CVS commit: src/share/misc

2012-08-24 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Aug 24 06:04:02 UTC 2012

Modified Files:
src/share/misc: acronyms

Log Message:
OTP (one true pairing)


To generate a diff of this commit:
cvs rdiff -u -r1.211 -r1.212 src/share/misc/acronyms

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

Modified files:

Index: src/share/misc/acronyms
diff -u src/share/misc/acronyms:1.211 src/share/misc/acronyms:1.212
--- src/share/misc/acronyms:1.211	Sun Aug 12 13:41:18 2012
+++ src/share/misc/acronyms	Fri Aug 24 06:04:02 2012
@@ -1,4 +1,4 @@
-$NetBSD: acronyms,v 1.211 2012/08/12 13:41:18 jakllsch Exp $
+$NetBSD: acronyms,v 1.212 2012/08/24 06:04:02 dholland Exp $
 10Q	thank you
 10X	thanks
 1337	elite (leet)
@@ -351,6 +351,7 @@ OOSOOM	out of sight, out of mind
 OT	off topic
 OTL	out to lunch
 OTOH	on the other hand
+OTP	one true pairing
 OTS	off the shelf
 OTT	over the top
 OTTOMH	off the top of my head



CVS commit: src/lib/libc

2012-08-24 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Aug 24 06:12:52 UTC 2012

Modified Files:
src/lib/libc: shlib_version

Log Message:
Some more notes for libc bump time that I had lying around.


To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 src/lib/libc/shlib_version

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/shlib_version
diff -u src/lib/libc/shlib_version:1.234 src/lib/libc/shlib_version:1.235
--- src/lib/libc/shlib_version:1.234	Tue Jul 17 05:41:30 2012
+++ src/lib/libc/shlib_version	Fri Aug 24 06:12:52 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: shlib_version,v 1.234 2012/07/17 05:41:30 dholland Exp $
+#	$NetBSD: shlib_version,v 1.235 2012/08/24 06:12:52 dholland Exp $
 #	Remember to update distrib/sets/lists/base/shl.* when changing
 #
 # things we wish to do on next major version bump:
@@ -11,12 +11,15 @@
 # - libc/gen/timezone.c: remove; __timezone13 - timezone
 # - libc/net/getaddrinfo.c, netdb.h: remove __ai_pad0
 # - libc/gen/utmpx.c, utmpx.h: remove lastlogxname, __getlastlogx13 - getlastlogx
+# - libc/gen/utmpx.c, utmpx.h: add expansion space to struct lastlogx
 # - infinity{,f,l}.c, math.h: __infinity - __huge_val
 # - libc/gen/is{inf,nan}d_ieee754.c: remove is{inf,nan} aliases
 # - libc/arch/vax/gen/is{inf,nan}.c: remove
 # - libc/db/hash/ndbm.c: remove; __ndbm13 - ndbm
 # - libc/net/getnet{ent,namadr}.c, netdb.h: remove __n_pad0
 # - libc/stdio: make _file an int, hide struct FILE, stdin, stdout, stderr impls
+# - libc/stdio: make fileno() not a macro
+# - libc/stdio: make stdio macro users depend on some library symbol
 # - remove frexp, ldexp, modf: they belong to libm.
 # - make sure we can support thread local [on arm don't use r9 for example,
 #   consider other risc architectures: mips, powerpc, sparc, etc]



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

2012-08-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug 24 06:34:08 UTC 2012

Modified Files:
src/sys/arch/arm/omap: omap2_reg.h

