CVS commit: src/external/gpl3/gcc/dist/gcc/config/sparc

2014-01-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan  3 08:30:41 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/sparc: constraints.md
predicates.md sync.md

Log Message:
Port from newer gcc:
Add a mem_noofs_operand predicate and corresponding w constraint.
Use those instead of memory_reg_operand/m for some atomic instrinsic
patterns: casx (and friends) do not accept an offset from the pointer
register (they are synthetic instructions mapping to e.g. casxa [..]
ASI_P, ... and the opcode space encoding offsets in other instructions
is needed to encode the ASI here).

This fixes the build of gtk+-3.10.6 from pkgsrc on sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/gcc/config/sparc/constraints.md \
src/external/gpl3/gcc/dist/gcc/config/sparc/predicates.md \
src/external/gpl3/gcc/dist/gcc/config/sparc/sync.md

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/sparc/constraints.md
diff -u src/external/gpl3/gcc/dist/gcc/config/sparc/constraints.md:1.1.1.1 src/external/gpl3/gcc/dist/gcc/config/sparc/constraints.md:1.2
--- src/external/gpl3/gcc/dist/gcc/config/sparc/constraints.md:1.1.1.1	Tue Jun 21 01:22:24 2011
+++ src/external/gpl3/gcc/dist/gcc/config/sparc/constraints.md	Fri Jan  3 08:30:41 2014
@@ -141,6 +141,10 @@
  Memory reference for 'e' constraint floating-point register
  (and (match_code mem,reg)
   (match_test memory_ok_for_ldd (op
+  
+(define_memory_constraint w
+  A memory with only a base register
+  (match_operand 0 mem_noofs_operand))
 
 (define_constraint Y
  The vector zero constant
Index: src/external/gpl3/gcc/dist/gcc/config/sparc/predicates.md
diff -u src/external/gpl3/gcc/dist/gcc/config/sparc/predicates.md:1.1.1.1 src/external/gpl3/gcc/dist/gcc/config/sparc/predicates.md:1.2
--- src/external/gpl3/gcc/dist/gcc/config/sparc/predicates.md:1.1.1.1	Tue Jun 21 01:22:24 2011
+++ src/external/gpl3/gcc/dist/gcc/config/sparc/predicates.md	Fri Jan  3 08:30:41 2014
@@ -427,6 +427,9 @@
   (and (match_code mem)
(match_test call_address_operand (XEXP (op, 0), mode
 
+(define_predicate mem_noofs_operand
+  (and (match_code mem)
+   (match_code reg 0)))
 
 ;; Predicates for operators.
 
Index: src/external/gpl3/gcc/dist/gcc/config/sparc/sync.md
diff -u src/external/gpl3/gcc/dist/gcc/config/sparc/sync.md:1.1.1.1 src/external/gpl3/gcc/dist/gcc/config/sparc/sync.md:1.2
--- src/external/gpl3/gcc/dist/gcc/config/sparc/sync.md:1.1.1.1	Tue Jun 21 01:22:25 2011
+++ src/external/gpl3/gcc/dist/gcc/config/sparc/sync.md	Fri Jan  3 08:30:41 2014
@@ -81,7 +81,7 @@
 
 (define_insn *sync_compare_and_swapmode
   [(set (match_operand:I48MODE 0 register_operand =r)
-	(match_operand:I48MODE 1 memory_reg_operand +m))
+	(match_operand:I48MODE 1 mem_noofs_operand +w))
(set (match_dup 1)
 	(unspec_volatile:I48MODE
 	  [(match_operand:I48MODE 2 register_operand r)
@@ -93,7 +93,7 @@
 
 (define_insn *sync_compare_and_swapdi_v8plus
   [(set (match_operand:DI 0 register_operand =h)
-	(match_operand:DI 1 memory_reg_operand +m))
+	(match_operand:DI 1 mem_noofs_operand +w))
(set (match_dup 1)
 	(unspec_volatile:DI
 	  [(match_operand:DI 2 register_operand h)



CVS commit: src/sys/fs/tmpfs

2014-01-03 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jan  3 09:53:12 UTC 2014

Modified Files:
src/sys/fs/tmpfs: tmpfs_subr.c tmpfs_vnops.c

Log Message:
Fix a race where thread1 runs VOP_REMOVE() and gets preempted in
tmpfs_reclaim() before the call to tmpfs_free_node().  Thread2
runs VFS_FHTOVP() and gets a new vnode attached to the node thread1
is about to destroy.

Change tmpfs_alloc_node() to always assign non-zero generation number
and tmpfs_inactive() to set the generation number of unlinked nodes
to zero.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/fs/tmpfs/tmpfs_subr.c
cvs rdiff -u -r1.110 -r1.111 src/sys/fs/tmpfs/tmpfs_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/tmpfs/tmpfs_subr.c
diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.92 src/sys/fs/tmpfs/tmpfs_subr.c:1.93
--- src/sys/fs/tmpfs/tmpfs_subr.c:1.92	Sun Nov 24 17:16:29 2013
+++ src/sys/fs/tmpfs/tmpfs_subr.c	Fri Jan  3 09:53:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_subr.c,v 1.92 2013/11/24 17:16:29 rmind Exp $	*/
+/*	$NetBSD: tmpfs_subr.c,v 1.93 2014/01/03 09:53:12 hannken Exp $	*/
 
 /*
  * Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tmpfs_subr.c,v 1.92 2013/11/24 17:16:29 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: tmpfs_subr.c,v 1.93 2014/01/03 09:53:12 hannken Exp $);
 
 #include sys/param.h
 #include sys/cprng.h
@@ -127,7 +127,13 @@ tmpfs_alloc_node(tmpfs_mount_t *tmp, enu
 	 * for applications that do not understand 64-bit ino_t.
 	 */
 	nnode-tn_id = (ino_t)((uintptr_t)nnode / sizeof(*nnode));
-	nnode-tn_gen = TMPFS_NODE_GEN_MASK  cprng_fast32();
+	/*
+	 * Make sure the generation number is not zero.
+	 * tmpfs_inactive() uses generation zero to mark dead nodes.
+	 */
+	do {
+		nnode-tn_gen = TMPFS_NODE_GEN_MASK  cprng_fast32();
+	} while (nnode-tn_gen == 0);
 
 	/* Generic initialization. */
 	nnode-tn_type = type;
@@ -252,6 +258,7 @@ tmpfs_free_node(tmpfs_mount_t *tmp, tmpf
 	default:
 		break;
 	}
+	KASSERT(node-tn_vnode == NULL);
 	KASSERT(node-tn_links == 0);
 
 	mutex_destroy(node-tn_vlock);

Index: src/sys/fs/tmpfs/tmpfs_vnops.c
diff -u src/sys/fs/tmpfs/tmpfs_vnops.c:1.110 src/sys/fs/tmpfs/tmpfs_vnops.c:1.111
--- src/sys/fs/tmpfs/tmpfs_vnops.c:1.110	Tue Dec 24 09:23:33 2013
+++ src/sys/fs/tmpfs/tmpfs_vnops.c	Fri Jan  3 09:53:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_vnops.c,v 1.110 2013/12/24 09:23:33 hannken Exp $	*/
+/*	$NetBSD: tmpfs_vnops.c,v 1.111 2014/01/03 09:53:12 hannken Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.110 2013/12/24 09:23:33 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.111 2014/01/03 09:53:12 hannken Exp $);
 
 #include sys/param.h
 #include sys/dirent.h
@@ -49,6 +49,7 @@ __KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.
 #include sys/vnode.h
 #include sys/lockf.h
 #include sys/kauth.h
+#include sys/atomic.h
 
 #include uvm/uvm.h
 
@@ -1052,7 +1053,15 @@ tmpfs_inactive(void *v)
 	KASSERT(VOP_ISLOCKED(vp));
 
 	node = VP_TO_TMPFS_NODE(vp);
-	*ap-a_recycle = (node-tn_links == 0);
+	if (node-tn_links == 0) {
+		/*
+		 * Mark node as dead by setting its generation to zero.
+		 */
+		atomic_and_32(node-tn_gen, ~TMPFS_NODE_GEN_MASK);
+		*ap-a_recycle = true;
+	} else {
+		*ap-a_recycle = false;
+	}
 	VOP_UNLOCK(vp);
 
 	return 0;



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

2014-01-03 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Fri Jan  3 10:30:47 UTC 2014

Modified Files:
src/sys/arch/amiga/conf: files.amiga

Log Message:
Fix undefined reference to amiga_bus_stride_0x1000.


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/sys/arch/amiga/conf/files.amiga

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/amiga/conf/files.amiga
diff -u src/sys/arch/amiga/conf/files.amiga:1.174 src/sys/arch/amiga/conf/files.amiga:1.175
--- src/sys/arch/amiga/conf/files.amiga:1.174	Fri Jan  3 00:33:06 2014
+++ src/sys/arch/amiga/conf/files.amiga	Fri Jan  3 10:30:47 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amiga,v 1.174 2014/01/03 00:33:06 rkujawa Exp $
+#	$NetBSD: files.amiga,v 1.175 2014/01/03 10:30:47 rkujawa Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16			# NOTE THAT AMIGA IS SPECIAL!
@@ -486,7 +486,7 @@ include dev/pcmcia/files.pcmcia
 include dev/ata/files.ata
 
 # Amiga 4000/1200 IDE using MI wdc
-attach	wdc at mainbus with wdc_amiga: gayle
+attach	wdc at mainbus with wdc_amiga: gayle, amibus_b1000
 file	arch/amiga/dev/wdc_amiga.c	wdc_amiga
 
 # Buddha wdc
@@ -494,7 +494,7 @@ attach	wdc at zbus with wdc_buddha
 file	arch/amiga/dev/wdc_buddha.c	wdc_buddha
 
 # FastATA 
-device  efa: ata,wdc_common
+device  efa: ata, wdc_common, amibus_b1000
 attach  efa at mainbus
 filearch/amiga/dev/efa.c		efa
 



CVS commit: src/sys/external/bsd/dwc2

2014-01-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan  3 12:07:37 UTC 2014

Modified Files:
src/sys/external/bsd/dwc2: dwc2.c

Log Message:
Change a KASSERT to a KASSERTMSG and add a DPRINTFN.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/external/bsd/dwc2/dwc2.c

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

Modified files:

Index: src/sys/external/bsd/dwc2/dwc2.c
diff -u src/sys/external/bsd/dwc2/dwc2.c:1.23 src/sys/external/bsd/dwc2/dwc2.c:1.24
--- src/sys/external/bsd/dwc2/dwc2.c:1.23	Thu Jan  2 15:54:10 2014
+++ src/sys/external/bsd/dwc2/dwc2.c	Fri Jan  3 12:07:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc2.c,v 1.23 2014/01/02 15:54:10 skrll Exp $	*/
+/*	$NetBSD: dwc2.c,v 1.24 2014/01/03 12:07:37 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc2.c,v 1.23 2014/01/02 15:54:10 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc2.c,v 1.24 2014/01/03 12:07:37 skrll Exp $);
 
 #include opt_usb.h
 
@@ -343,7 +343,8 @@ dwc2_softintr(void *v)
 	mutex_spin_enter(hsotg-lock);
 	while ((dxfer = TAILQ_FIRST(sc-sc_complete)) != NULL) {
 
-		KASSERT(!callout_pending(dxfer-xfer.timeout_handle));
+		KASSERTMSG(!callout_pending(dxfer-xfer.timeout_handle), 
+		xfer %p pipe %p\n, dxfer, dxfer-xfer.pipe);
 
 		/*
 		 * dwc2_abort_xfer will remove this transfer from the
@@ -1702,6 +1703,8 @@ void dwc2_host_complete(struct dwc2_hsot
 
 	xfer-actlen = dwc2_hcd_urb_get_actual_length(qtd-urb);
 
+	DPRINTFN(3, xfer=%p actlen=%d\n, xfer, xfer-actlen);
+
 	if (xfertype == UE_ISOCHRONOUS  dbg_perio()) {
 		int i;
 



CVS commit: src/sys/external/bsd/dwc2

2014-01-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan  3 12:20:26 UTC 2014

Modified Files:
src/sys/external/bsd/dwc2: dwc2.c

Log Message:
Call callout_reset on the xfer timeoute_handle before calling
dwc2_hcd_urb_enqueue


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/external/bsd/dwc2/dwc2.c

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

Modified files:

Index: src/sys/external/bsd/dwc2/dwc2.c
diff -u src/sys/external/bsd/dwc2/dwc2.c:1.24 src/sys/external/bsd/dwc2/dwc2.c:1.25
--- src/sys/external/bsd/dwc2/dwc2.c:1.24	Fri Jan  3 12:07:37 2014
+++ src/sys/external/bsd/dwc2/dwc2.c	Fri Jan  3 12:20:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc2.c,v 1.24 2014/01/03 12:07:37 skrll Exp $	*/
+/*	$NetBSD: dwc2.c,v 1.25 2014/01/03 12:20:26 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc2.c,v 1.24 2014/01/03 12:07:37 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc2.c,v 1.25 2014/01/03 12:20:26 skrll Exp $);
 
 #include opt_usb.h
 
@@ -1381,16 +1381,16 @@ dwc2_device_start(usbd_xfer_handle xfer)
 	/* might need to check cpu_intr_p */
 	mutex_spin_enter(hsotg-lock);
 
-	dwc2_urb-priv = xfer;
-	retval = dwc2_hcd_urb_enqueue(hsotg, dwc2_urb, dpipe-priv, 0);
-	if (retval)
-		goto fail;
-
 	if (xfer-timeout  !sc-sc_bus.use_polling) {
 		callout_reset(xfer-timeout_handle, mstohz(xfer-timeout),
 		dwc2_timeout, xfer);
 	}
 
+	dwc2_urb-priv = xfer;
+	retval = dwc2_hcd_urb_enqueue(hsotg, dwc2_urb, dpipe-priv, 0);
+	if (retval)
+		goto fail;
+
 	if (alloc_bandwidth) {
 		dwc2_allocate_bus_bandwidth(hsotg,
 dwc2_hcd_get_ep_bandwidth(hsotg, dpipe),



CVS commit: src/sys/net

2014-01-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  3 12:50:00 UTC 2014

Modified Files:
src/sys/net: if.c

Log Message:
missed one inet6 check


To generate a diff of this commit:
cvs rdiff -u -r1.270 -r1.271 src/sys/net/if.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/net/if.c
diff -u src/sys/net/if.c:1.270 src/sys/net/if.c:1.271
--- src/sys/net/if.c:1.270	Thu Jan  2 18:29:01 2014
+++ src/sys/net/if.c	Fri Jan  3 12:49:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.270 2014/01/02 18:29:01 pooka Exp $	*/
+/*	$NetBSD: if.c,v 1.271 2014/01/03 12:49:59 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.270 2014/01/02 18:29:01 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.271 2014/01/03 12:49:59 pooka Exp $);
 
 #include opt_inet.h
 
@@ -1685,7 +1685,8 @@ ifioctl_common(struct ifnet *ifp, u_long
 		 * If the link MTU changed, do network layer specific procedure.
 		 */
 #ifdef INET6
-		nd6_setmtu(ifp);
+		if (in6_present)
+			nd6_setmtu(ifp);
 #endif
 		return ENETRESET;
 	default:



CVS commit: src/tests/net/mpls

2014-01-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  3 13:14:50 UTC 2014

Modified Files:
src/tests/net/mpls: t_ldp_regen.sh

Log Message:
ldpd wants inet6


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/net/mpls/t_ldp_regen.sh

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

Modified files:

Index: src/tests/net/mpls/t_ldp_regen.sh
diff -u src/tests/net/mpls/t_ldp_regen.sh:1.2 src/tests/net/mpls/t_ldp_regen.sh:1.3
--- src/tests/net/mpls/t_ldp_regen.sh:1.2	Sat Jul 27 14:36:39 2013
+++ src/tests/net/mpls/t_ldp_regen.sh	Fri Jan  3 13:14:50 2014
@@ -1,4 +1,4 @@
-# $NetBSD: t_ldp_regen.sh,v 1.2 2013/07/27 14:36:39 kefren Exp $
+# $NetBSD: t_ldp_regen.sh,v 1.3 2014/01/03 13:14:50 pooka Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -41,7 +41,7 @@ RUMP_SERVER2=unix://./r2
 RUMP_SERVER3=unix://./r3
 RUMP_SERVER4=unix://./r4
 
-RUMP_LIBS=-lrumpnet -lrumpnet_net -lrumpnet_netmpls -lrumpnet_netinet -lrumpnet_shmif
+RUMP_LIBS=-lrumpnet -lrumpnet_net -lrumpnet_netmpls -lrumpnet_netinet -lrumpnet_netinet6 -lrumpnet_shmif
 LDP_FLAGS=
 
 atf_test_case ldp_regen cleanup



CVS commit: src/tests/lib/librumphijack

2014-01-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan  3 13:18:00 UTC 2014

Modified Files:
src/tests/lib/librumphijack: t_tcpip.sh

Log Message:
netstat expected output includes ipv6 sucket, so add netinet6


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/librumphijack/t_tcpip.sh

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

Modified files:

Index: src/tests/lib/librumphijack/t_tcpip.sh
diff -u src/tests/lib/librumphijack/t_tcpip.sh:1.12 src/tests/lib/librumphijack/t_tcpip.sh:1.13
--- src/tests/lib/librumphijack/t_tcpip.sh:1.12	Thu Aug 16 12:57:24 2012
+++ src/tests/lib/librumphijack/t_tcpip.sh	Fri Jan  3 13:18:00 2014
@@ -1,4 +1,4 @@
-#   $NetBSD: t_tcpip.sh,v 1.12 2012/08/16 12:57:24 pgoyette Exp $
+#   $NetBSD: t_tcpip.sh,v 1.13 2014/01/03 13:18:00 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -37,7 +37,7 @@ http_head()
 http_body()
 {
 
-	atf_check -s exit:0 ${rumpnetsrv} ${RUMP_SERVER}
+	atf_check -s exit:0 ${rumpnetsrv} -lrumpnet_netinet6 ${RUMP_SERVER}
 
 	# start bozo in daemon mode
 	atf_check -s exit:0 env LD_PRELOAD=/usr/lib/librumphijack.so \



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

2014-01-03 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Fri Jan  3 14:40:54 UTC 2014

Modified Files:
src/sys/arch/evbarm/conf: OPENBLOCKS_A6

Log Message:
Change wildcard for mvgbe configuration.  Don't attach, if clock was disabled.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/OPENBLOCKS_A6

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/evbarm/conf/OPENBLOCKS_A6
diff -u src/sys/arch/evbarm/conf/OPENBLOCKS_A6:1.17 src/sys/arch/evbarm/conf/OPENBLOCKS_A6:1.18
--- src/sys/arch/evbarm/conf/OPENBLOCKS_A6:1.17	Sat Oct  5 06:14:48 2013
+++ src/sys/arch/evbarm/conf/OPENBLOCKS_A6	Fri Jan  3 14:40:54 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: OPENBLOCKS_A6,v 1.17 2013/10/05 06:14:48 kiyohara Exp $
+#	$NetBSD: OPENBLOCKS_A6,v 1.18 2014/01/03 14:40:54 kiyohara Exp $
 #
 #	OPENBLOCKS_A6 -- Plat'Home. OpenBlockS A6 kernel
 #
@@ -171,10 +171,8 @@ mvsoc0	at mainbus?
 mvsata* at mvsoc? offset ? irq ?
 
 # On-chip Gigabit Ethernet Controller Interface
-mvgbec0 at mvsoc? offset 0x7
-mvgbe*	at mvgbec0 port 0 irq ?
-#mvgbec1 at mvsoc? offset 0x74000
-#mvgbe*	at mvgbec1 port 0 irq ?
+mvgbec* at mvsoc? offset ?
+mvgbe*	at mvgbec? port ? irq ?
 makphy* at mii? phy ?
 
 # On-chip USB 2.0 Interface



CVS commit: src/sys/external/bsd/dwc2

2014-01-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan  3 14:41:57 UTC 2014

Modified Files:
src/sys/external/bsd/dwc2: dwc2.c

Log Message:
Small bit of tidyup and remove a XXX now that it's possible.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/external/bsd/dwc2/dwc2.c

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

Modified files:

Index: src/sys/external/bsd/dwc2/dwc2.c
diff -u src/sys/external/bsd/dwc2/dwc2.c:1.25 src/sys/external/bsd/dwc2/dwc2.c:1.26
--- src/sys/external/bsd/dwc2/dwc2.c:1.25	Fri Jan  3 12:20:26 2014
+++ src/sys/external/bsd/dwc2/dwc2.c	Fri Jan  3 14:41:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc2.c,v 1.25 2014/01/03 12:20:26 skrll Exp $	*/
+/*	$NetBSD: dwc2.c,v 1.26 2014/01/03 14:41:57 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc2.c,v 1.25 2014/01/03 12:20:26 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc2.c,v 1.26 2014/01/03 14:41:57 skrll Exp $);
 
 #include opt_usb.h
 
@@ -1313,14 +1313,15 @@ dwc2_device_start(usbd_xfer_handle xfer)
 	}
 	flags |= URB_GIVEBACK_ASAP;
 
-	/* XXXNH this shouldn't be required */
-	if (xfertype == UE_CONTROL  len == 0) {
-		dwc2_urb-usbdma = dpipe-req_dma;
-	} else {
-		dwc2_urb-usbdma = xfer-dmabuf;
-	}
-	dwc2_urb-buf = KERNADDR(dwc2_urb-usbdma, 0);
-	dwc2_urb-dma = DMAADDR(dwc2_urb-usbdma, 0);
+	/*
+	 * control transfers with no data phase don't touch usbdma, but
+	 * everything else does.
+	 */
+	if (!(xfertype == UE_CONTROL  len == 0)) {
+		dwc2_urb-usbdma = xfer-dmabuf;
+		dwc2_urb-buf = KERNADDR(dwc2_urb-usbdma, 0);
+		dwc2_urb-dma = DMAADDR(dwc2_urb-usbdma, 0);
+ 	}
 	dwc2_urb-length = len;
  	dwc2_urb-flags = flags;
 	dwc2_urb-status = -EINPROGRESS;



CVS commit: src/sys

2014-01-03 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Fri Jan  3 15:15:02 UTC 2014

Modified Files:
src/sys/kern: core_elf32.c core_netbsd.c
src/sys/uvm: uvm_coredump.c uvm_extern.h

Log Message:
Minor changes to the process coredump code.
- Add some extra comments.
- Add some XXX comments because the process state might not be stable,
- Add uvm_coredump_count_segs() to simplify the calling code.
- uvm code now only returns non-empty sections/segments.
- Put the 'iocookie' into the 'cookie' block passed to uvm_coredump_walkmap()
  instead of passing it through as an additional parameter.
amd64 can still generate core dumps that gdb can read.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.19 -r1.20 src/sys/kern/core_netbsd.c
cvs rdiff -u -r1.3 -r1.4 src/sys/uvm/uvm_coredump.c
cvs rdiff -u -r1.186 -r1.187 src/sys/uvm/uvm_extern.h

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

Modified files:

Index: src/sys/kern/core_elf32.c
diff -u src/sys/kern/core_elf32.c:1.37 src/sys/kern/core_elf32.c:1.38
--- src/sys/kern/core_elf32.c:1.37	Wed Jan  1 18:57:16 2014
+++ src/sys/kern/core_elf32.c	Fri Jan  3 15:15:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: core_elf32.c,v 1.37 2014/01/01 18:57:16 dsl Exp $	*/
+/*	$NetBSD: core_elf32.c,v 1.38 2014/01/03 15:15:02 dsl Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.37 2014/01/01 18:57:16 dsl Exp $);
+__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.38 2014/01/03 15:15:02 dsl Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_coredump.h
@@ -66,20 +66,13 @@ __KERNEL_RCSID(1, $NetBSD: core_elf32.c
 
 #ifdef COREDUMP
 
-struct countsegs_state {
-	int	npsections;
-};
-
-static int	ELFNAMEEND(coredump_countsegs)(struct proc *,
-		struct coredump_iostate *, struct uvm_coredump_state *);
-
 struct writesegs_state {
 	Elf_Phdr *psections;
 	off_t	secoff;
 };
 
-static int	ELFNAMEEND(coredump_writeseghdrs)(struct proc *,
-		struct coredump_iostate *, struct uvm_coredump_state *);
+static int	ELFNAMEEND(coredump_getseghdrs)(struct proc *,
+		struct uvm_coredump_state *);
 
 static int	ELFNAMEEND(coredump_notes)(struct proc *, struct lwp *,
 		struct coredump_iostate *, size_t *);
@@ -105,7 +98,7 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 	Elf_Ehdr ehdr;
 	Elf_Phdr phdr, *psections;
 	size_t psectionssize;
-	struct countsegs_state cs;
+	int npsections;
 	struct writesegs_state ws;
 	off_t notestart, secstart, offset;
 	size_t notesize;
@@ -117,7 +110,7 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 	 * We have to make a total of 3 passes across the map:
 	 *
 	 *	1. Count the number of map entries (the number of
-	 *	   PT_LOAD sections).
+	 *	   PT_LOAD sections in the dump).
 	 *
 	 *	2. Write the P-section headers.
 	 *
@@ -125,16 +118,11 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 	 */
 
 	/* Pass 1: count the entries. */
-	cs.npsections = 0;
-	error = uvm_coredump_walkmap(p, NULL,
-	ELFNAMEEND(coredump_countsegs), cs);
-	if (error)
-		goto out;
-
+	npsections = uvm_coredump_count_segs(p);
 	/* Count the PT_NOTE section. */
-	cs.npsections++;
+	npsections++;
 
-	/* Get the size of the notes. */
+	/* Get the size of the notes (mostly all the registers). */
 	error = ELFNAMEEND(coredump_notes)(p, l, NULL, notesize);
 	if (error)
 		goto out;
@@ -162,7 +150,7 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 	ehdr.e_flags = 0;
 	ehdr.e_ehsize = sizeof(ehdr);
 	ehdr.e_phentsize = sizeof(Elf_Phdr);
-	ehdr.e_phnum = cs.npsections;
+	ehdr.e_phnum = npsections;
 	ehdr.e_shentsize = 0;
 	ehdr.e_shnum = 0;
 	ehdr.e_shstrndx = 0;
@@ -178,21 +166,20 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 
 	offset = sizeof(ehdr);
 
-	notestart = offset + sizeof(phdr) * cs.npsections;
+	notestart = offset + sizeof(phdr) * npsections;
 	secstart = notestart + notesize;
 
-	psectionssize = cs.npsections * sizeof(Elf_Phdr);
+	psectionssize = npsections * sizeof(Elf_Phdr);
 	psections = kmem_zalloc(psectionssize, KM_SLEEP);
 
-	/* Pass 2: now write the P-section headers. */
+	/* Pass 2: now find the P-section headers. */
 	ws.secoff = secstart;
 	ws.psections = psections;
-	error = uvm_coredump_walkmap(p, cookie,
-	ELFNAMEEND(coredump_writeseghdrs), ws);
+	error = uvm_coredump_walkmap(p, ELFNAMEEND(coredump_getseghdrs), ws);
 	if (error)
 		goto out;
 
-	/* Write out the PT_NOTE header. */
+	/* Add the PT_NOTE header after the P-section headers. */
 	ws.psections-p_type = PT_NOTE;
 	ws.psections-p_offset = notestart;
 	ws.psections-p_vaddr = 0;
@@ -202,13 +189,14 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 	ws.psections-p_flags = PF_R;
 	ws.psections-p_align = ELFROUNDSIZE;
 
+	/* Write the P-section headers followed by the PT_NOTR header */
 	error = coredump_write(cookie, UIO_SYSSPACE, psections,
-	cs.npsections * sizeof(Elf_Phdr));
+	npsections * 

CVS commit: src/sys/kern

2014-01-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  3 15:49:49 UTC 2014

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

Log Message:
Simplify error path and fix typos. From Maxime Villard and me.


To generate a diff of this commit:
cvs rdiff -u -r1.368 -r1.369 src/sys/kern/kern_exec.c

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

Modified files:

Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.368 src/sys/kern/kern_exec.c:1.369
--- src/sys/kern/kern_exec.c:1.368	Tue Dec 24 09:47:04 2013
+++ src/sys/kern/kern_exec.c	Fri Jan  3 10:49:49 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.368 2013/12/24 14:47:04 christos Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.369 2014/01/03 15:49: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.368 2013/12/24 14:47:04 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.369 2014/01/03 15:49:49 christos Exp $);
 
 #include opt_exec.h
 #include opt_execfmt.h
@@ -1823,11 +1823,11 @@ spawn_exec_data_release(struct spawn_exe
  * A child lwp of a posix_spawn operation starts here and ends up in
  * cpu_spawn_return, dealing with all filedescriptor and scheduler
  * manipulations in between.
- * The parent waits for the child, as it is not clear wether the child
- * will be able to aquire its own exec_lock. If it can, the parent can
+ * The parent waits for the child, as it is not clear whether the child
+ * will be able to acquire its own exec_lock. If it can, the parent can
  * be released early and continue running in parallel. If not (or if the
  * magic debug flag is passed in the scheduler attribute struct), the
- * child rides on the parent's exec lock untill it is ready to return to
+ * child rides on the parent's exec lock until it is ready to return to
  * to userland - and only then releases the parent. This method loses
  * concurrency, but improves error reporting.
  */
@@ -2001,7 +2001,7 @@ spawn_return(void *arg)
 	/* release our refcount on the data */
 	spawn_exec_data_release(spawn_data);
 
-	/* and finaly: leave to userland for the first time */
+	/* and finally: leave to userland for the first time */
 	cpu_spawn_return(l);
 
 	/* NOTREACHED */
@@ -2071,15 +2071,9 @@ posix_spawn_fa_alloc(struct posix_spawn_
 
 	fa = kmem_alloc(sizeof(*fa), KM_SLEEP);
 	error = copyin(ufa, fa, sizeof(*fa));
-	if (error) {
-		fa-fae = NULL;
-		fa-len = 0;
-		goto out;
-	}
-
-	if (fa-len == 0) {
+	if (error || fa-len == 0) {
 		kmem_free(fa, sizeof(*fa));
-		return 0;
+		return error;	/* 0 if not an error, and len == 0 */
 	}
 
 	fa-size = fa-len;



CVS commit: src/sys/dev/ic

2014-01-03 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Jan  3 15:57:12 UTC 2014

Modified Files:
src/sys/dev/ic: ct65550.c

Log Message:
do as joerg requested and mark an unused function __unused


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/ct65550.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/ic/ct65550.c
diff -u src/sys/dev/ic/ct65550.c:1.8 src/sys/dev/ic/ct65550.c:1.9
--- src/sys/dev/ic/ct65550.c:1.8	Wed Oct  9 17:20:54 2013
+++ src/sys/dev/ic/ct65550.c	Fri Jan  3 15:57:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ct65550.c,v 1.8 2013/10/09 17:20:54 macallan Exp $	*/
+/*	$NetBSD: ct65550.c,v 1.9 2014/01/03 15:57:12 macallan Exp $	*/
 
 /*
  * Copyright (c) 2006 Michael Lorenz
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ct65550.c,v 1.8 2013/10/09 17:20:54 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: ct65550.c,v 1.9 2014/01/03 15:57:12 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -151,7 +151,7 @@ chipsfb_read_vga(struct chipsfb_softc *s
 	return bus_space_read_1(sc-sc_iot, sc-sc_ioregh, reg);
 }
 
-static inline uint8_t
+__unused static inline uint8_t
 chipsfb_read_indexed(struct chipsfb_softc *sc, uint32_t reg, uint8_t index)
 {
 



CVS commit: src/sys/dev/pci

2014-01-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan  3 16:07:27 UTC 2014

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

Log Message:
If you're going to build this driver as a module, make sure that it
depends on opencrypto module.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/ubsec.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/ubsec.c
diff -u src/sys/dev/pci/ubsec.c:1.35 src/sys/dev/pci/ubsec.c:1.36
--- src/sys/dev/pci/ubsec.c:1.35	Thu Dec 26 00:51:23 2013
+++ src/sys/dev/pci/ubsec.c	Fri Jan  3 16:07:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ubsec.c,v 1.35 2013/12/26 00:51:23 bad Exp $	*/
+/*	$NetBSD: ubsec.c,v 1.36 2014/01/03 16:07:27 pgoyette Exp $	*/
 /* $FreeBSD: src/sys/dev/ubsec/ubsec.c,v 1.6.2.6 2003/01/23 21:06:43 sam Exp $ */
 /*	$OpenBSD: ubsec.c,v 1.127 2003/06/04 14:04:58 jason Exp $	*/
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ubsec.c,v 1.35 2013/12/26 00:51:23 bad Exp $);
+__KERNEL_RCSID(0, $NetBSD: ubsec.c,v 1.36 2014/01/03 16:07:27 pgoyette Exp $);
 
 #undef UBSEC_DEBUG
 
@@ -592,7 +592,7 @@ ubsec_detach(device_t self, int flags)
 	return 0;
 }
 
-MODULE(MODULE_CLASS_DRIVER, ubsec, pci);
+MODULE(MODULE_CLASS_DRIVER, ubsec, pci,opencrypto);
 
 #ifdef _MODULE
 #include ioconf.c



CVS commit: src/sys/dev/pci

2014-01-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan  3 16:09:22 UTC 2014

Modified Files:
src/sys/dev/pci: hifn7751.c hifn7751var.h

Log Message:
Modularize


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/hifn7751.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/hifn7751var.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/hifn7751.c
diff -u src/sys/dev/pci/hifn7751.c:1.52 src/sys/dev/pci/hifn7751.c:1.53
--- src/sys/dev/pci/hifn7751.c:1.52	Thu Jun 13 00:55:01 2013
+++ src/sys/dev/pci/hifn7751.c	Fri Jan  3 16:09:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: hifn7751.c,v 1.52 2013/06/13 00:55:01 tls Exp $	*/
+/*	$NetBSD: hifn7751.c,v 1.53 2014/01/03 16:09:22 pgoyette Exp $	*/
 /*	$FreeBSD: hifn7751.c,v 1.5.2.7 2003/10/08 23:52:00 sam Exp $ */
 /*	$OpenBSD: hifn7751.c,v 1.140 2003/08/01 17:55:54 deraadt Exp $	*/
 
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hifn7751.c,v 1.52 2013/06/13 00:55:01 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: hifn7751.c,v 1.53 2014/01/03 16:09:22 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -59,6 +59,7 @@ __KERNEL_RCSID(0, $NetBSD: hifn7751.c,v
 #include sys/kernel.h
 #include sys/mbuf.h
 #include sys/device.h
+#include sys/module.h
 
 #ifdef __OpenBSD__
 #include crypto/crypto.h
@@ -101,9 +102,15 @@ static int hifn_probe((struct device *, 
 static int hifn_probe(device_t, cfdata_t, void *);
 #endif
 static void hifn_attach(device_t, device_t, void *);
+#ifdef __NetBSD__
+static int hifn_detach(device_t, int);
 
 CFATTACH_DECL_NEW(hifn, sizeof(struct hifn_softc),
+hifn_probe, hifn_attach, hifn_detach, NULL);
+#else
+CFATTACH_DECL_NEW(hifn, sizeof(struct hifn_softc),
 hifn_probe, hifn_attach, NULL, NULL);
+#endif
 
 #ifdef __OpenBSD__
 struct cfdriver hifn_cd = {
@@ -241,7 +248,12 @@ hifn_attach(device_t parent, device_t se
 	const char *intrstr = NULL;
 	const char *hifncap;
 	char rbase;
+#ifdef __NetBSD__
+#define iosize0 sc-sc_iosz0
+#define iosize1 sc-sc_iosz1
+#else
 	bus_size_t iosize0, iosize1;
+#endif
 	u_int32_t cmd;
 	u_int16_t ena;
 	bus_dma_segment_t seg;
@@ -453,6 +465,70 @@ fail_io0:
 	bus_space_unmap(sc-sc_st0, sc-sc_sh0, iosize0);
 }
 
+#ifdef __NetBSD__
+static int
+hifn_detach(device_t self, int flags)
+{
+	struct hifn_softc *sc = device_private(self);
+
+	hifn_abort(sc);
+
+	hifn_reset_board(sc, 1);
+
+	pci_intr_disestablish(sc-sc_pci_pc, sc-sc_ih);
+
+	crypto_unregister_all(sc-sc_cid);
+
+	rnd_detach_source(sc-sc_rnd_source);
+
+	mutex_enter(sc-sc_mtx);
+	callout_halt(sc-sc_tickto, NULL);
+	if (sc-sc_flags  (HIFN_HAS_PUBLIC | HIFN_HAS_RNG))
+		callout_halt(sc-sc_rngto, NULL);
+	mutex_exit(sc-sc_mtx);
+
+	bus_space_unmap(sc-sc_st1, sc-sc_sh1, sc-sc_iosz1);
+	bus_space_unmap(sc-sc_st0, sc-sc_sh0, sc-sc_iosz0);
+
+	/*
+	 * XXX It's not clear if any additional buffers have been
+	 * XXX allocated and require free()ing
+	 */
+
+	return 0;
+}
+
+MODULE(MODULE_CLASS_DRIVER, hifn, pci,opencrypto);
+
+#ifdef _MODULE
+#include ioconf.c
+#endif
+
+static int
+hifn_modcmd(modcmd_t cmd, void *data)
+{
+	int error = 0;
+
+	switch(cmd) {
+	case MODULE_CMD_INIT:
+#ifdef _MODULE
+		error = config_init_component(cfdriver_ioconf_hifn,
+		cfattach_ioconf_hifn, cfdata_ioconf_hifn);
+#endif
+		return error;
+	case MODULE_CMD_FINI:
+#ifdef _MODULE
+		error = config_fini_component(cfdriver_ioconf_hifn,
+		cfattach_ioconf_hifn, cfdata_ioconf_hifn);
+#endif
+		return error;
+	default:
+		return ENOTTY;
+	}
+}
+
+#endif /* ifdef __NetBSD__ */
+
 static void
 hifn_rng_get(size_t bytes, void *priv)
 {

Index: src/sys/dev/pci/hifn7751var.h
diff -u src/sys/dev/pci/hifn7751var.h:1.10 src/sys/dev/pci/hifn7751var.h:1.11
--- src/sys/dev/pci/hifn7751var.h:1.10	Thu Jun 13 00:55:01 2013
+++ src/sys/dev/pci/hifn7751var.h	Fri Jan  3 16:09:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: hifn7751var.h,v 1.10 2013/06/13 00:55:01 tls Exp $	*/
+/*	$NetBSD: hifn7751var.h,v 1.11 2014/01/03 16:09:22 pgoyette Exp $	*/
 /*	$OpenBSD: hifn7751var.h,v 1.18 2000/06/02 22:36:45 deraadt Exp $	*/
 
 /*
@@ -144,6 +144,9 @@ struct hifn_softc {
 
 	bus_space_handle_t	sc_sh0, sc_sh1;
 	bus_space_tag_t		sc_st0, sc_st1;
+#ifdef __NetBSD__
+	bus_size_t		sc_iosz0, sc_iosz1;
+#endif
 	bus_dma_tag_t		sc_dmat;
 
 	struct hifn_dma *sc_dma;



CVS commit: src/sys/modules/hifn

2014-01-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan  3 16:12:49 UTC 2014

Added Files:
src/sys/modules/hifn: Makefile hifn.ioconf

Log Message:
Add module glue for hifn(4)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/modules/hifn/Makefile \
src/sys/modules/hifn/hifn.ioconf

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

Added files:

Index: src/sys/modules/hifn/Makefile
diff -u /dev/null src/sys/modules/hifn/Makefile:1.1
--- /dev/null	Fri Jan  3 16:12:49 2014
+++ src/sys/modules/hifn/Makefile	Fri Jan  3 16:12:49 2014
@@ -0,0 +1,11 @@
+#	$NetBSD: Makefile,v 1.1 2014/01/03 16:12:49 pgoyette Exp $
+
+.include ../Makefile.inc
+
+.PATH:	${S}/dev/pci
+
+KMOD=	hifn
+IOCONF=	hifn.ioconf
+SRCS=	hifn7751.c
+
+.include bsd.kmodule.mk
Index: src/sys/modules/hifn/hifn.ioconf
diff -u /dev/null src/sys/modules/hifn/hifn.ioconf:1.1
--- /dev/null	Fri Jan  3 16:12:49 2014
+++ src/sys/modules/hifn/hifn.ioconf	Fri Jan  3 16:12:49 2014
@@ -0,0 +1,10 @@
+#	$NetBSD: hifn.ioconf,v 1.1 2014/01/03 16:12:49 pgoyette Exp $
+
+ioconf hifn
+
+include conf/files
+include dev/pci/files.pci
+
+pseudo-root pci*
+
+hifn* at pci? dev ? function ?



CVS commit: src/sys/modules

2014-01-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan  3 16:16:10 UTC 2014

Modified Files:
src/sys/modules: Makefile

Log Message:
Add hifn(4) and ubsec(4) to the NOTYET section, and note that they can
be successfully built only on architectures that have PCI.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/modules/Makefile

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

Modified files:

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.134 src/sys/modules/Makefile:1.135
--- src/sys/modules/Makefile:1.134	Wed Jan  1 16:06:00 2014
+++ src/sys/modules/Makefile	Fri Jan  3 16:16:10 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.134 2014/01/01 16:06:00 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.135 2014/01/03 16:16:10 pgoyette Exp $
 
 .include bsd.own.mk
 
@@ -103,6 +103,8 @@ SUBDIR+=	vnd
 SUBDIR+=	zlib
 SUBDIR+=	tprof
 .if (defined(NOTYET))
+SUBDIR+=	hifn		# Builds on architectures with PCI bus
+SUBDIR+=	ubsec		# Builds on architectures with PCI bus
 SUBDIR+=	unionfs
 .endif
 .if ${MKBINUTILS} != no



CVS commit: src/sys/arch

2014-01-03 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Fri Jan  3 16:40:58 UTC 2014

Modified Files:
src/sys/arch/atari/stand/tostools/libtos: exec_elf.h
src/sys/arch/epoc32/stand/e32boot/include: elf.h

Log Message:
Remove the _KERNEL part of these two clones of sys/exec_elf.h
Remove the incorrect (and completely unused everywhere) Elf64_Shalf.
Put a better include guard on arch/epoc32/stand/e32boot/include/elf.h
Should be ok because I can't find any references to KERNEL in these
  source trees.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/stand/tostools/libtos/exec_elf.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/stand/e32boot/include/elf.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/atari/stand/tostools/libtos/exec_elf.h
diff -u src/sys/arch/atari/stand/tostools/libtos/exec_elf.h:1.6 src/sys/arch/atari/stand/tostools/libtos/exec_elf.h:1.7
--- src/sys/arch/atari/stand/tostools/libtos/exec_elf.h:1.6	Sat Aug 28 21:30:02 2010
+++ src/sys/arch/atari/stand/tostools/libtos/exec_elf.h	Fri Jan  3 16:40:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.6 2010/08/28 21:30:02 joerg Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.7 2014/01/03 16:40:58 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -76,8 +76,6 @@ typedef	__uint64_t	Elf64_Addr;
 #define	ELF64_FSZ_ADDR	8
 typedef	__uint64_t	Elf64_Off;
 #define	ELF64_FSZ_OFF	8
-typedef	__int32_t	Elf64_Shalf;
-#define	ELF64_FSZ_SHALF	4
 
 #ifdef __alpha__
 typedef	__int64_t	Elf64_Sword;
@@ -636,28 +634,4 @@ typedef struct {
 
 #define	AuxInfo		Aux32Info
 
-#ifdef _KERNEL
-
-#define ELF_AUX_ENTRIES	8		/* Size of aux array passed to loader */
-#define ELF32_NO_ADDR	(~(Elf32_Addr)0) /* Indicates addr. not yet filled in */
-#define ELF64_NO_ADDR	(~(Elf64_Addr)0) /* Indicates addr. not yet filled in */
-
-#if defined(ELFSIZE)  (ELFSIZE == 64)
-#define ELF_NO_ADDR	ELF64_NO_ADDR
-#elif defined(ELFSIZE)  (ELFSIZE == 32)
-#define ELF_NO_ADDR	ELF32_NO_ADDR
-#endif
-
-#if defined(ELFSIZE)
-struct elf_args {
-Elf_Addr  arg_entry;  /* program entry point */
-Elf_Addr  arg_interp; /* Interpreter load address */
-Elf_Addr  arg_phaddr; /* program header address */
-Elf_Addr  arg_phentsize;  /* Size of program header */
-Elf_Addr  arg_phnum;  /* Number of program headers */
-};
-#endif
-
-#endif /* _KERNEL */
-
 #endif /* !_LIBTOS_EXEC_ELF_H_ */

Index: src/sys/arch/epoc32/stand/e32boot/include/elf.h
diff -u src/sys/arch/epoc32/stand/e32boot/include/elf.h:1.2 src/sys/arch/epoc32/stand/e32boot/include/elf.h:1.3
--- src/sys/arch/epoc32/stand/e32boot/include/elf.h:1.2	Wed Jan  1 18:57:15 2014
+++ src/sys/arch/epoc32/stand/e32boot/include/elf.h	Fri Jan  3 16:40:58 2014
@@ -1,4 +1,5 @@
-/*	$NetBSD: elf.h,v 1.2 2014/01/01 18:57:15 dsl Exp $	*/
+/*	$NetBSD: elf.h,v 1.3 2014/01/03 16:40:58 dsl Exp $	*/
+@@
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -29,8 +30,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef _SYS_EXEC_ELF_H_
-#define _SYS_EXEC_ELF_H_
+#ifndef _STAND_E32BOOT_ELF_H_
+#define _STAND_E32BOOT_ELF_H_
 
 /*
  * The current ELF ABI specification is available at:
@@ -70,8 +71,6 @@ typedef uint64_t	Elf64_Addr;
 typedef uint64_t	Elf64_Off;
 typedef int64_t		Elf64_SOff;
 #define ELF64_FSZ_OFF	8
-typedef int32_t		Elf64_Shalf;
-#define ELF64_FSZ_SHALF 4
 
 typedef int32_t		Elf64_Sword;
 #define ELF64_FSZ_SWORD 4
@@ -1151,77 +1150,4 @@ typedef struct {
 } Elf32_Versym;
 typedef Elf32_Versym	Elf64_Versym;
 
-#ifdef _KERNEL
-
-#define ELF_AUX_ENTRIES 15	/* Max size of aux array passed to loader */
-#define ELF32_NO_ADDR	(~(Elf32_Addr)0) /* Indicates addr. not yet filled in */
-#define ELF32_LINK_ADDR ((Elf32_Addr)-2) /* advises to use link address */
-#define ELF64_NO_ADDR	(~(Elf64_Addr)0) /* Indicates addr. not yet filled in */
-#define ELF64_LINK_ADDR ((Elf64_Addr)-2) /* advises to use link address */
-
-#if defined(ELFSIZE)  (ELFSIZE == 64)
-#define ELF_NO_ADDR	ELF64_NO_ADDR
-#define ELF_LINK_ADDR	ELF64_LINK_ADDR
-#elif defined(ELFSIZE)  (ELFSIZE == 32)
-#define ELF_NO_ADDR	ELF32_NO_ADDR
-#define ELF_LINK_ADDR	ELF32_LINK_ADDR
-#endif
-
-#ifndef ELF32_EHDR_FLAGS_OK
-#define ELF32_EHDR_FLAGS_OK(eh) 1
-#endif
-
-#ifndef ELF64_EHDR_FLAGS_OK
-#define ELF64_EHDR_FLAGS_OK(eh) 1
-#endif
-
-#if defined(ELFSIZE)  (ELFSIZE == 64)
-#define ELF_EHDR_FLAGS_OK(eh)	ELF64_EHDR_FLAGS_OK(eh)
-#else
-#define ELF_EHDR_FLAGS_OK(eh)	ELF32_EHDR_FLAGS_OK(eh)
-#endif
-
-#if defined(ELFSIZE)
-struct elf_args {
-	Elf_Addr	arg_entry;	/* program entry point */
-	Elf_Addr	arg_interp;	/* Interpreter load address */
-	Elf_Addr	arg_phaddr;	/* program header address */
-	Elf_Addr	arg_phentsize;	/* Size of program header */
-	Elf_Addr	arg_phnum;	/* Number of program headers */
-};
-#endif
-
-#ifdef _KERNEL_OPT
-#include opt_execfmt.h
-#endif
-
-struct ps_strings;
-struct 

CVS commit: src

2014-01-03 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Fri Jan  3 16:50:54 UTC 2014

Modified Files:
src/sys/arch/xen/include/xen-public: elfstructs.h
src/tools/amiga-elf2bb/sys: exec_elf.h
src/tools/m68k-elf2aout/sys: exec_elf.h
src/tools/mips-elf2ecoff/sys: exec_elf.h

Log Message:
Remove the borked definition of ELF64_Shalf from some more places.
Remove the _KERNEL parts of some clones of sys/elf_exec.h
One might ask why this file has got cloned so many times.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/arch/xen/include/xen-public/elfstructs.h
cvs rdiff -u -r1.3 -r1.4 src/tools/amiga-elf2bb/sys/exec_elf.h
cvs rdiff -u -r1.1 -r1.2 src/tools/m68k-elf2aout/sys/exec_elf.h
cvs rdiff -u -r1.4 -r1.5 src/tools/mips-elf2ecoff/sys/exec_elf.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/xen/include/xen-public/elfstructs.h
diff -u src/sys/arch/xen/include/xen-public/elfstructs.h:1.1.1.1 src/sys/arch/xen/include/xen-public/elfstructs.h:1.2
--- src/sys/arch/xen/include/xen-public/elfstructs.h:1.1.1.1	Wed Dec  7 13:15:45 2011
+++ src/sys/arch/xen/include/xen-public/elfstructs.h	Fri Jan  3 16:50:54 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: elfstructs.h,v 1.1.1.1 2011/12/07 13:15:45 cegger Exp $ */
+/* $NetBSD: elfstructs.h,v 1.2 2014/01/03 16:50:54 dsl Exp $ */
 #ifndef __XEN_PUBLIC_ELFSTRUCTS_H__
 #define __XEN_PUBLIC_ELFSTRUCTS_H__ 1
 /*
@@ -37,7 +37,6 @@ typedef uint16_t	Elf32_Half;	/* Unsigned
 
 typedef uint64_t	Elf64_Addr;
 typedef uint64_t	Elf64_Off;
-typedef int32_t		Elf64_Shalf;
 
 typedef int32_t		Elf64_Sword;
 typedef uint32_t	Elf64_Word;

Index: src/tools/amiga-elf2bb/sys/exec_elf.h
diff -u src/tools/amiga-elf2bb/sys/exec_elf.h:1.3 src/tools/amiga-elf2bb/sys/exec_elf.h:1.4
--- src/tools/amiga-elf2bb/sys/exec_elf.h:1.3	Sat Aug 28 21:30:02 2010
+++ src/tools/amiga-elf2bb/sys/exec_elf.h	Fri Jan  3 16:50:54 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.3 2010/08/28 21:30:02 joerg Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.4 2014/01/03 16:50:54 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -63,8 +63,6 @@ typedef	uint64_t	Elf64_Addr;
 #define	ELF64_FSZ_ADDR	8
 typedef	uint64_t	Elf64_Off;
 #define	ELF64_FSZ_OFF	8
-typedef	int32_t		Elf64_Shalf;
-#define	ELF64_FSZ_SHALF	4
 
 #ifndef ELF64_FSZ_SWORD
 typedef	int32_t		Elf64_Sword;
@@ -754,75 +752,4 @@ struct netbsd_elfcore_procinfo {
 #define	AuxInfo		Aux64Info
 #endif
 
-#ifdef _KERNEL
-
-#define ELF_AUX_ENTRIES	12		/* Size of aux array passed to loader */
-#define ELF32_NO_ADDR	(~(Elf32_Addr)0) /* Indicates addr. not yet filled in */
-#define ELF32_LINK_ADDR	((Elf32_Addr)-2) /* advises to use link address */
-#define ELF64_NO_ADDR	(~(Elf64_Addr)0) /* Indicates addr. not yet filled in */
-#define ELF64_LINK_ADDR	((Elf64_Addr)-2) /* advises to use link address */
-
-#if defined(ELFSIZE)  (ELFSIZE == 64)
-#define ELF_NO_ADDR	ELF64_NO_ADDR
-#define ELF_LINK_ADDR	ELF64_LINK_ADDR
-#elif defined(ELFSIZE)  (ELFSIZE == 32)
-#define ELF_NO_ADDR	ELF32_NO_ADDR
-#define ELF_LINK_ADDR	ELF32_LINK_ADDR
-#endif
-
-#ifndef ELF32_EHDR_FLAGS_OK
-#define	ELF32_EHDR_FLAGS_OK(eh)	1
-#endif
-
-#ifndef ELF64_EHDR_FLAGS_OK
-#define	ELF64_EHDR_FLAGS_OK(eh)	1
-#endif
-
-#if defined(ELFSIZE)  (ELFSIZE == 64)
-#define	ELF_EHDR_FLAGS_OK(eh)	ELF64_EHDR_FLAGS_OK(eh)
-#else
-#define	ELF_EHDR_FLAGS_OK(eh)	ELF32_EHDR_FLAGS_OK(eh)
-#endif
-
-#if defined(ELFSIZE)
-struct elf_args {
-Elf_Addr  arg_entry;  /* program entry point */
-Elf_Addr  arg_interp; /* Interpreter load address */
-Elf_Addr  arg_phaddr; /* program header address */
-Elf_Addr  arg_phentsize;  /* Size of program header */
-Elf_Addr  arg_phnum;  /* Number of program headers */
-};
-#endif
-
-#ifndef _LKM
-#include opt_execfmt.h
-#endif
-
-#ifdef EXEC_ELF32
-int	exec_elf32_makecmds(struct proc *, struct exec_package *);
-int	elf32_copyargs(struct proc *, struct exec_package *, 
-	struct ps_strings *, char **, void *);
-
-int	coredump_elf32(struct lwp *, struct vnode *, struct ucred *);
-int	coredump_writenote_elf32(struct proc *, struct vnode *,
-	struct ucred *, off_t, Elf32_Nhdr *, const char *, void *);
-
-int	elf32_check_header(Elf32_Ehdr *, int);
-#endif
-
-#ifdef EXEC_ELF64
-int	exec_elf64_makecmds(struct proc *, struct exec_package *);
-int	elf64_read_from(struct proc *, struct vnode *, u_long, caddr_t, int);
-int	elf64_copyargs(struct proc *, struct exec_package *, 
-	struct ps_strings *, char **, void *);
-
-int	coredump_elf64 __P((struct lwp *, struct vnode *, struct ucred *));
-int	coredump_writenote_elf64 __P((struct proc *, struct vnode *,
-	struct ucred *, off_t, Elf64_Nhdr *, const char *, void *));
-
-int	elf64_check_header(Elf64_Ehdr *, int);
-#endif
-
-#endif /* _KERNEL */
-
 #endif /* !_SYS_EXEC_ELF_H_ */

Index: src/tools/m68k-elf2aout/sys/exec_elf.h
diff -u 

CVS commit: src/sys/sys

2014-01-03 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Fri Jan  3 16:54:48 UTC 2014

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

Log Message:
Remove the incorrect and unused Elf64_Shalf.
At one time it was used for a 32bit item - but that definition has long
  since been changed to use a reasonable 32bit type.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/sys/exec_elf.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/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.134 src/sys/sys/exec_elf.h:1.135
--- src/sys/sys/exec_elf.h:1.134	Thu Jan  2 19:15:07 2014
+++ src/sys/sys/exec_elf.h	Fri Jan  3 16:54:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.134 2014/01/02 19:15:07 christos Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.135 2014/01/03 16:54:48 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -73,8 +73,6 @@ typedef uint64_t	Elf64_Addr;
 typedef uint64_t	Elf64_Off;
 typedef int64_t		Elf64_SOff;
 #define ELF64_FSZ_OFF	8
-typedef int32_t		Elf64_Shalf;
-#define ELF64_FSZ_SHALF 4
 
 typedef int32_t		Elf64_Sword;
 #define ELF64_FSZ_SWORD 4



CVS commit: src/external/mit/xorg/bin/fc-match

2014-01-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  3 20:18:45 UTC 2014

Modified Files:
src/external/mit/xorg/bin/fc-match: Makefile

Log Message:
fix sun2 build. libfreetype requires -lbz2 -lz


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/bin/fc-match/Makefile

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

Modified files:

Index: src/external/mit/xorg/bin/fc-match/Makefile
diff -u src/external/mit/xorg/bin/fc-match/Makefile:1.2 src/external/mit/xorg/bin/fc-match/Makefile:1.3
--- src/external/mit/xorg/bin/fc-match/Makefile:1.2	Mon Jun  3 16:23:39 2013
+++ src/external/mit/xorg/bin/fc-match/Makefile	Fri Jan  3 15:18:45 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2013/06/03 20:23:39 mrg Exp $
+#	$NetBSD: Makefile,v 1.3 2014/01/03 20:18:45 christos Exp $
 
 .include bsd.own.mk
 
@@ -6,8 +6,8 @@ PROG=	fc-match
 
 CPPFLAGS+=	-I${X11SRCDIR.fontconfig} -I.
 
-LDADD+=	-lfontconfig -lfreetype -lexpat
-DPADD+=	${LIBFONTCONFIG} ${LIBFREETYPE} ${LIBEXPAT}
+LDADD+=	-lfontconfig -lfreetype -lexpat -lbz2 -lz
+DPADD+=	${LIBFONTCONFIG} ${LIBFREETYPE} ${LIBEXPAT} ${LIBBZ2} ${LIBZ}
 
 .PATH:	${X11SRCDIR.fontconfig}/${PROG}
 



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

2014-01-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jan  3 20:26:45 UTC 2014

Modified Files:
src/external/bsd/ntp/dist/libntp: socktoa.c
src/external/bsd/ntp/dist/ntpq: ntpq-subs.c

Log Message:
Don't bother with the h (short) modifier. The predicated use of bswap16
confuses the type tracking in clang and the use here is not portable
anyway, since it assumes short == int16_t.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/ntp/dist/libntp/socktoa.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/ntpq/ntpq-subs.c

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

Modified files:

Index: src/external/bsd/ntp/dist/libntp/socktoa.c
diff -u src/external/bsd/ntp/dist/libntp/socktoa.c:1.1.1.3 src/external/bsd/ntp/dist/libntp/socktoa.c:1.2
--- src/external/bsd/ntp/dist/libntp/socktoa.c:1.1.1.3	Fri Dec 27 23:30:48 2013
+++ src/external/bsd/ntp/dist/libntp/socktoa.c	Fri Jan  3 20:26:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: socktoa.c,v 1.1.1.3 2013/12/27 23:30:48 christos Exp $	*/
+/*	$NetBSD: socktoa.c,v 1.2 2014/01/03 20:26:45 joerg Exp $	*/
 
 /*
  * socktoa.c	socktoa(), sockporttoa(), and sock_hash()
@@ -93,8 +93,8 @@ sockporttoa(
 	LIB_GETBUF(buf);
 	snprintf(buf, LIB_BUFLENGTH,
 		 (IS_IPV6(sock))
-		 ? [%s]:%hu
-		 : %s:%hu,
+		 ? [%s]:%u
+		 : %s:%u,
 		 atext, SRCPORT(sock));
 	errno = saved_errno;
 

Index: src/external/bsd/ntp/dist/ntpq/ntpq-subs.c
diff -u src/external/bsd/ntp/dist/ntpq/ntpq-subs.c:1.6 src/external/bsd/ntp/dist/ntpq/ntpq-subs.c:1.7
--- src/external/bsd/ntp/dist/ntpq/ntpq-subs.c:1.6	Mon Dec 30 01:34:22 2013
+++ src/external/bsd/ntp/dist/ntpq/ntpq-subs.c	Fri Jan  3 20:26:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntpq-subs.c,v 1.6 2013/12/30 01:34:22 christos Exp $	*/
+/*	$NetBSD: ntpq-subs.c,v 1.7 2014/01/03 20:26:45 joerg Exp $	*/
 
 /*
  * ntpq-subs.c - subroutines which are called to perform ntpq commands.
@@ -3036,7 +3036,7 @@ mrulist(
 		LFPTOD(interval, favgint);
 		favgint /= recent-count;
 		avgint = (int)(favgint + 0.5);
-		fprintf(fp, %6d %6d %4hx %c %d %d %6d %5hu %s\n,
+		fprintf(fp, %6d %6d %4hx %c %d %d %6d %5u %s\n,
 			lstint, avgint, recent-rs,
 			(RES_KOD  recent-rs)
 			? 'K'



CVS commit: src/sys

2014-01-03 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Fri Jan  3 20:52:47 UTC 2014

Modified Files:
src/sys/kern: core_elf32.c kern_core.c
src/sys/sys: exec.h exec_elf.h

Log Message:
Instead of generating all the 'note' sections twice (and hoping that the
  'fast path' size on the first path matches the actual size on the second)
  save all the notes (mostly the cpu registers for all the LWPs) in
  malloced memory on the first pass.
Sanity check that the number of memory segments matches written matches
  the count obtained earlier. If gcore() is used they could differ.
  (Not sure that returning ENOMEM is ideal, but it is better than a crash.)


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.21 -r1.22 src/sys/kern/kern_core.c
cvs rdiff -u -r1.143 -r1.144 src/sys/sys/exec.h
cvs rdiff -u -r1.135 -r1.136 src/sys/sys/exec_elf.h

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

Modified files:

Index: src/sys/kern/core_elf32.c
diff -u src/sys/kern/core_elf32.c:1.38 src/sys/kern/core_elf32.c:1.39
--- src/sys/kern/core_elf32.c:1.38	Fri Jan  3 15:15:02 2014
+++ src/sys/kern/core_elf32.c	Fri Jan  3 20:52:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: core_elf32.c,v 1.38 2014/01/03 15:15:02 dsl Exp $	*/
+/*	$NetBSD: core_elf32.c,v 1.39 2014/01/03 20:52:47 dsl Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.38 2014/01/03 15:15:02 dsl Exp $);
+__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.39 2014/01/03 20:52:47 dsl Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_coredump.h
@@ -69,18 +69,33 @@ __KERNEL_RCSID(1, $NetBSD: core_elf32.c
 struct writesegs_state {
 	Elf_Phdr *psections;
 	off_t	secoff;
+	size_t  npsections;
+};
+
+/*
+ * We need to know how big the 'notes' are before we write the main header.
+ * To avoid problems with double-processing we save the data.
+ */
+struct note_buf {
+	struct note_buf  *nb_next;
+	unsigned charnb_data[4096 - sizeof (void *)];
+};
+
+struct note_state {
+	struct note_buf  *ns_first;
+	struct note_buf  *ns_last;
+	unsigned int ns_count;   /* Of full buffers */
+	unsigned int ns_offset;  /* Write point in last buffer */
 };
 
 static int	ELFNAMEEND(coredump_getseghdrs)(struct proc *,
 		struct uvm_coredump_state *);
 
-static int	ELFNAMEEND(coredump_notes)(struct proc *, struct lwp *,
-		struct coredump_iostate *, size_t *);
-static int	ELFNAMEEND(coredump_note)(struct proc *, struct lwp *,
-		struct coredump_iostate *, size_t *);
+static int	ELFNAMEEND(coredump_notes)(struct lwp *, struct note_state *);
+static int	ELFNAMEEND(coredump_note)(struct lwp *, struct note_state *);
 
+/* The 'note' section names and data are always 4-byte aligned. */
 #define	ELFROUNDSIZE	4	/* XXX Should it be sizeof(Elf_Word)? */
-#define	elfround(x)	roundup((x), ELFROUNDSIZE)
 
 #define elf_process_read_regs	CONCAT(process_read_regs, ELFSIZE)
 #ifdef __HAVE_PROCESS_XFPREGS
@@ -94,18 +109,31 @@ static int	ELFNAMEEND(coredump_note)(str
 int
 ELFNAMEEND(coredump)(struct lwp *l, struct coredump_iostate *cookie)
 {
-	struct proc *p;
 	Elf_Ehdr ehdr;
-	Elf_Phdr phdr, *psections;
+	Elf_Phdr *psections;
 	size_t psectionssize;
 	int npsections;
 	struct writesegs_state ws;
-	off_t notestart, secstart, offset;
+	off_t notestart;
 	size_t notesize;
 	int error, i;
 
+	struct note_state ns;
+	struct note_buf *nb;
+
 	psections = NULL;
-	p = l-l_proc;
+
+	/* Get all of the notes (mostly all the registers). */
+	ns.ns_first = kmem_alloc(sizeof *ns.ns_first, KM_SLEEP);
+	ns.ns_last = ns.ns_first;
+	ns.ns_count = 0;
+	ns.ns_offset = 0;
+	error = ELFNAMEEND(coredump_notes)(l, ns);
+	ns.ns_last-nb_next = NULL;
+	if (error)
+		goto out;
+	notesize = ns.ns_count * sizeof nb-nb_data + ns.ns_offset;
+
 	/*
 	 * We have to make a total of 3 passes across the map:
 	 *
@@ -118,15 +146,11 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 	 */
 
 	/* Pass 1: count the entries. */
-	npsections = uvm_coredump_count_segs(p);
-	/* Count the PT_NOTE section. */
+	npsections = uvm_coredump_count_segs(l-l_proc);
+	/* Allow for the PT_NOTE section. */
 	npsections++;
 
-	/* Get the size of the notes (mostly all the registers). */
-	error = ELFNAMEEND(coredump_notes)(p, l, NULL, notesize);
-	if (error)
-		goto out;
-
+	/* Build the main elf header */
 	memset(ehdr.e_ident[EI_PAD], 0, sizeof(ehdr.e_ident) - EI_PAD);
 	memcpy(ehdr.e_ident, ELFMAG, SELFMAG);
 #if ELFSIZE == 32
@@ -164,20 +188,24 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 	if (error)
 		goto out;
 
-	offset = sizeof(ehdr);
+	psectionssize = npsections * sizeof(*psections);
+	notestart = sizeof(ehdr) + psectionssize;
 
-	notestart = offset + sizeof(phdr) * npsections;
-	secstart = notestart + notesize;
-
-	psectionssize = npsections * sizeof(Elf_Phdr);
 	psections = kmem_zalloc(psectionssize, KM_SLEEP);
 
 	/* Pass 2: now 

CVS commit: src/sys

2014-01-03 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Fri Jan  3 21:12:18 UTC 2014

Modified Files:
src/sys/kern: core_elf32.c core_netbsd.c
src/sys/uvm: uvm_coredump.c uvm_extern.h

Log Message:
There is no need for uvm_coredump_walkmap() to explicity pass the proc_t
  pointer to the calller's function.
If the code needs the process its address can be placed in the caller's
  cookie.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.20 -r1.21 src/sys/kern/core_netbsd.c
cvs rdiff -u -r1.4 -r1.5 src/sys/uvm/uvm_coredump.c
cvs rdiff -u -r1.187 -r1.188 src/sys/uvm/uvm_extern.h

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

Modified files:

Index: src/sys/kern/core_elf32.c
diff -u src/sys/kern/core_elf32.c:1.39 src/sys/kern/core_elf32.c:1.40
--- src/sys/kern/core_elf32.c:1.39	Fri Jan  3 20:52:47 2014
+++ src/sys/kern/core_elf32.c	Fri Jan  3 21:12:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: core_elf32.c,v 1.39 2014/01/03 20:52:47 dsl Exp $	*/
+/*	$NetBSD: core_elf32.c,v 1.40 2014/01/03 21:12:18 dsl Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.39 2014/01/03 20:52:47 dsl Exp $);
+__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.40 2014/01/03 21:12:18 dsl Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_coredump.h
@@ -68,8 +68,9 @@ __KERNEL_RCSID(1, $NetBSD: core_elf32.c
 
 struct writesegs_state {
 	Elf_Phdr *psections;
-	off_t	secoff;
-	size_t  npsections;
+	proc_t   *p;
+	off_t	 secoff;
+	size_t   npsections;
 };
 
 /*
@@ -88,8 +89,7 @@ struct note_state {
 	unsigned int ns_offset;  /* Write point in last buffer */
 };
 
-static int	ELFNAMEEND(coredump_getseghdrs)(struct proc *,
-		struct uvm_coredump_state *);
+static int	ELFNAMEEND(coredump_getseghdrs)(struct uvm_coredump_state *);
 
 static int	ELFNAMEEND(coredump_notes)(struct lwp *, struct note_state *);
 static int	ELFNAMEEND(coredump_note)(struct lwp *, struct note_state *);
@@ -265,7 +265,7 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 }
 
 static int
-ELFNAMEEND(coredump_getseghdrs)(struct proc *p, struct uvm_coredump_state *us)
+ELFNAMEEND(coredump_getseghdrs)(struct uvm_coredump_state *us)
 {
 	struct writesegs_state *ws = us-cookie;
 	Elf_Phdr phdr;
@@ -290,7 +290,7 @@ ELFNAMEEND(coredump_getseghdrs)(struct p
 		int i;
 
 		end -= slen;
-		if ((error = copyin_proc(p, (void *)end, buf, slen)) != 0)
+		if ((error = copyin_proc(ws-p, (void *)end, buf, slen)) != 0)
 			return error;
 
 		ep = (const long *) buf[slen / sizeof(buf[0])];
@@ -397,18 +397,20 @@ ELFNAMEEND(coredump_notes)(struct lwp *l
 
 	/*
 	 * Now, for each LWP, write the register info and any other
-	 * per-LWP notes.  Since we're dumping core, we don't bother
-	 * locking.
+	 * per-LWP notes.
+	 * Lock in case this is a gcore requested dump.
 	 */
+	mutex_enter(p-p_lock);
 	LIST_FOREACH(l0, p-p_lwps, l_sibling) {
 		if (l0 == l)		/* we've taken care of this thread */
 			continue;
 		error = ELFNAMEEND(coredump_note)(l0, ns);
 		if (error)
-			return (error);
+			break;
 	}
+	mutex_exit(p-p_lock);
 
-	return (0);
+	return error;
 }
 
 static int

Index: src/sys/kern/core_netbsd.c
diff -u src/sys/kern/core_netbsd.c:1.20 src/sys/kern/core_netbsd.c:1.21
--- src/sys/kern/core_netbsd.c:1.20	Fri Jan  3 15:15:02 2014
+++ src/sys/kern/core_netbsd.c	Fri Jan  3 21:12:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: core_netbsd.c,v 1.20 2014/01/03 15:15:02 dsl Exp $	*/
+/*	$NetBSD: core_netbsd.c,v 1.21 2014/01/03 21:12:18 dsl Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -45,7 +45,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: core_netbsd.c,v 1.20 2014/01/03 15:15:02 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: core_netbsd.c,v 1.21 2014/01/03 21:12:18 dsl Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_coredump.h
@@ -74,8 +74,7 @@ struct coredump_state {
 	struct CORENAME(core) core;
 };
 
-static int	CORENAME(coredump_writesegs_netbsd)(struct proc *,
-		struct uvm_coredump_state *);
+static int	CORENAME(coredump_writesegs_netbsd)(struct uvm_coredump_state *);
 
 int
 CORENAME(coredump_netbsd)(struct lwp *l, struct coredump_iostate *iocookie)
@@ -118,8 +117,7 @@ CORENAME(coredump_netbsd)(struct lwp *l,
 }
 
 static int
-CORENAME(coredump_writesegs_netbsd)(struct proc *p,
-struct uvm_coredump_state *us)
+CORENAME(coredump_writesegs_netbsd)(struct uvm_coredump_state *us)
 {
 	struct coredump_state *cs = us-cookie;
 	struct CORENAME(coreseg) cseg;

Index: src/sys/uvm/uvm_coredump.c
diff -u src/sys/uvm/uvm_coredump.c:1.4 src/sys/uvm/uvm_coredump.c:1.5
--- src/sys/uvm/uvm_coredump.c:1.4	Fri Jan  3 15:15:02 2014
+++ src/sys/uvm/uvm_coredump.c	Fri Jan  3 21:12:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_coredump.c,v 1.4 2014/01/03 15:15:02 dsl Exp $	*/
+/*	$NetBSD: uvm_coredump.c,v 1.5 2014/01/03 21:12:18 dsl Exp $	*/
 
 /*
  * 

CVS commit: src/sys/arch/sun68k/stand

2014-01-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  3 21:21:17 UTC 2014

Modified Files:
src/sys/arch/sun68k/stand: Makefile.inc
Added Files:
src/sys/arch/sun68k/stand: boot.ldscript

Log Message:
Add a load script that puts text.unlikely after text so that the start
address stays where we are. This is copied from m68kelfnbsd.xbn


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sun68k/stand/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/sys/arch/sun68k/stand/boot.ldscript

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/sun68k/stand/Makefile.inc
diff -u src/sys/arch/sun68k/stand/Makefile.inc:1.21 src/sys/arch/sun68k/stand/Makefile.inc:1.22
--- src/sys/arch/sun68k/stand/Makefile.inc:1.21	Thu Nov  7 14:52:56 2013
+++ src/sys/arch/sun68k/stand/Makefile.inc	Fri Jan  3 16:21:17 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.21 2013/11/07 19:52:56 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.22 2014/01/03 21:21:17 christos Exp $
 
 # Must have S=/usr/src/sys (or equivalent)
 # But note: this is w.r.t. a subdirectory
@@ -39,8 +39,9 @@ ${SA_PROG}.bin : ${SA_PROG}
 	${OBJCOPY} --output-target=binary ${SA_PROG} $@
 
 ${SA_PROG} : ${OBJS} ${DPADD} ${SRTLIB}
-	${LD} -N -Ttext ${RELOC} -e start ${SA_LDFLAGS} -o $@ \
-	  ${SRTOBJ} ${OBJS} ${LDADD} ${SRTLIB}
+	${LD} -N -Ttext ${RELOC} -e start ${SA_LDFLAGS} \
+	-T${.CURDIR}/../boot.ldscript -o $@ \
+	${SRTOBJ} ${OBJS} ${LDADD} ${SRTLIB}
 	@${SIZE} $@
 
 .if !target(proginstall)

Added files:

Index: src/sys/arch/sun68k/stand/boot.ldscript
diff -u /dev/null src/sys/arch/sun68k/stand/boot.ldscript:1.1
--- /dev/null	Fri Jan  3 16:21:17 2014
+++ src/sys/arch/sun68k/stand/boot.ldscript	Fri Jan  3 16:21:17 2014
@@ -0,0 +1,202 @@
+/* Script for -N: mix text and data on same page; don't align data */
+OUTPUT_FORMAT(elf32-m68k, elf32-m68k,
+	  elf32-m68k)
+OUTPUT_ARCH(m68k)
+ENTRY(start)
+SEARCH_DIR(=/usr/lib);
+SECTIONS
+{
+  /* Read-only sections, merged into text segment: */
+  PROVIDE (__executable_start = SEGMENT_START(text-segment, 0x14000)); . = SEGMENT_START(text-segment, 0x14000) + SIZEOF_HEADERS;
+  .interp : { *(.interp) }
+  .note.gnu.build-id : { *(.note.gnu.build-id) }
+  .hash   : { *(.hash) }
+  .gnu.hash   : { *(.gnu.hash) }
+  .dynsym : { *(.dynsym) }
+  .dynstr : { *(.dynstr) }
+  .gnu.version: { *(.gnu.version) }
+  .gnu.version_d  : { *(.gnu.version_d) }
+  .gnu.version_r  : { *(.gnu.version_r) }
+  .rela.init  : { *(.rela.init) }
+  .rela.text  : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
+  .rela.fini  : { *(.rela.fini) }
+  .rela.rodata: { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
+  .rela.data.rel.ro   : { *(.rela.data.rel.ro .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*) }
+  .rela.data  : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
+  .rela.tdata	  : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
+  .rela.tbss	  : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
+  .rela.ctors : { *(.rela.ctors) }
+  .rela.dtors : { *(.rela.dtors) }
+  .rela.got   : { *(.rela.got) }
+  .rela.bss   : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
+  .rela.iplt  :
+{
+  PROVIDE_HIDDEN (__rela_iplt_start = .);
+  *(.rela.iplt)
+  PROVIDE_HIDDEN (__rela_iplt_end = .);
+}
+  .rela.plt   :
+{
+  *(.rela.plt)
+}
+  .init   :
+  {
+KEEP (*(SORT_NONE(.init)))
+  } =0x4e714e71
+  .plt: { *(.plt) }
+  .iplt   : { *(.iplt) }
+  .text   :
+  {
+PROVIDE_HIDDEN (__eprol = .);
+*(.text .stub .text.* .gnu.linkonce.t.*)
+*(.text.unlikely .text.*_unlikely)
+*(.text.exit .text.exit.*)
+*(.text.startup .text.startup.*)
+*(.text.hot .text.hot.*)
+/* .gnu.warning sections are handled specially by elf32.em.  */
+*(.gnu.warning)
+  } =0x4e714e71
+  .fini   :
+  {
+KEEP (*(SORT_NONE(.fini)))
+  } =0x4e714e71
+  PROVIDE (__etext = .);
+  PROVIDE (_etext = .);
+  PROVIDE (etext = .);
+  .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
+  .rodata1: { *(.rodata1) }
+  .eh_frame_hdr : { *(.eh_frame_hdr) }
+  .eh_frame   : ONLY_IF_RO { KEEP (*(.eh_frame)) }
+  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
+  .gcc_except_table.*) }
+  /* These sections are generated by the Sun/Oracle C++ compiler.  */
+  .exception_ranges   : ONLY_IF_RO { *(.exception_ranges
+  .exception_ranges*) }
+  /* Adjust the address for the data segment.  We want to adjust up to
+ the same address within the page on the next page up.  */
+  . = .;
+  /* Exception handling  */
+  .eh_frame   : ONLY_IF_RW { KEEP (*(.eh_frame)) }
+  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
+  .exception_ranges   : ONLY_IF_RW { *(.exception_ranges 

CVS commit: src/sys

2014-01-03 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Fri Jan  3 21:34:40 UTC 2014

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

Log Message:
Fix bug in previous (panic during process core dump).
Change the interface to ELFNAMEEND(coredump_savenote) so that the caller
  doesn't need to know the type of the elf note header.
Simplifies the calling code somewhat.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.136 -r1.137 src/sys/sys/exec_elf.h

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

Modified files:

Index: src/sys/kern/core_elf32.c
diff -u src/sys/kern/core_elf32.c:1.40 src/sys/kern/core_elf32.c:1.41
--- src/sys/kern/core_elf32.c:1.40	Fri Jan  3 21:12:18 2014
+++ src/sys/kern/core_elf32.c	Fri Jan  3 21:34:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: core_elf32.c,v 1.40 2014/01/03 21:12:18 dsl Exp $	*/
+/*	$NetBSD: core_elf32.c,v 1.41 2014/01/03 21:34:40 dsl Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.40 2014/01/03 21:12:18 dsl Exp $);
+__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.41 2014/01/03 21:34:40 dsl Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_coredump.h
@@ -197,6 +197,7 @@ ELFNAMEEND(coredump)(struct lwp *l, stru
 	ws.secoff = notestart + notesize;
 	ws.psections = psections;
 	ws.npsections = npsections - 1;
+	ws.p = l-l_proc;
 	error = uvm_coredump_walkmap(l-l_proc, ELFNAMEEND(coredump_getseghdrs),
 	ws);
 	if (error)
@@ -329,7 +330,6 @@ ELFNAMEEND(coredump_notes)(struct lwp *l
 {
 	struct proc *p;
 	struct netbsd_elfcore_procinfo cpi;
-	Elf_Nhdr nhdr;
 	int error;
 	struct lwp *l0;
 	sigset_t ss1, ss2;
@@ -378,12 +378,8 @@ ELFNAMEEND(coredump_notes)(struct lwp *l
 	(void)strncpy(cpi.cpi_name, p-p_comm, sizeof(cpi.cpi_name));
 	cpi.cpi_name[sizeof(cpi.cpi_name) - 1] = '\0';
 
-	nhdr.n_namesz = sizeof(ELF_NOTE_NETBSD_CORE_NAME);
-	nhdr.n_descsz = sizeof(cpi);
-	nhdr.n_type = ELF_NOTE_NETBSD_CORE_PROCINFO;
-
-	ELFNAMEEND(coredump_savenote)(ns, nhdr, ELF_NOTE_NETBSD_CORE_NAME,
-	cpi);
+	ELFNAMEEND(coredump_savenote)(ns, ELF_NOTE_NETBSD_CORE_PROCINFO,
+	ELF_NOTE_NETBSD_CORE_NAME, cpi, sizeof(cpi));
 
 	/* XXX Add hook for machdep per-proc notes. */
 
@@ -416,9 +412,7 @@ ELFNAMEEND(coredump_notes)(struct lwp *l
 static int
 ELFNAMEEND(coredump_note)(struct lwp *l, struct note_state *ns)
 {
-	Elf_Nhdr nhdr;
 	int error;
-	int namesize;
 	char name[64];
 	elf_reg intreg;
 #ifdef PT_GETFPREGS
@@ -428,17 +422,13 @@ ELFNAMEEND(coredump_note)(struct lwp *l,
 
 	snprintf(name, sizeof(name), %s@%d,
 	ELF_NOTE_NETBSD_CORE_NAME, l-l_lid);
-	namesize = strlen(name) + 1;
 
 	error = elf_process_read_regs(l, intreg);
 	if (error)
 		return (error);
 
-	nhdr.n_namesz = namesize;
-	nhdr.n_descsz = sizeof(intreg);
-	nhdr.n_type = PT_GETREGS;
-
-	ELFNAMEEND(coredump_savenote)(ns, nhdr, name, intreg);
+	ELFNAMEEND(coredump_savenote)(ns, PT_GETREGS, name, intreg,
+	sizeof(intreg));
 
 #ifdef PT_GETFPREGS
 	freglen = sizeof(freg);
@@ -450,11 +440,7 @@ ELFNAMEEND(coredump_note)(struct lwp *l,
 	if (error)
 		return (error);
 
-	nhdr.n_namesz = namesize;
-	nhdr.n_descsz = freglen;
-	nhdr.n_type = PT_GETFPREGS;
-
-	ELFNAMEEND(coredump_savenote)(ns, nhdr, name, freg);
+	ELFNAMEEND(coredump_savenote)(ns, PT_GETFPREGS, name, freg, freglen);
 #endif
 	/* XXX Add hook for machdep per-LWP notes. */
 	return (0);
@@ -493,12 +479,18 @@ save_note_bytes(struct note_state *ns, c
 }
 
 void
-ELFNAMEEND(coredump_savenote)(struct note_state *ns, Elf_Nhdr *nhdr,
-const char *name, void *data)
+ELFNAMEEND(coredump_savenote)(struct note_state *ns, unsigned int type,
+const char *name, void *data, size_t data_len)
 {
-	save_note_bytes(ns, nhdr, sizeof (*nhdr));
-	save_note_bytes(ns, name, nhdr-n_namesz);
-	save_note_bytes(ns, data, nhdr-n_descsz);
+	Elf_Nhdr nhdr;
+
+	nhdr.n_namesz = strlen(name) + 1;
+	nhdr.n_descsz = data_len;
+	nhdr.n_type = type;
+
+	save_note_bytes(ns, nhdr, sizeof (nhdr));
+	save_note_bytes(ns, name, nhdr.n_namesz);
+	save_note_bytes(ns, data, data_len);
 }
 
 #else	/* COREDUMP */

Index: src/sys/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.136 src/sys/sys/exec_elf.h:1.137
--- src/sys/sys/exec_elf.h:1.136	Fri Jan  3 20:52:47 2014
+++ src/sys/sys/exec_elf.h	Fri Jan  3 21:34:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.136 2014/01/03 20:52:47 dsl Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.137 2014/01/03 21:34:40 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -1258,8 +1258,8 @@ int	elf32_copyargs(struct lwp *, struct 
 struct ps_strings *, char **, void *);
 
 int	coredump_elf32(struct lwp *, struct coredump_iostate *);
-void	coredump_savenote_elf32(struct note_state *, Elf32_Nhdr *,
-	const char *, void *);
+void	coredump_savenote_elf32(struct note_state *, unsigned int,
+	const char *, 

CVS import: src/external/bsd/dhcpcd/dist

2014-01-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jan  3 22:10:44 UTC 2014

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

Log Message:
Import dhcpcd-6.2.0 with the following changes:

* Fix NAK backoff when a server NAKs a REQUEST after a DISCOVER.
* Fix IPv6 ICMP filtering on Android (RS/RA now works)
* Fix sending of DHCPv6 FQDN when only hostname specified
* Add support for RFC3925 Vendor-Identifying Vendor Options
* Remove hard coded DHCP/DHCPv6 options and embed dhcpcd-definitions.conf.
  This actually results in a slightly smaller binary than before and has the 
added advantage that the option definitions are now all held within one file.
* Change IAID to default from the last 4 bytes of the MAC address.
  Rationale in the commit, but in a nutshell it allows for a stable IAID 
between reboots without persistent storage and across different OS's who name 
or number it differently to each other.
* RFC4242, Information Refresh Time Option for DHCPv6.
* Fix processing of inet4 addr in vendor options and terminate correctly.
* Preserve vendor encapsulated options.
* Fix renewal of Prefix Delegation. Only spam the log if a lease has a new 
address or changes the vltime of an existing address.
* Add noipv4 and noipv6 options.
* Warn about missing interfaces which require prefix delegation.
* If we timeout, remove any waitip config so that we daemonise correctly.
* Remove the IPv6 forwarding router check as valid use cases exist where you 
would want IPv6 RS/RA on a router.
* Pass the correct run directory to dhcpcd-run-hooks

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-6-2-0

U src/external/bsd/dhcpcd/dist/common.c
U src/external/bsd/dhcpcd/dist/control.c
U src/external/bsd/dhcpcd/dist/dhcpcd.c
U src/external/bsd/dhcpcd/dist/duid.c
U src/external/bsd/dhcpcd/dist/eloop.c
C src/external/bsd/dhcpcd/dist/if-options.c
U src/external/bsd/dhcpcd/dist/if-pref.c
C src/external/bsd/dhcpcd/dist/net.c
C src/external/bsd/dhcpcd/dist/script.c
U src/external/bsd/dhcpcd/dist/dhcp-common.c
N src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c
U src/external/bsd/dhcpcd/dist/bpf.c
C src/external/bsd/dhcpcd/dist/if-bsd.c
U src/external/bsd/dhcpcd/dist/platform-bsd.c
U src/external/bsd/dhcpcd/dist/arp.c
C src/external/bsd/dhcpcd/dist/dhcp.c
U src/external/bsd/dhcpcd/dist/ipv4.c
U src/external/bsd/dhcpcd/dist/ipv4ll.c
U src/external/bsd/dhcpcd/dist/ipv6.c
C src/external/bsd/dhcpcd/dist/ipv6nd.c
U src/external/bsd/dhcpcd/dist/dhcp6.c
U src/external/bsd/dhcpcd/dist/dhcpcd.conf
N src/external/bsd/dhcpcd/dist/dhcpcd-definitions.conf
N src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
C src/external/bsd/dhcpcd/dist/dhcpcd.8.in
C src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/arp.h
U src/external/bsd/dhcpcd/dist/bpf-filter.h
U src/external/bsd/dhcpcd/dist/common.h
U src/external/bsd/dhcpcd/dist/config.h
U src/external/bsd/dhcpcd/dist/control.h
U src/external/bsd/dhcpcd/dist/defs.h
U src/external/bsd/dhcpcd/dist/dev.h
U src/external/bsd/dhcpcd/dist/dhcp-common.h
U src/external/bsd/dhcpcd/dist/dhcp.h
U src/external/bsd/dhcpcd/dist/dhcp6.h
N src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h
U src/external/bsd/dhcpcd/dist/dhcpcd.h
U src/external/bsd/dhcpcd/dist/duid.h
U src/external/bsd/dhcpcd/dist/eloop.h
U src/external/bsd/dhcpcd/dist/if-options.h
U src/external/bsd/dhcpcd/dist/if-pref.h
U src/external/bsd/dhcpcd/dist/ipv4.h
U src/external/bsd/dhcpcd/dist/ipv4ll.h
U src/external/bsd/dhcpcd/dist/ipv6.h
U src/external/bsd/dhcpcd/dist/ipv6nd.h
U src/external/bsd/dhcpcd/dist/net.h
U src/external/bsd/dhcpcd/dist/platform.h
U src/external/bsd/dhcpcd/dist/script.h
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-wpa_supplicant
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/15-timezone
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind

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

cvs checkout -jroy:yesterday -jroy src/external/bsd/dhcpcd/dist



CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd

2014-01-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jan  3 22:27:31 UTC 2014

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Build with dhcpcd-6.2.0


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile

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

Modified files:

Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.16 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.17
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.16	Fri Sep 20 10:58:16 2013
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile	Fri Jan  3 22:27:31 2014
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.16 2013/09/20 10:58:16 roy Exp $
+# $NetBSD: Makefile,v 1.17 2014/01/03 22:27:31 roy Exp $
 #
 
 PROG=		dhcpcd
 SRCS=		common.c control.c dhcpcd.c duid.c eloop.c
 SRCS+=		if-options.c if-pref.c net.c script.c
-SRCS+=		dhcp-common.c
+SRCS+=		dhcp-common.c dhcpcd-embedded.c
 SRCS+=		bpf.c if-bsd.c platform-bsd.c
 
 .include bsd.own.mk



CVS commit: src/doc

2014-01-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jan  3 22:28:51 UTC 2014

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-6.2.0


To generate a diff of this commit:
cvs rdiff -u -r1.1085 -r1.1086 src/doc/3RDPARTY
cvs rdiff -u -r1.1878 -r1.1879 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1085 src/doc/3RDPARTY:1.1086
--- src/doc/3RDPARTY:1.1085	Fri Jan  3 02:10:19 2014
+++ src/doc/3RDPARTY	Fri Jan  3 22:28:51 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1085 2014/01/03 02:10:19 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1086 2014/01/03 22:28:51 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -300,8 +300,8 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	6.1.0
-Current Vers:	6.1.0
+Version:	6.2.0
+Current Vers:	6.2.0
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1878 src/doc/CHANGES:1.1879
--- src/doc/CHANGES:1.1878	Fri Jan  3 02:10:19 2014
+++ src/doc/CHANGES	Fri Jan  3 22:28:51 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1878 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1879 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -329,3 +329,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	libpcap: Import 1.5.2 [christos 20131231]
 	bind: update to 9.9.5b1 [christos 2013-12-31]
 	wpa: Import wpa_supplicant and hostapd 2.0 [christos 20140102]
+	dhcpcd: Import dhcpcd-6.2.0 [roy 20140103]



CVS commit: src/external/bsd/openpam/dist/lib

2014-01-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jan  3 22:49:21 UTC 2014

Modified Files:
src/external/bsd/openpam/dist/lib: openpam_configure.c

Log Message:
Avoid implicit cast on the return value.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/openpam/dist/lib/openpam_configure.c

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

Modified files:

Index: src/external/bsd/openpam/dist/lib/openpam_configure.c
diff -u src/external/bsd/openpam/dist/lib/openpam_configure.c:1.6 src/external/bsd/openpam/dist/lib/openpam_configure.c:1.7
--- src/external/bsd/openpam/dist/lib/openpam_configure.c:1.6	Fri Dec 27 20:10:21 2013
+++ src/external/bsd/openpam/dist/lib/openpam_configure.c	Fri Jan  3 22:49:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: openpam_configure.c,v 1.6 2013/12/27 20:10:21 christos Exp $	*/
+/*	$NetBSD: openpam_configure.c,v 1.7 2014/01/03 22:49:21 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
@@ -109,9 +109,9 @@ parse_facility_name(const char *name)
 static pam_control_t
 parse_control_flag(const char *name)
 {
-	int i;
+	pam_control_t i;
 
-	for (i = 0; i  PAM_NUM_CONTROL_FLAGS; ++i)
+	for (i = PAM_BINDING; i  PAM_NUM_CONTROL_FLAGS; ++i)
 		if (strcmp(pam_control_flag_name[i], name) == 0)
 			return (i);
 	return ((pam_control_t)-1);



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

2014-01-03 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Jan  3 23:18:48 UTC 2014

Modified Files:
src/sys/arch/x86/pci: ichlpcib.c

Log Message:
Add C2000 Platform Controller Unit(PCU).


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/x86/pci/ichlpcib.c

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

Modified files:

Index: src/sys/arch/x86/pci/ichlpcib.c
diff -u src/sys/arch/x86/pci/ichlpcib.c:1.40 src/sys/arch/x86/pci/ichlpcib.c:1.41
--- src/sys/arch/x86/pci/ichlpcib.c:1.40	Tue Sep 17 01:16:45 2013
+++ src/sys/arch/x86/pci/ichlpcib.c	Fri Jan  3 23:18:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichlpcib.c,v 1.40 2013/09/17 01:16:45 jakllsch Exp $	*/
+/*	$NetBSD: ichlpcib.c,v 1.41 2014/01/03 23:18:48 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.40 2013/09/17 01:16:45 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.41 2014/01/03 23:18:48 msaitoh Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -261,6 +261,10 @@ static struct lpcib_device {
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C226_LPC, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_H81_LPC, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C600_LPC, 1, 0 },
+	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C2000_PCU_1, 1, 0 },
+	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C2000_PCU_2, 1, 0 },
+	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C2000_PCU_3, 1, 0 },
+	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C2000_PCU_4, 1, 0 },
 
 	{ 0, 0, 0, 0 },
 };



CVS commit: src/sys

2014-01-03 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sat Jan  4 00:10:03 UTC 2014

Modified Files:
src/sys/arch/alpha/alpha: process_machdep.c
src/sys/arch/amd64/amd64: netbsd32_machdep.c process_machdep.c
src/sys/arch/amd64/include: netbsd32_machdep.h
src/sys/arch/arm/arm: core_machdep.c process_machdep.c
src/sys/arch/hppa/hppa: core_machdep.c process_machdep.c
src/sys/arch/i386/i386: process_machdep.c
src/sys/arch/ia64/ia64: process_machdep.c
src/sys/arch/m68k/include: reg.h
src/sys/arch/m68k/m68k: core_machdep.c process_machdep.c
src/sys/arch/mips/include: types.h
src/sys/arch/mips/mips: process_machdep.c
src/sys/arch/powerpc/powerpc: process_machdep.c
src/sys/arch/sparc/sparc: process_machdep.c
src/sys/arch/sparc64/include: netbsd32_machdep.h
src/sys/arch/sparc64/sparc64: netbsd32_machdep.c process_machdep.c
src/sys/arch/usermode/usermode: process_machdep.c
src/sys/arch/x86/x86: core_machdep.c
src/sys/compat/linux/arch/amd64: linux_machdep.c
src/sys/compat/linux/arch/i386: linux_ptrace.c
src/sys/compat/linux/arch/powerpc: linux_ptrace.c
src/sys/kern: core_elf32.c sys_process.c
src/sys/sys: ptrace.h

Log Message:
Remove __HAVE_PROCESS_XFPREGS and add the extra parameter for the size
  of the fp save area to all the process_read_fpregs() and
  process_write_fpregs() functions.
None of the functions have been modified to use the new parameters.
The size is set for all the writes, but some of the arch-specific reads
  just pass NULL.
The amd64 (and i386) need variable sized fp register save areas in order
  to support AVX and other enhanced register areas.
These functions are rarely called - so the extra argument won't matter.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/alpha/alpha/process_machdep.c
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amd64/amd64/process_machdep.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amd64/include/netbsd32_machdep.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm/core_machdep.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/arm/process_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/hppa/core_machdep.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hppa/hppa/process_machdep.c
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/i386/i386/process_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/process_machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/m68k/include/reg.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/m68k/m68k/core_machdep.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/m68k/m68k/process_machdep.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/mips/include/types.h
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mips/mips/process_machdep.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/powerpc/powerpc/process_machdep.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc/sparc/process_machdep.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sparc64/include/netbsd32_machdep.h
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sparc64/sparc64/process_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/usermode/usermode/process_machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/x86/core_machdep.c
cvs rdiff -u -r1.43 -r1.44 src/sys/compat/linux/arch/amd64/linux_machdep.c
cvs rdiff -u -r1.26 -r1.27 src/sys/compat/linux/arch/i386/linux_ptrace.c
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/linux/arch/powerpc/linux_ptrace.c
cvs rdiff -u -r1.41 -r1.42 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.162 -r1.163 src/sys/kern/sys_process.c
cvs rdiff -u -r1.44 -r1.45 src/sys/sys/ptrace.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/alpha/alpha/process_machdep.c
diff -u src/sys/arch/alpha/alpha/process_machdep.c:1.27 src/sys/arch/alpha/alpha/process_machdep.c:1.28
--- src/sys/arch/alpha/alpha/process_machdep.c:1.27	Mon Feb  6 02:14:12 2012
+++ src/sys/arch/alpha/alpha/process_machdep.c	Sat Jan  4 00:10:02 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: process_machdep.c,v 1.27 2012/02/06 02:14:12 matt Exp $ */
+/* $NetBSD: process_machdep.c,v 1.28 2014/01/04 00:10:02 dsl Exp $ */
 
 /*
  * Copyright (c) 1994 Christopher G. Demetriou
@@ -54,7 +54,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: process_machdep.c,v 1.27 2012/02/06 02:14:12 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: process_machdep.c,v 1.28 2014/01/04 00:10:02 dsl Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -112,7 +112,7 @@ process_set_pc(struct lwp *l, void *addr
 }
 
 int
-process_read_fpregs(struct lwp *l, struct fpreg *regs)
+process_read_fpregs(struct lwp *l, struct fpreg *regs, size_t *sz)
 {
 	struct pcb *pcb = lwp_getpcb(l);
 
@@ -123,7 +123,7 @@ process_read_fpregs(struct lwp *l, struc
 }
 
 

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

2014-01-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jan  4 01:33:11 UTC 2014

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

Log Message:
Explicitly force a CPU for the assembler for the compatibility
cpu_func_* files. LLVM complains about the use of deprecated
instructions when -march=armv7 or equivalent is in use.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/arm/conf/Makefile.arm

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/arm/conf/Makefile.arm
diff -u src/sys/arch/arm/conf/Makefile.arm:1.39 src/sys/arch/arm/conf/Makefile.arm:1.40
--- src/sys/arch/arm/conf/Makefile.arm:1.39	Fri Dec 27 04:41:29 2013
+++ src/sys/arch/arm/conf/Makefile.arm	Sat Jan  4 01:33:11 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.arm,v 1.39 2013/12/27 04:41:29 matt Exp $
+#	$NetBSD: Makefile.arm,v 1.40 2014/01/04 01:33:11 joerg Exp $
 
 # Makefile for NetBSD
 #
@@ -45,6 +45,13 @@ AFLAGS.blockio.S+=-marm
 AFLAGS.copystr.S+=-marm
 CFLAGS+=	 -mfloat-abi=soft
 
+# This files use instructions deprecated for ARMv7+, but still
+# included in kernel that build with higher -mcpu=... settings.
+CPPFLAGS.cpufunc_asm_armv4.S+=	-mcpu=arm9
+CPPFLAGS.cpufunc_asm_armv6.S+=	-mcpu=arm1136j-s
+CPPFLAGS.cpufunc_asm_arm11.S+=	-mcpu=arm1136j-s
+CPPFLAGS.cpufunc_asm_xscale.S+=	-mcpu=xscale
+
 ##
 ## (3) libkern and compat
 ##



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

2014-01-03 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan  4 02:09:12 UTC 2014

Modified Files:
src/sys/arch/x86/pci: ichlpcib.c

Log Message:
Temporary disable C2000 PCU because the behavior of the wdog is little strange.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/x86/pci/ichlpcib.c

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

Modified files:

Index: src/sys/arch/x86/pci/ichlpcib.c
diff -u src/sys/arch/x86/pci/ichlpcib.c:1.41 src/sys/arch/x86/pci/ichlpcib.c:1.42
--- src/sys/arch/x86/pci/ichlpcib.c:1.41	Fri Jan  3 23:18:48 2014
+++ src/sys/arch/x86/pci/ichlpcib.c	Sat Jan  4 02:09:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichlpcib.c,v 1.41 2014/01/03 23:18:48 msaitoh Exp $	*/
+/*	$NetBSD: ichlpcib.c,v 1.42 2014/01/04 02:09:12 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.41 2014/01/03 23:18:48 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.42 2014/01/04 02:09:12 msaitoh Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -261,10 +261,12 @@ static struct lpcib_device {
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C226_LPC, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_H81_LPC, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C600_LPC, 1, 0 },
+#if 0
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C2000_PCU_1, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C2000_PCU_2, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C2000_PCU_3, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C2000_PCU_4, 1, 0 },
+#endif
 
 	{ 0, 0, 0, 0 },
 };



CVS commit: src/external/bsd/libevent/dist/test

2014-01-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jan  4 02:56:31 UTC 2014

Modified Files:
src/external/bsd/libevent/dist/test: regress_buffer.c

Log Message:
Fix memcmp use.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/test/regress_buffer.c

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

Modified files:

Index: src/external/bsd/libevent/dist/test/regress_buffer.c
diff -u src/external/bsd/libevent/dist/test/regress_buffer.c:1.2 src/external/bsd/libevent/dist/test/regress_buffer.c:1.3
--- src/external/bsd/libevent/dist/test/regress_buffer.c:1.2	Thu Apr 11 16:56:42 2013
+++ src/external/bsd/libevent/dist/test/regress_buffer.c	Sat Jan  4 02:56:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress_buffer.c,v 1.2 2013/04/11 16:56:42 christos Exp $	*/
+/*	$NetBSD: regress_buffer.c,v 1.3 2014/01/04 02:56:31 joerg Exp $	*/
 /*
  * Copyright (c) 2003-2007 Niels Provos pro...@citi.umich.edu
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -33,7 +33,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: regress_buffer.c,v 1.2 2013/04/11 16:56:42 christos Exp $);
+__RCSID($NetBSD: regress_buffer.c,v 1.3 2014/01/04 02:56:31 joerg Exp $);
 
 #include sys/types.h
 #include sys/stat.h
@@ -247,7 +247,7 @@ test_evbuffer(void *ptr)
 	if (memcmp(evbuffer_pullup(
 			   evb, -1), buffer, sizeof(buffer) / 2) != 0 ||
 	memcmp(evbuffer_pullup(
-			   evb_two, -1), buffer, sizeof(buffer) != 0))
+			   evb_two, -1), buffer, sizeof(buffer)) != 0)
 		tt_abort_msg(Pullup did not preserve content);
 
 	evbuffer_validate(evb);



CVS commit: src/sys/dev/pci

2014-01-03 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan  4 02:57:27 UTC 2014

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

Log Message:
Add Intel Z68 LPC


To generate a diff of this commit:
cvs rdiff -u -r1.1176 -r1.1177 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.1176 src/sys/dev/pci/pcidevs:1.1177
--- src/sys/dev/pci/pcidevs:1.1176	Wed Jan  1 08:33:00 2014
+++ src/sys/dev/pci/pcidevs	Sat Jan  4 02:57:27 2014
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1176 2014/01/01 08:33:00 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1177 2014/01/04 02:57:27 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2856,6 +2856,7 @@ product INTEL 6SERIES_EHCI_1	0x1c26	6 Se
 product INTEL 6SERIES_EHCI_2	0x1c2d	6 Series USB
 product INTEL 6SERIES_MEI	0x1c3a	6 Series MEI
 product INTEL 6SERIES_KT	0x1c3d	6 Series KT
+product INTEL Z68_LPC		0x1c44	Z68 LPC
 product INTEL P67_LPC		0x1c46	P67 LPC
 product INTEL UM67_LPC		0x1c47	UM67 LPC
 product INTEL HM65_LPC		0x1c49	HM65 LPC



CVS commit: src/sys/arch/arm/arm

2014-01-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jan  4 02:58:38 UTC 2014

Modified Files:
src/sys/arch/arm/arm: cpufunc.c

Log Message:
Add missing volatile for hidden side effects of asm.


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/arch/arm/arm/cpufunc.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/arm/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.132 src/sys/arch/arm/arm/cpufunc.c:1.133
--- src/sys/arch/arm/arm/cpufunc.c:1.132	Fri Dec 20 06:48:09 2013
+++ src/sys/arch/arm/arm/cpufunc.c	Sat Jan  4 02:58:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.132 2013/12/20 06:48:09 matt Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.133 2014/01/04 02:58:38 joerg Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.132 2013/12/20 06:48:09 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.133 2014/01/04 02:58:38 joerg Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_cpuoptions.h
@@ -3249,7 +3249,7 @@ sa110_setup(char *args)
 	 * enable clockswitching, note that this doesn't read or write to r0,
 	 * r0 is just to make it valid asm
 	 */
-	__asm (mcr 15, 0, r0, c15, c1, 2);
+	__asm volatile (mcr 15, 0, r0, c15, c1, 2);
 }
 #endif	/* CPU_SA110 */
 



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

2014-01-03 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan  4 02:59:17 UTC 2014

Modified Files:
src/sys/arch/x86/pci: ichlpcib.c

Log Message:
Add Z68 LPC.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/pci/ichlpcib.c

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

Modified files:

Index: src/sys/arch/x86/pci/ichlpcib.c
diff -u src/sys/arch/x86/pci/ichlpcib.c:1.42 src/sys/arch/x86/pci/ichlpcib.c:1.43
--- src/sys/arch/x86/pci/ichlpcib.c:1.42	Sat Jan  4 02:09:12 2014
+++ src/sys/arch/x86/pci/ichlpcib.c	Sat Jan  4 02:59:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichlpcib.c,v 1.42 2014/01/04 02:09:12 msaitoh Exp $	*/
+/*	$NetBSD: ichlpcib.c,v 1.43 2014/01/04 02:59:17 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.42 2014/01/04 02:09:12 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.43 2014/01/04 02:59:17 msaitoh Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -233,6 +233,7 @@ static struct lpcib_device {
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_QM67_LPC, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_QS67_LPC, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_UM67_LPC, 1, 0 },
+	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_Z68_LPC, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_B75_LPC, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_H77_LPC, 1, 0 },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_MOBILE_HM70_LPC, 1, 0 },



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-01-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jan  4 03:19:00 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: remote.c

Log Message:
Fix string compare.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/gpl3/gdb/dist/gdb/remote.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/remote.c
diff -u src/external/gpl3/gdb/dist/gdb/remote.c:1.1.1.2 src/external/gpl3/gdb/dist/gdb/remote.c:1.2
--- src/external/gpl3/gdb/dist/gdb/remote.c:1.1.1.2	Thu Oct  3 15:50:36 2013
+++ src/external/gpl3/gdb/dist/gdb/remote.c	Sat Jan  4 03:19:00 2014
@@ -5480,7 +5480,7 @@ remote_parse_stop_reply (char *buf, stru
 	 as a register number.  */
 
 	  if (strncmp (p, awatch, strlen(awatch)) != 0
-	   strncmp (p, core, strlen (core) != 0))
+	   strncmp (p, core, strlen (core)) != 0)
 	{
 	  /* Read the ``P'' register number.  */
 	  pnum = strtol (p, p_temp, 16);