CVS commit: src/sys/miscfs/deadfs

2013-11-07 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Nov  7 09:45:53 UTC 2013

Modified Files:
src/sys/miscfs/deadfs: dead_vnops.c

Log Message:
Add missing operations that unlock or dereference their arguments.

Stop checking for a vnode state change -- dead vnodes never change state.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/miscfs/deadfs/dead_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/miscfs/deadfs/dead_vnops.c
diff -u src/sys/miscfs/deadfs/dead_vnops.c:1.51 src/sys/miscfs/deadfs/dead_vnops.c:1.52
--- src/sys/miscfs/deadfs/dead_vnops.c:1.51	Sun Jun 12 03:35:57 2011
+++ src/sys/miscfs/deadfs/dead_vnops.c	Thu Nov  7 09:45:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dead_vnops.c,v 1.51 2011/06/12 03:35:57 rmind Exp $	*/
+/*	$NetBSD: dead_vnops.c,v 1.52 2013/11/07 09:45:53 hannken Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dead_vnops.c,v 1.51 2011/06/12 03:35:57 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: dead_vnops.c,v 1.52 2013/11/07 09:45:53 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -48,6 +48,10 @@ __KERNEL_RCSID(0, $NetBSD: dead_vnops.c
 /*
  * Prototypes for dead operations on vnodes.
  */
+#define dead_bwrite	genfs_nullop
+int	dead_lookup(void *);
+int	dead_create(void *);
+int	dead_mknod(void *);
 int	dead_open(void *);
 #define dead_close	genfs_nullop
 int	dead_read(void *);
@@ -55,28 +59,36 @@ int	dead_write(void *);
 #define dead_fcntl	genfs_nullop
 int	dead_ioctl(void *);
 int	dead_poll(void *);
+int	dead_remove(void *);
+int	dead_link(void *);
+int	dead_rename(void *);
+int	dead_mkdir(void *);
+int	dead_rmdir(void *);
+int	dead_symlink(void *);
 #define dead_fsync	genfs_nullop
 #define dead_seek	genfs_nullop
-#define dead_inactive	genfs_nullop
+int	dead_inactive(void *);
 #define dead_reclaim	genfs_nullop
-int	dead_lock(void *);
+#define dead_lock	genfs_lock
 #define dead_unlock	genfs_unlock
 int	dead_bmap(void *);
 int	dead_strategy(void *);
 int	dead_print(void *);
 #define dead_islocked	genfs_islocked
-#define dead_bwrite	genfs_nullop
 #define dead_revoke	genfs_nullop
 int	dead_getpages(void *);
-#define dead_putpages	genfs_null_putpages
+int	dead_putpages(void *);
 