Log Message:
Add registers for OMAP 3530 / TI DM37xx to determine CPU speed.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/omap/omap2_reg.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/arm/omap/omap2_reg.h
diff -u src/sys/arch/arm/omap/omap2_reg.h:1.8 src/sys/arch/arm/omap/omap2_reg.h:1.9
--- src/sys/arch/arm/omap/omap2_reg.h:1.8	Thu Aug 23 01:27:24 2012
+++ src/sys/arch/arm/omap/omap2_reg.h	Fri Aug 24 06:34:08 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_reg.h,v 1.8 2012/08/23 01:27:24 matt Exp $ */
+/* $NetBSD: omap2_reg.h,v 1.9 2012/08/24 06:34:08 matt Exp $ */
 
 /*
  * Copyright (c) 2007 Microsoft
@@ -108,7 +108,7 @@
 #define OMAP2_CM_BASE			0x48008000
 #endif
 #ifdef OMAP_3530
-#define OMAP2_CM_BASE			0x48004000
+#define OMAP2_CM_BASE			(OMAP3530_L4_CORE_BASE + 0x04000)
 #endif
 #ifdef OMAP_4430
 #define OMAP2_CM_BASE			(OMAP4430_L4_CORE_BASE + 0x04000)
@@ -117,7 +117,7 @@
 #define OMAP2_CM_BASE			TI_AM335X_L4_WAKEUP_BASE
 #endif
 #ifdef TI_DM37XX
-#define OMAP2_CM_BASE			TI_DM37XX_L4_WAKEUP_BASE
+#define OMAP2_CM_BASE			0x48004000
 #endif
 
 #define	OMAP2_CM_CLKSEL_MPU	0x140
@@ -128,7 +128,6 @@
 #define	OMAP2_CM_CLKSEL2_CORE	0x244
 #define	OMAP2_CM_SIZE		(OMAP2_CM_CLKSEL2_CORE + 4)
 
-
 /*
  * bit defines for OMAP2_CM_CLKSEL_MPU
  */
@@ -280,6 +279,15 @@
 		|OMAP2_CM_CLKSEL2_CORE_RESb)
 
 
+#define	OMAP3_CM_CLKSEL1_PLL_MPU	0x940
+#define	OMAP3_CM_CLKSEL2_PLL_MPU	0x944
+
+#define	OMAP3_CM_CLKSEL1_PLL_MPU_CLK_SRC	__BITS(21,9)
+#define	OMAP3_CM_CLKSEL1_PLL_MPU_DPLL_MULT	__BITS(18,8)
+#define	OMAP3_CM_CLKSEL1_PLL_MPU_DPLL_DIV	__BITS(6,0)
+
+#define	OMAP3_CM_CLKSEL2_PLL_MPU_DPLL_CLKOUT_DIV	__BITS(4,0)
+
 /*
  * Power Management registers base, offsets, and size
  */
@@ -334,6 +342,17 @@
 #define OMAP_RST_DPLL3		__BIT(2)
 #define OMAP_RST_GS		__BIT(1)
 
+#define	OMAP3_PRM_CLKSEL	0x40	// from PLL_MOD
+#define	OMAP3_PRM_CLKSEL_CLKIN	__BITS(2,0)
+#define	OMAP3_PRM_CLKSEL_CLKIN_12000KHZ		0
+#define	OMAP3_PRM_CLKSEL_CLKIN_13000KHZ		1
+#define	OMAP3_PRM_CLKSEL_CLKIN_19200KHZ		2
+#define	OMAP3_PRM_CLKSEL_CLKIN_26000KHZ		3
+#define	OMAP3_PRM_CLKSEL_CLKIN_38400KHZ		4
+#define	OMAP3_PRM_CLKSEL_CLKIN_16800KHZ		5
+#define OMAP3_PRM_CLKSEL_FREQS	{ 12000, 13000, 19200, 26000, 38400, 16800, 0, 0 }
+#define	OMAP3_PRM_CLKSEL_MULT	1000
+
 /*
  * L3 Interconnect Target Agent Common Registers
  */



CVS commit: src/sys

2012-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug 24 09:01:23 UTC 2012

Modified Files:
src/sys/arch/amiga/dev: siopreg.h
src/sys/arch/hpcmips/dev: plumreg.h
src/sys/dev/ic: advlib.h adwlib.h esiopvar.h osiopreg.h siopvar.h
tcic2.c
src/sys/dev/mii: nsphyter.c
src/sys/dev/pci: neo.c
src/sys/dev/pci/bktr: bktr_card.h
src/sys/dev/usb: if_atureg.h if_axe.c if_udavreg.h if_urlreg.h
if_zydreg.h usb.h

Log Message:
Fix typos


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/amiga/dev/siopreg.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hpcmips/dev/plumreg.h
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/ic/advlib.h
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/ic/adwlib.h
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/ic/esiopvar.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/osiopreg.h
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/siopvar.h
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ic/tcic2.c
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/mii/nsphyter.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/neo.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/bktr/bktr_card.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/if_atureg.h \
src/sys/dev/usb/if_udavreg.h src/sys/dev/usb/if_urlreg.h
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/usb/if_axe.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_zydreg.h
cvs rdiff -u -r1.95 -r1.96 src/sys/dev/usb/usb.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/amiga/dev/siopreg.h
diff -u src/sys/arch/amiga/dev/siopreg.h:1.14 src/sys/arch/amiga/dev/siopreg.h:1.15
--- src/sys/arch/amiga/dev/siopreg.h:1.14	Wed Mar  8 23:46:22 2006
+++ src/sys/arch/amiga/dev/siopreg.h	Fri Aug 24 09:01:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: siopreg.h,v 1.14 2006/03/08 23:46:22 lukem Exp $	*/
+/*	$NetBSD: siopreg.h,v 1.15 2012/08/24 09:01:22 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -498,7 +498,7 @@ typedef volatile siop_regmap_t *siop_reg
 #ifndef ARCH_720
 #define	SIOP_CTEST7_CDIS	0x80	/* Cache burst disable */
 #define	SIOP_CTEST7_SC1		0x40	/* Snoop control 1 */
-#define	SIOP_CTEST7_SC0		0x20	/* Snoop contorl 0 */
+#define	SIOP_CTEST7_SC0		0x20	/* Snoop control 0 */
 #define	SIOP_CTEST7_STD		0x10	/* Selection timeout disable */
 #define	SIOP_CTEST7_DFP		0x08	/* DMA FIFO parity bit */
 #define	SIOP_CTEST7_EVP		0x04	/* Even parity (to host bus) */

Index: src/sys/arch/hpcmips/dev/plumreg.h
diff -u src/sys/arch/hpcmips/dev/plumreg.h:1.3 src/sys/arch/hpcmips/dev/plumreg.h:1.4
--- src/sys/arch/hpcmips/dev/plumreg.h:1.3	Mon Apr 28 20:23:21 2008
+++ src/sys/arch/hpcmips/dev/plumreg.h	Fri Aug 24 09:01:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: plumreg.h,v 1.3 2008/04/28 20:23:21 martin Exp $ */
+/*	$NetBSD: plumreg.h,v 1.4 2012/08/24 09:01:22 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
 #define	PLUM2_20x0102
 
 /*
- * Bus contorller
+ * Bus controller
  */
 #define PLUM_BUS_REGBASE	0x
 #define PLUM_BUS_REGSIZE	0x1000

Index: src/sys/dev/ic/advlib.h
diff -u src/sys/dev/ic/advlib.h:1.17 src/sys/dev/ic/advlib.h:1.18
--- src/sys/dev/ic/advlib.h:1.17	Sun Dec 11 12:21:25 2005
+++ src/sys/dev/ic/advlib.h	Fri Aug 24 09:01:22 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: advlib.h,v 1.17 2005/12/11 12:21:25 christos Exp $*/
+/*  $NetBSD: advlib.h,v 1.18 2012/08/24 09:01:22 msaitoh Exp $*/
 
 /*
  * Definitions for low level routines and data structures
@@ -324,7 +324,7 @@ struct adv_ccb;
 
 
 /*
- * SCSI Iquiry structure
+ * SCSI Inquiry structure
  */
 
 typedef struct

Index: src/sys/dev/ic/adwlib.h
diff -u src/sys/dev/ic/adwlib.h:1.19 src/sys/dev/ic/adwlib.h:1.20
--- src/sys/dev/ic/adwlib.h:1.19	Sun Dec 11 12:21:25 2005
+++ src/sys/dev/ic/adwlib.h	Fri Aug 24 09:01:22 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: adwlib.h,v 1.19 2005/12/11 12:21:25 christos Exp $*/
+/*  $NetBSD: adwlib.h,v 1.20 2012/08/24 09:01:22 msaitoh Exp $*/
 
 /*
  * Definitions for low level routines and data structures
@@ -817,7 +817,7 @@ typedef struct adw_scsi_req_q {
 	u_int8_t	sg_working_ix;	/* ,uCode working SG variable. */
 	u_int8_t	cdb[12];	/* SCSI CDB bytes 0-11. */
 	u_int32_t	sg_real_addr;	/* SG list physical address. */
-	u_int32_t	scsiq_rptr;	/* Iternal pointer to ADW_SCSI_REQ_Q */
+	u_int32_t	scsiq_rptr;	/* Internal pointer to ADW_SCSI_REQ_Q */
 	u_int8_t	cdb16[4];	/* SCSI CDB bytes 12-15. */
 	u_int32_t	ccb_ptr;	/* CCB Physical Address */
 	u_int32_t	carr_va;	/* Carrier v-address (unused) */