-int	chkvnlock(struct vnode *);
 int	dead_default_error(void *);
 
 int (**dead_vnodeop_p)(void *);
 
 const struct vnodeopv_entry_desc dead_vnodeop_entries[] = {
 	{ vop_default_desc, dead_default_error },
+	{ vop_bwrite_desc, dead_bwrite },		/* bwrite */
+	{ vop_lookup_desc, dead_lookup },		/* lookup */
+	{ vop_create_desc, dead_create },		/* create */
+	{ vop_mknod_desc, dead_mknod },		/* mknod */
 	{ vop_open_desc, dead_open },			/* open */
 	{ vop_close_desc, dead_close },		/* close */
 	{ vop_read_desc, dead_read },			/* read */
@@ -84,7 +96,12 @@ const struct vnodeopv_entry_desc dead_vn
 	{ vop_fcntl_desc, dead_fcntl },		/* fcntl */
 	{ vop_ioctl_desc, dead_ioctl },		/* ioctl */
 	{ vop_poll_desc, dead_poll },			/* poll */
-	{ vop_revoke_desc, dead_revoke },		/* revoke */
+	{ vop_remove_desc, dead_remove },		/* remove */
+	{ vop_link_desc, dead_link },			/* link */
+	{ vop_rename_desc, dead_rename },		/* rename */
+	{ vop_mkdir_desc, dead_mkdir },		/* mkdir */
+	{ vop_rmdir_desc, dead_rmdir },		/* rmdir */
+	{ vop_symlink_desc, dead_symlink },		/* symlink */
 	{ vop_fsync_desc, dead_fsync },		/* fsync */
 	{ vop_seek_desc, dead_seek },			/* seek */
 	{ vop_inactive_desc, dead_inactive },		/* inactive */
@@ -95,7 +112,7 @@ const struct vnodeopv_entry_desc dead_vn
 	{ vop_strategy_desc, dead_strategy },		/* strategy */
 	{ vop_print_desc, dead_print },		/* print */
 	{ vop_islocked_desc, dead_islocked },		/* islocked */
-	{ vop_bwrite_desc, dead_bwrite },		/* bwrite */
+	{ vop_revoke_desc, dead_revoke },		/* revoke */
 	{ vop_getpages_desc, dead_getpages },		/* getpages */
 	{ vop_putpages_desc, dead_putpages },		/* putpages */
 	{ NULL, NULL }
@@ -103,6 +120,7 @@ const struct vnodeopv_entry_desc dead_vn
 const struct vnodeopv_desc dead_vnodeop_opv_desc =
 	{ dead_vnodeop_p, dead_vnodeop_entries };
 
+/* ARGSUSED */
 int
 dead_default_error(void *v)
 {
@@ -110,21 +128,78 @@ dead_default_error(void *v)
 	return EBADF;
 }
 
-/*
- * Open always fails as if device did not exist.
- */
+/* ARGSUSED */
+int
+dead_bmap(void *v)
+{
+	/* struct vop_bmap_args {
+		struct vnode *a_vp;
+		daddr_t  a_bn;
+		struct vnode **a_vpp;
+		daddr_t *a_bnp;
+		int *a_runp;
+	} *ap = v; */
+
+	return (EIO);
+}
+
+int
+dead_lookup(void *v)
+{
+	struct vop_lookup_args /* {
+		struct vnode *a_dvp;
+		struct vnode **a_vpp;
+		struct componentname *a_cnp;
+	} */ *ap = v;
+
+	*(ap-a_vpp) = NULL;
+
+	return EIO;
+}
+
+int
+dead_create(void *v)
+{
+	struct vop_create_args /* {
+		struct vnode *a_dvp;
+		struct vnode **a_vpp;
+		struct componentname *a_cnp;
+		struct vattr *a_vap;
+	} */ *ap = v;
+
+	

CVS commit: src/sys

2013-11-07 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Nov  7 09:48:34 UTC 2013

Modified Files:
src/sys/kern: vfs_vnode.c
src/sys/sys: vnode.h

Log Message:
Make vclean static (ride 6.99.2).

DOCLOSE is no longer needed -- remove.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/kern/vfs_vnode.c
cvs rdiff -u -r1.239 -r1.240 src/sys/sys/vnode.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/vfs_vnode.c
diff -u src/sys/kern/vfs_vnode.c:1.24 src/sys/kern/vfs_vnode.c:1.25
--- src/sys/kern/vfs_vnode.c:1.24	Sun Nov  3 08:33:00 2013
+++ src/sys/kern/vfs_vnode.c	Thu Nov  7 09:48:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_vnode.c,v 1.24 2013/11/03 08:33:00 hannken Exp $	*/
+/*	$NetBSD: vfs_vnode.c,v 1.25 2013/11/07 09:48:34 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -116,7 +116,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_vnode.c,v 1.24 2013/11/03 08:33:00 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_vnode.c,v 1.25 2013/11/07 09:48:34 hannken Exp $);
 
 #define _VFS_VNODE_PRIVATE
 
@@ -143,8 +143,6 @@ __KERNEL_RCSID(0, $NetBSD: vfs_vnode.c,
 #include uvm/uvm.h
 #include uvm/uvm_readahead.h
 
-#define	DOCLOSE		0x0008		/* vclean: close active files */
-
 /* Flags to vrelel. */
 #define	VRELEL_ASYNC_RELE	0x0001	/* Always defer to vrele thread. */
 
@@ -170,6 +168,7 @@ static int		vrele_pending		__cacheline_a
 static int		vrele_gen		__cacheline_aligned;
 
 static int		cleanvnode(void);
+static void		vclean(vnode_t *);
 static void		vrelel(vnode_t *, int);
 static void		vdrain_thread(void *);
 static void		vrele_thread(void *);
@@ -324,7 +323,7 @@ try_nextlist:
 	 * before doing this.
 	 */
 	vp-v_usecount = 1;
-	vclean(vp, DOCLOSE);
+	vclean(vp);
 	vrelel(vp, 0);
 	fstrans_done(mp);
 
@@ -751,7 +750,7 @@ retry:
 		 * otherwise just free it.
 		 */
 		if (recycle) {
-			vclean(vp, DOCLOSE);
+			vclean(vp);
 		}
 		KASSERT(vp-v_usecount  0);
 	}
@@ -928,11 +927,11 @@ holdrelel(vnode_t *vp)
  *
  * Must be called with the interlock held, and will return with it held.
  */
-void
-vclean(vnode_t *vp, int flags)
+static void
+vclean(vnode_t *vp)
 {
 	lwp_t *l = curlwp;
-	bool recycle, active, make_anon;
+	bool recycle, active, doclose;
 	int error;
 
 	KASSERT(mutex_owned(vp-v_interlock));
@@ -966,10 +965,8 @@ vclean(vnode_t *vp, int flags)
 	mutex_exit(vp-v_interlock);
 	VOP_LOCK(vp, LK_EXCLUSIVE);
 
-	make_anon = (active  vp-v_type == VBLK 
+	doclose = ! (active  vp-v_type == VBLK 
 	spec_node_getmountedfs(vp) != NULL);
-	if (make_anon)
-		flags = ~DOCLOSE;
 
 	/*
 	 * Clean out any cached data associated with the vnode.
@@ -977,11 +974,9 @@ vclean(vnode_t *vp, int flags)
 	 * deactivated before being reclaimed. Note that the
 	 * VOP_INACTIVE will unlock the vnode.
 	 */
-	if (flags  DOCLOSE) {
+	if (doclose) {
 		error = vinvalbuf(vp, V_SAVE, NOCRED, l, 0, 0);
 		if (error != 0) {
-			/* XXX, fix vn_start_write's grab of mp and use that. */
-
 			if (wapbl_vphaswapbl(vp))
 WAPBL_DISCARD(wapbl_vptomp(vp));
 			error = vinvalbuf(vp, 0, NOCRED, l, 0, 0);
@@ -1022,23 +1017,22 @@ vclean(vnode_t *vp, int flags)
 	 * The vnode isn't clean, but still resides on the mount list.  Remove
 	 * it. XXX This is a bit dodgy.
 	 */
-	if (make_anon)
+	if (! doclose)
 		vfs_insmntque(vp, NULL);
 
 	/* Done with purge, notify sleepers of the grim news. */
 	mutex_enter(vp-v_interlock);
-	if (make_anon) {
-		vp-v_op = spec_vnodeop_p;
-	} else {
+	if (doclose) {
 		vp-v_op = dead_vnodeop_p;
+		vp-v_vflag |= VV_LOCKSWORK;
+		vp-v_iflag |= VI_CLEAN;
+	} else {
+		vp-v_op = spec_vnodeop_p;
+		vp-v_vflag = ~VV_LOCKSWORK;
 	}
 	vp-v_tag = VT_NON;
 	KNOTE(vp-v_klist, NOTE_REVOKE);
 	vp-v_iflag = ~VI_XLOCK;
-	vp-v_vflag = ~VV_LOCKSWORK;
-	if ((flags  DOCLOSE) != 0) {
-		vp-v_iflag |= VI_CLEAN;
-	}
 	cv_broadcast(vp-v_cv);
 
 	KASSERT((vp-v_iflag  VI_ONWORKLST) == 0);
@@ -1064,7 +1058,7 @@ vrecycle(vnode_t *vp, kmutex_t *inter_lk
 	}
 	vremfree(vp);
 	vp-v_usecount = 1;
-	vclean(vp, DOCLOSE);
+	vclean(vp);
 	vrelel(vp, 0);
 	return 1;
 }
@@ -1088,7 +1082,7 @@ vrevoke(vnode_t *vp)
 		return;
 	} else if (vp-v_type != VBLK  vp-v_type != VCHR) {
 		atomic_inc_uint(vp-v_usecount);
-		vclean(vp, DOCLOSE);
+		vclean(vp);
 		vrelel(vp, 0);
 		return;
 	} else {
@@ -1099,7 +1093,7 @@ vrevoke(vnode_t *vp)
 
 	while (spec_node_lookup_by_dev(type, dev, vq) == 0) {
 		mutex_enter(vq-v_interlock);
-		vclean(vq, DOCLOSE);
+		vclean(vq);
 		vrelel(vq, 0);
 	}
 }
@@ -1113,7 +1107,7 @@ vgone(vnode_t *vp)
 {
 
 	mutex_enter(vp-v_interlock);
-	vclean(vp, DOCLOSE);
+	vclean(vp);
 	vrelel(vp, 0);
 }
 

Index: src/sys/sys/vnode.h
diff -u src/sys/sys/vnode.h:1.239 src/sys/sys/vnode.h:1.240
--- src/sys/sys/vnode.h:1.239	Tue Oct 29 09:53:51 2013
+++ src/sys/sys/vnode.h	Thu Nov  7 09:48:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode.h,v 1.239 2013/10/29 

CVS commit: src/sys/dev/pci

2013-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  7 14:33:09 UTC 2013

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

Log Message:
Add some Intel devices. Mainly taken from Mobile 4th Generation Intel Core
Processor Family I/O datasheet (Document number: 329003)


To generate a diff of this commit:
cvs rdiff -u -r1.1162 -r1.1163 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.1162 src/sys/dev/pci/pcidevs:1.1163
--- src/sys/dev/pci/pcidevs:1.1162	Sat Sep 14 20:26:51 2013
+++ src/sys/dev/pci/pcidevs	Thu Nov  7 14:33:09 2013
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1162 2013/09/14 20:26:51 soren Exp $
+$NetBSD: pcidevs,v 1.1163 2013/11/07 14:33:09 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2558,6 +2558,23 @@ product INTEL WIFI_LINK_2230_2	0x0888	Ce
 product INTEL WIFI_LINK_6235	0x088e	Centrino Advanced-N 6235
 product INTEL 80960RM		0x0962	i960 RM PCI-PCI
 product INTEL 80960RN		0x0964	i960 RN PCI-PCI
+product INTEL CORE4G_D_ULT_GT1	0x0a02	HD Graphics
+product INTEL CORE4G_M_HOST_DRAM 0x0a04	Core 4G (mobile) Host Bridge, DRAM
+product INTEL CORE4G_M_ULT_GT1	0x0a06	HD Graphics (GT1)
+product INTEL CORE4G_S_ULT_GT1	0x0a0a	HD Graphics
+product INTEL CORE4G_R_ULT_GT1_1 0x0a0b	HD Graphics
+product INTEL CORE4G_M_MINI_HDA	0x0a0c	Core 4G (mobile) Mini HD audio
+product INTEL CORE4G_R_ULT_GT1_2 0x0a0e	HD Graphics
+product INTEL CORE4G_D_ULT_GT2	0x0a12	HD Graphics
+product INTEL CORE4G_M_ULT_GT2	0x0a16	HD Graphics (GT2)
+product INTEL CORE4G_S_ULT_GT2	0x0a1a	HD Graphics
+product INTEL CORE4G_R_ULT_GT2_1 0x0a1b	HD Graphics
+product INTEL CORE4G_R_ULT_GT2_2 0x0a1e	HD Graphics
+product INTEL CORE4G_D_ULT_GT3	0x0a22	HD Graphics
+product INTEL CORE4G_M_ULT_GT3	0x0a26	HD Graphics 5000 (GT3)
+product INTEL CORE4G_S_ULT_GT3	0x0a2a	HD Graphics
+product INTEL CORE4G_R_ULT_GT3_1 0x0a2b	HD Graphics
+product INTEL CORE4G_R_ULT_GT3_2 0x0a2e	Iris Graphics 5100
 product INTEL HASWELL_HOST_DRAM	0x0c00	Haswell Host Bridge, DRAM
 product INTEL HASWELL_PCIE16	0x0c01	Haswell PCI-E x16 Controller
 product INTEL HASWELL_PCIE8	0x0c05	Haswell PCI-E x8 Controller
@@ -3524,6 +3541,37 @@ product INTEL C222_LPC		0x8c52	C222 LPC
 product INTEL C224_LPC		0x8c54	C224 LPC
 product INTEL C226_LPC		0x8c56	C226 LPC
 product INTEL H81_LPC		0x8c5c	H81 LPC
+product INTEL CORE4G_M_AHCI	0x9c03	Core 4G (mobile) SATA Controller (AHCI)
+product INTEL CORE4G_M_RAID_1	0x9c05	Core 4G (mobile) SATA Controller (RAID)
+product INTEL CORE4G_M_RAID_2	0x9c07	Core 4G (mobile) SATA Controller (RAID) Premium
+product INTEL CORE4G_M_RAID_3	0x9c0f	Core 4G (mobile) SATA Controller (RAID) Premium
+product INTEL CORE4G_M_PCIE_1	0x9c10	Core 4G (mobile) PCIE
+product INTEL CORE4G_M_PCIE_2	0x9c12	Core 4G (mobile) PCIE
+product INTEL CORE4G_M_PCIE_3	0x9c14	Core 4G (mobile) PCIE
+product INTEL CORE4G_M_PCIE_4	0x9c16	Core 4G (mobile) PCIE
+product INTEL CORE4G_M_PCIE_5	0x9c18	Core 4G (mobile) PCIE
+product INTEL CORE4G_M_PCIE_6	0x9c1a	Core 4G (mobile) PCIE
+product INTEL CORE4G_M_HDA	0x9c20	Core 4G (mobile) HD Audio
+product INTEL CORE4G_M_SMB	0x9c22	Core 4G (mobile) SMBus
+product INTEL CORE4G_M_THERM	0x9c24	Core 4G (mobile) Thermal
+product INTEL CORE4G_M_EHCI	0x9c26	Core 4G (mobile) USB EHCI
+product INTEL CORE4G_M_XHCI	0x9c31	Core 4G (mobile) USB xHCI
+product INTEL CORE4G_M_SDIO	0x9c35	Core 4G (mobile) SDIO
+product INTEL CORE4G_M_SSOUND	0x9c36	Core 4G (mobile) Smart Sound
+product INTEL CORE4G_M_MEI_1	0x9c3a	Core 4G (mobile) MEI
+product INTEL CORE4G_M_MEI_2	0x9c3b	Core 4G (mobile) MEI
+product INTEL CORE4G_M_IDE_R	0x9c3c	Core 4G (mobile) IDE-R
+product INTEL CORE4G_M_KT	0x9c3d	Core 4G (mobile) KT
+product INTEL CORE4G_M_LPC_1	0x9c41	Core 4G (mobile) LPC
+product INTEL CORE4G_M_LPC_2	0x9c43	Core 4G (mobile) LPC
+product INTEL CORE4G_M_LPC_3	0x9c45	Core 4G (mobile) LPC
+product INTEL CORE4G_M_S_DMA	0x9c60	Core 4G (mobile) Serial I/O DMA
+product INTEL CORE4G_M_S_I2C_0	0x9c61	Core 4G (mobile) Serial I/O I2C
+product INTEL CORE4G_M_S_I2C_1	0x9c62	Core 4G (mobile) Serial I/O I2C
+product INTEL CORE4G_M_S_UART_0 0x9c63	Core 4G (mobile) Serial I/O UART
+product INTEL CORE4G_M_S_UART_1 0x9c64	Core 4G (mobile) Serial I/O UART
+product INTEL CORE4G_M_S_GSPI_0 0x9c65	Core 4G (mobile) Serial I/O GSPI
+product INTEL CORE4G_M_S_GSPI_1 0x9c66	Core 4G (mobile) Serial I/O GSPI
 product INTEL PINEVIEW_HB	0xa000	Pineview Host Bridge
 product INTEL PINEVIEW_IGD	0xa001	Pineview Integrated Graphics Device
 product INTEL PINEVIEW_M_HB	0xa010	Pineview Host Bridge



CVS commit: src/sys/arch/sandpoint/stand/altboot

2013-11-07 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Thu Nov  7 14:51:36 UTC 2013

Modified Files:
src/sys/arch/sandpoint/stand/altboot: brdsetup.c

Log Message:
shut off gcc 4.8 unused variable warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sandpoint/stand/altboot/brdsetup.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/sandpoint/stand/altboot/brdsetup.c
diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.32 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.33
--- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.32	Tue Dec 25 17:07:06 2012
+++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c	Thu Nov  7 14:51:36 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: brdsetup.c,v 1.32 2012/12/25 17:07:06 phx Exp $ */
+/* $NetBSD: brdsetup.c,v 1.33 2013/11/07 14:51:36 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -446,6 +446,9 @@ encbrdfix(struct brdprop *brd)
 	val = pcicfgread(ac97, 0x3c) ~ 0xff;
 	val |= 5;
 	pcicfgwrite(ac97, 0x3c, val);
+
+	(void) pcicfgread(ide, 0x08);
+	(void) pcicfgread(pmgt, 0x08);
 }
 
 void



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

2013-11-07 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Thu Nov  7 15:26:36 UTC 2013

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

Log Message:
move DIAGNOSTIC only variable inside #ifdef


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/powerpc/fixup.c

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

Modified files:

Index: src/sys/arch/powerpc/powerpc/fixup.c
diff -u src/sys/arch/powerpc/powerpc/fixup.c:1.5 src/sys/arch/powerpc/powerpc/fixup.c:1.6
--- src/sys/arch/powerpc/powerpc/fixup.c:1.5	Fri Jul  1 23:47:09 2011
+++ src/sys/arch/powerpc/powerpc/fixup.c	Thu Nov  7 15:26:36 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fixup.c,v 1.5 2011/07/01 23:47:09 matt Exp $	*/
+/*	$NetBSD: fixup.c,v 1.6 2013/11/07 15:26:36 nisimura Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: fixup.c,v 1.5 2011/07/01 23:47:09 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: fixup.c,v 1.6 2013/11/07 15:26:36 nisimura Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -104,7 +104,9 @@ powerpc_fixup_stubs(uint32_t *start, uin
 		register_t fixreg[32];
 		register_t ctr = 0;
 		uint32_t valid_mask = (1  1);
+#ifdef DIAGNOSTIC
 		int r_lr = -1;
+#endif
 		for (; stub  stub_end  fixup.jfi_real == 0; stub++) {
 			const union instr i = { .i_int = *stub };
 
@@ -120,9 +122,9 @@ powerpc_fixup_stubs(uint32_t *start, uin
 #ifdef DIAGNOSTIC
 	const u_int spr = (rb  5) | ra;
 	KASSERT(spr == SPR_LR);
+	r_lr = rs;
 #endif
 	valid_mask |= (1  rs);
-	r_lr = rs;
 	break;
 }
 case OPC31_MTSPR: {



CVS commit: src/sys/dev/pci

2013-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  7 15:55:09 UTC 2013

Modified Files:
src/sys/dev/pci: ichsmb.c pucdata.c

Log Message:
Add some Mobile 4th generation Intel Core Processor devices
(Lynx Point-LP).


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/ichsmb.c
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/pci/pucdata.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/ichsmb.c
diff -u src/sys/dev/pci/ichsmb.c:1.32 src/sys/dev/pci/ichsmb.c:1.33
--- src/sys/dev/pci/ichsmb.c:1.32	Thu Jul 18 22:14:54 2013
+++ src/sys/dev/pci/ichsmb.c	Thu Nov  7 15:55:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichsmb.c,v 1.32 2013/07/18 22:14:54 soren Exp $	*/
+/*	$NetBSD: ichsmb.c,v 1.33 2013/11/07 15:55:08 msaitoh Exp $	*/
 /*	$OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ichsmb.c,v 1.32 2013/07/18 22:14:54 soren Exp $);
+__KERNEL_RCSID(0, $NetBSD: ichsmb.c,v 1.33 2013/11/07 15:55:08 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -110,6 +110,7 @@ ichsmb_match(device_t parent, cfdata_t m
 		case PCI_PRODUCT_INTEL_6SERIES_SMB:
 		case PCI_PRODUCT_INTEL_7SERIES_SMB:
 		case PCI_PRODUCT_INTEL_8SERIES_SMB:
+		case PCI_PRODUCT_INTEL_CORE4G_M_SMB:
 		case PCI_PRODUCT_INTEL_C600_SMBUS:
 		case PCI_PRODUCT_INTEL_C600_SMB_0:
 		case PCI_PRODUCT_INTEL_C600_SMB_1:

Index: src/sys/dev/pci/pucdata.c
diff -u src/sys/dev/pci/pucdata.c:1.86 src/sys/dev/pci/pucdata.c:1.87
--- src/sys/dev/pci/pucdata.c:1.86	Wed Sep  4 17:38:37 2013
+++ src/sys/dev/pci/pucdata.c	Thu Nov  7 15:55:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pucdata.c,v 1.86 2013/09/04 17:38:37 christos Exp $	*/
+/*	$NetBSD: pucdata.c,v 1.87 2013/11/07 15:55:08 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1998, 1999 Christopher G. Demetriou.  All rights reserved.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pucdata.c,v 1.86 2013/09/04 17:38:37 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: pucdata.c,v 1.87 2013/11/07 15:55:08 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1806,6 +1806,15 @@ const struct puc_device_description puc_
 	},
 	},
 
+	/* Intel Core 4G (mobile) KT */
+	{   Intel Core 4G (mobile) KT,
+	{	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_CORE4G_M_KT, 0, 0 },
+	{	0x,	0x,	0,	0	},
+	{
+		{ PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+	},
+	},
+
 	/* Intel EG20T UART */
 	{   Intel EG20T UART #0,
 	{	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_EG20T_UART_0, 0, 0 },



CVS commit: src/distrib/utils/ssh

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  7 17:18:22 UTC 2013

Modified Files:
src/distrib/utils/ssh: ssh.c

Log Message:
remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/ssh/ssh.c

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

Modified files:

Index: src/distrib/utils/ssh/ssh.c
diff -u src/distrib/utils/ssh/ssh.c:1.5 src/distrib/utils/ssh/ssh.c:1.6
--- src/distrib/utils/ssh/ssh.c:1.5	Thu Aug 25 12:54:58 2011
+++ src/distrib/utils/ssh/ssh.c	Thu Nov  7 12:18:22 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssh.c,v 1.5 2011/08/25 16:54:58 christos Exp $	*/
+/*	$NetBSD: ssh.c,v 1.6 2013/11/07 17:18:22 christos Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -417,7 +417,7 @@ int
 cmd_run(int argc, char *argv[])
 {
 	struct sigaction sa;
-	int pid, err, cstat;
+	int pid, cstat;
 	char file[MAXPATHLEN];
 	int background;
 	char *opt, *ifile, *ofile, *efile;
@@ -494,7 +494,7 @@ cmd_run(int argc, char *argv[])
 			sigaction(SIGINT,  sa, NULL);
 			sigaction(SIGQUIT, sa, NULL);
 		}
-		err = execve(file, argv, environ);
+		execve(file, argv, environ);
 		perror(argv[0]);
 		return 1;
 	}



CVS commit: src/common/dist/zlib

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  7 17:26:13 UTC 2013

Modified Files:
src/common/dist/zlib: gzio.c

Log Message:
mark variables as used


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/dist/zlib/gzio.c

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

Modified files:

Index: src/common/dist/zlib/gzio.c
diff -u src/common/dist/zlib/gzio.c:1.3 src/common/dist/zlib/gzio.c:1.4
--- src/common/dist/zlib/gzio.c:1.3	Thu May 19 18:23:12 2011
+++ src/common/dist/zlib/gzio.c	Thu Nov  7 12:26:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: gzio.c,v 1.3 2011/05/19 22:23:12 tsutsui Exp $	*/
+/*	$NetBSD: gzio.c,v 1.4 2013/11/07 17:26:13 christos Exp $	*/
 
 /* gzio.c -- IO on .gz files
  * Copyright (C) 1995-2005 Jean-loup Gailly.
@@ -157,6 +157,8 @@ local gzFile gz_open (path, mode, fd)
 if (s-mode == 'w') {
 #ifdef NO_GZCOMPRESS
 err = Z_STREAM_ERROR;
+	__USE(level);
+	__USE(strategy);
 #else
 err = deflateInit2((s-stream), level,
Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy);



CVS commit: src/sys/arch/sun3

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  7 17:50:18 UTC 2013

Modified Files:
src/sys/arch/sun3/dev: si_sebuf.c xy.c
src/sys/arch/sun3/sun3: dvma.c pmap.c

Log Message:
fix unused warnings


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sun3/dev/si_sebuf.c
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/sun3/dev/xy.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/sun3/sun3/dvma.c
cvs rdiff -u -r1.169 -r1.170 src/sys/arch/sun3/sun3/pmap.c

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

Modified files:

Index: src/sys/arch/sun3/dev/si_sebuf.c
diff -u src/sys/arch/sun3/dev/si_sebuf.c:1.28 src/sys/arch/sun3/dev/si_sebuf.c:1.29
--- src/sys/arch/sun3/dev/si_sebuf.c:1.28	Fri Nov 20 23:16:52 2009
+++ src/sys/arch/sun3/dev/si_sebuf.c	Thu Nov  7 12:50:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: si_sebuf.c,v 1.28 2009/11/21 04:16:52 rmind Exp $	*/
+/*	$NetBSD: si_sebuf.c,v 1.29 2013/11/07 17:50:18 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: si_sebuf.c,v 1.28 2009/11/21 04:16:52 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: si_sebuf.c,v 1.29 2013/11/07 17:50:18 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -526,11 +526,10 @@ se_intr(void *arg)
 {
 	struct se_softc *sc = arg;
 	volatile struct se_regs *se = sc-sc_regs;
-	int dma_error, claimed;
+	int claimed;
 	u_short csr;
 
 	claimed = 0;
-	dma_error = 0;
 
 	/* SBC interrupt? DMA interrupt? */
 	csr = se-se_csr;

Index: src/sys/arch/sun3/dev/xy.c
diff -u src/sys/arch/sun3/dev/xy.c:1.72 src/sys/arch/sun3/dev/xy.c:1.73
--- src/sys/arch/sun3/dev/xy.c:1.72	Tue Feb  1 15:19:32 2011
+++ src/sys/arch/sun3/dev/xy.c	Thu Nov  7 12:50:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: xy.c,v 1.72 2011/02/01 20:19:32 chuck Exp $	*/
+/*	$NetBSD: xy.c,v 1.73 2013/11/07 17:50:18 christos Exp $	*/
 
 /*
  * Copyright (c) 1995 Charles D. Cranor
@@ -46,7 +46,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xy.c,v 1.72 2011/02/01 20:19:32 chuck Exp $);
+__KERNEL_RCSID(0, $NetBSD: xy.c,v 1.73 2013/11/07 17:50:18 christos Exp $);
 
 #undef XYC_DEBUG		/* full debug */
 #undef XYC_DIAG			/* extra sanity checks */
@@ -1241,7 +1241,6 @@ xyc_cmd(struct xyc_softc *xycsc, int cmd
 int 
 xyc_startbuf(struct xyc_softc *xycsc, struct xy_softc *xysc, struct buf *bp)
 {
-	int partno;
 	struct xy_iorq *iorq;
 	struct xy_iopb *iopb;
 	u_long  block;
@@ -1255,8 +1254,8 @@ xyc_startbuf(struct xyc_softc *xycsc, st
 	if (bp == NULL)
 		panic(%s null buf, __func__);
 
-	partno = DISKPART(bp-b_dev);
 #ifdef XYC_DEBUG
+	int partno = DISKPART(bp-b_dev);
 	printf(%s: %s%c: %s block %d\n, __func__, device_xname(xysc-sc_dev),
 	'a' + partno, (bp-b_flags  B_READ) ? read : write,
 	(int)bp-b_blkno);

Index: src/sys/arch/sun3/sun3/dvma.c
diff -u src/sys/arch/sun3/sun3/dvma.c:1.39 src/sys/arch/sun3/sun3/dvma.c:1.40
--- src/sys/arch/sun3/sun3/dvma.c:1.39	Sat Sep  7 11:56:11 2013
+++ src/sys/arch/sun3/sun3/dvma.c	Thu Nov  7 12:50:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dvma.c,v 1.39 2013/09/07 15:56:11 tsutsui Exp $	*/
+/*	$NetBSD: dvma.c,v 1.40 2013/11/07 17:50:18 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dvma.c,v 1.39 2013/09/07 15:56:11 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: dvma.c,v 1.40 2013/11/07 17:50:18 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -239,7 +239,7 @@ dvma_mapout(void *dma, int len)
 	vaddr_t seg_dma;
 	vsize_t seg_len, seg_off;
 	vaddr_t v, x;
-	int sme;
+	int sme __diagused;
 	int s;
 
 	/* Get seg-aligned address and length. */
@@ -292,7 +292,7 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm
 	vsize_t off, sgsize;
 	paddr_t pa;
 	pmap_t pmap;
-	int error, rv, s;
+	int error, rv __diagused, s;
 
 	/*
 	 * Make sure that on error condition we return no valid mappings.
@@ -356,7 +356,7 @@ _bus_dmamap_unload(bus_dma_tag_t t, bus_
 	bus_dma_segment_t *segs;
 	vaddr_t dva;
 	vsize_t sgsize;
-	int error, s;
+	int error __diagused, s;
 
 #ifdef DIAGNOSTIC
 	if (map-dm_nsegs != 1)

Index: src/sys/arch/sun3/sun3/pmap.c
diff -u src/sys/arch/sun3/sun3/pmap.c:1.169 src/sys/arch/sun3/sun3/pmap.c:1.170
--- src/sys/arch/sun3/sun3/pmap.c:1.169	Sat Sep  7 11:56:11 2013
+++ src/sys/arch/sun3/sun3/pmap.c	Thu Nov  7 12:50:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.169 2013/09/07 15:56:11 tsutsui Exp $	*/
+/*	$NetBSD: pmap.c,v 1.170 2013/11/07 17:50:18 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.169 2013/09/07 15:56:11 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.170 2013/11/07 17:50:18 christos Exp $);
 
 #include opt_ddb.h
 #include opt_pmap_debug.h
@@ -3044,9 +3044,8 @@ out:
 void
 pmap_protect_mmu(pmap_t pmap, 

CVS commit: src/sys/arch/sun3/sun3

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  7 17:50:02 UTC 2013

Modified Files:
src/sys/arch/sun3/sun3: locore.s

Log Message:
don't duplicate definitions


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/sun3/sun3/locore.s

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

Modified files:

Index: src/sys/arch/sun3/sun3/locore.s
diff -u src/sys/arch/sun3/sun3/locore.s:1.96 src/sys/arch/sun3/sun3/locore.s:1.97
--- src/sys/arch/sun3/sun3/locore.s:1.96	Sat Sep  7 11:56:11 2013
+++ src/sys/arch/sun3/sun3/locore.s	Thu Nov  7 12:50:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.96 2013/09/07 15:56:11 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.97 2013/11/07 17:50:02 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -446,12 +446,6 @@ Lbrkpt2:
  *   %d0,%d1,%a0,%a1, sr, pc, vo
  */
 
-#define INTERRUPT_SAVEREG \
-	moveml	#0xC0C0,%sp@-
-
-#define INTERRUPT_RESTORE \
-	moveml	%sp@+,#0x0303
-
 /*
  * This is the common auto-vector interrupt handler,
  * for which the CPU provides the vector=0x18+level.
@@ -465,7 +459,7 @@ Lbrkpt2:
 GLOBAL(_isr_autovec)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(isr_autovec)
-	INTERRUPT_RESTORE
+	INTERRUPT_RESTOREREG
 	jra	_ASM_LABEL(rei)
 
 /* clock: see clock.c */
@@ -477,7 +471,7 @@ GLOBAL(_isr_autovec)
 GLOBAL(_isr_clock)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(clock_intr)
-	INTERRUPT_RESTORE
+	INTERRUPT_RESTOREREG
 	jra	_ASM_LABEL(rei)
 
 | Handler for all vectored interrupts (i.e. VME interrupts)
@@ -489,12 +483,9 @@ GLOBAL(_isr_clock)
 GLOBAL(_isr_vectored)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(isr_vectored)
-	INTERRUPT_RESTORE
+	INTERRUPT_RESTOREREG
 	jra	_ASM_LABEL(rei)
 
-#undef	INTERRUPT_SAVEREG
-#undef	INTERRUPT_RESTORE
-
 /* interrupt counters (needed by vmstat) */
 GLOBAL(intrnames)
 	.asciz	spur	| 0



CVS commit: src/usr.sbin/cpuctl/arch

2013-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  7 18:18:59 UTC 2013

Modified Files:
src/usr.sbin/cpuctl/arch: i386.c

Log Message:
Update some processor names.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/cpuctl/arch/i386.c

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

Modified files:

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.47 src/usr.sbin/cpuctl/arch/i386.c:1.48
--- src/usr.sbin/cpuctl/arch/i386.c:1.47	Wed Oct 30 08:42:16 2013
+++ src/usr.sbin/cpuctl/arch/i386.c	Thu Nov  7 18:18:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.47 2013/10/30 08:42:16 mrg Exp $	*/
+/*	$NetBSD: i386.c,v 1.48 2013/11/07 18:18:59 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: i386.c,v 1.47 2013/10/30 08:42:16 mrg Exp $);
+__RCSID($NetBSD: i386.c,v 1.48 2013/11/07 18:18:59 msaitoh Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -342,18 +342,19 @@ const struct cpu_cpuid_nameclass i386_cp
 [0x2a] = Xeon E3-12xx, 2nd gen i7, i5, 
 	 i3 2xxx,
 [0x2c] = Xeon 36xx  56xx, i7, i5 and i3,
-[0x2d] = Xeon E5 Sandy bridy family,
+[0x2d] = Xeon E5 Sandy Bridy family, 
+	 Core i7-39xx Extreme,
 [0x2e] = Xeon 75xx  65xx,
 [0x2f] = Xeon E7 family,
 [0x35] = Atom Family,
 [0x36] = Atom S1000,
 [0x37] = Atom C2000, E3000,
 [0x3a] = Xeon E3-1200v2 and 3rd gen core, 
-	 Ivy bridge,
+	 Ivy Bridge,
 [0x3c] = 4th gen Core, Xeon E3-12xx v3 
 	 (Haswell),
 [0x3d] = Next gen Core,
-[0x3e] = Next gen Xeon E5/E7, Ivy bridge,
+[0x3e] = Xeon E5/E7, Ivy Bridge-EP,
 [0x3f] = Future gen Xeon,
 [0x45] = 4th gen Core, Xeon E3-12xx v3 
 	 (Haswell),



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

2013-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  7 18:17:13 UTC 2013

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

Log Message:
Get bus clock for some Atom processors.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x86/x86/intel_busclock.c

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

Modified files:

Index: src/sys/arch/x86/x86/intel_busclock.c
diff -u src/sys/arch/x86/x86/intel_busclock.c:1.13 src/sys/arch/x86/x86/intel_busclock.c:1.14
--- src/sys/arch/x86/x86/intel_busclock.c:1.13	Sat Sep 24 10:49:13 2011
+++ src/sys/arch/x86/x86/intel_busclock.c	Thu Nov  7 18:17:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: intel_busclock.c,v 1.13 2011/09/24 10:49:13 jym Exp $	*/
+/*	$NetBSD: intel_busclock.c,v 1.14 2013/11/07 18:17:13 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intel_busclock.c,v 1.13 2011/09/24 10:49:13 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: intel_busclock.c,v 1.14 2013/11/07 18:17:13 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -213,6 +213,66 @@ p3_get_bus_clock(struct cpu_info *ci)
 			goto print_msr;
 		}
 		break;
+	case 0x1c: /* Atom */
+	case 0x26:
+	case 0x27:
+	case 0x35:
+	case 0x36:
+		if (rdmsr_safe(MSR_FSB_FREQ, msr) == EFAULT) {
+			aprint_debug_dev(ci-ci_dev,
+			unable to determine bus speed);
+			goto print_msr;
+		}
+		bus = (msr  0)  0x7;
+		switch (bus) {
+		case 7:
+			bus_clock =  8333;
+			break;
+		case 5:
+			bus_clock = 1;
+			break;
+		case 1:
+			bus_clock = 1;
+			break;
+		case 3:
+			bus_clock = 16667;
+			break;
+		default:
+			aprint_debug(%s: unknown Atom FSB_FREQ value %d,
+			device_xname(ci-ci_dev), bus);
+			goto print_msr;
+		}
+		break;
+	case 0x37: /* Silvermont */
+	case 0x4d:
+		if (rdmsr_safe(MSR_FSB_FREQ, msr) == EFAULT) {
+			aprint_debug_dev(ci-ci_dev,
+			unable to determine bus speed);
+			goto print_msr;
+		}
+		bus = (msr  0)  0x7;
+		switch (bus) {
+		case 4:
+			bus_clock =  8000;
+			break;
+		case 0:
+			bus_clock =  8333;
+			break;
+		case 1:
+			bus_clock = 1;
+			break;
+		case 2:
+			bus_clock = 1;
+			break;
+		case 3:
+			bus_clock = 16667;
+			break;
+		default:
+			aprint_debug(%s: unknown Silvermont FSB_FREQ value %d,
+			device_xname(ci-ci_dev), bus);
+			goto print_msr;
+		}
+		break;
 	default:
 		aprint_debug(%s: unknown i686 model %d, can't get bus clock,
 		device_xname(ci-ci_dev),



CVS commit: src/sys/dev/pci

2013-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  7 18:45:32 UTC 2013

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

Log Message:
Revert previos. Sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.263 -r1.264 src/sys/dev/pci/if_bge.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/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.263 src/sys/dev/pci/if_bge.c:1.264
--- src/sys/dev/pci/if_bge.c:1.263	Thu Nov  7 18:44:09 2013
+++ src/sys/dev/pci/if_bge.c	Thu Nov  7 18:45:32 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.263 2013/11/07 18:44:09 msaitoh Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.264 2013/11/07 18:45:32 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.263 2013/11/07 18:44:09 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.264 2013/11/07 18:45:32 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -3724,7 +3724,6 @@ bge_attach(device_t parent, device_t sel
 	else
 		sc-bge_dmatag = pa-pa_dmat;
 
-#if 0
 	/* 40bit DMA workaround */
 	if (sizeof(bus_addr_t)  4) {
 		if ((sc-bge_flags  BGEF_40BIT_BUG) != 0) {
@@ -3740,7 +3739,6 @@ bge_attach(device_t parent, device_t sel
 			}
 		}
 	}
-#endif
 	DPRINTFN(5, (bus_dmamem_alloc\n));
 	if (bus_dmamem_alloc(sc-bge_dmatag, sizeof(struct bge_ring_data),
 			 PAGE_SIZE, 0, sc-bge_ring_seg, 1,



CVS commit: src/usr.bin/make

2013-11-07 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Nov  7 18:50:46 UTC 2013

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

Log Message:
apostrophe's do not make plural's.


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/usr.bin/make/make.1

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

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.225 src/usr.bin/make/make.1:1.226
--- src/usr.bin/make/make.1:1.225	Sun Oct 27 11:38:13 2013
+++ src/usr.bin/make/make.1	Thu Nov  7 18:50:46 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: make.1,v 1.225 2013/10/27 11:38:13 wiz Exp $
+.\	$NetBSD: make.1,v 1.226 2013/11/07 18:50:46 dholland Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -1758,7 +1758,7 @@ or
 .Fl t
 options were specified.
 Normally used to mark recursive
-.Nm Ns 's .
+.Nm Ns s .
 .It Ic .META
 Create a meta file for the target, even if it is flagged as
 .Ic .PHONY ,



CVS commit: src/sys/dev/pci

2013-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  7 18:47:07 UTC 2013

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1156 -r1.1157 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1155 -r1.1156 src/sys/dev/pci/pcidevs_data.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/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.1156 src/sys/dev/pci/pcidevs.h:1.1157
--- src/sys/dev/pci/pcidevs.h:1.1156	Thu Nov  7 18:44:09 2013
+++ src/sys/dev/pci/pcidevs.h	Thu Nov  7 18:47:07 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1156 2013/11/07 18:44:09 msaitoh Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1157 2013/11/07 18:47:07 msaitoh Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1163 2013/11/07 14:33:09 msaitoh Exp
+ *	NetBSD: pcidevs,v 1.1164 2013/11/07 18:44:09 msaitoh Exp
  */
 
 /*

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1155 src/sys/dev/pci/pcidevs_data.h:1.1156
--- src/sys/dev/pci/pcidevs_data.h:1.1155	Thu Nov  7 18:44:09 2013
+++ src/sys/dev/pci/pcidevs_data.h	Thu Nov  7 18:47:07 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1155 2013/11/07 18:44:09 msaitoh Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1156 2013/11/07 18:47:07 msaitoh Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1163 2013/11/07 14:33:09 msaitoh Exp
+ *	NetBSD: pcidevs,v 1.1164 2013/11/07 18:44:09 msaitoh Exp
  */
 
 /*



CVS commit: src/usr.sbin/cpuctl/arch

2013-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  7 18:59:01 UTC 2013

Modified Files:
src/usr.sbin/cpuctl/arch: i386.c

Log Message:
Fix typo. From jnemeth.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/cpuctl/arch/i386.c

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

Modified files:

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.48 src/usr.sbin/cpuctl/arch/i386.c:1.49
--- src/usr.sbin/cpuctl/arch/i386.c:1.48	Thu Nov  7 18:18:59 2013
+++ src/usr.sbin/cpuctl/arch/i386.c	Thu Nov  7 18:59:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.48 2013/11/07 18:18:59 msaitoh Exp $	*/
+/*	$NetBSD: i386.c,v 1.49 2013/11/07 18:59:01 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: i386.c,v 1.48 2013/11/07 18:18:59 msaitoh Exp $);
+__RCSID($NetBSD: i386.c,v 1.49 2013/11/07 18:59:01 msaitoh Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -342,7 +342,7 @@ const struct cpu_cpuid_nameclass i386_cp
 [0x2a] = Xeon E3-12xx, 2nd gen i7, i5, 
 	 i3 2xxx,
 [0x2c] = Xeon 36xx  56xx, i7, i5 and i3,
-[0x2d] = Xeon E5 Sandy Bridy family, 
+[0x2d] = Xeon E5 Sandy Bridge family, 
 	 Core i7-39xx Extreme,
 [0x2e] = Xeon 75xx  65xx,
 [0x2f] = Xeon E7 family,



CVS commit: src/sys/compat

2013-11-07 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Nov  7 19:37:19 UTC 2013

Modified Files:
src/sys/compat/freebsd: syscalls.master
src/sys/compat/ibcs2: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux32/arch/amd64: syscalls.master
src/sys/compat/osf1: syscalls.master
src/sys/compat/sunos: syscalls.master
src/sys/compat/sunos32: syscalls.master
src/sys/compat/svr4: syscalls.master
src/sys/compat/svr4_32: syscalls.master
src/sys/compat/ultrix: syscalls.master

Log Message:
Fix dup/dup2/dup3 argument types (u_int - int).


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/freebsd/syscalls.master
cvs rdiff -u -r1.40 -r1.41 src/sys/compat/ibcs2/syscalls.master
cvs rdiff -u -r1.43 -r1.44 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.110 -r1.111 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.76 -r1.77 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.46 -r1.47 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.62 -r1.63 src/sys/compat/linux32/arch/amd64/syscalls.master
cvs rdiff -u -r1.48 -r1.49 src/sys/compat/osf1/syscalls.master
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/sunos/syscalls.master
cvs rdiff -u -r1.21 -r1.22 src/sys/compat/sunos32/syscalls.master
cvs rdiff -u -r1.61 -r1.62 src/sys/compat/svr4/syscalls.master
cvs rdiff -u -r1.19 -r1.20 src/sys/compat/svr4_32/syscalls.master
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/ultrix/syscalls.master

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

Modified files:

Index: src/sys/compat/freebsd/syscalls.master
diff -u src/sys/compat/freebsd/syscalls.master:1.66 src/sys/compat/freebsd/syscalls.master:1.67
--- src/sys/compat/freebsd/syscalls.master:1.66	Sat Mar 10 21:51:57 2012
+++ src/sys/compat/freebsd/syscalls.master	Thu Nov  7 19:37:18 2013
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.66 2012/03/10 21:51:57 joerg Exp $
+	$NetBSD: syscalls.master,v 1.67 2013/11/07 19:37:18 njoly Exp $
 
 ;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -112,7 +112,7 @@
 39	NOARGS		{ pid_t|sys||getppid(void); }
 40	NOARGS		{ int|compat_43_sys||lstat(const char *path, \
 			struct stat43 *ub); } lstat43
-41	NOARGS		{ int|sys||dup(u_int fd); }
+41	NOARGS		{ int|sys||dup(int fd); }
 42	NOARGS		{ int|sys||pipe(void); }
 43	NOARGS		{ gid_t|sys||getegid(void); }
 44	NOARGS		{ int|sys||profil(void *samples, u_int size, \
@@ -186,7 +186,7 @@
 			u_int len); } osethostname
 89	NOARGS		{ int|compat_43_sys||getdtablesize(void); } \
 			ogetdtablesize
-90	NOARGS		{ int|sys||dup2(u_int from, u_int to); }
+90	NOARGS		{ int|sys||dup2(int from, int to); }
 91	UNIMPL		getdopt
 92	NOARGS		{ int|sys||fcntl(int fd, int cmd, void *arg); }
 93	NOARGS		{ int|compat_50_sys||select(u_int nd, fd_set *in, \

Index: src/sys/compat/ibcs2/syscalls.master
diff -u src/sys/compat/ibcs2/syscalls.master:1.40 src/sys/compat/ibcs2/syscalls.master:1.41
--- src/sys/compat/ibcs2/syscalls.master:1.40	Wed Jun 26 16:29:41 2013
+++ src/sys/compat/ibcs2/syscalls.master	Thu Nov  7 19:37:18 2013
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.40 2013/06/26 16:29:41 christos Exp $
+	$NetBSD: syscalls.master,v 1.41 2013/11/07 19:37:18 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -102,7 +102,7 @@
 39	STD		{ int|ibcs2_sys||pgrpsys(int type, void *dummy, \
 			int pid, int pgid); }
 40	UNIMPL		ibcs2_xenix
-41	NOARGS		{ int|sys||dup(u_int fd); }
+41	NOARGS		{ int|sys||dup(int fd); }
 42	NOARGS		{ int|sys||pipe(void); }
 43	STD		{ int|ibcs2_sys||times(struct tms *tp); }
 44	UNIMPL		profil

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.43 src/sys/compat/linux/arch/amd64/syscalls.master:1.44
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.43	Tue Sep 24 13:27:49 2013
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Thu Nov  7 19:37:18 2013
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.43 2013/09/24 13:27:49 njoly Exp $
+	$NetBSD: syscalls.master,v 1.44 2013/11/07 19:37:18 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -127,8 +127,8 @@
 30	UNIMPL		shmat
 31	UNIMPL		shmctl
 #endif
-32	NOARGS		{ int|sys||dup(u_int fd); }
-33	NOARGS		{ int|sys||dup2(u_int from, u_int to); }
+32	NOARGS		{ int|sys||dup(int fd); }
+33	NOARGS		{ int|sys||dup2(int from, int to); }
 34	STD		{ int|linux_sys||pause(void); }
 

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

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  7 19:52:56 UTC 2013

Modified Files:
src/sys/arch/sun68k/stand: Makefile.inc
src/sys/arch/sun68k/stand/libsa: Makefile

Log Message:
Revert previous change:
gcc-4.8.1 converts -mc68000 to -mcpu=68000 which breaks gas. gas even
breaks with -mcpu=68010, but works with -march=68010 so we'll go with that.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sun68k/stand/Makefile.inc
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sun68k/stand/libsa/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/arch/sun68k/stand/Makefile.inc
diff -u src/sys/arch/sun68k/stand/Makefile.inc:1.20 src/sys/arch/sun68k/stand/Makefile.inc:1.21
--- src/sys/arch/sun68k/stand/Makefile.inc:1.20	Wed Nov  6 19:43:15 2013
+++ src/sys/arch/sun68k/stand/Makefile.inc	Thu Nov  7 14:52:56 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.20 2013/11/07 00:43:15 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.21 2013/11/07 19:52:56 christos Exp $
 
 # Must have S=/usr/src/sys (or equivalent)
 # But note: this is w.r.t. a subdirectory
@@ -18,7 +18,13 @@ RELOC?= 24
 DEFS?= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t
 INCL?= -I. -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
 
-CPUFLAGS= -m68020 -Wa,-mc68020
+.if defined(HAVE_GCC)  ${HAVE_GCC} = 48
+# gcc 4.8 convers -mc68000 to -mcpu=68000 and that breaks gas
+# which works for -march=68010 but breaks for -mcpu=68010
+CPUFLAGS= -march=68010
+.else
+CPUFLAGS= -mc68000 -Wa,-mc68010
+.endif
 COPTS= -Os -fno-defer-pop -ffreestanding -fno-unwind-tables
 CFLAGS= -msoft-float
 CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}

Index: src/sys/arch/sun68k/stand/libsa/Makefile
diff -u src/sys/arch/sun68k/stand/libsa/Makefile:1.30 src/sys/arch/sun68k/stand/libsa/Makefile:1.31
--- src/sys/arch/sun68k/stand/libsa/Makefile:1.30	Wed Nov  6 19:43:15 2013
+++ src/sys/arch/sun68k/stand/libsa/Makefile	Thu Nov  7 14:52:56 2013
@@ -1,6 +1,7 @@
-#	$NetBSD: Makefile,v 1.30 2013/11/07 00:43:15 christos Exp $
+#	$NetBSD: Makefile,v 1.31 2013/11/07 19:52:56 christos Exp $
 
 # Logically src/sys
+.include bsd.own.mk
 S!= cd ${.CURDIR}/../../../..; pwd
 DIR_SA=${S}/lib/libsa
 DIR_KERN=${S}/lib/libkern ${S}/lib/libkern/arch/m68k
@@ -12,8 +13,15 @@ DIR_LIBC=${S}/../common/lib/libc
 CPUFLAGS=	# ignore settings in /etc/mk.conf
 DEFS= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t
 INCL= -I. -I${.CURDIR} -I${S}/lib/libsa -I${S} -I${S}/arch
-AFLAGS= -Wa,-m68020 -Wa,-m68851
-CFLAGS= -m68020 ${AFLAGS} -msoft-float
+AFLAGS= -Wa,-mc68020 -Wa,-mc68851
+.if defined(HAVE_GCC)  ${HAVE_GCC} = 48
+# gcc 4.8 convers -mc68000 to -mcpu=68000 and that breaks gas
+# which works for -march=68010 but breaks for -mcpu=68010
+CFLAGS= -march=68010
+.else
+CFLAGS= -mc68000 -Wa,-mc68010
+.endif
+CFLAGS+= -Wa,-m68851 -msoft-float
 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
 COPTS= -Os -fno-defer-pop -ffreestanding -fno-unwind-tables
 CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}



CVS commit: src/external/gpl2/xcvs/dist/src

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  7 20:09:55 UTC 2013

Modified Files:
src/external/gpl2/xcvs/dist/src: exithandle.c

Log Message:
Don't use SIG_register to register a SIG_IGN handler. It thinks it registers
a fucntion, but then it ends up calling (*1)(13) with all signals blocked
so cvs spins (with all signal blocked, getting SEGV). Use plain signal instead
To reproduce: cvs log file | less and quit.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/exithandle.c

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

Modified files:

Index: src/external/gpl2/xcvs/dist/src/exithandle.c
diff -u src/external/gpl2/xcvs/dist/src/exithandle.c:1.2 src/external/gpl2/xcvs/dist/src/exithandle.c:1.3
--- src/external/gpl2/xcvs/dist/src/exithandle.c:1.2	Wed Oct 30 10:25:47 2013
+++ src/external/gpl2/xcvs/dist/src/exithandle.c	Thu Nov  7 15:09:55 2013
@@ -30,7 +30,7 @@ signals_register (RETSIGTYPE (*handler)(
 	(void) SIG_register (SIGQUIT, handler);
 #endif
 #ifdef SIGPIPE
-	(void) SIG_register (SIGPIPE, SIG_IGN);
+	(void) signal (SIGPIPE, SIG_IGN);
 #endif
 #ifdef SIGTERM
 	(void) SIG_register (SIGTERM, handler);



CVS commit: [netbsd-6] src/sys/arch/xen/xen

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:16:48 UTC 2013

Modified Files:
src/sys/arch/xen/xen [netbsd-6]: xbdback_xenbus.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #974):
sys/arch/xen/xen/xbdback_xenbus.c: revision 1.58
Add more XENPRINTF() to xbdback_connect()
in xbdback_backend_changed(), fix memory leak.
Do not free an uninitialized pointer in xbdback_connect(). Should fix
 hypervisor or dom0 reboot when using windows PV drivers, as reported
 by several users on port-xen.


To generate a diff of this commit:
cvs rdiff -u -r1.55.2.1 -r1.55.2.2 src/sys/arch/xen/xen/xbdback_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1 src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.2
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1	Tue Jun  5 15:36:00 2012
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Thu Nov  7 20:16:48 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.55.2.1 2012/06/05 15:36:00 jdc Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.55.2.2 2013/11/07 20:16:48 snj Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.55.2.1 2012/06/05 15:36:00 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.55.2.2 2013/11/07 20:16:48 snj Exp $);
 
 #include sys/atomic.h
 #include sys/buf.h
@@ -531,6 +531,7 @@ xbdback_connect(struct xbdback_instance 
 	const char *proto;
 	struct xenbus_device *xbusd = xbdi-xbdi_xbusd;
 
+	XENPRINTF((xbdback %s: connect\n, xbusd-xbusd_path));
 	/* read comunication informations */
 	err = xenbus_read_ul(NULL, xbusd-xbusd_otherend,
 	ring-ref, ring_ref, 10);
@@ -539,6 +540,7 @@ xbdback_connect(struct xbdback_instance 
 		xbusd-xbusd_otherend);
 		return -1;
 	}
+	XENPRINTF((xbdback %s: connect ring-ref %lu\n, xbusd-xbusd_path, ring_ref));
 	err = xenbus_read_ul(NULL, xbusd-xbusd_otherend,
 	event-channel, revtchn, 10);
 	if (err) {
@@ -546,12 +548,15 @@ xbdback_connect(struct xbdback_instance 
 		xbusd-xbusd_otherend);
 		return -1;
 	}
+	XENPRINTF((xbdback %s: connect revtchn %lu\n, xbusd-xbusd_path, revtchn));
 	err = xenbus_read(NULL, xbusd-xbusd_otherend, protocol,
 	len, xsproto);
 	if (err) {
 		xbdi-xbdi_proto = XBDIP_NATIVE;
 		proto = unspecified;
+		XENPRINTF((xbdback %s: connect no xsproto\n, xbusd-xbusd_path));
 	} else {
+		XENPRINTF((xbdback %s: connect xsproto %s\n, xbusd-xbusd_path, xsproto));
 		if (strcmp(xsproto, XEN_IO_PROTO_ABI_NATIVE) == 0) {
 			xbdi-xbdi_proto = XBDIP_NATIVE;
 			proto = XEN_IO_PROTO_ABI_NATIVE;
@@ -567,8 +572,8 @@ xbdback_connect(struct xbdback_instance 
 			free(xsproto, M_DEVBUF);
 			return -1;
 		}
+		free(xsproto, M_DEVBUF);
 	}
-	free(xsproto, M_DEVBUF);
 
 	/* allocate VA space and map rings */
 	xbdi-xbdi_ring_va = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
@@ -578,6 +583,7 @@ xbdback_connect(struct xbdback_instance 
 		can't get VA for ring, xbusd-xbusd_otherend);
 		return -1;
 	}
+	XENPRINTF((xbdback %s: connect va 0x% PRIxVADDR \n, xbusd-xbusd_path, xbdi-xbdi_ring_va));
 
 	grop.host_addr = xbdi-xbdi_ring_va;
 	grop.flags = GNTMAP_host_map;
@@ -593,6 +599,7 @@ xbdback_connect(struct xbdback_instance 
 		goto err;
 	}
 	xbdi-xbdi_ring_handle = grop.handle;
+	XENPRINTF((xbdback %s: connect grhandle %d\n, xbusd-xbusd_path, grop.handle));
 
 	switch(xbdi-xbdi_proto) {
 	case XBDIP_NATIVE:
@@ -627,6 +634,7 @@ xbdback_connect(struct xbdback_instance 
 		can't bind event channel, xbusd-xbusd_otherend);
 		goto err2;
 	}
+	XENPRINTF((xbdback %s: connect evchannel %d\n, xbusd-xbusd_path, xbdi-xbdi_evtchn));
 	xbdi-xbdi_evtchn = evop.u.bind_interdomain.local_port;
 
 	event_set_handler(xbdi-xbdi_evtchn, xbdback_evthandler,
@@ -766,6 +774,7 @@ xbdback_backend_changed(struct xenbus_wa
 		xbdi-xbdi_ro = false;
 	else
 		xbdi-xbdi_ro = true;
+	free(mode, M_DEVBUF);
 	major = major(xbdi-xbdi_dev);
 	devname = devsw_blk2name(major);
 	if (devname == NULL) {



CVS commit: [netbsd-6-0] src/sys/arch/xen/xen

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:18:50 UTC 2013

Modified Files:
src/sys/arch/xen/xen [netbsd-6-0]: xbdback_xenbus.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #974):
sys/arch/xen/xen/xbdback_xenbus.c: revision 1.58
Add more XENPRINTF() to xbdback_connect()
in xbdback_backend_changed(), fix memory leak.
Do not free an uninitialized pointer in xbdback_connect(). Should fix
 hypervisor or dom0 reboot when using windows PV drivers, as reported
 by several users on port-xen.


To generate a diff of this commit:
cvs rdiff -u -r1.55.2.1 -r1.55.2.1.4.1 src/sys/arch/xen/xen/xbdback_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1 src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1.4.1
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1	Tue Jun  5 15:36:00 2012
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Thu Nov  7 20:18:50 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.55.2.1 2012/06/05 15:36:00 jdc Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.55.2.1.4.1 2013/11/07 20:18:50 snj Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.55.2.1 2012/06/05 15:36:00 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.55.2.1.4.1 2013/11/07 20:18:50 snj Exp $);
 
 #include sys/atomic.h
 #include sys/buf.h
@@ -531,6 +531,7 @@ xbdback_connect(struct xbdback_instance 
 	const char *proto;
 	struct xenbus_device *xbusd = xbdi-xbdi_xbusd;
 
+	XENPRINTF((xbdback %s: connect\n, xbusd-xbusd_path));
 	/* read comunication informations */
 	err = xenbus_read_ul(NULL, xbusd-xbusd_otherend,
 	ring-ref, ring_ref, 10);
@@ -539,6 +540,7 @@ xbdback_connect(struct xbdback_instance 
 		xbusd-xbusd_otherend);
 		return -1;
 	}
+	XENPRINTF((xbdback %s: connect ring-ref %lu\n, xbusd-xbusd_path, ring_ref));
 	err = xenbus_read_ul(NULL, xbusd-xbusd_otherend,
 	event-channel, revtchn, 10);
 	if (err) {
@@ -546,12 +548,15 @@ xbdback_connect(struct xbdback_instance 
 		xbusd-xbusd_otherend);
 		return -1;
 	}
+	XENPRINTF((xbdback %s: connect revtchn %lu\n, xbusd-xbusd_path, revtchn));
 	err = xenbus_read(NULL, xbusd-xbusd_otherend, protocol,
 	len, xsproto);
 	if (err) {
 		xbdi-xbdi_proto = XBDIP_NATIVE;
 		proto = unspecified;
+		XENPRINTF((xbdback %s: connect no xsproto\n, xbusd-xbusd_path));
 	} else {
+		XENPRINTF((xbdback %s: connect xsproto %s\n, xbusd-xbusd_path, xsproto));
 		if (strcmp(xsproto, XEN_IO_PROTO_ABI_NATIVE) == 0) {
 			xbdi-xbdi_proto = XBDIP_NATIVE;
 			proto = XEN_IO_PROTO_ABI_NATIVE;
@@ -567,8 +572,8 @@ xbdback_connect(struct xbdback_instance 
 			free(xsproto, M_DEVBUF);
 			return -1;
 		}
+		free(xsproto, M_DEVBUF);
 	}
-	free(xsproto, M_DEVBUF);
 
 	/* allocate VA space and map rings */
 	xbdi-xbdi_ring_va = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
@@ -578,6 +583,7 @@ xbdback_connect(struct xbdback_instance 
 		can't get VA for ring, xbusd-xbusd_otherend);
 		return -1;
 	}
+	XENPRINTF((xbdback %s: connect va 0x% PRIxVADDR \n, xbusd-xbusd_path, xbdi-xbdi_ring_va));
 
 	grop.host_addr = xbdi-xbdi_ring_va;
 	grop.flags = GNTMAP_host_map;
@@ -593,6 +599,7 @@ xbdback_connect(struct xbdback_instance 
 		goto err;
 	}
 	xbdi-xbdi_ring_handle = grop.handle;
+	XENPRINTF((xbdback %s: connect grhandle %d\n, xbusd-xbusd_path, grop.handle));
 
 	switch(xbdi-xbdi_proto) {
 	case XBDIP_NATIVE:
@@ -627,6 +634,7 @@ xbdback_connect(struct xbdback_instance 
 		can't bind event channel, xbusd-xbusd_otherend);
 		goto err2;
 	}
+	XENPRINTF((xbdback %s: connect evchannel %d\n, xbusd-xbusd_path, xbdi-xbdi_evtchn));
 	xbdi-xbdi_evtchn = evop.u.bind_interdomain.local_port;
 
 	event_set_handler(xbdi-xbdi_evtchn, xbdback_evthandler,
@@ -766,6 +774,7 @@ xbdback_backend_changed(struct xenbus_wa
 		xbdi-xbdi_ro = false;
 	else
 		xbdi-xbdi_ro = true;
+	free(mode, M_DEVBUF);
 	major = major(xbdi-xbdi_dev);
 	devname = devsw_blk2name(major);
 	if (devname == NULL) {



CVS commit: [netbsd-6-1] src/sys/arch/xen/xen

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:19:40 UTC 2013

Modified Files:
src/sys/arch/xen/xen [netbsd-6-1]: xbdback_xenbus.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #974):
sys/arch/xen/xen/xbdback_xenbus.c: revision 1.58
Add more XENPRINTF() to xbdback_connect()
in xbdback_backend_changed(), fix memory leak.
Do not free an uninitialized pointer in xbdback_connect(). Should fix
 hypervisor or dom0 reboot when using windows PV drivers, as reported
 by several users on port-xen.


To generate a diff of this commit:
cvs rdiff -u -r1.55.2.1 -r1.55.2.1.6.1 src/sys/arch/xen/xen/xbdback_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1 src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1.6.1
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1	Tue Jun  5 15:36:00 2012
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Thu Nov  7 20:19:40 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.55.2.1 2012/06/05 15:36:00 jdc Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.55.2.1.6.1 2013/11/07 20:19:40 snj Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.55.2.1 2012/06/05 15:36:00 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.55.2.1.6.1 2013/11/07 20:19:40 snj Exp $);
 
 #include sys/atomic.h
 #include sys/buf.h
@@ -531,6 +531,7 @@ xbdback_connect(struct xbdback_instance 
 	const char *proto;
 	struct xenbus_device *xbusd = xbdi-xbdi_xbusd;
 
+	XENPRINTF((xbdback %s: connect\n, xbusd-xbusd_path));
 	/* read comunication informations */
 	err = xenbus_read_ul(NULL, xbusd-xbusd_otherend,
 	ring-ref, ring_ref, 10);
@@ -539,6 +540,7 @@ xbdback_connect(struct xbdback_instance 
 		xbusd-xbusd_otherend);
 		return -1;
 	}
+	XENPRINTF((xbdback %s: connect ring-ref %lu\n, xbusd-xbusd_path, ring_ref));
 	err = xenbus_read_ul(NULL, xbusd-xbusd_otherend,
 	event-channel, revtchn, 10);
 	if (err) {
@@ -546,12 +548,15 @@ xbdback_connect(struct xbdback_instance 
 		xbusd-xbusd_otherend);
 		return -1;
 	}
+	XENPRINTF((xbdback %s: connect revtchn %lu\n, xbusd-xbusd_path, revtchn));
 	err = xenbus_read(NULL, xbusd-xbusd_otherend, protocol,
 	len, xsproto);
 	if (err) {
 		xbdi-xbdi_proto = XBDIP_NATIVE;
 		proto = unspecified;
+		XENPRINTF((xbdback %s: connect no xsproto\n, xbusd-xbusd_path));
 	} else {
+		XENPRINTF((xbdback %s: connect xsproto %s\n, xbusd-xbusd_path, xsproto));
 		if (strcmp(xsproto, XEN_IO_PROTO_ABI_NATIVE) == 0) {
 			xbdi-xbdi_proto = XBDIP_NATIVE;
 			proto = XEN_IO_PROTO_ABI_NATIVE;
@@ -567,8 +572,8 @@ xbdback_connect(struct xbdback_instance 
 			free(xsproto, M_DEVBUF);
 			return -1;
 		}
+		free(xsproto, M_DEVBUF);
 	}
-	free(xsproto, M_DEVBUF);
 
 	/* allocate VA space and map rings */
 	xbdi-xbdi_ring_va = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
@@ -578,6 +583,7 @@ xbdback_connect(struct xbdback_instance 
 		can't get VA for ring, xbusd-xbusd_otherend);
 		return -1;
 	}
+	XENPRINTF((xbdback %s: connect va 0x% PRIxVADDR \n, xbusd-xbusd_path, xbdi-xbdi_ring_va));
 
 	grop.host_addr = xbdi-xbdi_ring_va;
 	grop.flags = GNTMAP_host_map;
@@ -593,6 +599,7 @@ xbdback_connect(struct xbdback_instance 
 		goto err;
 	}
 	xbdi-xbdi_ring_handle = grop.handle;
+	XENPRINTF((xbdback %s: connect grhandle %d\n, xbusd-xbusd_path, grop.handle));
 
 	switch(xbdi-xbdi_proto) {
 	case XBDIP_NATIVE:
@@ -627,6 +634,7 @@ xbdback_connect(struct xbdback_instance 
 		can't bind event channel, xbusd-xbusd_otherend);
 		goto err2;
 	}
+	XENPRINTF((xbdback %s: connect evchannel %d\n, xbusd-xbusd_path, xbdi-xbdi_evtchn));
 	xbdi-xbdi_evtchn = evop.u.bind_interdomain.local_port;
 
 	event_set_handler(xbdi-xbdi_evtchn, xbdback_evthandler,
@@ -766,6 +774,7 @@ xbdback_backend_changed(struct xenbus_wa
 		xbdi-xbdi_ro = false;
 	else
 		xbdi-xbdi_ro = true;
+	free(mode, M_DEVBUF);
 	major = major(xbdi-xbdi_dev);
 	devname = devsw_blk2name(major);
 	if (devname == NULL) {



CVS commit: [netbsd-6] src

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:23:46 UTC 2013

Modified Files:
src/libexec/ld.elf_so [netbsd-6]: tls.c
src/tests/lib/libc/tls/dso [netbsd-6]: h_tls_dlopen.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #976):
libexec/ld.elf_so/tls.c: revision 1.9
tests/lib/libc/tls/dso/h_tls_dlopen.c: revision 1.5
Only initialise TLS space from the PT_TLS segment, if the size is
positive and the offset has been computed. Fixes PR lib/48324.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.6.1 src/libexec/ld.elf_so/tls.c
cvs rdiff -u -r1.4 -r1.4.2.1 src/tests/lib/libc/tls/dso/h_tls_dlopen.c

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

Modified files:

Index: src/libexec/ld.elf_so/tls.c
diff -u src/libexec/ld.elf_so/tls.c:1.7 src/libexec/ld.elf_so/tls.c:1.7.6.1
--- src/libexec/ld.elf_so/tls.c:1.7	Sat Apr 23 16:40:08 2011
+++ src/libexec/ld.elf_so/tls.c	Thu Nov  7 20:23:46 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.7 2011/04/23 16:40:08 joerg Exp $	*/
+/*	$NetBSD: tls.c,v 1.7.6.1 2013/11/07 20:23:46 snj Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tls.c,v 1.7 2011/04/23 16:40:08 joerg Exp $);
+__RCSID($NetBSD: tls.c,v 1.7.6.1 2013/11/07 20:23:46 snj Exp $);
 
 #include sys/param.h
 #include sys/ucontext.h
@@ -138,7 +138,7 @@ _rtld_tls_allocate_locked(void)
 	SET_DTV_GENERATION(tcb-tcb_dtv, _rtld_tls_dtv_generation);
 
 	for (obj = _rtld_objlist; obj != NULL; obj = obj-next) {
-		if (obj-tlssize) {
+		if (obj-tlsinitsize  obj-tls_done) {
 #ifdef __HAVE_TLS_VARIANT_I
 			q = p + obj-tlsoffset;
 #else

Index: src/tests/lib/libc/tls/dso/h_tls_dlopen.c
diff -u src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.4 src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.4.2.1
--- src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.4	Tue Jan 17 20:34:57 2012
+++ src/tests/lib/libc/tls/dso/h_tls_dlopen.c	Thu Nov  7 20:23:46 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_tls_dlopen.c,v 1.4 2012/01/17 20:34:57 joerg Exp $	*/
+/*	$NetBSD: h_tls_dlopen.c,v 1.4.2.1 2013/11/07 20:23:46 snj Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: h_tls_dlopen.c,v 1.4 2012/01/17 20:34:57 joerg Exp $);
+__RCSID($NetBSD: h_tls_dlopen.c,v 1.4.2.1 2013/11/07 20:23:46 snj Exp $);
 
 #include atf-c.h
 #include unistd.h
@@ -45,6 +45,7 @@ __RCSID($NetBSD: h_tls_dlopen.c,v 1.4 2
 extern __thread int var1;
 extern __thread int var2;
 extern __thread int *var3;
+__thread int var5 = 1;
 static __thread pid_t (*local_var)(void) = getpid;
 
 void testf_dso_helper(int x, int y);



CVS commit: [netbsd-6-0] src

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:31:55 UTC 2013

Modified Files:
src/libexec/ld.elf_so [netbsd-6-0]: tls.c
src/tests/lib/libc/tls/dso [netbsd-6-0]: h_tls_dlopen.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #976):
libexec/ld.elf_so/tls.c: revision 1.9
tests/lib/libc/tls/dso/h_tls_dlopen.c: revision 1.5
Only initialise TLS space from the PT_TLS segment, if the size is
positive and the offset has been computed. Fixes PR lib/48324.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.12.1 src/libexec/ld.elf_so/tls.c
cvs rdiff -u -r1.4 -r1.4.8.1 src/tests/lib/libc/tls/dso/h_tls_dlopen.c

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

Modified files:

Index: src/libexec/ld.elf_so/tls.c
diff -u src/libexec/ld.elf_so/tls.c:1.7 src/libexec/ld.elf_so/tls.c:1.7.12.1
--- src/libexec/ld.elf_so/tls.c:1.7	Sat Apr 23 16:40:08 2011
+++ src/libexec/ld.elf_so/tls.c	Thu Nov  7 20:31:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.7 2011/04/23 16:40:08 joerg Exp $	*/
+/*	$NetBSD: tls.c,v 1.7.12.1 2013/11/07 20:31:55 snj Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tls.c,v 1.7 2011/04/23 16:40:08 joerg Exp $);
+__RCSID($NetBSD: tls.c,v 1.7.12.1 2013/11/07 20:31:55 snj Exp $);
 
 #include sys/param.h
 #include sys/ucontext.h
@@ -138,7 +138,7 @@ _rtld_tls_allocate_locked(void)
 	SET_DTV_GENERATION(tcb-tcb_dtv, _rtld_tls_dtv_generation);
 
 	for (obj = _rtld_objlist; obj != NULL; obj = obj-next) {
-		if (obj-tlssize) {
+		if (obj-tlsinitsize  obj-tls_done) {
 #ifdef __HAVE_TLS_VARIANT_I
 			q = p + obj-tlsoffset;
 #else

Index: src/tests/lib/libc/tls/dso/h_tls_dlopen.c
diff -u src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.4 src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.4.8.1
--- src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.4	Tue Jan 17 20:34:57 2012
+++ src/tests/lib/libc/tls/dso/h_tls_dlopen.c	Thu Nov  7 20:31:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_tls_dlopen.c,v 1.4 2012/01/17 20:34:57 joerg Exp $	*/
+/*	$NetBSD: h_tls_dlopen.c,v 1.4.8.1 2013/11/07 20:31:55 snj Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: h_tls_dlopen.c,v 1.4 2012/01/17 20:34:57 joerg Exp $);
+__RCSID($NetBSD: h_tls_dlopen.c,v 1.4.8.1 2013/11/07 20:31:55 snj Exp $);
 
 #include atf-c.h
 #include unistd.h
@@ -45,6 +45,7 @@ __RCSID($NetBSD: h_tls_dlopen.c,v 1.4 2
 extern __thread int var1;
 extern __thread int var2;
 extern __thread int *var3;
+__thread int var5 = 1;
 static __thread pid_t (*local_var)(void) = getpid;
 
 void testf_dso_helper(int x, int y);



CVS commit: [netbsd-6-1] src

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:32:37 UTC 2013

Modified Files:
src/libexec/ld.elf_so [netbsd-6-1]: tls.c
src/tests/lib/libc/tls/dso [netbsd-6-1]: h_tls_dlopen.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #976):
libexec/ld.elf_so/tls.c: revision 1.9
tests/lib/libc/tls/dso/h_tls_dlopen.c: revision 1.5
Only initialise TLS space from the PT_TLS segment, if the size is
positive and the offset has been computed. Fixes PR lib/48324.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.18.1 src/libexec/ld.elf_so/tls.c
cvs rdiff -u -r1.4 -r1.4.14.1 src/tests/lib/libc/tls/dso/h_tls_dlopen.c

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

Modified files:

Index: src/libexec/ld.elf_so/tls.c
diff -u src/libexec/ld.elf_so/tls.c:1.7 src/libexec/ld.elf_so/tls.c:1.7.18.1
--- src/libexec/ld.elf_so/tls.c:1.7	Sat Apr 23 16:40:08 2011
+++ src/libexec/ld.elf_so/tls.c	Thu Nov  7 20:32:36 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.7 2011/04/23 16:40:08 joerg Exp $	*/
+/*	$NetBSD: tls.c,v 1.7.18.1 2013/11/07 20:32:36 snj Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tls.c,v 1.7 2011/04/23 16:40:08 joerg Exp $);
+__RCSID($NetBSD: tls.c,v 1.7.18.1 2013/11/07 20:32:36 snj Exp $);
 
 #include sys/param.h
 #include sys/ucontext.h
@@ -138,7 +138,7 @@ _rtld_tls_allocate_locked(void)
 	SET_DTV_GENERATION(tcb-tcb_dtv, _rtld_tls_dtv_generation);
 
 	for (obj = _rtld_objlist; obj != NULL; obj = obj-next) {
-		if (obj-tlssize) {
+		if (obj-tlsinitsize  obj-tls_done) {
 #ifdef __HAVE_TLS_VARIANT_I
 			q = p + obj-tlsoffset;
 #else

Index: src/tests/lib/libc/tls/dso/h_tls_dlopen.c
diff -u src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.4 src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.4.14.1
--- src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.4	Tue Jan 17 20:34:57 2012
+++ src/tests/lib/libc/tls/dso/h_tls_dlopen.c	Thu Nov  7 20:32:36 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_tls_dlopen.c,v 1.4 2012/01/17 20:34:57 joerg Exp $	*/
+/*	$NetBSD: h_tls_dlopen.c,v 1.4.14.1 2013/11/07 20:32:36 snj Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: h_tls_dlopen.c,v 1.4 2012/01/17 20:34:57 joerg Exp $);
+__RCSID($NetBSD: h_tls_dlopen.c,v 1.4.14.1 2013/11/07 20:32:36 snj Exp $);
 
 #include atf-c.h
 #include unistd.h
@@ -45,6 +45,7 @@ __RCSID($NetBSD: h_tls_dlopen.c,v 1.4 2
 extern __thread int var1;
 extern __thread int var2;
 extern __thread int *var3;
+__thread int var5 = 1;
 static __thread pid_t (*local_var)(void) = getpid;
 
 void testf_dso_helper(int x, int y);



CVS commit: [netbsd-6] src/sys/arch/x86/x86

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:35:16 UTC 2013

Modified Files:
src/sys/arch/x86/x86 [netbsd-6]: x86_autoconf.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #977):
sys/arch/x86/x86/x86_autoconf.c: revision 1.67
If we have both wedge and partition info, use the partition info in the
wedge case too. From mlelstv.
XXX: pullup-6


To generate a diff of this commit:
cvs rdiff -u -r1.62.8.3 -r1.62.8.4 src/sys/arch/x86/x86/x86_autoconf.c

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

Modified files:

Index: src/sys/arch/x86/x86/x86_autoconf.c
diff -u src/sys/arch/x86/x86/x86_autoconf.c:1.62.8.3 src/sys/arch/x86/x86/x86_autoconf.c:1.62.8.4
--- src/sys/arch/x86/x86/x86_autoconf.c:1.62.8.3	Wed Aug  8 15:51:08 2012
+++ src/sys/arch/x86/x86/x86_autoconf.c	Thu Nov  7 20:35:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_autoconf.c,v 1.62.8.3 2012/08/08 15:51:08 martin Exp $	*/
+/*	$NetBSD: x86_autoconf.c,v 1.62.8.4 2013/11/07 20:35:16 snj Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: x86_autoconf.c,v 1.62.8.3 2012/08/08 15:51:08 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: x86_autoconf.c,v 1.62.8.4 2013/11/07 20:35:16 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -346,7 +346,10 @@ findroot(void)
 			return;
 	}
 
-	if ((biw = lookup_bootinfo(BTINFO_BOOTWEDGE)) != NULL) {
+	bid = lookup_bootinfo(BTINFO_BOOTDISK);
+	biw = lookup_bootinfo(BTINFO_BOOTWEDGE);
+
+	if (biw != NULL) {
 		/*
 		 * Scan all disk devices for ones that match the passed data.
 		 * Don't break if one is found, to get possible multiple
@@ -382,7 +385,7 @@ findroot(void)
 continue;
 			}
 			booted_device = dv;
-			booted_partition = 0;
+			booted_partition = bid != NULL ? bid-partition : 0;
 			booted_nblks = biw-nblks;
 			booted_startblk = biw-startblk;
 		}
@@ -392,7 +395,7 @@ findroot(void)
 			return;
 	}
 
-	if ((bid = lookup_bootinfo(BTINFO_BOOTDISK)) != NULL) {
+	if (bid != NULL) {
 		/*
 		 * Scan all disk devices for ones that match the passed data.
 		 * Don't break if one is found, to get possible multiple



CVS commit: [netbsd-6] src/lib/libc/gen

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:38:43 UTC 2013

Modified Files:
src/lib/libc/gen [netbsd-6]: getpwent.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #979):
lib/libc/gen/getpwent.c: revision 1.79
PR/46279: Dr. W. Stukenbrock: Off-by-one in buffer length check and make sure
that the password fits in the supplied buffer.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.77.8.1 src/lib/libc/gen/getpwent.c

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

Modified files:

Index: src/lib/libc/gen/getpwent.c
diff -u src/lib/libc/gen/getpwent.c:1.77 src/lib/libc/gen/getpwent.c:1.77.8.1
--- src/lib/libc/gen/getpwent.c:1.77	Tue Mar 23 20:28:59 2010
+++ src/lib/libc/gen/getpwent.c	Thu Nov  7 20:38:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: getpwent.c,v 1.77 2010/03/23 20:28:59 drochner Exp $	*/
+/*	$NetBSD: getpwent.c,v 1.77.8.1 2013/11/07 20:38:43 snj Exp $	*/
 
 /*-
  * Copyright (c) 1997-2000, 2004-2005 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
 #if 0
 static char sccsid[] = @(#)getpwent.c	8.2 (Berkeley) 4/27/95;
 #else
-__RCSID($NetBSD: getpwent.c,v 1.77 2010/03/23 20:28:59 drochner Exp $);
+__RCSID($NetBSD: getpwent.c,v 1.77.8.1 2013/11/07 20:38:43 snj Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1224,7 +1224,7 @@ _nis_parse(const char *entry, struct pas
 	_DIAGASSERT(buf != NULL);
 	_DIAGASSERT(state != NULL);
 
-	elen = strlen(entry);
+	elen = strlen(entry) + 1;
 	if (elen = buflen)
 		return 0;
 	if (! _pw_parse(entry, pw, buf, buflen,
@@ -1242,10 +1242,14 @@ _nis_parse(const char *entry, struct pas
 			char	*bp, *ep;
 		/* skip name to get password */
 			ep = data;
-			if ((bp = strsep(ep, :)) != NULL 
+			if (strsep(ep, :) != NULL 
 			(bp = strsep(ep, :)) != NULL) {
 	/* store new pw_passwd after entry */
-strlcpy(buf + elen, bp, buflen - elen);
+if (strlcpy(buf + elen, bp, buflen - elen) =
+buflen - elen) {
+	free(data);
+	return 0;
+}
 pw-pw_passwd = buf[elen];
 			}
 			free(data);



CVS commit: [netbsd-6] src/doc

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:43:44 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Tickets 974, 976, 977, and 979.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.57 -r1.1.2.58 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.57 src/doc/CHANGES-6.2:1.1.2.58
--- src/doc/CHANGES-6.2:1.1.2.57	Tue Oct 29 10:06:07 2013
+++ src/doc/CHANGES-6.2	Thu Nov  7 20:43:44 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.57 2013/10/29 10:06:07 sborrill Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.58 2013/11/07 20:43:44 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -945,3 +945,29 @@ sys/ufs/ffs/ffs_alloc.c1.144 via pat
 	cylinder group on relatively full file systems.
 	[bad, ticket #978]
 
+sys/arch/xen/xen/xbdback_xenbus.c		1.58
+
+	Fix a dom0 panic, or crash with a hypervisor panic, when creating
+	some domUs (domUs where the frontend driver doesn't provide a
+	protocol entry in the xenstore).
+	[bouyer, ticket #974]
+
+libexec/ld.elf_so/tls.c1.9
+tests/lib/libc/tls/dso/h_tls_dlopen.c		1.5
+
+	Only initialise TLS space from the PT_TLS segment, if the size is
+	positive and the offset has been computed. Fixes PR lib/48324.
+	[joerg, ticket #976]
+
+sys/arch/x86/x86/x86_autoconf.c			1.67
+
+	If we have both wedge and partition info, use the partition info
+	in the wedge case too.
+	[msaitoh, ticket #977]
+
+lib/libc/gen/getpwent.c1.79
+
+	PR/46279: Fix an off-by-one in buffer length check and make sure
+	that the password fits in the supplied buffer.
+	[christos, ticket #979]
+



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

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:44:11 UTC 2013

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.4

Log Message:
Tickets 974 and 976.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/doc/CHANGES-6.0.4

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

Modified files:

Index: src/doc/CHANGES-6.0.4
diff -u src/doc/CHANGES-6.0.4:1.1.2.3 src/doc/CHANGES-6.0.4:1.1.2.4
--- src/doc/CHANGES-6.0.4:1.1.2.3	Sun Oct 20 13:50:36 2013
+++ src/doc/CHANGES-6.0.4	Thu Nov  7 20:44:11 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.4,v 1.1.2.3 2013/10/20 13:50:36 bouyer Exp $
+# $NetBSD: CHANGES-6.0.4,v 1.1.2.4 2013/11/07 20:44:11 snj Exp $
 
 A complete list of changes from the NetBSD 6.0.3 release to the NetBSD 6.0.4
 release:
@@ -48,3 +48,17 @@ distrib/utils/sysinst/mbr.c			1.92
 	PR/48304.
 	[tsutsui, ticket #972]
 
+sys/arch/xen/xen/xbdback_xenbus.c		1.58
+
+	Fix a dom0 panic, or crash with a hypervisor panic, when creating
+	some domUs (domUs where the frontend driver doesn't provide a
+	protocol entry in the xenstore).
+	[bouyer, ticket #974]
+
+libexec/ld.elf_so/tls.c1.9
+tests/lib/libc/tls/dso/h_tls_dlopen.c		1.5
+
+	Only initialise TLS space from the PT_TLS segment, if the size is
+	positive and the offset has been computed. Fixes PR lib/48324.
+	[joerg, ticket #976]
+



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

2013-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Nov  7 20:44:37 UTC 2013

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.3

Log Message:
Tickets 974 and 976.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/doc/CHANGES-6.1.3

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

Modified files:

Index: src/doc/CHANGES-6.1.3
diff -u src/doc/CHANGES-6.1.3:1.1.2.3 src/doc/CHANGES-6.1.3:1.1.2.4
--- src/doc/CHANGES-6.1.3:1.1.2.3	Sun Oct 20 13:49:59 2013
+++ src/doc/CHANGES-6.1.3	Thu Nov  7 20:44:37 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.3,v 1.1.2.3 2013/10/20 13:49:59 bouyer Exp $
+# $NetBSD: CHANGES-6.1.3,v 1.1.2.4 2013/11/07 20:44:37 snj Exp $
 
 A complete list of changes from the NetBSD 6.1.1 release to the NetBSD 6.1.2
 release:
@@ -48,3 +48,17 @@ distrib/utils/sysinst/mbr.c			1.92
 	PR/48304.
 	[tsutsui, ticket #972]
 
+sys/arch/xen/xen/xbdback_xenbus.c		1.58
+
+	Fix a dom0 panic, or crash with a hypervisor panic, when creating
+	some domUs (domUs where the frontend driver doesn't provide a
+	protocol entry in the xenstore).
+	[bouyer, ticket #974]
+
+libexec/ld.elf_so/tls.c1.9
+tests/lib/libc/tls/dso/h_tls_dlopen.c		1.5
+
+	Only initialise TLS space from the PT_TLS segment, if the size is
+	positive and the offset has been computed. Fixes PR lib/48324.
+	[joerg, ticket #976]
+



CVS commit: src/sys/rump/net/lib/libnetbt

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  7 21:30:58 UTC 2013

Modified Files:
src/sys/rump/net/lib/libnetbt: Makefile

Log Message:
avoid gcc bug on sh3


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libnetbt/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/rump/net/lib/libnetbt/Makefile
diff -u src/sys/rump/net/lib/libnetbt/Makefile:1.1 src/sys/rump/net/lib/libnetbt/Makefile:1.2
--- src/sys/rump/net/lib/libnetbt/Makefile:1.1	Mon Mar 22 08:08:44 2010
+++ src/sys/rump/net/lib/libnetbt/Makefile	Thu Nov  7 16:30:58 2013
@@ -1,6 +1,8 @@
-#	$NetBSD: Makefile,v 1.1 2010/03/22 12:08:44 pooka Exp $
+#	$NetBSD: Makefile,v 1.2 2013/11/07 21:30:58 christos Exp $
 #
 
+.include bsd.own.mk
+
 .PATH:	${.CURDIR}/../../../../netbt
 
 LIB=	rumpnet_netbt
@@ -13,6 +15,11 @@ SRCS=	bt_proto.c bt_sysctl.c		\
 	rfcomm_dlc.c rfcomm_session.c rfcomm_socket.c rfcomm_upper.c	\
 	sco_socket.c sco_upper.c
 
+.if ${HAVE_GCC}  ${HAVE_GCC} == 48
+.if ${MACHINE_ARCH} == sh3eb || ${MACHINE_ARCH} == sh3el
+COPTS.l2cap_signal.c=	-O0
+.endif
+.endif
 SRCS+=	component.c
 
 .include bsd.lib.mk



CVS commit: src/doc

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  7 21:33:59 UTC 2013

Modified Files:
src/doc: HACKS

Log Message:
another gcc-4.8.1 workaround


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/doc/HACKS

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

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.136 src/doc/HACKS:1.137
--- src/doc/HACKS:1.136	Wed Nov  6 20:47:59 2013
+++ src/doc/HACKS	Thu Nov  7 16:33:59 2013
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.136 2013/11/07 01:47:59 joerg Exp $
+# $NetBSD: HACKS,v 1.137 2013/11/07 21:33:59 christos Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -586,6 +586,19 @@ port	sh3
 		-fno-loop-optimize.
 	kcah
 
+	hack	gcc4.8.1
+	cdate	Thu Nov  7 16:31:23 EST 2013
+	who	christos
+	file	src/sys/rump/net/lib/libnetbt/Makefile	: 1.2
+	desrc
+		compile l2cap_signal.c with -O0 to avoid:
+		./netbt/l2cap_signal.c:36:
+		/p/netbsd/cvsroot/src/sys/rump/net/lib/libnetbt/../../../../\
+		netbt/l2cap_signal.c: In function 'l2cap_recv_signal':
+		./sh3/byte_swap.h:20:2: error: 'asm' operand requires \
+		impossible reload
+		  __asm volatile (swap.b %1,%0 : =r(rval) : r(x));
+	kcah
 
 port	m68000
 



CVS commit: src/sys/net

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  7 21:44:48 UTC 2013

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

Log Message:
eliminate unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/net/if_gre.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_gre.c
diff -u src/sys/net/if_gre.c:1.152 src/sys/net/if_gre.c:1.153
--- src/sys/net/if_gre.c:1.152	Fri Sep 13 17:05:02 2013
+++ src/sys/net/if_gre.c	Thu Nov  7 16:44:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gre.c,v 1.152 2013/09/13 21:05:02 martin Exp $ */
+/*	$NetBSD: if_gre.c,v 1.153 2013/11/07 21:44:48 christos Exp $ */
 
 /*
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_gre.c,v 1.152 2013/09/13 21:05:02 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_gre.c,v 1.153 2013/11/07 21:44:48 christos Exp $);
 
 #include opt_atalk.h
 #include opt_gre.h
@@ -412,7 +412,6 @@ gre_upcall_remove(struct socket *so)
 static int
 gre_socreate(struct gre_softc *sc, const struct gre_soparm *sp, int *fdout)
 {
-	const struct protosw *pr;
 	int fd, rc;
 	struct mbuf *m;
 	struct sockaddr *sa;
@@ -459,8 +458,7 @@ gre_socreate(struct gre_softc *sc, const
 	m = NULL;
 
 	/* XXX convert to a (new) SOL_SOCKET call */
-  	pr = so-so_proto;
-  	KASSERT(pr != NULL);
+  	KASSERT(so-so_proto != NULL);
  	rc = so_setsockopt(curlwp, so, IPPROTO_IP, IP_TTL,
 	ip_gre_ttl, sizeof(ip_gre_ttl));
   	if (rc != 0) {



CVS commit: src/sys/arch/sh3/sh3

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  7 21:45:04 UTC 2013

Modified Files:
src/sys/arch/sh3/sh3: cache.c vm_machdep.c

Log Message:
fix unused variables


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sh3/sh3/cache.c
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/sh3/sh3/vm_machdep.c

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

Modified files:

Index: src/sys/arch/sh3/sh3/cache.c
diff -u src/sys/arch/sh3/sh3/cache.c:1.16 src/sys/arch/sh3/sh3/cache.c:1.17
--- src/sys/arch/sh3/sh3/cache.c:1.16	Wed Mar 18 06:22:36 2009
+++ src/sys/arch/sh3/sh3/cache.c	Thu Nov  7 16:45:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache.c,v 1.16 2009/03/18 10:22:36 cegger Exp $	*/
+/*	$NetBSD: cache.c,v 1.17 2013/11/07 21:45:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cache.c,v 1.16 2009/03/18 10:22:36 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: cache.c,v 1.17 2013/11/07 21:45:04 christos Exp $);
 
 #include opt_cache.h
 #include opt_memsize.h	/* IOM_RAM_BEGIN */
@@ -167,6 +167,7 @@ __cache_flush(void)
 		d = *p;
 		p += 4;	/* next line index (16B) */
 	}
+	__USE(d);
 
 	/* Flush I-Cache */
 	/*

Index: src/sys/arch/sh3/sh3/vm_machdep.c
diff -u src/sys/arch/sh3/sh3/vm_machdep.c:1.75 src/sys/arch/sh3/sh3/vm_machdep.c:1.76
--- src/sys/arch/sh3/sh3/vm_machdep.c:1.75	Sun Feb 19 16:06:27 2012
+++ src/sys/arch/sh3/sh3/vm_machdep.c	Thu Nov  7 16:45:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.75 2012/02/19 21:06:27 rmind Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.76 2013/11/07 21:45:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@@ -81,7 +81,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.75 2012/02/19 21:06:27 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.76 2013/11/07 21:45:04 christos Exp $);
 
 #include opt_kstack_debug.h
 
@@ -269,7 +269,7 @@ startlwp(void *arg)
 {
 	ucontext_t *uc = arg;
 	lwp_t *l = curlwp;
-	int error;
+	int error __diagused;
 
 	error = cpu_setmcontext(l, uc-uc_mcontext, uc-uc_flags);
 	KASSERT(error == 0);



CVS commit: src/usr.sbin/ndiscvt

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  8 01:10:24 UTC 2013

Modified Files:
src/usr.sbin/ndiscvt: ndiscvt.c

Log Message:
remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/ndiscvt/ndiscvt.c

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

Modified files:

Index: src/usr.sbin/ndiscvt/ndiscvt.c
diff -u src/usr.sbin/ndiscvt/ndiscvt.c:1.10 src/usr.sbin/ndiscvt/ndiscvt.c:1.11
--- src/usr.sbin/ndiscvt/ndiscvt.c:1.10	Fri Nov 25 08:18:22 2011
+++ src/usr.sbin/ndiscvt/ndiscvt.c	Thu Nov  7 20:10:23 2013
@@ -35,7 +35,7 @@
 __FBSDID($FreeBSD: src/usr.sbin/ndiscvt/ndiscvt.c,v 1.9.2.2 2005/02/23 16:31:47 wpaul Exp $);
 #endif
 #ifdef __NetBSD__
-__RCSID($NetBSD: ndiscvt.c,v 1.10 2011/11/25 13:18:22 joerg Exp $);
+__RCSID($NetBSD: ndiscvt.c,v 1.11 2013/11/08 01:10:23 christos Exp $);
 #endif
 
 
@@ -110,7 +110,7 @@ int insert_padding(imgbase, imglen)
 image_dos_header	*dos_hdr;
 image_nt_header		*nt_hdr;
 	image_optional_header	opt_hdr;
-int			i = 0, sections, curlen = 0;
+int			i = 0, sections;
 	int			offaccum = 0, oldraddr, oldrlen;
 	uint8_t			*newimg, *tmp;
 
@@ -120,7 +120,6 @@ int insert_padding(imgbase, imglen)
 		return(ENOMEM);
 
 	bcopy(*imgbase, newimg, *imglen);
-	curlen = *imglen;
 
 	if (pe_get_optional_header((vm_offset_t)newimg, opt_hdr))
 		return(0);



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

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  8 01:41:45 UTC 2013

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

Log Message:
fix unused variables


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x86/x86/est.c

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

Modified files:

Index: src/sys/arch/x86/x86/est.c
diff -u src/sys/arch/x86/x86/est.c:1.25 src/sys/arch/x86/x86/est.c:1.26
--- src/sys/arch/x86/x86/est.c:1.25	Sat Jun  2 17:36:42 2012
+++ src/sys/arch/x86/x86/est.c	Thu Nov  7 20:41:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: est.c,v 1.25 2012/06/02 21:36:42 dsl Exp $	*/
+/*	$NetBSD: est.c,v 1.26 2013/11/08 01:41:45 christos Exp $	*/
 /*
  * Copyright (c) 2003 Michael Eriksson.
  * All rights reserved.
@@ -76,7 +76,7 @@
  *   http://www.codemonkey.org.uk/projects/cpufreq/cpufreq-2.4.22-pre6-1.gz
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: est.c,v 1.25 2012/06/02 21:36:42 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: est.c,v 1.26 2013/11/08 01:41:45 christos Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -1121,7 +1121,6 @@ est_tables(device_t self)
 #endif
 	uint64_t msr;
 	uint16_t cur, idhi, idlo;
-	uint8_t crhi, crlo, crcur;
 	size_t len;
 	int i, mv;
 
@@ -1130,9 +1129,6 @@ est_tables(device_t self)
 	idhi = (msr  32)  0x;
 	idlo = (msr  48)  0x;
 	cur = msr  0x;
-	crhi = (idhi   8)  0xff;
-	crlo = (idlo   8)  0xff;
-	crcur = (cur  8)  0xff;
 
 #ifdef __i386__
 	if (idhi == 0 || idlo == 0 || cur == 0 ||
@@ -1144,6 +1140,9 @@ est_tables(device_t self)
 #endif
 
 #ifdef __amd64__
+	uint8_t crhi = (idhi  8)  0xff;
+	uint8_t crlo = (idlo  8)  0xff;
+	uint8_t crcur = (cur  8)  0xff;
 	if (crlo == 0 || crhi == 0 || crcur == 0 || crhi == crlo ||
 	crlo  crhi || crcur  crlo || crcur  crhi) {
 		/*



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

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  8 02:23:52 UTC 2013

Modified Files:
src/sys/arch/xen/x86: x86_xpmap.c

Log Message:
fix unused variable warnings


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/xen/x86/x86_xpmap.c

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

Modified files:

Index: src/sys/arch/xen/x86/x86_xpmap.c
diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.50 src/sys/arch/xen/x86/x86_xpmap.c:1.51
--- src/sys/arch/xen/x86/x86_xpmap.c:1.50	Wed Nov  6 01:23:15 2013
+++ src/sys/arch/xen/x86/x86_xpmap.c	Thu Nov  7 21:23:52 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_xpmap.c,v 1.50 2013/11/06 06:23:15 mrg Exp $	*/
+/*	$NetBSD: x86_xpmap.c,v 1.51 2013/11/08 02:23:52 christos Exp $	*/
 
 /*
  * Copyright (c) 2006 Mathieu Ropert m...@adviseo.fr
@@ -69,7 +69,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: x86_xpmap.c,v 1.50 2013/11/06 06:23:15 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: x86_xpmap.c,v 1.51 2013/11/08 02:23:52 christos Exp $);
 
 #include opt_xen.h
 #include opt_ddb.h
@@ -1044,6 +1044,7 @@ xen_bootstrap_tables (vaddr_t old_pgd, v
 		cpu_info_primary.ci_kpm_pdirpa = ((paddr_t) bt_cpu_pgd - KERNBASE);
 	}
 #endif
+	__USE(pdtpe);
 
 	/* Now we can safely reclaim space taken by old tables */
 	



CVS commit: src/sys/arch/i386

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  8 02:24:12 UTC 2013

Modified Files:
src/sys/arch/i386/i386: machdep.c
src/sys/arch/i386/isa: npx.c

Log Message:
Fix unused variable warnings


To generate a diff of this commit:
cvs rdiff -u -r1.735 -r1.736 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.144 -r1.145 src/sys/arch/i386/isa/npx.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/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.735 src/sys/arch/i386/i386/machdep.c:1.736
--- src/sys/arch/i386/i386/machdep.c:1.735	Wed Oct 23 16:18:50 2013
+++ src/sys/arch/i386/i386/machdep.c	Thu Nov  7 21:24:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.735 2013/10/23 20:18:50 drochner Exp $	*/
+/*	$NetBSD: machdep.c,v 1.736 2013/11/08 02:24:11 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.735 2013/10/23 20:18:50 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.736 2013/11/08 02:24:11 christos Exp $);
 
 #include opt_beep.h
 #include opt_compat_ibcs2.h
@@ -530,12 +530,10 @@ void i386_tls_switch(lwp_t *);
 void
 i386_switch_context(lwp_t *l)
 {
-	struct cpu_info *ci;
 	struct pcb *pcb;
 	struct physdev_op physop;
 
 	pcb = lwp_getpcb(l);
-	ci = curcpu();
 
 	HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), pcb-pcb_esp0);
 
@@ -806,6 +804,8 @@ haltsys:
 			splx(s);
 
 		acpi_enter_sleep_state(ACPI_STATE_S5);
+#else
+		__USE(s);
 #endif
 	}
 

Index: src/sys/arch/i386/isa/npx.c
diff -u src/sys/arch/i386/isa/npx.c:1.144 src/sys/arch/i386/isa/npx.c:1.145
--- src/sys/arch/i386/isa/npx.c:1.144	Wed Oct 23 16:18:50 2013
+++ src/sys/arch/i386/isa/npx.c	Thu Nov  7 21:24:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npx.c,v 1.144 2013/10/23 20:18:50 drochner Exp $	*/
+/*	$NetBSD: npx.c,v 1.145 2013/11/08 02:24:11 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npx.c,v 1.144 2013/10/23 20:18:50 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: npx.c,v 1.145 2013/11/08 02:24:11 christos Exp $);
 
 #if 0
 #define IPRINTF(x)	printf x
@@ -376,11 +376,9 @@ npxintr(void *arg, struct intrframe *fra
 	struct cpu_info *ci = curcpu();
 	struct lwp *l = curlwp;
 	union savefpu *addr;
-	struct npx_softc *sc;
 	struct pcb *pcb;
 	ksiginfo_t ksi;
 
-	sc = npx_softc;
 
 	kpreempt_disable();
 #ifndef XEN
@@ -392,6 +390,7 @@ npxintr(void *arg, struct intrframe *fra
 	IPRINTF((%s: fp intr\n, device_xname(ci-ci_dev)));
 
 #ifndef XEN
+	struct npx_softc *sc = npx_softc;
 	/*
 	 * Clear the interrupt latch.
 	 */



CVS commit: src/sys/arch/mmeye/mmeye

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  8 02:24:53 UTC 2013

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

Log Message:
fix unused variable warning


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/mmeye/mmeye/machdep.c

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

Modified files:

Index: src/sys/arch/mmeye/mmeye/machdep.c
diff -u src/sys/arch/mmeye/mmeye/machdep.c:1.56 src/sys/arch/mmeye/mmeye/machdep.c:1.57
--- src/sys/arch/mmeye/mmeye/machdep.c:1.56	Sat Oct 27 13:18:04 2012
+++ src/sys/arch/mmeye/mmeye/machdep.c	Thu Nov  7 21:24:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.56 2012/10/27 17:18:04 chs Exp $	*/
+/*	$NetBSD: machdep.c,v 1.57 2013/11/08 02:24:53 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.56 2012/10/27 17:18:04 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.57 2013/11/08 02:24:53 christos Exp $);
 
 #include opt_ddb.h
 #include opt_memsize.h
@@ -648,7 +648,7 @@ void
 intc_intr(int ssr, int spc, int ssp)
 {
 	struct intc_intrhand *ih;
-	int s, evtcode;
+	int evtcode;
 
 	curcpu()-ci_data.cpu_nintr++;
 
@@ -662,7 +662,7 @@ intc_intr(int ssr, int spc, int ssp)
 	 * SH3 may or may not cause TLB miss when access stack.)
 	 * Enable higher level interrupt here.
 	 */
-	s = _cpu_intr_resume(ih-ih_level);
+	(void)_cpu_intr_resume(ih-ih_level);
 
 	if (evtcode == SH_INTEVT_TMU0_TUNI0) {	/* hardclock */
 		struct clockframe cf;



CVS commit: src/sys/dev/apm

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  8 02:47:41 UTC 2013

Modified Files:
src/sys/dev/apm: apm.c

Log Message:
fix unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/apm/apm.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/apm/apm.c
diff -u src/sys/dev/apm/apm.c:1.28 src/sys/dev/apm/apm.c:1.29
--- src/sys/dev/apm/apm.c:1.28	Sun Sep 30 17:36:19 2012
+++ src/sys/dev/apm/apm.c	Thu Nov  7 21:47:41 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: apm.c,v 1.28 2012/09/30 21:36:19 dsl Exp $ */
+/*	$NetBSD: apm.c,v 1.29 2013/11/08 02:47:41 christos Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: apm.c,v 1.28 2012/09/30 21:36:19 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: apm.c,v 1.29 2013/11/08 02:47:41 christos Exp $);
 
 #include opt_apm.h
 
@@ -449,6 +449,8 @@ apm_event_handle(struct apm_softc *sc, u
 		if (error == 0 
 		(sc-sc_flags  (SCFLAG_OREAD|SCFLAG_OWRITE)) == 0)
 			apm_power_print(sc, pi);
+#else
+		__USE(error);
 #endif
 		apm_record_event(sc, event_code);
 		break;



CVS commit: src/sys/dev

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  8 03:12:17 UTC 2013

Modified Files:
src/sys/dev/ic: interwave.c
src/sys/dev/isa: if_iy.c ym.c
src/sys/dev/mca: if_tr_mca.c
src/sys/dev/usb: if_upgt.c xhci.c

Log Message:
fix unused variable warnings


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/ic/interwave.c
cvs rdiff -u -r1.91 -r1.92 src/sys/dev/isa/if_iy.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/isa/ym.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/mca/if_tr_mca.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/usb/if_upgt.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/xhci.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/interwave.c
diff -u src/sys/dev/ic/interwave.c:1.37 src/sys/dev/ic/interwave.c:1.38
--- src/sys/dev/ic/interwave.c:1.37	Sat Oct 27 13:18:20 2012
+++ src/sys/dev/ic/interwave.c	Thu Nov  7 22:12:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: interwave.c,v 1.37 2012/10/27 17:18:20 chs Exp $	*/
+/*	$NetBSD: interwave.c,v 1.38 2013/11/08 03:12:17 christos Exp $	*/
 
 /*
  * Copyright (c) 1997, 1999, 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: interwave.c,v 1.37 2012/10/27 17:18:20 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: interwave.c,v 1.38 2013/11/08 03:12:17 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -576,6 +576,7 @@ iw_set_speed(struct iw_softc *sc, u_long
 	IW_READ_CODEC_1(CRDFI, reg);
 
 	DPRINTF(( CRDFI %x , reg));
+	__USE(reg);
 
 	return freq;
 }

Index: src/sys/dev/isa/if_iy.c
diff -u src/sys/dev/isa/if_iy.c:1.91 src/sys/dev/isa/if_iy.c:1.92
--- src/sys/dev/isa/if_iy.c:1.91	Sat Oct 27 13:18:24 2012
+++ src/sys/dev/isa/if_iy.c	Thu Nov  7 22:12:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iy.c,v 1.91 2012/10/27 17:18:24 chs Exp $	*/
+/*	$NetBSD: if_iy.c,v 1.92 2013/11/08 03:12:17 christos Exp $	*/
 /* #define IYDEBUG */
 /* #define IYMEMDEBUG */
 
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_iy.c,v 1.91 2012/10/27 17:18:24 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_iy.c,v 1.92 2013/11/08 03:12:17 christos Exp $);
 
 #include opt_inet.h
 
@@ -1088,6 +1088,8 @@ iy_intr_rx(struct iy_softc *sc)
 			printf(%s: pck at 0x%04x stat %s next 0x%x len 0x%x\n,
 			device_xname(sc-sc_dev), rxadrs, sbuf, rxnext, rxlen);
 		}
+#else
+		__USE(rxstatus);
 #endif
 		iyget(sc, iot, ioh, rxlen);
 
@@ -1346,6 +1348,7 @@ iy_mc_setup(struct iy_softc *sc)
 		ETHER_NEXT_MULTI(step, enm);
 	}
 	dum = bus_space_read_2(iot, ioh, MEM_PORT_REG); /* dummy read */
+	__USE(dum);
 	bus_space_write_2(iot, ioh, XMT_ADDR_REG, last);
 	bus_space_write_1(iot, ioh, 0, MC_SETUP_CMD);
 

Index: src/sys/dev/isa/ym.c
diff -u src/sys/dev/isa/ym.c:1.43 src/sys/dev/isa/ym.c:1.44
--- src/sys/dev/isa/ym.c:1.43	Wed Nov 23 22:35:58 2011
+++ src/sys/dev/isa/ym.c	Thu Nov  7 22:12:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ym.c,v 1.43 2011/11/24 03:35:58 mrg Exp $	*/
+/*	$NetBSD: ym.c,v 1.44 2013/11/08 03:12:17 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999-2002, 2008 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ym.c,v 1.43 2011/11/24 03:35:58 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ym.c,v 1.44 2013/11/08 03:12:17 christos Exp $);
 
 #include mpu_ym.h
 #include opt_ym.h
@@ -505,6 +505,8 @@ ym_hvol_to_master_gain(struct ym_softc *
 	/* Notify the change to async processes. */
 	if (changed  sc-sc_audiodev)
 		mixer_signal(sc-sc_audiodev);
+#else
+	__USE(changed);
 #endif
 }
 

Index: src/sys/dev/mca/if_tr_mca.c
diff -u src/sys/dev/mca/if_tr_mca.c:1.22 src/sys/dev/mca/if_tr_mca.c:1.23
--- src/sys/dev/mca/if_tr_mca.c:1.22	Sat Oct 27 13:18:26 2012
+++ src/sys/dev/mca/if_tr_mca.c	Thu Nov  7 22:12:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tr_mca.c,v 1.22 2012/10/27 17:18:26 chs Exp $ */
+/* $NetBSD: if_tr_mca.c,v 1.23 2013/11/08 03:12:17 christos Exp $ */
 
 /*_
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_tr_mca.c,v 1.22 2012/10/27 17:18:26 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_tr_mca.c,v 1.23 2013/11/08 03:12:17 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -117,6 +117,7 @@ tr_mca_attach(device_t parent, device_t 
 	pos3 = mca_conf_read(ma-ma_mc, ma-ma_slot, 3);
 	pos4 = mca_conf_read(ma-ma_mc, ma-ma_slot, 4);
 	pos5 = mca_conf_read(ma-ma_mc, ma-ma_slot, 5);
+	__USE(pos5);
 
 	/*
 	 * POS register 2: (adf pos0)

Index: src/sys/dev/usb/if_upgt.c
diff -u src/sys/dev/usb/if_upgt.c:1.9 src/sys/dev/usb/if_upgt.c:1.10
--- src/sys/dev/usb/if_upgt.c:1.9	Fri Mar 29 23:15:53 2013
+++ src/sys/dev/usb/if_upgt.c	Thu Nov  7 22:12:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_upgt.c,v 1.9 2013/03/30 03:15:53 christos Exp $	*/
+/*	$NetBSD: if_upgt.c,v 1.10 2013/11/08 03:12:17 christos Exp $	*/
 /*	$OpenBSD: if_upgt.c,v 1.49 2010/04/20 

CVS commit: src/sys/arch/i386

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  8 03:12:48 UTC 2013

Modified Files:
src/sys/arch/i386/i386: machdep.c mainbus.c
src/sys/arch/i386/pci: elan520.c

Log Message:
fix unused variable warnings


To generate a diff of this commit:
cvs rdiff -u -r1.736 -r1.737 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/i386/i386/mainbus.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/i386/pci/elan520.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/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.736 src/sys/arch/i386/i386/machdep.c:1.737
--- src/sys/arch/i386/i386/machdep.c:1.736	Thu Nov  7 21:24:11 2013
+++ src/sys/arch/i386/i386/machdep.c	Thu Nov  7 22:12:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.736 2013/11/08 02:24:11 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.737 2013/11/08 03:12:48 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.736 2013/11/08 02:24:11 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.737 2013/11/08 03:12:48 christos Exp $);
 
 #include opt_beep.h
 #include opt_compat_ibcs2.h
@@ -1162,7 +1162,6 @@ void
 init386(paddr_t first_avail)
 {
 	extern void consinit(void);
-	struct pcb *pcb;
 	int x;
 #ifndef XEN
 	union descriptor *tgdt;
@@ -1184,7 +1183,6 @@ init386(paddr_t first_avail)
 	cpu_probe(cpu_info_primary);
 
 	uvm_lwp_setuarea(lwp0, lwp0uarea);
-	pcb = lwp_getpcb(lwp0);
 
 	cpu_init_msrs(cpu_info_primary, true);
 
@@ -1195,6 +1193,7 @@ init386(paddr_t first_avail)
 #endif
 
 #ifdef XEN
+	struct pcb *pcb = lwp_getpcb(lwp0);
 	pcb-pcb_cr3 = PDPpaddr;
 	__PRINTK((pcb_cr3 0x%lx cr3 0x%lx\n,
 	PDPpaddr, xpmap_ptom(PDPpaddr)));

Index: src/sys/arch/i386/i386/mainbus.c
diff -u src/sys/arch/i386/i386/mainbus.c:1.97 src/sys/arch/i386/i386/mainbus.c:1.98
--- src/sys/arch/i386/i386/mainbus.c:1.97	Wed Jul 31 10:05:33 2013
+++ src/sys/arch/i386/i386/mainbus.c	Thu Nov  7 22:12:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.97 2013/07/31 14:05:33 soren Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.98 2013/11/08 03:12:48 christos Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.97 2013/07/31 14:05:33 soren Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.98 2013/11/08 03:12:48 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -242,6 +242,8 @@ mainbus_attach(device_t parent, device_t
 		pci_addr_fixup(NULL, pci_maxbus);
 #endif
 	}
+#else
+	__USE(mode);
 #endif
 #endif
 

Index: src/sys/arch/i386/pci/elan520.c
diff -u src/sys/arch/i386/pci/elan520.c:1.49 src/sys/arch/i386/pci/elan520.c:1.50
--- src/sys/arch/i386/pci/elan520.c:1.49	Fri Jul  1 13:37:26 2011
+++ src/sys/arch/i386/pci/elan520.c	Thu Nov  7 22:12:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: elan520.c,v 1.49 2011/07/01 17:37:26 dyoung Exp $	*/
+/*	$NetBSD: elan520.c,v 1.50 2013/11/08 03:12:48 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: elan520.c,v 1.49 2011/07/01 17:37:26 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: elan520.c,v 1.50 2013/11/08 03:12:48 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -693,7 +693,6 @@ static void
 elansc_protect_text(device_t self, struct elansc_softc *sc)
 {
 	int i, j, nregion, pidx, tidx = 0, xnregion;
-	uint32_t par;
 	uint32_t protsize, unprotsize;
 	paddr_t start_pa, end_pa;
 	extern char kernel_text, etext;
@@ -722,7 +721,7 @@ elansc_protect_text(device_t self, struc
 		return;
 	}
 
-	par = bus_space_read_4(memt, memh, MMCR_PAR(pidx));
+	(void) bus_space_read_4(memt, memh, MMCR_PAR(pidx));
 
 	aprint_debug_dev(self,
 	protect kernel text at physical addresses 



CVS commit: src/distrib/sets/lists/comp

2013-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  8 03:13:29 UTC 2013

Modified Files:
src/distrib/sets/lists/comp: md.i386

Log Message:
fix gcc-4.8 sets


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/distrib/sets/lists/comp/md.i386

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

Modified files:

Index: src/distrib/sets/lists/comp/md.i386
diff -u src/distrib/sets/lists/comp/md.i386:1.139 src/distrib/sets/lists/comp/md.i386:1.140
--- src/distrib/sets/lists/comp/md.i386:1.139	Fri Nov  1 03:48:31 2013
+++ src/distrib/sets/lists/comp/md.i386	Thu Nov  7 22:13:29 2013
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.139 2013/11/01 07:48:31 mrg Exp $
+# $NetBSD: md.i386,v 1.140 2013/11/08 03:13:29 christos Exp $
 ./usr/include/clang-3.0/avx2intrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.0/avxintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.0/bmi2intrin.h		comp-obsolete		obsolete
@@ -142,30 +142,44 @@
 ./usr/include/gcc-4.5/x86intrin.h		comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/xmmintrin.h		comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/xopintrin.h		comp-c-include		gcccmds,gcc=45
-./usr/include/gcc-4.8/abmintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/adxintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/ammintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/avx2intrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/avxintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/bmi2intrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/bmiintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/bmmintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/cpuid.h			comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/cross-stdarg.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/emmintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/f16cintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/fma4intrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/fmaintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/fxsrintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/ia32intrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/immintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/lwpintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/lzcntintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/mm3dnow.h			comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/mm_malloc.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/mmintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/nmmintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/pmmintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/popcntintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/prfchwintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/rdseedintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/rtmintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/smmintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/tbmintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/tgmath.h			comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/tmmintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/wmmintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/x86intrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/xmmintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-4.8/xopintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/xsaveintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/xsaveoptintrin.h		comp-c-include		gcccmds,gcc=48
+./usr/include/gcc-4.8/xtestintrin.h		comp-c-include		gcccmds,gcc=48
 ./usr/include/i386comp-c-include
 ./usr/include/i386/_G_config.h			comp-obsolete		obsolete
 ./usr/include/i386/ansi.h			comp-c-include



CVS commit: src/sys/dev/i2c

2013-11-07 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Nov  8 03:56:10 UTC 2013

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

Log Message:
fix an array bound error which was spotted by gcc 4.8


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/i2c/m41st84.c

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

Modified files:

Index: src/sys/dev/i2c/m41st84.c
diff -u src/sys/dev/i2c/m41st84.c:1.18 src/sys/dev/i2c/m41st84.c:1.19
--- src/sys/dev/i2c/m41st84.c:1.18	Sat May 28 13:59:31 2011
+++ src/sys/dev/i2c/m41st84.c	Fri Nov  8 03:56:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: m41st84.c,v 1.18 2011/05/28 13:59:31 phx Exp $	*/
+/*	$NetBSD: m41st84.c,v 1.19 2013/11/08 03:56:10 nisimura Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: m41st84.c,v 1.18 2011/05/28 13:59:31 phx Exp $);
+__KERNEL_RCSID(0, $NetBSD: m41st84.c,v 1.19 2013/11/08 03:56:10 nisimura Exp $);
 
 #include opt_strtc.h
 
@@ -282,7 +282,7 @@ strtc_settime(struct todr_chip_handle *c
 static int
 strtc_clock_read(struct strtc_softc *sc, struct clock_ymdhms *dt)
 {
-	u_int8_t bcd[M41ST84_REG_DATE_BYTES], cmdbuf[1];
+	u_int8_t bcd[M41ST84_REG_DATE_BYTES], cmdbuf[2];
 	int i;
 
 	if (iic_acquire_bus(sc-sc_tag, I2C_F_POLL)) {



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

2013-11-07 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Nov  8 03:59:35 UTC 2013

Modified Files:
src/sys/arch/powerpc/include: cpu.h

Log Message:
resort the sys/cpu.h way for unused cii iterator in !MULTIPROCESSOR case.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/powerpc/include/cpu.h

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

Modified files:

Index: src/sys/arch/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.97 src/sys/arch/powerpc/include/cpu.h:1.98
--- src/sys/arch/powerpc/include/cpu.h:1.97	Wed Jul 17 23:27:02 2013
+++ src/sys/arch/powerpc/include/cpu.h	Fri Nov  8 03:59:35 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.97 2013/07/17 23:27:02 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.98 2013/11/08 03:59:35 nisimura Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -199,7 +199,7 @@ extern struct cpuset_info cpuset_info;
 #define CPU_IS_PRIMARY(ci)	true
 #define CPU_INFO_ITERATOR	int
 #define CPU_INFO_FOREACH(cii, ci)\
-	cii = 0, ci = curcpu(); ci != NULL; ci = NULL
+	(void)cii, ci = curcpu(); ci != NULL; ci = NULL
 
 #endif /* MULTIPROCESSOR || _MODULE */
 



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

2013-11-07 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Nov  8 04:32:58 UTC 2013

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

Log Message:
use __diagused for KASSERT only variable.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/powerpc/powerpc/powerpc_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/powerpc/powerpc_machdep.c
diff -u src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.65 src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.66
--- src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.65	Fri Jul 19 06:43:20 2013
+++ src/sys/arch/powerpc/powerpc/powerpc_machdep.c	Fri Nov  8 04:32:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: powerpc_machdep.c,v 1.65 2013/07/19 06:43:20 matt Exp $	*/
+/*	$NetBSD: powerpc_machdep.c,v 1.66 2013/11/08 04:32:58 nisimura Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: powerpc_machdep.c,v 1.65 2013/07/19 06:43:20 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: powerpc_machdep.c,v 1.66 2013/11/08 04:32:58 nisimura Exp $);
 
 #include opt_altivec.h
 #include opt_modular.h
@@ -319,7 +319,7 @@ startlwp(void *arg)
 	ucontext_t * const uc = arg;
 	lwp_t * const l = curlwp;
 	struct trapframe * const tf = l-l_md.md_utf;
-	int error;
+	int error __diagused;
 
 	error = cpu_setmcontext(l, uc-uc_mcontext, uc-uc_flags);
 	KASSERT(error == 0);



CVS commit: src/sys/dev/pci

2013-11-07 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Nov  8 06:20:48 UTC 2013

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

Log Message:
move EVCNT only variable inside #ifdef


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/if_kse.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/if_kse.c
diff -u src/sys/dev/pci/if_kse.c:1.24 src/sys/dev/pci/if_kse.c:1.25
--- src/sys/dev/pci/if_kse.c:1.24	Sat Mar 30 03:21:06 2013
+++ src/sys/dev/pci/if_kse.c	Fri Nov  8 06:20:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_kse.c,v 1.24 2013/03/30 03:21:06 christos Exp $	*/
+/*	$NetBSD: if_kse.c,v 1.25 2013/11/08 06:20:48 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_kse.c,v 1.24 2013/03/30 03:21:06 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_kse.c,v 1.25 2013/11/08 06:20:48 nisimura Exp $);
 
 
 #include sys/param.h
@@ -350,7 +350,7 @@ kse_attach(device_t parent, device_t sel
 	struct ifmedia *ifm;
 	uint8_t enaddr[ETHER_ADDR_LEN];
 	bus_dma_segment_t seg;
-	int i, p, error, nseg;
+	int i, error, nseg;
 	pcireg_t pmode;
 	int pmreg;
 
@@ -526,8 +526,8 @@ kse_attach(device_t parent, device_t sel
 	if_attach(ifp);
 	ether_ifattach(ifp, enaddr);
 
-	p = (sc-sc_chip == 0x8842) ? 3 : 1;
 #ifdef KSE_EVENT_COUNTERS
+	int p = (sc-sc_chip == 0x8842) ? 3 : 1;
 	for (i = 0; i  p; i++) {
 		struct ksext *ee = sc-sc_ext;
 		sprintf(ee-evcntname[i], %s.%d, device_xname(sc-sc_dev), i+1);