Index: src/sys/dev/ic/esiopvar.h
diff -u src/sys/dev/ic/esiopvar.h:1.20 src/sys/dev/ic/esiopvar.h:1.21
--- src/sys/dev/ic/esiopvar.h:1.20	Mon Oct 19 18:41:13 2009
+++ src/sys/dev/ic/esiopvar.h	Fri Aug 24 09:01:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: esiopvar.h,v 1.20 2009/10/19 18:41:13 bouyer Exp $	*/
+/*	$NetBSD: esiopvar.h,v 1.21 2012/08/24 09:01:22 msaitoh 

CVS commit: src/sys/dev/usb

2012-08-24 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Aug 24 12:20:02 UTC 2012

Modified Files:
src/sys/dev/usb: umass.c umass_quirks.c umassvar.h

Log Message:
Another contribution to PR kern/42225 which will hopefully
bring the story to an end:

Always ignore the residue from the CSW, just use the real
transfer length counted by the USB stack. This was first
proposed by Markus Kilbinger but unfortunately ignored
later. (Too many cooks...)
According to Matthias Kretschmer, Darwin and Haiku do
the same.

Remove the UMASS_QUIRK_IGNORE_RESIDUE quirk which was
just for the one SuperTop device mentioned in the PR.
This device was successfully tested by Matthias Kretschmer /
Ignatios Souvatzis.

I've tested the patch with various other devices and
didn't find regressions.


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/sys/dev/usb/umass.c
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/usb/umass_quirks.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/usb/umassvar.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/usb/umass.c
diff -u src/sys/dev/usb/umass.c:1.145 src/sys/dev/usb/umass.c:1.146
--- src/sys/dev/usb/umass.c:1.145	Sun Jun 10 06:15:54 2012
+++ src/sys/dev/usb/umass.c	Fri Aug 24 12:20:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass.c,v 1.145 2012/06/10 06:15:54 mrg Exp $	*/
+/*	$NetBSD: umass.c,v 1.146 2012/08/24 12:20:02 drochner Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umass.c,v 1.145 2012/06/10 06:15:54 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: umass.c,v 1.146 2012/08/24 12:20:02 drochner Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_umass.h
@@ -1183,11 +1183,14 @@ umass_bbb_state(usbd_xfer_handle xfer, u
 
 		DIF(UDMASS_BBB, umass_bbb_dump_csw(sc, sc-csw));
 
-		if ((sc-sc_quirks  UMASS_QUIRK_IGNORE_RESIDUE) == 0) {
-			residue = UGETDW(sc-csw.dCSWDataResidue);
-		} else {
-			residue = sc-transfer_datalen - sc-transfer_actlen;
-		}
+#ifdef UMASS_DEBUG
+		residue = UGETDW(sc-csw.dCSWDataResidue);
+		if (residue != sc-transfer_datalen - sc-transfer_actlen)
+			printf(%s: dCSWDataResidue=%d req=%d act=%d\n,
+			   device_xname(sc-sc_dev), residue,
+			   sc-transfer_datalen, sc-transfer_actlen);
+#endif
+		residue = sc-transfer_datalen - sc-transfer_actlen;
 
 		/* Translate weird command-status signatures. */
 		if ((sc-sc_quirks  UMASS_QUIRK_WRONG_CSWSIG) 

Index: src/sys/dev/usb/umass_quirks.c
diff -u src/sys/dev/usb/umass_quirks.c:1.93 src/sys/dev/usb/umass_quirks.c:1.94
--- src/sys/dev/usb/umass_quirks.c:1.93	Sat Mar  3 21:35:32 2012
+++ src/sys/dev/usb/umass_quirks.c	Fri Aug 24 12:20:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass_quirks.c,v 1.93 2012/03/03 21:35:32 riz Exp $	*/
+/*	$NetBSD: umass_quirks.c,v 1.94 2012/08/24 12:20:02 drochner Exp $	*/
 
 /*
  * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umass_quirks.c,v 1.93 2012/03/03 21:35:32 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: umass_quirks.c,v 1.94 2012/08/24 12:20:02 drochner Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_umass.h
@@ -336,15 +336,6 @@ Static const struct umass_quirk umass_qu
 	  UMATCH_VENDOR_PRODUCT,
 	  NULL, NULL
 	},
-
-	/* Devices with bad residue. */
-	{ { USB_VENDOR_SUPERTOP, USB_PRODUCT_SUPERTOP_IDEBRIDGE },
-	  UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
-	  UMASS_QUIRK_IGNORE_RESIDUE,
-	  0,
-	  UMATCH_VENDOR_PRODUCT,
-	  NULL, NULL
-	},
 };
 
 const struct umass_quirk *

Index: src/sys/dev/usb/umassvar.h
diff -u src/sys/dev/usb/umassvar.h:1.33 src/sys/dev/usb/umassvar.h:1.34
--- src/sys/dev/usb/umassvar.h:1.33	Sun Jun 10 06:15:54 2012
+++ src/sys/dev/usb/umassvar.h	Fri Aug 24 12:20:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: umassvar.h,v 1.33 2012/06/10 06:15:54 mrg Exp $	*/
+/*	$NetBSD: umassvar.h,v 1.34 2012/08/24 12:20:02 drochner Exp $	*/
 
 /*-
  * Copyright (c) 1999 MAEKAWA Masahide bis...@rr.iij4u.or.jp,
@@ -184,7 +184,6 @@ struct umass_softc {
 #define	UMASS_QUIRK_WRONG_CSWTAG	0x0002
 #define	UMASS_QUIRK_RBC_PAD_TO_12	0x0004
 #define	UMASS_QUIRK_NOGETMAXLUN		0x0008
-#define	UMASS_QUIRK_IGNORE_RESIDUE	0x0010
 
 #define UMASS_QUIRK_USE_DEFAULTMATCH	-1
 



CVS commit: src/sys/dev/usb

2012-08-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug 24 13:14:19 UTC 2012

Modified Files:
src/sys/dev/usb: ulpt.c

Log Message:
Destroy the reader callout on close, as discussed back in may on current-users.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/dev/usb/ulpt.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/usb/ulpt.c
diff -u src/sys/dev/usb/ulpt.c:1.91 src/sys/dev/usb/ulpt.c:1.92
--- src/sys/dev/usb/ulpt.c:1.91	Sun Mar 11 01:06:07 2012
+++ src/sys/dev/usb/ulpt.c	Fri Aug 24 13:14:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ulpt.c,v 1.91 2012/03/11 01:06:07 mrg Exp $	*/
+/*	$NetBSD: ulpt.c,v 1.92 2012/08/24 13:14:19 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ulpt.c,v 1.91 2012/03/11 01:06:07 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ulpt.c,v 1.92 2012/08/24 13:14:19 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -572,7 +572,8 @@ ulptclose(dev_t dev, int flag, int mode,
 
 	if (sc-sc_has_callout) {
 		DPRINTFN(2, (ulptclose: stopping read callout\n));
-		callout_stop(sc-sc_read_callout);
+		callout_halt(sc-sc_read_callout, NULL);
+		callout_destroy(sc-sc_read_callout);
 		sc-sc_has_callout = 0;
 	}
 



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

2012-08-24 Thread Steve Woodford
Module Name:src
Committed By:   scw
Date:   Fri Aug 24 15:25:11 UTC 2012

Modified Files:
src/sys/arch/arm/omap: omap_wdt.c

Log Message:
Defend against the case where omapwdt32k_enable() can be called via ddb if
the kernel crashes early on before the watchdog driver starts.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/omap/omap_wdt.c

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

Modified files:

Index: src/sys/arch/arm/omap/omap_wdt.c
diff -u src/sys/arch/arm/omap/omap_wdt.c:1.3 src/sys/arch/arm/omap/omap_wdt.c:1.4
--- src/sys/arch/arm/omap/omap_wdt.c:1.3	Fri Jul  1 20:30:21 2011
+++ src/sys/arch/arm/omap/omap_wdt.c	Fri Aug 24 15:25:11 2012
@@ -148,7 +148,13 @@ int
 omapwdt32k_enable(int enable)
 {
 	int s;
-	int prev_state = omapwdt32k_sc-sc_armed;
+	int prev_state;
+
+	/* Just return if ddb is entered before the watchdog driver starts. */
+	if (omapwdt32k_sc == NULL)
+		return (0);
+
+	prev_state = omapwdt32k_sc-sc_armed;
 
 	/* Normalize the int to a boolean so we can compare values directly.
 	 */



CVS commit: src/lib/csu/arch/arm

2012-08-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug 24 16:37:45 UTC 2012

Modified Files:
src/lib/csu/arch/arm: crtbegin.S

Log Message:
Fix code around __register_frame_info (fixes core dumps)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/csu/arch/arm/crtbegin.S

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

Modified files:

Index: src/lib/csu/arch/arm/crtbegin.S
diff -u src/lib/csu/arch/arm/crtbegin.S:1.2 src/lib/csu/arch/arm/crtbegin.S:1.3
--- src/lib/csu/arch/arm/crtbegin.S:1.2	Sat Aug 11 07:25:13 2012
+++ src/lib/csu/arch/arm/crtbegin.S	Fri Aug 24 16:37:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: crtbegin.S,v 1.2 2012/08/11 07:25:13 matt Exp $	*/
+/*	$NetBSD: crtbegin.S,v 1.3 2012/08/24 16:37:45 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
 
 #include arm/asm.h
 
-RCSID($NetBSD: crtbegin.S,v 1.2 2012/08/11 07:25:13 matt Exp $)
+RCSID($NetBSD: crtbegin.S,v 1.3 2012/08/24 16:37:45 matt Exp $)
 
 	.section	.ctors, aw, %progbits
 	.p2align 2
@@ -211,14 +211,12 @@ __do_global_ctors_aux:
 	cmp	ip, #0
 	beq	1f
 
-	ldr	r2, .L__EH_FRAME_LIST__
-	ldr	r3, .L__dwarf_eh_object
+	ldr	r0, .L__EH_FRAME_LIST__
+	ldr	r1, .L__dwarf_eh_object
 #ifdef PIC
-	add	r2, r2, r7		/* object addr = got addr + offset */
-	add	r3, r3, r7		/* object addr = got addr + offset */
+	add	r0, r0, r7		/* object addr = got addr + offset */
+	add	r1, r1, r7		/* object addr = got addr + offset */
 #endif
-	ldr	r0, [r2]
-	ldr	r1, [r3]
 
 #ifdef _ARM_ARCH_4T
 	blx	ip



CVS commit: src

2012-08-24 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Aug 24 20:24:40 UTC 2012

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/regex: Makefile
src/tests/lib/libtre: Makefile
Added Files:
src/tests/lib/libc/regex: t_regex.sh t_regex_att.c
Removed Files:
src/tests/lib/libc/regex: att.c t_regex.awk t_regex.in t_regex_att.in

Log Message:
Sanitize the regex test cases.

- Merge h_regex_att (att.c) and t_regex_att.sh into a single C test program.
  The former was really a test program, and the latter just a very strange
  driver for it.

- Stop using awk to generate the shell test programs.  This is unnecessary
  and confusing.  Instead, change t_regex.sh to generate the test case
  functions on the fly with eval (as done in many other places).


To generate a diff of this commit:
cvs rdiff -u -r1.488 -r1.489 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/regex/Makefile
cvs rdiff -u -r1.7 -r0 src/tests/lib/libc/regex/att.c
cvs rdiff -u -r1.2 -r0 src/tests/lib/libc/regex/t_regex.awk \
src/tests/lib/libc/regex/t_regex_att.in
cvs rdiff -u -r1.3 -r0 src/tests/lib/libc/regex/t_regex.in
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/regex/t_regex.sh \
src/tests/lib/libc/regex/t_regex_att.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libtre/Makefile

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.488 src/distrib/sets/lists/tests/mi:1.489
--- src/distrib/sets/lists/tests/mi:1.488	Tue Aug 14 19:13:54 2012
+++ src/distrib/sets/lists/tests/mi	Fri Aug 24 20:24:39 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.488 2012/08/14 19:13:54 alnsn Exp $
+# $NetBSD: mi,v 1.489 2012/08/24 20:24:39 jmmv Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -448,7 +448,8 @@
 ./usr/libdata/debug/usr/tests/lib/libc/regextests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/regex/t_exhaust.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/regex/h_regex.debug		tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/regex/h_regex_att.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/regex/h_regex_att.debug		tests-obsolete		obsolete
+./usr/libdata/debug/usr/tests/lib/libc/regex/t_regex_att.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/rpctests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/rpc/t_xdr.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/setjmptests-lib-debug
@@ -688,8 +689,9 @@
 ./usr/libdata/debug/usr/tests/lib/libskeytests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libskey/t_algorithms.debug		tests-lib-debug		debug,atf,skey
 ./usr/libdata/debug/usr/tests/lib/libtretests-lib-debug
-./usr/libdata/debug/usr/tests/lib/libtre/h_regex_att.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libtre/h_regex_att.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libtre/t_exhaust.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libtre/t_regex_att.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libutiltests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libutil/t_efun.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libutil/t_parsedate.debug		tests-lib-debug		debug,atf
@@ -2347,7 +2349,7 @@
 ./usr/tests/lib/libc/regex/data/word_bound.in	tests-lib-tests		atf
 ./usr/tests/lib/libc/regex/data/zero.in		tests-lib-tests		atf
 ./usr/tests/lib/libc/regex/h_regex		tests-lib-tests		atf
-./usr/tests/lib/libc/regex/h_regex_att		tests-lib-tests		atf
+./usr/tests/lib/libc/regex/h_regex_att		tests-obsolete		obsolete
 ./usr/tests/lib/libc/regex/t_exhaust		tests-lib-tests		atf
 ./usr/tests/lib/libc/regex/t_regex		tests-lib-tests		atf
 ./usr/tests/lib/libc/regex/t_regex_att		tests-lib-tests		atf
@@ -2745,7 +2747,7 @@
 ./usr/tests/lib/libskey/t_algorithms		tests-lib-tests		atf,skey
 ./usr/tests/lib/libtretests-lib-tests		atf
 ./usr/tests/lib/libtre/Atffile			tests-lib-tests		atf
-./usr/tests/lib/libtre/h_regex_att		tests-lib-tests		atf
+./usr/tests/lib/libtre/h_regex_att		tests-obsolete		obsolete
 ./usr/tests/lib/libtre/t_exhaust		tests-lib-tests		atf
 ./usr/tests/lib/libtre/t_regex_att		tests-lib-tests		atf
 ./usr/tests/lib/libtre/data			tests-lib-tests		atf

Index: src/tests/lib/libc/regex/Makefile
diff -u src/tests/lib/libc/regex/Makefile:1.8 src/tests/lib/libc/regex/Makefile:1.9
--- src/tests/lib/libc/regex/Makefile:1.8	Sun Nov  6 19:45:37 2011
+++ src/tests/lib/libc/regex/Makefile	Fri Aug 24 20:24:40 2012
@@ -1,23 +1,20 @@
-# $NetBSD: Makefile,v 1.8 2011/11/06 19:45:37 christos Exp $
+# $NetBSD: Makefile,v 1.9 2012/08/24 20:24:40 jmmv Exp $
 
 MKMAN=	no
 
 .include bsd.own.mk
 
 TESTSDIR?=	${TESTSBASE}/lib/libc/regex
-IMPLEMENTATION?=	

CVS commit: src/tests/fs/ffs

2012-08-24 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Aug 24 20:25:50 UTC 2012

Modified Files:
src/tests/fs/ffs: h_ffs_server.c

Log Message:
h_ffs_server.c is not a test program.  Remove unnecessary traces of atf.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/fs/ffs/h_ffs_server.c

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

Modified files:

Index: src/tests/fs/ffs/h_ffs_server.c
diff -u src/tests/fs/ffs/h_ffs_server.c:1.1 src/tests/fs/ffs/h_ffs_server.c:1.2
--- src/tests/fs/ffs/h_ffs_server.c:1.1	Wed Jan 18 20:51:23 2012
+++ src/tests/fs/ffs/h_ffs_server.c	Fri Aug 24 20:25:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_ffs_server.c,v 1.1 2012/01/18 20:51:23 bouyer Exp $	*/
+/*	$NetBSD: h_ffs_server.c,v 1.2 2012/08/24 20:25:50 jmmv Exp $	*/
 
 /*
  * rump server for advanced quota tests
@@ -19,8 +19,6 @@
 #include rump/rump.h
 #include rump/rump_syscalls.h
 
-#include ../../h_macros.h
-
 int background = 0;
 
 static void
@@ -91,7 +89,7 @@ main(int argc, char **argv)
 		die(rump init failed, error);
 
 	if (rump_sys_mkdir(FSTEST_MNTNAME, 0777) == -1)
-		atf_tc_fail_errno(mount point create);
+		die(mount point create, errno);
 	rump_pub_etfs_register(/diskdev, filename, RUMP_ETFS_BLK);
 	uargs.fspec = __UNCONST(/diskdev);
 	if (rump_sys_mount(MOUNT_FFS, FSTEST_MNTNAME, (log) ? MNT_LOG : 0,



CVS commit: src/share/mk

2012-08-24 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Aug 24 20:26:25 UTC 2012

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

Log Message:
Allow DPADD to be specified on a per-program basis.


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 src/share/mk/bsd.prog.mk

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

Modified files:

Index: src/share/mk/bsd.prog.mk
diff -u src/share/mk/bsd.prog.mk:1.277 src/share/mk/bsd.prog.mk:1.278
--- src/share/mk/bsd.prog.mk:1.277	Thu Aug 23 21:21:16 2012
+++ src/share/mk/bsd.prog.mk	Fri Aug 24 20:26:24 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.prog.mk,v 1.277 2012/08/23 21:21:16 joerg Exp $
+#	$NetBSD: bsd.prog.mk,v 1.278 2012/08/24 20:26:24 jmmv Exp $
 #	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -405,6 +405,7 @@ PAXCTL_FLAGS.${_P}?= ${PAXCTL_FLAGS}
 
 # PROG specific flags.
 
+_DPADD.${_P}=		${DPADD}${DPADD.${_P}}
 _LDADD.${_P}=		${LDADD}${LDADD.${_P}}
 _LDFLAGS.${_P}=		${LDFLAGS}  ${LDFLAGS.${_P}}
 _LDSTATIC.${_P}=	${LDSTATIC} ${LDSTATIC.${_P}}
@@ -445,7 +446,7 @@ NODPSRCS+=	${f}
 .endif
 .endfor
 
-${_P}: .gdbinit ${LIBCRT0} ${XOBJS.${_P}} ${SRCS.${_P}} ${DPSRCS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
+${_P}: .gdbinit ${LIBCRT0} ${XOBJS.${_P}} ${SRCS.${_P}} ${DPSRCS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${_DPADD.${_P}}
 	${_MKTARGET_LINK}
 .if defined(DESTDIR)
 	${_CCLINK.${_P}} -Wl,-nostdlib \
@@ -478,7 +479,7 @@ CLEANFILES+=	${_P}.d
 
 ${OBJS.${_P}} ${LOBJS.${_P}}: ${DPSRCS}
 
-${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
+${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${_DPADD.${_P}}
 .if !commands(${_P})
 	${_MKTARGET_LINK}
 	${_CCLINK.${_P}} \
@@ -497,7 +498,7 @@ ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}}
 .endif	# !commands(${_P})
 .endif	# USE_COMBINE
 
-${_P}.ro: ${OBJS.${_P}} ${DPADD}
+${_P}.ro: ${OBJS.${_P}} ${_DPADD.${_P}}
 	${_MKTARGET_LINK}
 	${CC} ${LDFLAGS} -nostdlib -r -Wl,-dc -o ${.TARGET} ${OBJS.${_P}}
 



CVS commit: src/share/mk

2012-08-24 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Aug 24 20:28:19 UTC 2012

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

Log Message:
Make DPADD and LDADD specific to the test programs.  This allows mixing
C and C++ test programs in the same Makefile, and prevents regular programs
from being polluted by libraries that they may not need.

Suggested by Garrett Cooper in private mail, although I redid his patch.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/share/mk/bsd.test.mk

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

Modified files:

Index: src/share/mk/bsd.test.mk
diff -u src/share/mk/bsd.test.mk:1.19 src/share/mk/bsd.test.mk:1.20
--- src/share/mk/bsd.test.mk:1.19	Sat Sep 10 16:57:35 2011
+++ src/share/mk/bsd.test.mk	Fri Aug 24 20:28:19 2012
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.test.mk,v 1.19 2011/09/10 16:57:35 apb Exp $
+# $NetBSD: bsd.test.mk,v 1.20 2012/08/24 20:28:19 jmmv Exp $
 #
 
 .include bsd.init.mk
@@ -15,10 +15,10 @@ _TESTS:=	${TESTS_SUBDIRS:N.WAIT}
 .if defined(TESTS_C)
 _TESTS+=	${TESTS_C}
 PROGS+=		${TESTS_C}
-LDADD+=		-latf-c
-DPADD+=		${LIBATF_C}
 .  for _T in ${TESTS_C}
 BINDIR.${_T}=	${TESTSDIR}
+LDADD.${_T}+=	-latf-c
+DPADD.${_T}+=	${LIBATF_C}
 MAN.${_T}?=	# empty
 .  endfor
 .endif
@@ -26,10 +26,10 @@ MAN.${_T}?=	# empty
 .if defined(TESTS_CXX)
 _TESTS+=	${TESTS_CXX}
 PROGS_CXX+=	${TESTS_CXX}
-LDADD+=		-latf-c++ -latf-c
-DPADD+=		${LIBATF_CXX} ${LIBATF_C}
 .  for _T in ${TESTS_CXX}
 BINDIR.${_T}=	${TESTSDIR}
+LDADD.${_T}+=	-latf-c++ -latf-c
+DPADD.${_T}+=	${LIBATF_CXX} ${LIBATF_C}
 MAN.${_T}?=	# empty
 .  endfor
 .endif