CVS commit: src/lib/libc/arch/arm/gen

2012-03-21 Thread Hiroyuki Bessho
Module Name:src
Committed By:   bsh
Date:   Wed Mar 21 09:05:36 UTC 2012

Modified Files:
src/lib/libc/arch/arm/gen: _lwp.c

Log Message:
shut up lint(1)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/arm/gen/_lwp.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/arch/arm/gen/_lwp.c
diff -u src/lib/libc/arch/arm/gen/_lwp.c:1.5 src/lib/libc/arch/arm/gen/_lwp.c:1.6
--- src/lib/libc/arch/arm/gen/_lwp.c:1.5	Thu Feb 24 04:28:41 2011
+++ src/lib/libc/arch/arm/gen/_lwp.c	Wed Mar 21 09:05:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:41 joerg Exp $	*/
+/*	$NetBSD: _lwp.c,v 1.6 2012/03/21 09:05:35 bsh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:41 joerg Exp $);
+__RCSID($NetBSD: _lwp.c,v 1.6 2012/03/21 09:05:35 bsh Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -58,16 +58,22 @@ _lwp_makecontext(ucontext_t *u, void (*s
 	u-uc_stack.ss_sp = stack_base;
 	u-uc_stack.ss_size = stack_size;
 
+	/* LINTED - alignment is fixed below. */
 	sp = (void **) (stack_base + stack_size);
 
 	/*
 	 * Note: We make sure the stack is 8-byte aligned, here.
 	 */
 
+	/* LINTED - doesn't lose any bits by this conversion */
 	u-uc_mcontext.__gregs[_REG_R0] = (__greg_t) arg;
+	/* LINTED - doesn't lose any bits by this conversion */
 	u-uc_mcontext.__gregs[_REG_SP] = ((__greg_t) sp)  ~7;
+	/* LINTED - doesn't lose any bits by this conversion */
 	u-uc_mcontext.__gregs[_REG_LR] = (__greg_t) _lwp_exit;
+	/* LINTED - doesn't lose any bits by this conversion */
 	u-uc_mcontext.__gregs[_REG_PC] = (__greg_t) start;
+	/* LINTED - unsinged long and unsigned int are same size */
 	u-uc_mcontext._mc_tlsbase = (uintptr_t)private;
 	u-uc_flags |= _UC_TLSBASE;
 }



CVS commit: src/lib/libc/stdlib

2012-03-21 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Mar 21 09:49:03 UTC 2012

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
Cast an int argument to umax2s() to size_t.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/stdlib/jemalloc.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/stdlib/jemalloc.c
diff -u src/lib/libc/stdlib/jemalloc.c:1.25 src/lib/libc/stdlib/jemalloc.c:1.26
--- src/lib/libc/stdlib/jemalloc.c:1.25	Wed Mar 21 00:38:06 2012
+++ src/lib/libc/stdlib/jemalloc.c	Wed Mar 21 09:49:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: jemalloc.c,v 1.25 2012/03/21 00:38:06 christos Exp $	*/
+/*	$NetBSD: jemalloc.c,v 1.26 2012/03/21 09:49:02 he Exp $	*/
 
 /*-
  * Copyright (C) 2006,2007 Jason Evans jas...@freebsd.org.
@@ -118,7 +118,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $); */ 
-__RCSID($NetBSD: jemalloc.c,v 1.25 2012/03/21 00:38:06 christos Exp $);
+__RCSID($NetBSD: jemalloc.c,v 1.26 2012/03/21 09:49:02 he Exp $);
 
 #ifdef __FreeBSD__
 #include libc_private.h
@@ -3227,7 +3227,7 @@ malloc_print_stats(void)
 		);
 
 		_malloc_message(Chunk size: , umax2s(chunksize, s), , );
-		_malloc_message( (2^, umax2s(opt_chunk_2pow, s), )\n, );
+		_malloc_message( (2^, umax2s((size_t) opt_chunk_2pow, s), )\n, );
 
 #ifdef MALLOC_STATS
 		{



CVS commit: src/lib

2012-03-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 21 10:08:31 UTC 2012

Modified Files:
src/lib/libbsdmalloc: Makefile
src/lib/libcompat: Makefile
src/lib/libkvm: Makefile
src/lib/libossaudio: Makefile
src/lib/librpcsvc: Makefile
src/lib/libz: Makefile

Log Message:
These directories don't handle WARNS=5


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libbsdmalloc/Makefile
cvs rdiff -u -r1.30 -r1.31 src/lib/libcompat/Makefile
cvs rdiff -u -r1.48 -r1.49 src/lib/libkvm/Makefile
cvs rdiff -u -r1.8 -r1.9 src/lib/libossaudio/Makefile
cvs rdiff -u -r1.39 -r1.40 src/lib/librpcsvc/Makefile
cvs rdiff -u -r1.20 -r1.21 src/lib/libz/Makefile

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

Modified files:

Index: src/lib/libbsdmalloc/Makefile
diff -u src/lib/libbsdmalloc/Makefile:1.3 src/lib/libbsdmalloc/Makefile:1.4
--- src/lib/libbsdmalloc/Makefile:1.3	Sun Apr 10 16:47:39 2011
+++ src/lib/libbsdmalloc/Makefile	Wed Mar 21 10:08:30 2012
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.3 2011/04/10 16:47:39 joerg Exp $
+# $NetBSD: Makefile,v 1.4 2012/03/21 10:08:30 matt Exp $
 
 NOMAN=1
 
+WARNS=	2
+
 .include bsd.own.mk
 
 LIB=	bsdmalloc

Index: src/lib/libcompat/Makefile
diff -u src/lib/libcompat/Makefile:1.30 src/lib/libcompat/Makefile:1.31
--- src/lib/libcompat/Makefile:1.30	Mon Mar 22 01:29:30 2010
+++ src/lib/libcompat/Makefile	Wed Mar 21 10:08:30 2012
@@ -1,7 +1,9 @@
-#	$NetBSD: Makefile,v 1.30 2010/03/22 01:29:30 mrg Exp $
+#	$NetBSD: Makefile,v 1.31 2012/03/21 10:08:30 matt Exp $
 
 .include bsd.own.mk
 
+WARNS=	2
+
 LIB=	compat
 CPPFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -D__LIBCOMPAT_SOURCE__
 AFLAGS+=-I${NETBSDSRCDIR}/lib/libc/arch/${MACHINE_ARCH}

Index: src/lib/libkvm/Makefile
diff -u src/lib/libkvm/Makefile:1.48 src/lib/libkvm/Makefile:1.49
--- src/lib/libkvm/Makefile:1.48	Mon Sep 12 21:11:31 2011
+++ src/lib/libkvm/Makefile	Wed Mar 21 10:08:30 2012
@@ -1,6 +1,8 @@
-#	$NetBSD: Makefile,v 1.48 2011/09/12 21:11:31 christos Exp $
+#	$NetBSD: Makefile,v 1.49 2012/03/21 10:08:30 matt Exp $
 #	from: @(#)Makefile	8.1 (Berkeley) 6/4/93
 
+WARNS=	3
+
 USE_FORT?= yes	# used primarily by setgid programs
 
 USE_SHLIBDIR=	yes

Index: src/lib/libossaudio/Makefile
diff -u src/lib/libossaudio/Makefile:1.8 src/lib/libossaudio/Makefile:1.9
--- src/lib/libossaudio/Makefile:1.8	Thu Mar 12 13:52:47 2009
+++ src/lib/libossaudio/Makefile	Wed Mar 21 10:08:30 2012
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.8 2009/03/12 13:52:47 wiz Exp $
+#	$NetBSD: Makefile,v 1.9 2012/03/21 10:08:30 matt Exp $
+
+WARNS=	2
 
 LIB=	ossaudio
 MAN=	ossaudio.3

Index: src/lib/librpcsvc/Makefile
diff -u src/lib/librpcsvc/Makefile:1.39 src/lib/librpcsvc/Makefile:1.40
--- src/lib/librpcsvc/Makefile:1.39	Mon May 28 12:06:21 2007
+++ src/lib/librpcsvc/Makefile	Wed Mar 21 10:08:30 2012
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.39 2007/05/28 12:06:21 tls Exp $
+#	$NetBSD: Makefile,v 1.40 2012/03/21 10:08:30 matt Exp $
+
+WARNS=	4
 
 USE_FORT?= yes	# network protocol library
 

Index: src/lib/libz/Makefile
diff -u src/lib/libz/Makefile:1.20 src/lib/libz/Makefile:1.21
--- src/lib/libz/Makefile:1.20	Mon May 28 12:06:22 2007
+++ src/lib/libz/Makefile	Wed Mar 21 10:08:31 2012
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.20 2007/05/28 12:06:22 tls Exp $
+#	$NetBSD: Makefile,v 1.21 2012/03/21 10:08:31 matt Exp $
+
+WARNS=	3
 
 USE_FORT?= yes	# data-driven bugs?
 



CVS commit: src/lib/csu/common_elf

2012-03-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 21 10:09:21 UTC 2012

Modified Files:
src/lib/csu/common_elf: common.h

Log Message:
Use __UNCONST to unconst a 


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/csu/common_elf/common.h

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/common_elf/common.h
diff -u src/lib/csu/common_elf/common.h:1.15 src/lib/csu/common_elf/common.h:1.16
--- src/lib/csu/common_elf/common.h:1.15	Mon Mar  7 05:09:09 2011
+++ src/lib/csu/common_elf/common.h	Wed Mar 21 10:09:20 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.15 2011/03/07 05:09:09 joerg Exp $ */
+/* $NetBSD: common.h,v 1.16 2012/03/21 10:09:20 matt Exp $ */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -66,7 +66,7 @@ do {		\
 static char	*_strrchr(char *, int);
 
 char	**environ;
-char	*__progname = ;
+char	*__progname = __UNCONST();
 struct ps_strings *__ps_strings = 0;
 
 extern void	_init(void);



CVS commit: src/usr.sbin/tcpdchk

2012-03-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 21 10:11:34 UTC 2012

Modified Files:
src/usr.sbin/tcpdchk: scaffold.c scaffold.h tcpdchk.c

Log Message:
Use a little const for quotes strings.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/tcpdchk/scaffold.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/tcpdchk/scaffold.h
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/tcpdchk/tcpdchk.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/tcpdchk/scaffold.c
diff -u src/usr.sbin/tcpdchk/scaffold.c:1.10 src/usr.sbin/tcpdchk/scaffold.c:1.11
--- src/usr.sbin/tcpdchk/scaffold.c:1.10	Mon Jul 14 09:07:22 2003
+++ src/usr.sbin/tcpdchk/scaffold.c	Wed Mar 21 10:11:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: scaffold.c,v 1.10 2003/07/14 09:07:22 itojun Exp $	*/
+/*	$NetBSD: scaffold.c,v 1.11 2012/03/21 10:11:34 matt Exp $	*/
 
  /*
   * Routines for testing only. Not really industrial strength.
@@ -11,7 +11,7 @@
 #if 0
 static char sccs_id[] = @(#) scaffold.c 1.6 97/03/21 19:27:24;
 #else
-__RCSID($NetBSD: scaffold.c,v 1.10 2003/07/14 09:07:22 itojun Exp $);
+__RCSID($NetBSD: scaffold.c,v 1.11 2012/03/21 10:11:34 matt Exp $);
 #endif
 #endif
 
@@ -134,8 +134,8 @@ struct request_info *request;
 
 /* ARGSUSED */
 
-voidrfc931(request)
-struct request_info *request;
+void
+rfc931(struct request_info *request)
 {
 strlcpy(request-user, unknown, sizeof(request-user));
 }
@@ -143,9 +143,8 @@ struct request_info *request;
 
 /* check_path - examine accessibility */
 
-int check_path(path, st)
-char   *path;
-struct stat *st;
+int
+check_path(const char *path, struct stat *st)
 {
 struct stat stbuf;
 charbuf[BUFSIZ];

Index: src/usr.sbin/tcpdchk/scaffold.h
diff -u src/usr.sbin/tcpdchk/scaffold.h:1.4 src/usr.sbin/tcpdchk/scaffold.h:1.5
--- src/usr.sbin/tcpdchk/scaffold.h:1.4	Thu Jun  6 21:28:50 2002
+++ src/usr.sbin/tcpdchk/scaffold.h	Wed Mar 21 10:11:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: scaffold.h,v 1.4 2002/06/06 21:28:50 itojun Exp $	*/
+/*	$NetBSD: scaffold.h,v 1.5 2012/03/21 10:11:34 matt Exp $	*/
 
  /*
   * @(#) scaffold.h 1.3 94/12/31 18:19:19
@@ -6,11 +6,11 @@
   * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
   */
 
-struct addrinfo *find_inet_addr __P((char *, int));
-int check_dns __P((char *));
-void shell_cmd __P((char *));
-void clean_exit __P((struct request_info *));
+struct addrinfo *find_inet_addr(char *, int);
+int check_dns(char *);
+void shell_cmd(char *);
+void clean_exit(struct request_info *);
 #if 0
-void rfc931 __P((struct request_info *));
+void rfc931(struct request_info *);
 #endif
-int check_path __P((char *, struct stat *));
+int check_path(const char *, struct stat *);

Index: src/usr.sbin/tcpdchk/tcpdchk.c
diff -u src/usr.sbin/tcpdchk/tcpdchk.c:1.11 src/usr.sbin/tcpdchk/tcpdchk.c:1.12
--- src/usr.sbin/tcpdchk/tcpdchk.c:1.11	Sun Jul 13 12:07:16 2003
+++ src/usr.sbin/tcpdchk/tcpdchk.c	Wed Mar 21 10:11:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcpdchk.c,v 1.11 2003/07/13 12:07:16 itojun Exp $	*/
+/*	$NetBSD: tcpdchk.c,v 1.12 2012/03/21 10:11:34 matt Exp $	*/
 
  /*
   * tcpdchk - examine all tcpd access control rules and inetd.conf entries
@@ -21,7 +21,7 @@
 #if 0
 static char sccsid[] = @(#) tcpdchk.c 1.8 97/02/12 02:13:25;
 #else
-__RCSID($NetBSD: tcpdchk.c,v 1.11 2003/07/13 12:07:16 itojun Exp $);
+__RCSID($NetBSD: tcpdchk.c,v 1.12 2012/03/21 10:11:34 matt Exp $);
 #endif
 #endif
 
@@ -65,33 +65,33 @@ __RCSID($NetBSD: tcpdchk.c,v 1.11 2003/
  /*
   * Stolen from hosts_access.c...
   */
-static char sep[] = , \t\n;
+static const char sep[] = , \t\n;
 
 #define	BUFLEN 2048
 
 int resident = 0;
 int hosts_access_verbose = 0;
-char   *hosts_allow_table = HOSTS_ALLOW;
-char   *hosts_deny_table = HOSTS_DENY;
+const char *hosts_allow_table = HOSTS_ALLOW;
+const char *hosts_deny_table = HOSTS_DENY;
 extern jmp_buf tcpd_buf;
 
  /*
   * Local stuff.
   */
-static void usage __P((void));
-static void parse_table __P((char *, struct request_info *));
-static void print_list __P((char *, char *));
-static void check_daemon_list __P((char *));
-static void check_client_list __P((char *));
-static void check_daemon __P((char *));
-static void check_user __P((char *));
+static void usage(void);
+static void parse_table(const char *, struct request_info *);
+static void print_list(char *, char *);
+static void check_daemon_list(char *);
+static void check_client_list(char *);
+static void check_daemon(char *);
+static void check_user(char *);
 #ifdef INET6
-static int check_inet_addr __P((char *));
+static int check_inet_addr(char *);
 #endif
-static int check_host __P((char *));
-static int reserved_name __P((char *));
+static int check_host(char *);
+static int reserved_name(char *);
 
-int main __P((int, char **));
+int main(int, char **);
 
 #define PERMIT	1
 #define DENY	0
@@ -104,9 +104,8 @@ static char *myname;
 

CVS commit: src/sys/dev/pci

2012-03-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 21 10:14:19 UTC 2012

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

Log Message:
Use an unsigned value to hold the pci_class


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/pci_subr.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/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.90 src/sys/dev/pci/pci_subr.c:1.91
--- src/sys/dev/pci/pci_subr.c:1.90	Sun Jan 29 11:31:38 2012
+++ src/sys/dev/pci/pci_subr.c	Wed Mar 21 10:14:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.90 2012/01/29 11:31:38 drochner Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.91 2012/03/21 10:14:19 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.90 2012/01/29 11:31:38 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.91 2012/03/21 10:14:19 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pci.h
@@ -71,7 +71,7 @@ __KERNEL_RCSID(0, $NetBSD: pci_subr.c,v
  */
 struct pci_class {
 	const char	*name;
-	int		val;		/* as wide as pci_{,sub}class_t */
+	u_int		val;		/* as wide as pci_{,sub}class_t */
 	const struct pci_class *subclasses;
 };
 



CVS commit: src/sys/dev/ic

2012-03-21 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Mar 21 13:19:12 UTC 2012

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

Log Message:
From OpenBSD. Fixes a deadlock during autoconf.

scrub more fields in the ccb when returning them to the free list after
theyve been used, in particular the mfi header flags which has a bit
that specifies if a command should be completed via the interrupt path.

if we use a ccb during boot we set that bit, but it isnt necessarily
cleared by things that use it later on. this means a ccb we expected to
complete via an interrupt never actually generates an interrupt or appears
in the reply queue. this obviously stalls the io.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ic/mfi.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/mfi.c
diff -u src/sys/dev/ic/mfi.c:1.36 src/sys/dev/ic/mfi.c:1.37
--- src/sys/dev/ic/mfi.c:1.36	Mon Jun 20 22:02:55 2011
+++ src/sys/dev/ic/mfi.c	Wed Mar 21 13:19:11 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.36 2011/06/20 22:02:55 pgoyette Exp $ */
+/* $NetBSD: mfi.c,v 1.37 2012/03/21 13:19:11 sborrill Exp $ */
 /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
 /*
  * Copyright (c) 2006 Marco Peereboom ma...@peereboom.us
@@ -17,7 +17,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mfi.c,v 1.36 2011/06/20 22:02:55 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: mfi.c,v 1.37 2012/03/21 13:19:11 sborrill Exp $);
 
 #include bio.h
 
@@ -180,11 +180,13 @@ static void
 mfi_put_ccb(struct mfi_ccb *ccb)
 {
 	struct mfi_softc	*sc = ccb-ccb_sc;
+	struct mfi_frame_header	*hdr = ccb-ccb_frame-mfr_header;
 	int			s;
 
 	DNPRINTF(MFI_D_CCB, %s: mfi_put_ccb: %p\n, DEVNAME(sc), ccb);
 
-	s = splbio();
+	hdr-mfh_cmd_status = 0x0;
+	hdr-mfh_flags = 0x0;
 	ccb-ccb_state = MFI_CCB_FREE;
 	ccb-ccb_xs = NULL;
 	ccb-ccb_flags = 0;
@@ -195,6 +197,8 @@ mfi_put_ccb(struct mfi_ccb *ccb)
 	ccb-ccb_sgl = NULL;
 	ccb-ccb_data = NULL;
 	ccb-ccb_len = 0;
+
+	s = splbio();
 	TAILQ_INSERT_TAIL(sc-sc_ccb_freeq, ccb, ccb_link);
 	splx(s);
 }



CVS commit: src/sys/dev/pci

2012-03-21 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Mar 21 13:30:12 UTC 2012

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

Log Message:
Add some Symbios SAS2108 devices. Add new Symbios SAS2008 device (as used by
IBM ServeRAID M1015).


To generate a diff of this commit:
cvs rdiff -u -r1.1106 -r1.1107 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.1106 src/sys/dev/pci/pcidevs:1.1107
--- src/sys/dev/pci/pcidevs:1.1106	Sun Mar 18 17:29:06 2012
+++ src/sys/dev/pci/pcidevs	Wed Mar 21 13:30:12 2012
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1106 2012/03/18 17:29:06 tsutsui Exp $
+$NetBSD: pcidevs,v 1.1107 2012/03/21 13:30:12 sborrill Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3409,6 +3409,10 @@ product SYMBIOS SAS1066			0x005E	SAS1066
 product SYMBIOS SAS1078			0x0060	SAS1078 PCI
 product SYMBIOS SAS1078_PCIE		0x0062	SAS1078 PCI Express
 product SYMBIOS SAS2008			0x0072	SAS2008
+product SYMBIOS SAS2008_1		0x0073	MegaRAID SAS2008
+product SYMBIOS SAS2108_3		0x0074	SAS2108
+product SYMBIOS SAS2108_4		0x0076	SAS2108
+product SYMBIOS SAS2108_5		0x0077	SAS2108
 product SYMBIOS SAS2108_1		0x0078	MegaRAID SAS2108 CRYPTO GEN2
 product SYMBIOS SAS2108_2		0x0079	MegaRAID SAS2108 GEN2
 product SYMBIOS SAS1078DE		0x007c	SAS1078DE



CVS commit: src/sys/dev/pci

2012-03-21 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Mar 21 13:31:41 UTC 2012

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.1101 -r1.1102 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1100 -r1.1101 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.1101 src/sys/dev/pci/pcidevs.h:1.1102
--- src/sys/dev/pci/pcidevs.h:1.1101	Sun Mar 18 17:30:19 2012
+++ src/sys/dev/pci/pcidevs.h	Wed Mar 21 13:31:40 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1101 2012/03/18 17:30:19 tsutsui Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1102 2012/03/21 13:31:40 sborrill Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1106 2012/03/18 17:29:06 tsutsui Exp
+ *	NetBSD: pcidevs,v 1.1107 2012/03/21 13:30:12 sborrill Exp
  */
 
 /*
@@ -3416,6 +3416,10 @@
 #define	PCI_PRODUCT_SYMBIOS_SAS1078	0x0060		/* SAS1078 PCI */
 #define	PCI_PRODUCT_SYMBIOS_SAS1078_PCIE	0x0062		/* SAS1078 PCI Express */
 #define	PCI_PRODUCT_SYMBIOS_SAS2008	0x0072		/* SAS2008 */
+#define	PCI_PRODUCT_SYMBIOS_SAS2008_1	0x0073		/* MegaRAID SAS2008 */
+#define	PCI_PRODUCT_SYMBIOS_SAS2108_3	0x0074		/* SAS2108 */
+#define	PCI_PRODUCT_SYMBIOS_SAS2108_4	0x0076		/* SAS2108 */
+#define	PCI_PRODUCT_SYMBIOS_SAS2108_5	0x0077		/* SAS2108 */
 #define	PCI_PRODUCT_SYMBIOS_SAS2108_1	0x0078		/* MegaRAID SAS2108 CRYPTO GEN2 */
 #define	PCI_PRODUCT_SYMBIOS_SAS2108_2	0x0079		/* MegaRAID SAS2108 GEN2 */
 #define	PCI_PRODUCT_SYMBIOS_SAS1078DE	0x007c		/* SAS1078DE */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1100 src/sys/dev/pci/pcidevs_data.h:1.1101
--- src/sys/dev/pci/pcidevs_data.h:1.1100	Sun Mar 18 17:30:19 2012
+++ src/sys/dev/pci/pcidevs_data.h	Wed Mar 21 13:31:40 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1100 2012/03/18 17:30:19 tsutsui Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1101 2012/03/21 13:31:40 sborrill Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1106 2012/03/18 17:29:06 tsutsui Exp
+ *	NetBSD: pcidevs,v 1.1107 2012/03/21 13:30:12 sborrill Exp
  */
 
 /*
@@ -5452,6 +5452,14 @@ static const uint16_t pci_products[] = {
 	20619, 615, 4329, 0,
 	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS2008, 
 	20627, 0,
+	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS2008_1, 
+	8160, 20627, 0,
+	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS2108_3, 
+	20635, 0,
+	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS2108_4, 
+	20635, 0,
+	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS2108_5, 
+	20635, 0,
 	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS2108_1, 
 	8160, 20635, 20643, 20650, 0,
 	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS2108_2, 
@@ -9038,7 +9046,7 @@ static const char pci_words[] = { . 
 	(port\0 /* 3 refs @ 8148 */
 	1)\0 /* 1 refs @ 8154 */
 	2)\0 /* 1 refs @ 8157 */
-	MegaRAID\0 /* 7 refs @ 8160 */
+	MegaRAID\0 /* 8 refs @ 8160 */
 	Crypto\0 /* 2 refs @ 8169 */
 	Accelerator\0 /* 17 refs @ 8176 */
 	ADSP-2141\0 /* 1 refs @ 8188 */
@@ -10759,8 +10767,8 @@ static const char pci_words[] = { . 
 	SAS1064A\0 /* 1 refs @ 20602 */
 	SAS1066\0 /* 1 refs @ 20611 */
 	SAS1078\0 /* 2 refs @ 20619 */
-	SAS2008\0 /* 1 refs @ 20627 */
-	SAS2108\0 /* 2 refs @ 20635 */
+	SAS2008\0 /* 2 refs @ 20627 */
+	SAS2108\0 /* 5 refs @ 20635 */
 	CRYPTO\0 /* 1 refs @ 20643 */
 	GEN2\0 /* 2 refs @ 20650 */
 	SAS1078DE\0 /* 1 refs @ 20655 */



CVS commit: src/lib/libc/arch/arm/gen

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 14:03:06 UTC 2012

Modified Files:
src/lib/libc/arch/arm/gen: _lwp.c makecontext.c

Log Message:
no need for linted annotations


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/gen/_lwp.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/arm/gen/makecontext.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/arch/arm/gen/_lwp.c
diff -u src/lib/libc/arch/arm/gen/_lwp.c:1.6 src/lib/libc/arch/arm/gen/_lwp.c:1.7
--- src/lib/libc/arch/arm/gen/_lwp.c:1.6	Wed Mar 21 05:05:35 2012
+++ src/lib/libc/arch/arm/gen/_lwp.c	Wed Mar 21 10:03:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: _lwp.c,v 1.6 2012/03/21 09:05:35 bsh Exp $	*/
+/*	$NetBSD: _lwp.c,v 1.7 2012/03/21 14:03:06 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: _lwp.c,v 1.6 2012/03/21 09:05:35 bsh Exp $);
+__RCSID($NetBSD: _lwp.c,v 1.7 2012/03/21 14:03:06 christos Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -58,22 +58,15 @@ _lwp_makecontext(ucontext_t *u, void (*s
 	u-uc_stack.ss_sp = stack_base;
 	u-uc_stack.ss_size = stack_size;
 
-	/* LINTED - alignment is fixed below. */
-	sp = (void **) (stack_base + stack_size);
-
+	sp = (void *) (stack_base + stack_size);
 	/*
 	 * Note: We make sure the stack is 8-byte aligned, here.
 	 */
 
-	/* LINTED - doesn't lose any bits by this conversion */
-	u-uc_mcontext.__gregs[_REG_R0] = (__greg_t) arg;
-	/* LINTED - doesn't lose any bits by this conversion */
-	u-uc_mcontext.__gregs[_REG_SP] = ((__greg_t) sp)  ~7;
-	/* LINTED - doesn't lose any bits by this conversion */
-	u-uc_mcontext.__gregs[_REG_LR] = (__greg_t) _lwp_exit;
-	/* LINTED - doesn't lose any bits by this conversion */
-	u-uc_mcontext.__gregs[_REG_PC] = (__greg_t) start;
-	/* LINTED - unsinged long and unsigned int are same size */
-	u-uc_mcontext._mc_tlsbase = (uintptr_t)private;
+	u-uc_mcontext.__gregs[_REG_R0] = (__greg_t)(uintptr_t)arg;
+	u-uc_mcontext.__gregs[_REG_SP] = ((__greg_t)(uintptr_t)sp)  ~7;
+	u-uc_mcontext.__gregs[_REG_LR] = (__greg_t)(uintptr_t)_lwp_exit;
+	u-uc_mcontext.__gregs[_REG_PC] = (__greg_t)(uintptr_t)start;
+	u-uc_mcontext._mc_tlsbase = (__greg_t)(uintptr_t)private;
 	u-uc_flags |= _UC_TLSBASE;
 }

Index: src/lib/libc/arch/arm/gen/makecontext.c
diff -u src/lib/libc/arch/arm/gen/makecontext.c:1.3 src/lib/libc/arch/arm/gen/makecontext.c:1.4
--- src/lib/libc/arch/arm/gen/makecontext.c:1.3	Mon Apr 28 16:22:55 2008
+++ src/lib/libc/arch/arm/gen/makecontext.c	Wed Mar 21 10:03:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: makecontext.c,v 1.4 2012/03/21 14:03:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:55 martin Exp $);
+__RCSID($NetBSD: makecontext.c,v 1.4 2012/03/21 14:03:06 christos Exp $);
 #endif
 
 #include stddef.h
@@ -55,12 +55,12 @@ makecontext(ucontext_t *ucp, void (*func
 	/* Allocate necessary stack space for arguments exceeding r0-3. */
 	if (argc  4)
 		sp -= argc - 4;
-	gr[_REG_SP] = (__greg_t)sp;
+	gr[_REG_SP] = (__greg_t)(uintptr_t)sp;
 	/* Wipe out frame pointer. */
 	gr[_REG_FP] = 0;
 	/* Arrange for return via the trampoline code. */
-	gr[_REG_LR] = (__greg_t)_resumecontext;
-	gr[_REG_PC] = (__greg_t)func;
+	gr[_REG_LR] = (__greg_t)(uintptr_t)_resumecontext;
+	gr[_REG_PC] = (__greg_t)(uintptr_t)func;
 
 	va_start(ap, argc);
 	/* Pass up to four arguments in r0-3. */



CVS commit: src/lib/libc/arch/sparc64

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 14:10:47 UTC 2012

Modified Files:
src/lib/libc/arch/sparc64: Makefile.inc

Log Message:
do not need lint overrides anymore


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/arch/sparc64/Makefile.inc

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/arch/sparc64/Makefile.inc
diff -u src/lib/libc/arch/sparc64/Makefile.inc:1.18 src/lib/libc/arch/sparc64/Makefile.inc:1.19
--- src/lib/libc/arch/sparc64/Makefile.inc:1.18	Tue Mar 20 17:37:19 2012
+++ src/lib/libc/arch/sparc64/Makefile.inc	Wed Mar 21 10:10:47 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.18 2012/03/20 21:37:19 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.19 2012/03/21 14:10:47 christos Exp $
 
 SRCS+=	__sigaction14_sigtramp.c __sigtramp2.S
 
@@ -24,6 +24,4 @@ CPPFLAGS+=  -I${ARCHDIR}/softfloat -
 COPTS.softfloat-wrapper.c+=	-Wno-enum-compare
 .endif
 
-LINTFLAGS.softfloat-wrapper.c+=	-X117,132,218,259,298
-
 .endif



CVS commit: src/lib/libc/locale

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 14:11:24 UTC 2012

Modified Files:
src/lib/libc/locale: fix_grouping.c global_locale.c

Log Message:
cast CHAR_MAX to (char) for unsigned character machines


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/locale/fix_grouping.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/locale/global_locale.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/locale/fix_grouping.c
diff -u src/lib/libc/locale/fix_grouping.c:1.5 src/lib/libc/locale/fix_grouping.c:1.6
--- src/lib/libc/locale/fix_grouping.c:1.5	Tue Jun  1 09:52:08 2010
+++ src/lib/libc/locale/fix_grouping.c	Wed Mar 21 10:11:24 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: fix_grouping.c,v 1.5 2010/06/01 13:52:08 tnozaki Exp $ */
+/* $NetBSD: fix_grouping.c,v 1.6 2012/03/21 14:11:24 christos Exp $ */
 
 /*
  * Copyright (c) 2001 Alexey Zelkin phan...@freebsd.org
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: fix_grouping.c,v 1.5 2010/06/01 13:52:08 tnozaki Exp $);
+__RCSID($NetBSD: fix_grouping.c,v 1.6 2012/03/21 14:11:24 christos Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include limits.h
@@ -44,7 +44,7 @@ __RCSID($NetBSD: fix_grouping.c,v 1.5 2
 #include fix_grouping.h
 
 #ifndef NBCHAR_MAX
-#define NBCHAR_MAX	CHAR_MAX
+#define NBCHAR_MAX	(char)CHAR_MAX
 #endif
 
 #ifndef __UNCONST

Index: src/lib/libc/locale/global_locale.c
diff -u src/lib/libc/locale/global_locale.c:1.12 src/lib/libc/locale/global_locale.c:1.13
--- src/lib/libc/locale/global_locale.c:1.12	Fri Jan 20 11:31:29 2012
+++ src/lib/libc/locale/global_locale.c	Wed Mar 21 10:11:24 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: global_locale.c,v 1.12 2012/01/20 16:31:29 joerg Exp $ */
+/* $NetBSD: global_locale.c,v 1.13 2012/03/21 14:11:24 christos Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: global_locale.c,v 1.12 2012/01/20 16:31:29 joerg Exp $);
+__RCSID($NetBSD: global_locale.c,v 1.13 2012/03/21 14:11:24 christos Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include sys/types.h
@@ -43,6 +43,10 @@ __RCSID($NetBSD: global_locale.c,v 1.12
 #include runetype_local.h
 #include setlocale_local.h
 
+#ifndef NBCHAR_MAX
+#define NBCHAR_MAX (char)CHAR_MAX
+#endif
+
 static struct lconv _global_ldata = {
 	.decimal_point		= __UNCONST(.),
 	.thousands_sep		= __UNCONST(),
@@ -54,20 +58,20 @@ static struct lconv _global_ldata = {
 	.mon_grouping		= __UNCONST(),
 	.positive_sign		= __UNCONST(),
 	.negative_sign		= __UNCONST(),
-	.int_frac_digits	= CHAR_MAX,
-	.frac_digits		= CHAR_MAX,
-	.p_cs_precedes		= CHAR_MAX,
-	.p_sep_by_space		= CHAR_MAX,
-	.n_cs_precedes		= CHAR_MAX,
-	.n_sep_by_space		= CHAR_MAX,
-	.p_sign_posn		= CHAR_MAX,
-	.n_sign_posn		= CHAR_MAX,
-	.int_p_cs_precedes	= CHAR_MAX,
-	.int_n_cs_precedes	= CHAR_MAX,
-	.int_p_sep_by_space	= CHAR_MAX,
-	.int_n_sep_by_space	= CHAR_MAX,
-	.int_p_sign_posn	= CHAR_MAX,
-	.int_n_sign_posn	= CHAR_MAX,
+	.int_frac_digits	= NBCHAR_MAX,
+	.frac_digits		= NBCHAR_MAX,
+	.p_cs_precedes		= NBCHAR_MAX,
+	.p_sep_by_space		= NBCHAR_MAX,
+	.n_cs_precedes		= NBCHAR_MAX,
+	.n_sep_by_space		= NBCHAR_MAX,
+	.p_sign_posn		= NBCHAR_MAX,
+	.n_sign_posn		= NBCHAR_MAX,
+	.int_p_cs_precedes	= NBCHAR_MAX,
+	.int_n_cs_precedes	= NBCHAR_MAX,
+	.int_p_sep_by_space	= NBCHAR_MAX,
+	.int_n_sep_by_space	= NBCHAR_MAX,
+	.int_p_sign_posn	= NBCHAR_MAX,
+	.int_n_sign_posn	= NBCHAR_MAX,
 };
 
 static const char *_global_items[(size_t)ALT_DIGITS + 1] = {



CVS commit: src/usr.bin/xlint/lint1

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 14:17:22 UTC 2012

Modified Files:
src/usr.bin/xlint/lint1: tree.c

Log Message:
-0 is not unary overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/usr.bin/xlint/lint1/tree.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.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.68 src/usr.bin/xlint/lint1/tree.c:1.69
--- src/usr.bin/xlint/lint1/tree.c:1.68	Sat Feb  5 12:14:14 2011
+++ src/usr.bin/xlint/lint1/tree.c	Wed Mar 21 10:17:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.68 2011/02/05 17:14:14 christos Exp $	*/
+/*	$NetBSD: tree.c,v 1.69 2012/03/21 14:17:22 christos Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include sys/cdefs.h
 #if defined(__RCSID)  !defined(lint)
-__RCSID($NetBSD: tree.c,v 1.68 2011/02/05 17:14:14 christos Exp $);
+__RCSID($NetBSD: tree.c,v 1.69 2012/03/21 14:17:22 christos Exp $);
 #endif
 
 #include stdlib.h
@@ -2676,7 +2676,7 @@ fold(tnode_t *tn)
 		break;
 	case UMINUS:
 		q = -sl;
-		if (msb(q, t, -1) == msb(sl, t, -1))
+		if (sl != 0  msb(q, t, -1) == msb(sl, t, -1))
 			ovfl = 1;
 		break;
 	case COMPL:



CVS commit: src/lib/libc/softfloat/bits32

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 14:17:54 UTC 2012

Modified Files:
src/lib/libc/softfloat/bits32: softfloat.c

Log Message:
add casts


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/softfloat/bits32/softfloat.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/softfloat/bits32/softfloat.c
diff -u src/lib/libc/softfloat/bits32/softfloat.c:1.1 src/lib/libc/softfloat/bits32/softfloat.c:1.2
--- src/lib/libc/softfloat/bits32/softfloat.c:1.1	Tue May 21 19:51:07 2002
+++ src/lib/libc/softfloat/bits32/softfloat.c	Wed Mar 21 10:17:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat.c,v 1.1 2002/05/21 23:51:07 bjh21 Exp $ */
+/* $NetBSD: softfloat.c,v 1.2 2012/03/21 14:17:54 christos Exp $ */
 
 /*
  * This version hacked for use with gcc -msoft-float by bjh21.
@@ -53,7 +53,7 @@ this code that are retained.
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: softfloat.c,v 1.1 2002/05/21 23:51:07 bjh21 Exp $);
+__RCSID($NetBSD: softfloat.c,v 1.2 2012/03/21 14:17:54 christos Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef SOFTFLOAT_FOR_GCC
@@ -237,7 +237,7 @@ static float32 roundAndPackFloat32( flag
 isTiny =
( float_detect_tininess == float_tininess_before_rounding )
 || ( zExp  -1 )
-|| ( zSig + roundIncrement  0x8000 );
+|| ( zSig + roundIncrement  (uint32)0x8000 );
 shift32RightJamming( zSig, - zExp, zSig );
 zExp = 0;
 roundBits = zSig  0x7F;
@@ -281,7 +281,7 @@ floating-point value `a'.
 INLINE bits32 extractFloat64Frac1( float64 a )
 {
 
-return FLOAT64_DEMANGLE(a)  LIT64( 0x );
+return (bits32)(FLOAT64_DEMANGLE(a)  LIT64(0x));
 
 }
 
@@ -294,7 +294,7 @@ floating-point value `a'.
 INLINE bits32 extractFloat64Frac0( float64 a )
 {
 
-return ( FLOAT64_DEMANGLE(a)32 )  0x000F;
+return (bits32)((FLOAT64_DEMANGLE(a)  32)  0x000F);
 
 }
 
@@ -306,7 +306,7 @@ Returns the exponent bits of the double-
 INLINE int16 extractFloat64Exp( float64 a )
 {
 
-return ( FLOAT64_DEMANGLE(a)52 )  0x7FF;
+return (int16)((FLOAT64_DEMANGLE(a)  52)  0x7FF);
 
 }
 
@@ -318,7 +318,7 @@ Returns the sign bit of the double-preci
 INLINE flag extractFloat64Sign( float64 a )
 {
 
-return FLOAT64_DEMANGLE(a)63;
+return (flag)(FLOAT64_DEMANGLE(a)  63);
 
 }
 
@@ -535,7 +535,7 @@ float32 int32_to_float32( int32 a )
 if ( a == 0 ) return 0;
 if ( a == (sbits32) 0x8000 ) return packFloat32( 1, 0x9E, 0 );
 zSign = ( a  0 );
-return normalizeRoundAndPackFloat32( zSign, 0x9C, zSign ? - a : a );
+return normalizeRoundAndPackFloat32(zSign, 0x9C, (uint32)(zSign ? - a : a));
 
 }
 



CVS commit: src/lib/libc/stdlib

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 14:19:15 UTC 2012

Modified Files:
src/lib/libc/stdlib: strfmon.c

Log Message:
unsigned char portability casts


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/stdlib/strfmon.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/stdlib/strfmon.c
diff -u src/lib/libc/stdlib/strfmon.c:1.9 src/lib/libc/stdlib/strfmon.c:1.10
--- src/lib/libc/stdlib/strfmon.c:1.9	Tue Mar 13 17:13:48 2012
+++ src/lib/libc/stdlib/strfmon.c	Wed Mar 21 10:19:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: strfmon.c,v 1.9 2012/03/13 21:13:48 christos Exp $	*/
+/*	$NetBSD: strfmon.c,v 1.10 2012/03/21 14:19:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 Alexey Zelkin phan...@freebsd.org
@@ -32,7 +32,7 @@
 #if 0
 __FBSDID($FreeBSD: src/lib/libc/stdlib/strfmon.c,v 1.14 2003/03/20 08:18:55 ache Exp $);
 #else
-__RCSID($NetBSD: strfmon.c,v 1.9 2012/03/13 21:13:48 christos Exp $);
+__RCSID($NetBSD: strfmon.c,v 1.10 2012/03/21 14:19:15 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -63,6 +63,10 @@ __RCSID($NetBSD: strfmon.c,v 1.9 2012/0
 #define	USE_INTL_CURRENCY	0x40	/* use international currency symbol */
 #define IS_NEGATIVE		0x80	/* is argument value negative ? */
 
+#ifndef NBCHAR_MAX
+#define NBCHAR_MAX ((unsigned char)CHAR_MAX)
+#endif
+
 /* internal macros */
 #define PRINT(CH) do {		\
 	if (dst = s + maxsize) \
@@ -443,9 +447,9 @@ __setup_vars(int flags, char *cs_precede
 	/* Set defult values for unspecified information. */
 	if (*cs_precedes != 0)
 		*cs_precedes = 1;
-	if (*sep_by_space == CHAR_MAX)
+	if ((unsigned char)*sep_by_space == NBCHAR_MAX)
 		*sep_by_space = 0;
-	if (*sign_posn == CHAR_MAX)
+	if ((unsigned char)*sign_posn == NBCHAR_MAX)
 		*sign_posn = 0;
 }
 
@@ -482,14 +486,14 @@ get_groups(int size, char *grouping) {
 
 	int	chars = 0;
 
-	if (*grouping == CHAR_MAX || *grouping = 0)	/* no grouping ? */
+	if ((unsigned char)*grouping == NBCHAR_MAX || *grouping = 0)	/* no grouping ? */
 		return (0);
 
 	while (size  (int)*grouping) {
 		chars++;
 		size -= (int)*grouping++;
 		/* no more grouping ? */
-		if (*grouping == CHAR_MAX)
+		if ((unsigned char)*grouping == NBCHAR_MAX)
 			break;
 		/* rest grouping with same value ? */
 		if (*grouping == 0) {
@@ -581,7 +585,7 @@ __format_grouped_double(double value, in
 /* XXX: Why not use %' instead? */
 	if ((*flags  NEED_GROUPING) 
 	thousands_sep != '\0' 	/* XXX: need investigation */
-	*grouping != CHAR_MAX 
+	(unsigned char)*grouping != NBCHAR_MAX 
 	*grouping  0) {
 		while (avalue_size  (int)*grouping) {
 			GRPCPY(*grouping);
@@ -589,7 +593,7 @@ __format_grouped_double(double value, in
 			grouping++;
 
 			/* no more grouping ? */
-			if (*grouping == CHAR_MAX)
+			if ((unsigned char)*grouping == NBCHAR_MAX)
 break;
 
 			/* rest grouping with same value ? */



CVS commit: src/lib/libc/stdio

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 14:20:47 UTC 2012

Modified Files:
src/lib/libc/stdio: vfwprintf.c

Log Message:
unsigned char portability casts


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libc/stdio/vfwprintf.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/stdio/vfwprintf.c
diff -u src/lib/libc/stdio/vfwprintf.c:1.28 src/lib/libc/stdio/vfwprintf.c:1.29
--- src/lib/libc/stdio/vfwprintf.c:1.28	Thu Mar 15 14:22:30 2012
+++ src/lib/libc/stdio/vfwprintf.c	Wed Mar 21 10:20:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfwprintf.c,v 1.28 2012/03/15 18:22:30 christos Exp $	*/
+/*	$NetBSD: vfwprintf.c,v 1.29 2012/03/21 14:20:47 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
 static char sccsid[] = @(#)vfprintf.c	8.1 (Berkeley) 6/4/93;
 __FBSDID($FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.27 2007/01/09 00:28:08 imp Exp $);
 #else
-__RCSID($NetBSD: vfwprintf.c,v 1.28 2012/03/15 18:22:30 christos Exp $);
+__RCSID($NetBSD: vfwprintf.c,v 1.29 2012/03/21 14:20:47 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -290,8 +290,9 @@ __ultoa(u_long val, CHAR_T *endp, int ba
 			 * If (*grp == CHAR_MAX) then no more grouping
 			 * should be performed.
 			 */
-			if (needgrp  ndig == *grp  *grp != CHAR_MAX
-	 sval  9) {
+			if (needgrp  ndig == *grp
+			 (unsigned char)*grp != (unsigned char)CHAR_MAX
+			 sval  9) {
 *--cp = thousep;
 ndig = 0;
 /*
@@ -362,8 +363,10 @@ __ujtoa(uintmax_t val, CHAR_T *endp, int
 			 * If (*grp == CHAR_MAX) then no more grouping
 			 * should be performed.
 			 */
-			if (needgrp  *grp != CHAR_MAX  ndig == *grp
-	 sval  9) {
+			if (needgrp
+			 (unsigned char)*grp != (unsigned char)CHAR_MAX
+			 ndig == *grp
+			 sval  9) {
 *--cp = thousep;
 ndig = 0;
 /*
@@ -1240,7 +1243,8 @@ fp_common:
 	/* space for thousands' grouping */
 	nseps = nrepeats = 0;
 	lead = expt;
-	while (*grouping != CHAR_MAX) {
+	while ((unsigned char)*grouping
+	!= (unsigned char)CHAR_MAX) {
 		if (lead = *grouping)
 			break;
 		lead -= *grouping;



CVS commit: src/sys/dev

2012-03-21 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Mar 21 14:22:36 UTC 2012

Modified Files:
src/sys/dev/ic: mfi.c mfireg.h mfivar.h
src/sys/dev/pci: mfi_pci.c

Log Message:
Add support for skinny variants (e.g. IBM ServeRAID M1015). Based on OpenBSD
changes with some improvements. Tested on IBM x3550M3 with RAID0 and RAID1
volumes including bioctl(8) operation.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/ic/mfi.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/mfireg.h
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/mfivar.h
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/mfi_pci.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/mfi.c
diff -u src/sys/dev/ic/mfi.c:1.37 src/sys/dev/ic/mfi.c:1.38
--- src/sys/dev/ic/mfi.c:1.37	Wed Mar 21 13:19:11 2012
+++ src/sys/dev/ic/mfi.c	Wed Mar 21 14:22:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.37 2012/03/21 13:19:11 sborrill Exp $ */
+/* $NetBSD: mfi.c,v 1.38 2012/03/21 14:22:36 sborrill Exp $ */
 /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
 /*
  * Copyright (c) 2006 Marco Peereboom ma...@peereboom.us
@@ -17,7 +17,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mfi.c,v 1.37 2012/03/21 13:19:11 sborrill Exp $);
+__KERNEL_RCSID(0, $NetBSD: mfi.c,v 1.38 2012/03/21 14:22:36 sborrill Exp $);
 
 #include bio.h
 
@@ -151,6 +151,20 @@ static const struct mfi_iop_ops mfi_iop_
 	mfi_gen2_post
 };
 
+u_int32_t	mfi_skinny_fw_state(struct mfi_softc *);
+void		mfi_skinny_intr_dis(struct mfi_softc *);
+void		mfi_skinny_intr_ena(struct mfi_softc *);
+int		mfi_skinny_intr(struct mfi_softc *);
+void		mfi_skinny_post(struct mfi_softc *, struct mfi_ccb *);
+
+static const struct mfi_iop_ops mfi_iop_skinny = {
+	mfi_skinny_fw_state,
+	mfi_skinny_intr_dis,
+	mfi_skinny_intr_ena,
+	mfi_skinny_intr,
+	mfi_skinny_post
+};
+
 #define mfi_fw_state(_s) 	((_s)-sc_iop-mio_fw_state(_s))
 #define mfi_intr_enable(_s) 	((_s)-sc_iop-mio_intr_ena(_s))
 #define mfi_intr_disable(_s) 	((_s)-sc_iop-mio_intr_dis(_s))
@@ -402,11 +416,17 @@ mfi_transition_firmware(struct mfi_softc
 			printf(%s: firmware fault\n, DEVNAME(sc));
 			return 1;
 		case MFI_STATE_WAIT_HANDSHAKE:
-			mfi_write(sc, MFI_IDB, MFI_INIT_CLEAR_HANDSHAKE);
+			if (sc-sc_flags  MFI_IOP_SKINNY)
+mfi_write(sc, MFI_SKINNY_IDB, MFI_INIT_CLEAR_HANDSHAKE);
+			else
+mfi_write(sc, MFI_IDB, MFI_INIT_CLEAR_HANDSHAKE);
 			max_wait = 2;
 			break;
 		case MFI_STATE_OPERATIONAL:
-			mfi_write(sc, MFI_IDB, MFI_INIT_READY);
+			if (sc-sc_flags  MFI_IOP_SKINNY)
+mfi_write(sc, MFI_SKINNY_IDB, MFI_INIT_READY);
+			else
+mfi_write(sc, MFI_IDB, MFI_INIT_READY);
 			max_wait = 10;
 			break;
 		case MFI_STATE_UNDEFINED:
@@ -730,6 +750,9 @@ mfi_attach(struct mfi_softc *sc, enum mf
 	case MFI_IOP_GEN2:
 		sc-sc_iop = mfi_iop_gen2;
 		break;
+	case MFI_IOP_SKINNY:
+		sc-sc_iop = mfi_iop_skinny;
+		break;
 	default:
 		 panic(%s: unknown iop %d, DEVNAME(sc), iop);
 	}
@@ -2233,3 +2256,44 @@ mfi_gen2_post(struct mfi_softc *sc, stru
 	mfi_write(sc, MFI_IQP, 0x1 | ccb-ccb_pframe |
 	(ccb-ccb_extra_frames  1));
 }
+
+u_int32_t
+mfi_skinny_fw_state(struct mfi_softc *sc)
+{
+	return (mfi_read(sc, MFI_OSP));
+}
+
+void
+mfi_skinny_intr_dis(struct mfi_softc *sc)
+{
+	mfi_write(sc, MFI_OMSK, 0);
+}
+
+void
+mfi_skinny_intr_ena(struct mfi_softc *sc)
+{
+	mfi_write(sc, MFI_OMSK, ~0x0001);
+}
+
+int
+mfi_skinny_intr(struct mfi_softc *sc)
+{
+	u_int32_t status;
+
+	status = mfi_read(sc, MFI_OSTS);
+	if (!ISSET(status, MFI_OSTS_SKINNY_INTR_VALID))
+		return (0);
+
+	/* write status back to acknowledge interrupt */
+	mfi_write(sc, MFI_OSTS, status);
+
+	return (1);
+}
+
+void
+mfi_skinny_post(struct mfi_softc *sc, struct mfi_ccb *ccb)
+{
+	mfi_write(sc, MFI_IQPL, 0x1 | ccb-ccb_pframe |
+	(ccb-ccb_extra_frames  1));
+	mfi_write(sc, MFI_IQPH, 0x);
+}

Index: src/sys/dev/ic/mfireg.h
diff -u src/sys/dev/ic/mfireg.h:1.4 src/sys/dev/ic/mfireg.h:1.5
--- src/sys/dev/ic/mfireg.h:1.4	Tue Feb  9 00:05:18 2010
+++ src/sys/dev/ic/mfireg.h	Wed Mar 21 14:22:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: mfireg.h,v 1.4 2010/02/09 00:05:18 msaitoh Exp $ */
+/* $NetBSD: mfireg.h,v 1.5 2012/03/21 14:22:36 sborrill Exp $ */
 /* $OpenBSD: mfireg.h,v 1.24 2006/06/19 19:05:45 marco Exp $ */
 /*
  * Copyright (c) 2006 Marco Peereboom ma...@peereboom.us
@@ -46,6 +46,14 @@
 #define MFI_ODC	0xa0 /* outbound doorbell clr */
 #define MFI_OSP 0xb0 /* outbound scratch pad */
 
+/*
+ * skinny specific changes
+*/
+#define MFI_SKINNY_IDB0x00 /* Inbound doorbell is at 0x00 for skinny */
+#define MFI_IQPL0x00c0
+#define MFI_IQPH0x00c4
+#define MFI_OSTS_SKINNY_INTR_VALID		0x0001
+
 /* * firmware states */
 #define MFI_STATE_MASK0xf000
 #define MFI_STATE_UNDEFINED			0x

Index: src/sys/dev/ic/mfivar.h
diff -u src/sys/dev/ic/mfivar.h:1.14 

CVS commit: src/lib/libc/gen

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 14:28:32 UTC 2012

Modified Files:
src/lib/libc/gen: setmode.c

Log Message:
fix argument order.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/gen/setmode.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/setmode.c
diff -u src/lib/libc/gen/setmode.c:1.32 src/lib/libc/gen/setmode.c:1.33
--- src/lib/libc/gen/setmode.c:1.32	Tue Mar 20 12:36:05 2012
+++ src/lib/libc/gen/setmode.c	Wed Mar 21 10:28:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: setmode.c,v 1.32 2012/03/20 16:36:05 matt Exp $	*/
+/*	$NetBSD: setmode.c,v 1.33 2012/03/21 14:28:32 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)setmode.c	8.2 (Berkeley) 3/25/94;
 #else
-__RCSID($NetBSD: setmode.c,v 1.32 2012/03/20 16:36:05 matt Exp $);
+__RCSID($NetBSD: setmode.c,v 1.33 2012/03/21 14:28:32 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -367,7 +367,7 @@ out:
 }
 
 static BITCMD *
-addcmd(BITCMD *set, mode_t oparg, mode_t who, mode_t op, mode_t mask)
+addcmd(BITCMD *set, mode_t op, mode_t who, mode_t oparg, mode_t mask)
 {
 
 	_DIAGASSERT(set != NULL);



CVS commit: src/lib/libc/stdlib

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 14:32:22 UTC 2012

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
rename umax2s-size_t2s function per apb's request.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/lib/libc/stdlib/jemalloc.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/stdlib/jemalloc.c
diff -u src/lib/libc/stdlib/jemalloc.c:1.27 src/lib/libc/stdlib/jemalloc.c:1.28
--- src/lib/libc/stdlib/jemalloc.c:1.27	Wed Mar 21 06:10:36 2012
+++ src/lib/libc/stdlib/jemalloc.c	Wed Mar 21 10:32:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: jemalloc.c,v 1.27 2012/03/21 10:10:36 matt Exp $	*/
+/*	$NetBSD: jemalloc.c,v 1.28 2012/03/21 14:32:22 christos Exp $	*/
 
 /*-
  * Copyright (C) 2006,2007 Jason Evans jas...@freebsd.org.
@@ -118,7 +118,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $); */ 
-__RCSID($NetBSD: jemalloc.c,v 1.27 2012/03/21 10:10:36 matt Exp $);
+__RCSID($NetBSD: jemalloc.c,v 1.28 2012/03/21 14:32:22 christos Exp $);
 
 #ifdef __FreeBSD__
 #include libc_private.h
@@ -816,7 +816,7 @@ static void	wrtmessage(const char *p1, c
 #ifdef MALLOC_STATS
 static void	malloc_printf(const char *format, ...);
 #endif
-static char	*umax2s(size_t x, char *s);
+static char	*size_t2s(size_t x, char *s);
 static bool	base_pages_alloc(size_t minsize);
 static void	*base_alloc(size_t size);
 static chunk_node_t *base_chunk_node_alloc(void);
@@ -978,13 +978,13 @@ malloc_printf(const char *format, ...)
 
 /*
  * We don't want to depend on vsnprintf() for production builds, since that can
- * cause unnecessary bloat for static binaries.  umax2s() provides minimal
+ * cause unnecessary bloat for static binaries.  size_t2s() provides minimal
  * integer printing functionality, so that malloc_printf() use can be limited to
  * MALLOC_STATS code.
  */
 #define UMAX2S_BUFSIZE	21
 static char *
-umax2s(size_t x, char *s)
+size_t2s(size_t x, char *s)
 {
 	unsigned i;
 
@@ -3218,16 +3218,16 @@ malloc_print_stats(void)
 		opt_xmalloc ? X : x,
 		opt_zero ? Z\n : z\n);
 
-		_malloc_message(CPUs: , umax2s(ncpus, s), \n, );
-		_malloc_message(Max arenas: , umax2s(narenas, s), \n, );
-		_malloc_message(Pointer size: , umax2s(sizeof(void *), s),
+		_malloc_message(CPUs: , size_t2s(ncpus, s), \n, );
+		_malloc_message(Max arenas: , size_t2s(narenas, s), \n, );
+		_malloc_message(Pointer size: , size_t2s(sizeof(void *), s),
 		\n, );
-		_malloc_message(Quantum size: , umax2s(quantum, s), \n, );
-		_malloc_message(Max small size: , umax2s(small_max, s), \n,
+		_malloc_message(Quantum size: , size_t2s(quantum, s), \n, );
+		_malloc_message(Max small size: , size_t2s(small_max, s), \n,
 		);
 
-		_malloc_message(Chunk size: , umax2s(chunksize, s), , );
-		_malloc_message( (2^, umax2s((size_t)opt_chunk_2pow, s),
+		_malloc_message(Chunk size: , size_t2s(chunksize, s), , );
+		_malloc_message( (2^, size_t2s((size_t)opt_chunk_2pow, s),
 		)\n, );
 
 #ifdef MALLOC_STATS



CVS commit: src/sys/kern

2012-03-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Mar 21 14:51:36 UTC 2012

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

Log Message:
Fix query of IMMEDIATE bool values (copy  pasto).


To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.234 src/sys/kern/kern_sysctl.c

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

Modified files:

Index: src/sys/kern/kern_sysctl.c
diff -u src/sys/kern/kern_sysctl.c:1.233 src/sys/kern/kern_sysctl.c:1.234
--- src/sys/kern/kern_sysctl.c:1.233	Sat Nov 19 22:51:25 2011
+++ src/sys/kern/kern_sysctl.c	Wed Mar 21 14:51:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sysctl.c,v 1.233 2011/11/19 22:51:25 tls Exp $	*/
+/*	$NetBSD: kern_sysctl.c,v 1.234 2012/03/21 14:51:36 martin Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_sysctl.c,v 1.233 2011/11/19 22:51:25 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_sysctl.c,v 1.234 2012/03/21 14:51:36 martin Exp $);
 
 #include opt_defcorename.h
 #include ksyms.h
@@ -1182,7 +1182,7 @@ sysctl_create(SYSCTLFN_ARGS)
 	} else if (flags  CTLFLAG_IMMEDIATE) {
 		switch (type) {
 		case CTLTYPE_BOOL:
-			node-sysctl_idata = nnode.sysctl_bdata;
+			node-sysctl_bdata = nnode.sysctl_bdata;
 			break;
 		case CTLTYPE_INT:
 			node-sysctl_idata = nnode.sysctl_idata;



CVS commit: src/lib/libc

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 14:52:40 UTC 2012

Modified Files:
src/lib/libc: Makefile.inc

Log Message:
welcome to WARNS=5


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/Makefile.inc

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/Makefile.inc
diff -u src/lib/libc/Makefile.inc:1.13 src/lib/libc/Makefile.inc:1.14
--- src/lib/libc/Makefile.inc:1.13	Mon Mar 19 18:32:16 2012
+++ src/lib/libc/Makefile.inc	Wed Mar 21 10:52:40 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.13 2012/03/19 22:32:16 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.14 2012/03/21 14:52:40 christos Exp $
 #	@(#)Makefile	8.2 (Berkeley) 2/3/94
 #
 # All library objects contain sccsid strings by default; they may be
@@ -23,7 +23,7 @@ USE_SHLIBDIR=	yes
 
 .include bsd.own.mk
 
-WARNS=4
+WARNS=5
 CPPFLAGS+=	-D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT
 CPPFLAGS+=	-D_DIAGNOSTIC
 



CVS commit: src/lib/libc/gen

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 15:32:26 UTC 2012

Modified Files:
src/lib/libc/gen: nlist.c nlist_aout.c nlist_coff.c

Log Message:
c89 definitions


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/gen/nlist.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/gen/nlist_aout.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/gen/nlist_coff.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/nlist.c
diff -u src/lib/libc/gen/nlist.c:1.23 src/lib/libc/gen/nlist.c:1.24
--- src/lib/libc/gen/nlist.c:1.23	Tue Mar 20 12:36:05 2012
+++ src/lib/libc/gen/nlist.c	Wed Mar 21 11:32:26 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: nlist.c,v 1.23 2012/03/20 16:36:05 matt Exp $ */
+/* $NetBSD: nlist.c,v 1.24 2012/03/21 15:32:26 christos Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -66,7 +66,7 @@
 #if 0
 static char sccsid[] = @(#)nlist.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: nlist.c,v 1.23 2012/03/20 16:36:05 matt Exp $);
+__RCSID($NetBSD: nlist.c,v 1.24 2012/03/21 15:32:26 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -112,9 +112,7 @@ static const struct {
 };
 	
 int
-nlist(name, list)
-	const char *name;
-	struct nlist *list;
+nlist(const char *name, struct nlist *list)
 {
 	int fd, n;
 
@@ -130,9 +128,7 @@ nlist(name, list)
 }
 
 int
-__fdnlist(fd, list)
-	int fd;
-	struct nlist *list;
+__fdnlist(int fd, struct nlist *list)
 {
 	size_t i;
 	int rv;

Index: src/lib/libc/gen/nlist_aout.c
diff -u src/lib/libc/gen/nlist_aout.c:1.22 src/lib/libc/gen/nlist_aout.c:1.23
--- src/lib/libc/gen/nlist_aout.c:1.22	Thu Aug 20 07:08:59 2009
+++ src/lib/libc/gen/nlist_aout.c	Wed Mar 21 11:32:26 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: nlist_aout.c,v 1.22 2009/08/20 11:08:59 martin Exp $ */
+/* $NetBSD: nlist_aout.c,v 1.23 2012/03/21 15:32:26 christos Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -66,7 +66,7 @@
 #if 0
 static char sccsid[] = @(#)nlist.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: nlist_aout.c,v 1.22 2009/08/20 11:08:59 martin Exp $);
+__RCSID($NetBSD: nlist_aout.c,v 1.23 2012/03/21 15:32:26 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -91,9 +91,7 @@ struct nlist;
 #include sys/exec_aout.h
 
 int
-__fdnlist_aout(fd, list)
-	int fd;
-	struct nlist *list;
+__fdnlist_aout(int fd, struct nlist *list)
 {
 	struct nlist *p, *s;
 	char *strtab;

Index: src/lib/libc/gen/nlist_coff.c
diff -u src/lib/libc/gen/nlist_coff.c:1.8 src/lib/libc/gen/nlist_coff.c:1.9
--- src/lib/libc/gen/nlist_coff.c:1.8	Fri Aug 21 04:42:02 2009
+++ src/lib/libc/gen/nlist_coff.c	Wed Mar 21 11:32:26 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: nlist_coff.c,v 1.8 2009/08/21 08:42:02 he Exp $ */
+/* $NetBSD: nlist_coff.c,v 1.9 2012/03/21 15:32:26 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou
@@ -36,7 +36,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: nlist_coff.c,v 1.8 2009/08/21 08:42:02 he Exp $);
+__RCSID($NetBSD: nlist_coff.c,v 1.9 2012/03/21 15:32:26 christos Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -81,9 +81,7 @@ struct coff_extsym {
 #define es_offset u.s.u_offset
 
 int
-__fdnlist_coff(fd, list)
-	int fd;
-	struct nlist *list;
+__fdnlist_coff(int fd, struct nlist *list)
 {
 	struct nlist *p;
 	struct coff_filehdr *filehdrp;



CVS commit: src/share/man/man4

2012-03-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Mar 21 15:38:32 UTC 2012

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

Log Message:
Remove remaining references to pccons options for i386 and shark.
pccons has not existed on either port since late 2007.


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

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

Modified files:

Index: src/share/man/man4/options.4
diff -u src/share/man/man4/options.4:1.413 src/share/man/man4/options.4:1.414
--- src/share/man/man4/options.4:1.413	Tue Mar 13 19:25:41 2012
+++ src/share/man/man4/options.4	Wed Mar 21 15:38:32 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: options.4,v 1.413 2012/03/13 19:25:41 njoly Exp $
+.\	$NetBSD: options.4,v 1.414 2012/03/21 15:38:32 jakllsch Exp $
 .\
 .\ Copyright (c) 1996
 .\ 	Perry E. Metzger.  All rights reserved.
@@ -30,7 +30,7 @@
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
 .\
-.Dd January 13, 2012
+.Dd March 21, 2012
 .Dt OPTIONS 4
 .Os
 .Sh NAME
@@ -2395,25 +2395,6 @@ and is only needed on 68040+PPC, not on
 has shut
 down and will only restart after a keyboard reset or a power cycle.
 .El
-.Ss arm32-specific Options
-.Bl -ohang
-.It Cd options FRENCH_KBD
-Include translation for French keyboards when using
-.Em pccons
-on a Shark.
-.It Cd options FINNISH_KBD
-Include translation for Finnish keyboards when using
-.Em pccons
-on a Shark.
-.It Cd options GERMAN_KBD
-Include translation for German keyboards when using
-.Em pccons
-on a Shark.
-.It Cd options NORWEGIAN_KBD
-Include translation for French keyboards when using
-.Em pccons
-on a Shark.
-.El
 .Ss atari-specific Options
 .Bl -ohang
 .It Cd options DISKLABEL_AHDI
@@ -2489,10 +2470,6 @@ Overrides the extended memory size passe
 (Value given in kilobytes.
 Extended memory does not include the first megabyte.)
 Use this option only if the boot block reports the size incorrectly.
-.It Cd options FRENCH_KBD,FINNISH_KBD,GERMAN_KBD,NORWEGIAN_KBD
-Select a non-US keyboard layout for the
-.Em pccons
-console driver.
 .It Cd options CYRIX_CACHE_WORKS
 Relevant only to the Cyrix 486DLC CPU.
 This option is used to turn on the cache in hold-flush mode.



CVS commit: src/sys/fs/v7fs

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 15:55:50 UTC 2012

Modified Files:
src/sys/fs/v7fs: v7fs_file.c

Log Message:
don't re-define MIN


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/fs/v7fs/v7fs_file.c

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

Modified files:

Index: src/sys/fs/v7fs/v7fs_file.c
diff -u src/sys/fs/v7fs/v7fs_file.c:1.3 src/sys/fs/v7fs/v7fs_file.c:1.4
--- src/sys/fs/v7fs/v7fs_file.c:1.3	Fri Jul 29 23:51:53 2011
+++ src/sys/fs/v7fs/v7fs_file.c	Wed Mar 21 11:55:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: v7fs_file.c,v 1.3 2011/07/30 03:51:53 uch Exp $	*/
+/*	$NetBSD: v7fs_file.c,v 1.4 2012/03/21 15:55:50 christos Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -34,19 +34,18 @@
 #endif
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: v7fs_file.c,v 1.3 2011/07/30 03:51:53 uch Exp $);
+__KERNEL_RCSID(0, $NetBSD: v7fs_file.c,v 1.4 2012/03/21 15:55:50 christos Exp $);
 #if defined _KERNEL_OPT
 #include opt_v7fs.h
 #endif
 
+#include sys/param.h
 #ifdef _KERNEL
 #include sys/systm.h
-#include sys/param.h
 #else
 #include stdio.h
 #include string.h
 #include errno.h
-#define	MIN(a,b)	((/*CONSTCOND*/(a)(b))?(a):(b))
 #endif
 
 #include v7fs.h



CVS commit: [netbsd-6] src/external/lgpl3/gmp

2012-03-21 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Mar 21 16:07:13 UTC 2012

Modified Files:
src/external/lgpl3/gmp [netbsd-6]: README
src/external/lgpl3/gmp/lib/libgmp/arch/alpha [netbsd-6]: config.h gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/arm [netbsd-6]: config.h
src/external/lgpl3/gmp/lib/libgmp/arch/armeb [netbsd-6]: config.h
src/external/lgpl3/gmp/lib/libgmp/arch/hppa [netbsd-6]: config.h gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/m68000 [netbsd-6]: config.h
gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/m68k [netbsd-6]: config.h gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/mips64eb [netbsd-6]: config.h
gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/mips64el [netbsd-6]: config.h
gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/mipseb [netbsd-6]: config.h
gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/mipsel [netbsd-6]: config.h
gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/powerpc64 [netbsd-6]: config.h
config.m4 gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/sh3eb [netbsd-6]: config.h gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/sh3el [netbsd-6]: config.h gmp.h
src/external/lgpl3/gmp/lib/libgmp/arch/sparc [netbsd-6]: config.h

Log Message:
Pull up following revision(s) (requested by mrg in ticket #130):
external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/armeb/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/sh3eb/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/sh3el/gmp.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/hppa/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/arm/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp.h: revision 1.3
external/lgpl3/gmp/lib/libgmp/arch/sh3el/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/m68000/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/sparc/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp.h: revision 1.3
external/lgpl3/gmp/lib/libgmp/arch/m68k/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.m4: revision 1.3
external/lgpl3/gmp/lib/libgmp/arch/alpha/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.h: revision 1.2
external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.h: revision 1.2
external/lgpl3/gmp/README: revision 1.3
remove references to my src/obj trees, and make a note about avoiding
this in the future / should automate it too.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.4.1 src/external/lgpl3/gmp/README
cvs rdiff -u -r1.1 -r1.1.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/alpha/config.h \
src/external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp.h
cvs rdiff -u -r1.1 -r1.1.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/arm/config.h
cvs rdiff -u -r1.1 -r1.1.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/armeb/config.h
cvs rdiff -u -r1.1 -r1.1.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/hppa/config.h \
src/external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp.h
cvs rdiff -u -r1.1 -r1.1.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/m68000/config.h \
src/external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp.h
cvs rdiff -u -r1.1 -r1.1.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/m68k/config.h \
src/external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp.h
cvs rdiff -u -r1.1 -r1.1.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.h
cvs rdiff -u -r1.2 -r1.2.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp.h
cvs rdiff -u -r1.1 -r1.1.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.h
cvs rdiff -u -r1.2 -r1.2.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp.h
cvs rdiff -u -r1.1 -r1.1.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.h \
src/external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp.h
cvs rdiff -u -r1.1 -r1.1.4.1 \
src/external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.h \
src/external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp.h
cvs rdiff -u -r1.1 -r1.1.4.1 \

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

2012-03-21 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Mar 21 16:10:22 UTC 2012

Modified Files:
src/sys/arch/sparc64/sparc64 [netbsd-6]: locore.s trap.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #131):
sys/arch/sparc64/sparc64/trap.c: revision 1.170
sys/arch/sparc64/sparc64/trap.c: revision 1.171
sys/arch/sparc64/sparc64/locore.s: revision 1.341
port the corrected ECC error handling code from freebsd.  i noticed my U10
took one of these and then hang.  it shouldn't hang, there's a 'sir' here that
doesn't seem to reset properly.  oh well.
tested by simulated a trap via 'ta 0x10' and considering that the same, but
it hasn't been tested against a real ECC error yet.
count ECC corrected traps with evcnt(9).


To generate a diff of this commit:
cvs rdiff -u -r1.338.8.1 -r1.338.8.2 src/sys/arch/sparc64/sparc64/locore.s
cvs rdiff -u -r1.168 -r1.168.8.1 src/sys/arch/sparc64/sparc64/trap.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/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.338.8.1 src/sys/arch/sparc64/sparc64/locore.s:1.338.8.2
--- src/sys/arch/sparc64/sparc64/locore.s:1.338.8.1	Mon Mar  5 20:59:25 2012
+++ src/sys/arch/sparc64/sparc64/locore.s	Wed Mar 21 16:10:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.338.8.1 2012/03/05 20:59:25 sborrill Exp $	*/
+/*	$NetBSD: locore.s,v 1.338.8.2 2012/03/21 16:10:21 riz Exp $	*/
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -491,7 +491,7 @@ _C_LABEL(trapbase):
 	VTRAP(0x060, interrupt_vector); ! 060 = interrupt vector
 	TRAP(T_PA_WATCHPT)		! 061 = physical address data watchpoint
 	TRAP(T_VA_WATCHPT)		! 062 = virtual address data watchpoint
-	UTRAP(T_ECCERR)			! We'll implement this one later
+	TRAP(T_ECCERR)			! 063 = corrected ECC error
 ufast_IMMU_miss:			! 064 = fast instr access MMU miss
 	ldxa	[%g0] ASI_IMMU_8KPTR, %g2 ! Load IMMU 8K TSB pointer
 #ifdef NO_TSB
@@ -727,7 +727,7 @@ kdatafault:
 	VTRAP(0x060, interrupt_vector); ! 060 = interrupt vector
 	TRAP(T_PA_WATCHPT)		! 061 = physical address data watchpoint
 	TRAP(T_VA_WATCHPT)		! 062 = virtual address data watchpoint
-	UTRAP(T_ECCERR)			! We'll implement this one later
+	TRAP(T_ECCERR)			! 063 = corrected ECC error
 kfast_IMMU_miss:			! 064 = fast instr access MMU miss
 	ldxa	[%g0] ASI_IMMU_8KPTR, %g2 ! Load IMMU 8K TSB pointer
 #ifdef NO_TSB

Index: src/sys/arch/sparc64/sparc64/trap.c
diff -u src/sys/arch/sparc64/sparc64/trap.c:1.168 src/sys/arch/sparc64/sparc64/trap.c:1.168.8.1
--- src/sys/arch/sparc64/sparc64/trap.c:1.168	Sat Jul 30 19:29:12 2011
+++ src/sys/arch/sparc64/sparc64/trap.c	Wed Mar 21 16:10:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.168 2011/07/30 19:29:12 martin Exp $ */
+/*	$NetBSD: trap.c,v 1.168.8.1 2012/03/21 16:10:21 riz Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.168 2011/07/30 19:29:12 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.168.8.1 2012/03/21 16:10:21 riz Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -94,6 +94,8 @@ __KERNEL_RCSID(0, $NetBSD: trap.c,v 1.1
 #include machine/svr4_32_machdep.h
 #endif
 
+#include sparc64/sparc64/cache.h
+
 #include sparc/fpu/fpu_extern.h
 
 #ifndef offsetof
@@ -159,6 +161,10 @@ int	trapdebug = 0/*|TDB_SYSCALL|TDB_STOP
 #define Debugger()
 #endif
 
+struct evcnt ecc_corrected =
+EVCNT_INITIALIZER(EVCNT_TYPE_MISC,0,ECC,corrected);
+EVCNT_ATTACH_STATIC(ecc_corrected);
+
 /*
  * Initial FPU state is all registers == all 1s, everything else == all 0s.
  * This makes every floating point register a signalling NaN, with sign bit
@@ -371,6 +377,7 @@ void text_access_fault(struct trapframe6
 	u_long sfsr);
 void text_access_error(struct trapframe64 *, unsigned int, vaddr_t, u_long,
 	vaddr_t, u_long);
+void ecc_corrected_error(unsigned int type, vaddr_t pc);
 
 #ifdef DEBUG
 void print_trapframe(struct trapframe64 *);
@@ -540,6 +547,9 @@ trap(struct trapframe64 *tf, unsigned in
 			/* Enable the FPU */
 			tf-tf_tstate |= TSTATE_PEF;
 			return;
+		} else if (type == T_ECCERR) {
+			ecc_corrected_error(type, pc);
+			return;
 		}
 		goto dopanic;
 	}
@@ -855,6 +865,9 @@ badtrap:
 		ksi.ksi_code = FPE_INTOVF;
 		ksi.ksi_addr = (void *)pc;
 		break;
+	case T_ECCERR:
+		ecc_corrected_error(type, pc);
+		break;
 	}
 	if (sig != 0) {
 		ksi.ksi_signo = sig;
@@ -1622,3 +1635,48 @@ out:
 	}
 #endif
 }
+
+/*
+ * Handle an ECC corrected event.
+ */
+void
+ecc_corrected_error(unsigned int type, vaddr_t pc)
+{
+	uint64_t eeer, afar, afsr;
+	char buf[128];
+	int s;
+
+	/* Clear the error */
+	eeer = ldxa(0, ASI_ERROR_EN_REG);
+	s = intr_disable();
+	stxa(0, ASI_ERROR_EN_REG,
+	eeer  ~(P_EER_NCEEN | P_EER_CEEN));
+	membar_Sync();
+	intr_restore(s);
+
+	/* Flush the caches in order ensure no corrupt 

CVS commit: src/sbin/ldconfig

2012-03-21 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Mar 21 16:11:26 UTC 2012

Modified Files:
src/sbin/ldconfig: shlib.c

Log Message:
Convert from KR to c89 function definitions.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sbin/ldconfig/shlib.c

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

Modified files:

Index: src/sbin/ldconfig/shlib.c
diff -u src/sbin/ldconfig/shlib.c:1.1 src/sbin/ldconfig/shlib.c:1.2
--- src/sbin/ldconfig/shlib.c:1.1	Tue Jul  6 05:59:56 2010
+++ src/sbin/ldconfig/shlib.c	Wed Mar 21 16:11:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: shlib.c,v 1.1 2010/07/06 05:59:56 mrg Exp $	*/
+/*	$NetBSD: shlib.c,v 1.2 2012/03/21 16:11:26 he Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -74,8 +74,7 @@ const char	*standard_search_dirs[] = {
 };
 
 static void
-add_search_dir(name)
-	const char	*name;
+add_search_dir(const char *name)
 {
 	n_search_dirs += 2;
 	search_dirs = (char **)
@@ -88,7 +87,7 @@ add_search_dir(name)
 }
 
 void
-std_search_path()
+std_search_path(void)
 {
 	int	i, n;
 
@@ -105,9 +104,7 @@ std_search_path()
  */
 
 int
-getdewey(dewey, cp)
-int	dewey[];
-char	*cp;
+getdewey(int dewey[], char *cp)
 {
 	int	i, n;
 
@@ -136,9 +133,7 @@ char	*cp;
  * Return  0 if equal.
  */
 int
-cmpndewey(d1, n1, d2, n2)
-int	d1[], d2[];
-int	n1, n2;
+cmpndewey(int d1[], int n1, int d2[], int n2)
 {
 	register int	i;
 
@@ -172,8 +167,7 @@ int	n1, n2;
  * Like malloc but get fatal error if memory is exhausted.
  */
 void *
-xmalloc(size)
-	size_t size;
+xmalloc(size_t size)
 {
 	void	*result = (void *)malloc(size);
 
@@ -187,9 +181,7 @@ xmalloc(size)
  * Like realloc but get fatal error if memory is exhausted.
  */
 void *
-xrealloc(ptr, size)
-	void *ptr;
-	size_t size;
+xrealloc(void *ptr, size_t size)
 {
 	void	*result;
 
@@ -205,8 +197,7 @@ xrealloc(ptr, size)
  * the strings S1, S2, S3.
  */
 char *
-concat(s1, s2, s3)
-	const char *s1, *s2, *s3;
+concat(const char *s1, const char *s2, const char *s3)
 {
 	int	len1 = strlen(s1),
 		len2 = strlen(s2),



CVS commit: [netbsd-6] src/sys/dev/pci

2012-03-21 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Mar 21 16:12:19 UTC 2012

Modified Files:
src/sys/dev/pci [netbsd-6]: radeonfb.c radeonfbvar.h

Log Message:
Pull up following revision(s) (requested by macallan in ticket #132):
sys/dev/pci/radeonfb.c: revision 1.59
sys/dev/pci/radeonfbvar.h: revision 1.16
adjust the backlight control interface to match the other drivers ( genfb,
r128fb, voyagerfb etc. ) so the lid_switch script does the right thing
noticed by riz, I thought I fixed that a long time ago


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.53.2.1 src/sys/dev/pci/radeonfb.c
cvs rdiff -u -r1.13 -r1.13.2.1 src/sys/dev/pci/radeonfbvar.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/radeonfb.c
diff -u src/sys/dev/pci/radeonfb.c:1.53 src/sys/dev/pci/radeonfb.c:1.53.2.1
--- src/sys/dev/pci/radeonfb.c:1.53	Mon Jan 30 19:41:23 2012
+++ src/sys/dev/pci/radeonfb.c	Wed Mar 21 16:12:18 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeonfb.c,v 1.53 2012/01/30 19:41:23 drochner Exp $ */
+/*	$NetBSD: radeonfb.c,v 1.53.2.1 2012/03/21 16:12:18 riz Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.53 2012/01/30 19:41:23 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.53.2.1 2012/03/21 16:12:18 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -169,8 +169,9 @@ static void radeonfb_putchar(void *, int
 static void radeonfb_putchar_aa32(void *, int, int, unsigned, long);
 static void radeonfb_putchar_wrapper(void *, int, int, unsigned, long);
 
-static int radeonfb_get_backlight(struct radeonfb_display *);
 static int radeonfb_set_backlight(struct radeonfb_display *, int);
+static int radeonfb_get_backlight(struct radeonfb_display *);
+static void radeonfb_switch_backlight(struct radeonfb_display *, int);
 static void radeonfb_lvds_callout(void *);
 
 static void radeonfb_brightness_up(device_t);
@@ -900,11 +901,14 @@ radeonfb_attach(device_t parent, device_
 		config_found(sc-sc_dev, aa, wsemuldisplaydevprint);
 		
 		radeonfb_blank(dp, 0);
-		
+
 		/* Initialise delayed lvds operations for backlight. */
 		callout_init(dp-rd_bl_lvds_co, 0);
 		callout_setfunc(dp-rd_bl_lvds_co,
 radeonfb_lvds_callout, dp);
+		dp-rd_bl_on = 1;
+		dp-rd_bl_level = radeonfb_get_backlight(dp);
+		radeonfb_set_backlight(dp, dp-rd_bl_level);
 	}
 
 	/*
@@ -1051,18 +1055,29 @@ radeonfb_ioctl(void *v, void *vs,
 #endif
 	case WSDISPLAYIO_GETPARAM:
 		param = (struct wsdisplay_param *)d;
-		if (param-param == WSDISPLAYIO_PARAM_BACKLIGHT) {
+		switch (param-param) {
+		case WSDISPLAYIO_PARAM_BRIGHTNESS:
+			param-min = 0;
+			param-max = 255;
+			param-curval = dp-rd_bl_level;
+			return 0;
+		case WSDISPLAYIO_PARAM_BACKLIGHT:
 			param-min = 0;
 			param-max = RADEONFB_BACKLIGHT_MAX;
-			param-curval = radeonfb_get_backlight(dp);
+			param-curval = dp-rd_bl_on;
 			return 0;
 		}
 		return EPASSTHROUGH;
 
 	case WSDISPLAYIO_SETPARAM:
 		param = (struct wsdisplay_param *)d;
-		if (param-param == WSDISPLAYIO_PARAM_BACKLIGHT) {
-			return radeonfb_set_backlight(dp, param-curval);
+		switch (param-param) {
+		case WSDISPLAYIO_PARAM_BRIGHTNESS:
+			radeonfb_set_backlight(dp, param-curval);
+			return 0;
+		case WSDISPLAYIO_PARAM_BACKLIGHT:
+			radeonfb_switch_backlight(dp,  param-curval);
+			return 0;
 		}
 		return EPASSTHROUGH;
 
@@ -3578,6 +3593,14 @@ radeonfb_get_backlight(struct radeonfb_d
 }	
 
 /* Set the backlight to the given level for the display.  */
+static void 
+radeonfb_switch_backlight(struct radeonfb_display *dp, int on)
+{
+	if (dp-rd_bl_on == on)
+		return;
+	dp-rd_bl_on = on;
+	radeonfb_set_backlight(dp, dp-rd_bl_level);
+}
 
 static int 
 radeonfb_set_backlight(struct radeonfb_display *dp, int level)
@@ -3587,7 +3610,11 @@ radeonfb_set_backlight(struct radeonfb_d
 	uint32_t lvds;
 
 	s = spltty();
-	
+
+	dp-rd_bl_level = level;
+	if (dp-rd_bl_on == 0)
+		level = 0;
+
 	if (level  0)
 		level = 0;
 	else if (level = RADEONFB_BACKLIGHT_MAX)
@@ -3663,24 +3690,30 @@ static void
 radeonfb_brightness_up(device_t dev)
 {
 	struct radeonfb_softc *sc = device_private(dev);
+	struct radeonfb_display *dp = sc-sc_displays[0];
 	int level;
 
 	/* we assume the main display is the first one - need a better way */
 	if (sc-sc_ndisplays  1) return;
-	level = radeonfb_get_backlight(sc-sc_displays[0]);
+	/* make sure pushing the hotkeys always has an effect */
+	dp-rd_bl_on = 1;
+	level = dp-rd_bl_level;
 	level = min(RADEONFB_BACKLIGHT_MAX, level + 5);
-	radeonfb_set_backlight(sc-sc_displays[0], level);
+	radeonfb_set_backlight(dp, level);
 }
 
 static void
 radeonfb_brightness_down(device_t dev)
 {
 	struct radeonfb_softc *sc = device_private(dev);
+	struct radeonfb_display *dp = sc-sc_displays[0];
 	int level;
 
 	/* we assume the main display is the first one - need a better way 

CVS commit: [netbsd-6] src/sys/dev/raidframe

2012-03-21 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Mar 21 16:14:58 UTC 2012

Modified Files:
src/sys/dev/raidframe [netbsd-6]: rf_netbsdkintf.c

Log Message:
Pull up following revision(s) (requested by buhrow in ticket #133):
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.296
Add the ability to autoconfigure raid components on raw disks.
This change causes components on raw disks, as opposed to components inside
partitions or wedges, to be autoconfigured if the raid set is configured
for autoconfiguration.
Approved by oster@ and mrg@ for submission after the NetBSD-6 tag.  I've
been running these changes in production at my day job for over a year
without a problem.
See http://mail-index.NetBSD.org/tech-kern/2010/11/09/msg009167.html
for the original discussion of this patch and for a version of this patch
that works with NetBSD-5.x systems.


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.295.6.1 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.295 src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.1
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.295	Sat Nov  5 16:40:35 2011
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Wed Mar 21 16:14:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.295 2011/11/05 16:40:35 erh Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.295.6.1 2012/03/21 16:14:57 riz Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.295 2011/11/05 16:40:35 erh Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.295.6.1 2012/03/21 16:14:57 riz Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -2992,7 +2992,7 @@ rf_find_raid_components(void)
 	device_t dv;
 	deviter_t di;
 	dev_t dev;
-	int bmajor, bminor, wedge;
+	int bmajor, bminor, wedge, rf_part_found;
 	int error;
 	int i;
 	RF_AutoConfig_t *ac_list;
@@ -3039,6 +3039,8 @@ rf_find_raid_components(void)
 		/* need to find the device_name_to_block_device_major stuff */
 		bmajor = devsw_name2blk(device_xname(dv), NULL, 0);
 
+		rf_part_found = 0; /*No raid partition as yet*/
+
 		/* get a vnode for the raw partition of this disk */
 
 		wedge = device_is_a(dv, dk);
@@ -3084,6 +3086,7 @@ rf_find_raid_components(void)
 
 			ac_list = rf_get_component(ac_list, dev, vp,
 			device_xname(dv), dkw.dkw_size, numsecs, secsize);
+			rf_part_found = 1; /*There is a raid component on this disk*/
 			continue;
 		}
 
@@ -3108,6 +3111,7 @@ rf_find_raid_components(void)
 		if (error)
 			continue;
 
+		rf_part_found = 0; /*No raid partitions yet*/
 		for (i = 0; i  label.d_npartitions; i++) {
 			char cname[sizeof(ac_list-devname)];
 
@@ -3129,6 +3133,33 @@ rf_find_raid_components(void)
 			device_xname(dv), 'a' + i);
 			ac_list = rf_get_component(ac_list, dev, vp, cname,
 label.d_partitions[i].p_size, numsecs, secsize);
+rf_part_found = 1; /*There is at least one raid partition on this disk*/
+		}
+
+		/*
+		 *If there is no raid component on this disk, either in a
+		 *disklabel or inside a wedge, check the raw partition as well,
+		 *as it is possible to configure raid components on raw disk
+		 *devices.
+		 */
+
+		if (!rf_part_found) {
+			char cname[sizeof(ac_list-devname)];
+
+			dev = MAKEDISKDEV(bmajor, device_unit(dv), RAW_PART);
+			if (bdevvp(dev, vp))
+panic(RAID can't alloc vnode);
+
+			error = VOP_OPEN(vp, FREAD, NOCRED);
+			if (error) {
+/* Whatever... */
+vput(vp);
+continue;
+			}
+			snprintf(cname, sizeof(cname), %s%c,
+			device_xname(dv), 'a' + RAW_PART);
+			ac_list = rf_get_component(ac_list, dev, vp, cname,
+label.d_partitions[RAW_PART].p_size, numsecs, secsize);
 		}
 	}
 	deviter_release(di);



CVS commit: [netbsd-6] src/doc

2012-03-21 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Mar 21 16:16:00 UTC 2012

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

Log Message:
Tickets 130-133.


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

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
diff -u src/doc/CHANGES-6.0:1.1.2.57 src/doc/CHANGES-6.0:1.1.2.58
--- src/doc/CHANGES-6.0:1.1.2.57	Mon Mar 19 23:25:45 2012
+++ src/doc/CHANGES-6.0	Wed Mar 21 16:16:00 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.57 2012/03/19 23:25:45 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.58 2012/03/21 16:16:00 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -1416,3 +1416,53 @@ lib/libc/gen/humanize_number.c			1.16 vi
 	PR/44097: Yamamoto Takashi: Prevent overflow.
 	[dholland, ticket #129]
 
+external/lgpl3/gmp/README			1.3
+external/lgpl3/gmp/lib/libgmp/arch/alpha/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp.h	1.2
+external/lgpl3/gmp/lib/libgmp/arch/arm/config.h	1.2
+external/lgpl3/gmp/lib/libgmp/arch/armeb/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/hppa/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp.h	1.2
+external/lgpl3/gmp/lib/libgmp/arch/m68000/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp.h	1.2
+external/lgpl3/gmp/lib/libgmp/arch/m68k/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp.h	1.2
+external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp.h 1.3
+external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp.h 1.3
+external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp.h	1.2
+external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp.h	1.2
+external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.m4 1.3
+external/lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/sh3eb/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp.h	1.2
+external/lgpl3/gmp/lib/libgmp/arch/sh3el/config.h 1.2
+external/lgpl3/gmp/lib/libgmp/arch/sh3el/gmp.h	1.2
+external/lgpl3/gmp/lib/libgmp/arch/sparc/config.h 1.2
+
+	Clean up references to a specific user's trees, and make a note
+	about avoiding such in the future.
+	[mrg, ticket #130]
+
+sys/arch/sparc64/sparc64/locore.s		1.341
+sys/arch/sparc64/sparc64/trap.c			1.170-1.171
+
+	Fix sparc64 ECC error handling.
+	[mrg, ticket #131]
+
+sys/dev/pci/radeonfb.c1.59
+sys/dev/pci/radeonfbvar.h			1.16
+
+	Adjust the backlight control interface for radeonfb(4) to match
+	the other drivers.
+	[macallan, ticket #132]
+
+sys/dev/raidframe/rf_netbsdkintf.c		1.296
+
+	Add the ability to autoconfigure raid components on raw disks.
+	[buhrow, ticket #133]
+



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

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 18:01:34 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: inf-ptrace.c

Log Message:
Disable OS supplied single step functionality, because the code here is
wrong.


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

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/inf-ptrace.c
diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.2 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.3
--- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.2	Sun Sep 25 12:30:25 2011
+++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c	Wed Mar 21 14:01:34 2012
@@ -358,6 +358,12 @@ inf_ptrace_resume (struct target_ops *op
   else
 request = PT_CONTINUE;
 
+#ifdef notyet
+  /*
+   * Disable support for kernel PT_STEP. This code has no hope of working
+   * since this is the only place where PT_STEP is set, and it is only turned
+   * on!
+   */
   if (step)
 {
   /* If this system does not support PT_STEP, a higher level
@@ -368,6 +374,7 @@ inf_ptrace_resume (struct target_ops *op
   request = PT_STEP;
   sig = 0;
 } else
+#endif
   sig = target_signal_to_host (signal);
 
   /* An address of (PTRACE_TYPE_ARG3)1 tells ptrace to continue from



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

2012-03-21 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Mar 21 19:59:18 UTC 2012

Modified Files:
src/sys/arch/m68k/include: profile.h

Log Message:
Use c89 function declarations in MCOUNT definition.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/m68k/include/profile.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/m68k/include/profile.h
diff -u src/sys/arch/m68k/include/profile.h:1.19 src/sys/arch/m68k/include/profile.h:1.20
--- src/sys/arch/m68k/include/profile.h:1.19	Mon Aug  7 23:24:55 2006
+++ src/sys/arch/m68k/include/profile.h	Wed Mar 21 19:59:18 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.h,v 1.19 2006/08/07 23:24:55 tsutsui Exp $	*/
+/*	$NetBSD: profile.h,v 1.20 2012/03/21 19:59:18 he Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -43,7 +43,7 @@
 #define	MCOUNT \
 extern void mcount(void) __asm(MCOUNT_ENTRY) \
 	__attribute__((__no_instrument_function__)); \
-void mcount() { \
+void mcount(void) { \
 	int selfpc, frompcindex; \
 	__asm(movl %%a6@(4),%0 : =r (selfpc)); \
 	__asm(movl %%a6@(0)@(4),%0 : =r (frompcindex)); \
@@ -56,7 +56,7 @@ void mcount() { \
  * to do something different.
  */
 #define	MCOUNT \
-extern void mcount(void) __asm(mcount); void mcount() { \
+extern void mcount(void) __asm(mcount); void mcount(void) { \
 	int selfpc, frompcindex; \
 	__asm(movl %%a6@(4),%0 : =r (selfpc)); \
 	__asm(movl %%a6@(0),%%a0 ; movl %%a0@(4),%0 : =r (frompcindex) : /* no inputs */ : a0); \



CVS commit: src/common/lib/libc/net

2012-03-21 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Mar 21 20:02:56 UTC 2012

Modified Files:
src/common/lib/libc/net: htonl.c htons.c ntohl.c ntohs.c

Log Message:
Lint seems to prefer that we cast via (void*) and not directly to
(u_char*), so follow suit.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/net/htonl.c \
src/common/lib/libc/net/htons.c src/common/lib/libc/net/ntohl.c \
src/common/lib/libc/net/ntohs.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/lib/libc/net/htonl.c
diff -u src/common/lib/libc/net/htonl.c:1.2 src/common/lib/libc/net/htonl.c:1.3
--- src/common/lib/libc/net/htonl.c:1.2	Mon Jul  4 21:29:16 2011
+++ src/common/lib/libc/net/htonl.c	Wed Mar 21 20:02:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: htonl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $	*/
+/*	$NetBSD: htonl.c,v 1.3 2012/03/21 20:02:56 he Exp $	*/
 
 /*
  * Written by J.T. Conklin j...@netbsd.org.
@@ -7,7 +7,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: htonl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $);
+__RCSID($NetBSD: htonl.c,v 1.3 2012/03/21 20:02:56 he Exp $);
 #endif
 
 #include sys/types.h
@@ -18,7 +18,7 @@ uint32_t 
 htonl(uint32_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
-	u_char *s = (u_char *)x;
+	u_char *s = (void *)x;
 	return (uint32_t)(s[0]  24 | s[1]  16 | s[2]  8 | s[3]);
 #else
 	return x;
Index: src/common/lib/libc/net/htons.c
diff -u src/common/lib/libc/net/htons.c:1.2 src/common/lib/libc/net/htons.c:1.3
--- src/common/lib/libc/net/htons.c:1.2	Mon Jul  4 21:29:16 2011
+++ src/common/lib/libc/net/htons.c	Wed Mar 21 20:02:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: htons.c,v 1.2 2011/07/04 21:29:16 joerg Exp $	*/
+/*	$NetBSD: htons.c,v 1.3 2012/03/21 20:02:56 he Exp $	*/
 
 /*
  * Written by J.T. Conklin j...@netbsd.org.
@@ -7,7 +7,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: htons.c,v 1.2 2011/07/04 21:29:16 joerg Exp $);
+__RCSID($NetBSD: htons.c,v 1.3 2012/03/21 20:02:56 he Exp $);
 #endif
 
 #include sys/types.h
@@ -18,7 +18,7 @@ uint16_t
 htons(uint16_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
-	u_char *s = (u_char *) x;
+	u_char *s = (void *) x;
 	return (uint16_t)(s[0]  8 | s[1]);
 #else
 	return x;
Index: src/common/lib/libc/net/ntohl.c
diff -u src/common/lib/libc/net/ntohl.c:1.2 src/common/lib/libc/net/ntohl.c:1.3
--- src/common/lib/libc/net/ntohl.c:1.2	Mon Jul  4 21:29:16 2011
+++ src/common/lib/libc/net/ntohl.c	Wed Mar 21 20:02:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntohl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $	*/
+/*	$NetBSD: ntohl.c,v 1.3 2012/03/21 20:02:56 he Exp $	*/
 
 /*
  * Written by J.T. Conklin j...@netbsd.org.
@@ -7,7 +7,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: ntohl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $);
+__RCSID($NetBSD: ntohl.c,v 1.3 2012/03/21 20:02:56 he Exp $);
 #endif
 
 #include sys/types.h
@@ -18,7 +18,7 @@ uint32_t
 ntohl(uint32_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
-	u_char *s = (u_char *)x;
+	u_char *s = (void *)x;
 	return (uint32_t)(s[0]  24 | s[1]  16 | s[2]  8 | s[3]);
 #else
 	return x;
Index: src/common/lib/libc/net/ntohs.c
diff -u src/common/lib/libc/net/ntohs.c:1.2 src/common/lib/libc/net/ntohs.c:1.3
--- src/common/lib/libc/net/ntohs.c:1.2	Mon Jul  4 21:29:16 2011
+++ src/common/lib/libc/net/ntohs.c	Wed Mar 21 20:02:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntohs.c,v 1.2 2011/07/04 21:29:16 joerg Exp $	*/
+/*	$NetBSD: ntohs.c,v 1.3 2012/03/21 20:02:56 he Exp $	*/
 
 /*
  * Written by J.T. Conklin j...@netbsd.org.
@@ -7,7 +7,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: ntohs.c,v 1.2 2011/07/04 21:29:16 joerg Exp $);
+__RCSID($NetBSD: ntohs.c,v 1.3 2012/03/21 20:02:56 he Exp $);
 #endif
 
 #include sys/types.h
@@ -18,7 +18,7 @@ uint16_t
 ntohs(uint16_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
-	u_char *s = (u_char *) x;
+	u_char *s = (void *) x;
 	return (uint16_t)(s[0]  8 | s[1]);
 #else
 	return x;



CVS commit: src/lib/libc/arch/arm/gen

2012-03-21 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Mar 21 20:04:57 UTC 2012

Modified Files:
src/lib/libc/arch/arm/gen: flt_rounds.c

Log Message:
Use c89 function declaration.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/arm/gen/flt_rounds.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/arch/arm/gen/flt_rounds.c
diff -u src/lib/libc/arch/arm/gen/flt_rounds.c:1.3 src/lib/libc/arch/arm/gen/flt_rounds.c:1.4
--- src/lib/libc/arch/arm/gen/flt_rounds.c:1.3	Sat Feb 25 00:58:35 2006
+++ src/lib/libc/arch/arm/gen/flt_rounds.c	Wed Mar 21 20:04:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: flt_rounds.c,v 1.3 2006/02/25 00:58:35 wiz Exp $	*/
+/*	$NetBSD: flt_rounds.c,v 1.4 2012/03/21 20:04:57 he Exp $	*/
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: flt_rounds.c,v 1.3 2006/02/25 00:58:35 wiz Exp $);
+__RCSID($NetBSD: flt_rounds.c,v 1.4 2012/03/21 20:04:57 he Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include sys/types.h
@@ -75,7 +75,7 @@ static const int map[] = {
 int __flt_rounds(void);
 
 int
-__flt_rounds()
+__flt_rounds(void)
 {
 	return(map[fpgetround()]);
 }



CVS commit: src/lib/libc/arch/alpha/gen

2012-03-21 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Mar 21 20:07:52 UTC 2012

Modified Files:
src/lib/libc/arch/alpha/gen: fpgetround.c fpsetround.c

Log Message:
Add some casts to get rid of bitwise op on signed value is non-portable
warning from lint.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/alpha/gen/fpgetround.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/alpha/gen/fpsetround.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/arch/alpha/gen/fpgetround.c
diff -u src/lib/libc/arch/alpha/gen/fpgetround.c:1.10 src/lib/libc/arch/alpha/gen/fpgetround.c:1.11
--- src/lib/libc/arch/alpha/gen/fpgetround.c:1.10	Sun Jun 12 05:44:36 2011
+++ src/lib/libc/arch/alpha/gen/fpgetround.c	Wed Mar 21 20:07:52 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: fpgetround.c,v 1.10 2011/06/12 05:44:36 matt Exp $ */
+/* $NetBSD: fpgetround.c,v 1.11 2012/03/21 20:07:52 he Exp $ */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -36,7 +36,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: fpgetround.c,v 1.10 2011/06/12 05:44:36 matt Exp $);
+__RCSID($NetBSD: fpgetround.c,v 1.11 2012/03/21 20:07:52 he Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -58,5 +58,5 @@ fpgetround(void)
 
 	__asm(excb; mf_fpcr %0; excb : =f (fpcrval.d));
 
-	return ((fpcrval.u64  58)  0x3);
+	return ((fp_rnd)(fpcrval.u64  58)  0x3);
 }

Index: src/lib/libc/arch/alpha/gen/fpsetround.c
diff -u src/lib/libc/arch/alpha/gen/fpsetround.c:1.11 src/lib/libc/arch/alpha/gen/fpsetround.c:1.12
--- src/lib/libc/arch/alpha/gen/fpsetround.c:1.11	Sun Jun 12 05:44:36 2011
+++ src/lib/libc/arch/alpha/gen/fpsetround.c	Wed Mar 21 20:07:52 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: fpsetround.c,v 1.11 2011/06/12 05:44:36 matt Exp $ */
+/* $NetBSD: fpsetround.c,v 1.12 2012/03/21 20:07:52 he Exp $ */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -36,7 +36,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: fpsetround.c,v 1.11 2011/06/12 05:44:36 matt Exp $);
+__RCSID($NetBSD: fpsetround.c,v 1.12 2012/03/21 20:07:52 he Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -58,7 +58,7 @@ fpsetround(fp_rnd rnd_dir)
 	fp_rnd old;
 
 	__asm(excb; mf_fpcr %0; excb : =f (fpcrval.d));
-	old = (fpcrval.u64  58)  0x3;
+	old = (fp_rnd)(fpcrval.u64  58)  0x3;
 
 	rnd_dir ^= old;
 



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

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 21:25:38 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: inf-ptrace.c

Log Message:
Undo previous, it was wrong:
The problem has to do with the threaded initialization.
After we take the first breakpoint and we enter single step mode,
we set trap_expected = 1 in the thread_info structure for main pid,0,0.
After the threads initialize, the main thread becomes pid,1,0, and so
we get a new thread_info struct with trap_expected = 0, and so we break.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/inf-ptrace.c
diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.3 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.4
--- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.3	Wed Mar 21 14:01:34 2012
+++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c	Wed Mar 21 17:25:38 2012
@@ -358,12 +358,6 @@ inf_ptrace_resume (struct target_ops *op
   else
 request = PT_CONTINUE;
 
-#ifdef notyet
-  /*
-   * Disable support for kernel PT_STEP. This code has no hope of working
-   * since this is the only place where PT_STEP is set, and it is only turned
-   * on!
-   */
   if (step)
 {
   /* If this system does not support PT_STEP, a higher level
@@ -374,7 +368,6 @@ inf_ptrace_resume (struct target_ops *op
   request = PT_STEP;
   sig = 0;
 } else
-#endif
   sig = target_signal_to_host (signal);
 
   /* An address of (PTRACE_TYPE_ARG3)1 tells ptrace to continue from



CVS commit: [netbsd-5] src/sys/dev/wscons

2012-03-21 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Wed Mar 21 21:27:37 UTC 2012

Modified Files:
src/sys/dev/wscons [netbsd-5]: wsemul_vt100.c wsemul_vt100_chars.c
wsksymdef.h

Log Message:
Pull up revisions (requested by bouyer in ticket #1727):
  src/sys/dev/wscons/wsemul_vt100.c 1.31
  src/sys/dev/wscons/wsemul_vt100_chars.c   1.12
  src/sys/dev/wscons/wsksymdef.h1.62

s/portugese/portuguese/, spotted by Ari Constancio in PR misc/40202.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.64.1 src/sys/dev/wscons/wsemul_vt100.c
cvs rdiff -u -r1.11 -r1.11.86.1 src/sys/dev/wscons/wsemul_vt100_chars.c
cvs rdiff -u -r1.61.8.1 -r1.61.8.2 src/sys/dev/wscons/wsksymdef.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/wscons/wsemul_vt100.c
diff -u src/sys/dev/wscons/wsemul_vt100.c:1.30 src/sys/dev/wscons/wsemul_vt100.c:1.30.64.1
--- src/sys/dev/wscons/wsemul_vt100.c:1.30	Thu Nov 16 01:33:31 2006
+++ src/sys/dev/wscons/wsemul_vt100.c	Wed Mar 21 21:27:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100.c,v 1.30 2006/11/16 01:33:31 christos Exp $ */
+/* $NetBSD: wsemul_vt100.c,v 1.30.64.1 2012/03/21 21:27:36 jdc Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsemul_vt100.c,v 1.30 2006/11/16 01:33:31 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsemul_vt100.c,v 1.30.64.1 2012/03/21 21:27:36 jdc Exp $);
 
 #include opt_wsmsgattrs.h
 
@@ -662,7 +662,7 @@ wsemul_vt100_output_scs96(struct wsemul_
 	int nrc;
 
 	switch (c) {
-	case '%': /* probably portugese */
+	case '%': /* probably portuguese */
 		newstate = VT100_EMUL_STATE_SCS96_PERCENT;
 		break;
 	case 'A': /* ISO-latin-1 supplemental */
@@ -713,7 +713,7 @@ static u_int
 wsemul_vt100_output_scs96_percent(struct wsemul_vt100_emuldata *edp, u_char c)
 {
 	switch (c) {
-	case '6': /* portugese */
+	case '6': /* portuguese */
 		vt100_setnrc(edp, 8);
 		break;
 	default:

Index: src/sys/dev/wscons/wsemul_vt100_chars.c
diff -u src/sys/dev/wscons/wsemul_vt100_chars.c:1.11 src/sys/dev/wscons/wsemul_vt100_chars.c:1.11.86.1
--- src/sys/dev/wscons/wsemul_vt100_chars.c:1.11	Sun Dec 11 12:24:12 2005
+++ src/sys/dev/wscons/wsemul_vt100_chars.c	Wed Mar 21 21:27:37 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100_chars.c,v 1.11 2005/12/11 12:24:12 christos Exp $ */
+/* $NetBSD: wsemul_vt100_chars.c,v 1.11.86.1 2012/03/21 21:27:37 jdc Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsemul_vt100_chars.c,v 1.11 2005/12/11 12:24:12 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsemul_vt100_chars.c,v 1.11.86.1 2012/03/21 21:27:37 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -124,7 +124,7 @@ static const struct {
 	/* norwegian /danish */
 	{{0x0023, 0x0040, 0x00c6, 0x00d8, 0x00c5, 0x005e,
 	0x005f, 0x0060, 0x00e6, 0x00f8, 0x00e5, 0x007e}},
-	/* portugese */
+	/* portuguese */
 	{{0x0023, 0x0040, 0x00c3, 0x00c7, 0x00d5, 0x005e,
 	0x005f, 0x0060, 0x00e3, 0x00e7, 0x00f5, 0x007e}},
 	/* spanish */

Index: src/sys/dev/wscons/wsksymdef.h
diff -u src/sys/dev/wscons/wsksymdef.h:1.61.8.1 src/sys/dev/wscons/wsksymdef.h:1.61.8.2
--- src/sys/dev/wscons/wsksymdef.h:1.61.8.1	Sun Nov  1 16:13:10 2009
+++ src/sys/dev/wscons/wsksymdef.h	Wed Mar 21 21:27:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsksymdef.h,v 1.61.8.1 2009/11/01 16:13:10 bouyer Exp $ */
+/*	$NetBSD: wsksymdef.h,v 1.61.8.2 2012/03/21 21:27:37 jdc Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -652,7 +652,7 @@ action(KB_IT,	0,	0x0500,	it,	,	Italia
 action(KB_JP,	0,	0x0800,	jp,	,	Japanese)	\
 action(KB_NO,	0,	0x0a00,	no,	,	Norwegian)	\
 action(KB_PL,	0,	0x0d00,	pl,	,	Polish)	\
-action(KB_PT,	0,	0x1100,	pt,	,	Portugese)	\
+action(KB_PT,	0,	0x1100,	pt,	,	Portuguese)	\
 action(KB_RU,	0,	0x0e00,	ru,	,	Russian)	\
 action(KB_ES,	0,	0x0b00,	es,	,	Spanish)	\
 action(KB_SV,	0,	0x0900,	sv,	,	Swedish)	\



CVS commit: [netbsd-5-0] src/sys/dev/wscons

2012-03-21 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Wed Mar 21 21:27:42 UTC 2012

Modified Files:
src/sys/dev/wscons [netbsd-5-0]: wsemul_vt100.c wsemul_vt100_chars.c
wsksymdef.h

Log Message:
Pull up revisions (requested by bouyer in ticket #1727):
  src/sys/dev/wscons/wsemul_vt100.c 1.31
  src/sys/dev/wscons/wsemul_vt100_chars.c   1.12
  src/sys/dev/wscons/wsksymdef.h1.62

s/portugese/portuguese/, spotted by Ari Constancio in PR misc/40202.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.70.1 src/sys/dev/wscons/wsemul_vt100.c
cvs rdiff -u -r1.11 -r1.11.92.1 src/sys/dev/wscons/wsemul_vt100_chars.c
cvs rdiff -u -r1.61 -r1.61.14.1 src/sys/dev/wscons/wsksymdef.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/wscons/wsemul_vt100.c
diff -u src/sys/dev/wscons/wsemul_vt100.c:1.30 src/sys/dev/wscons/wsemul_vt100.c:1.30.70.1
--- src/sys/dev/wscons/wsemul_vt100.c:1.30	Thu Nov 16 01:33:31 2006
+++ src/sys/dev/wscons/wsemul_vt100.c	Wed Mar 21 21:27:42 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100.c,v 1.30 2006/11/16 01:33:31 christos Exp $ */
+/* $NetBSD: wsemul_vt100.c,v 1.30.70.1 2012/03/21 21:27:42 jdc Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsemul_vt100.c,v 1.30 2006/11/16 01:33:31 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsemul_vt100.c,v 1.30.70.1 2012/03/21 21:27:42 jdc Exp $);
 
 #include opt_wsmsgattrs.h
 
@@ -662,7 +662,7 @@ wsemul_vt100_output_scs96(struct wsemul_
 	int nrc;
 
 	switch (c) {
-	case '%': /* probably portugese */
+	case '%': /* probably portuguese */
 		newstate = VT100_EMUL_STATE_SCS96_PERCENT;
 		break;
 	case 'A': /* ISO-latin-1 supplemental */
@@ -713,7 +713,7 @@ static u_int
 wsemul_vt100_output_scs96_percent(struct wsemul_vt100_emuldata *edp, u_char c)
 {
 	switch (c) {
-	case '6': /* portugese */
+	case '6': /* portuguese */
 		vt100_setnrc(edp, 8);
 		break;
 	default:

Index: src/sys/dev/wscons/wsemul_vt100_chars.c
diff -u src/sys/dev/wscons/wsemul_vt100_chars.c:1.11 src/sys/dev/wscons/wsemul_vt100_chars.c:1.11.92.1
--- src/sys/dev/wscons/wsemul_vt100_chars.c:1.11	Sun Dec 11 12:24:12 2005
+++ src/sys/dev/wscons/wsemul_vt100_chars.c	Wed Mar 21 21:27:42 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100_chars.c,v 1.11 2005/12/11 12:24:12 christos Exp $ */
+/* $NetBSD: wsemul_vt100_chars.c,v 1.11.92.1 2012/03/21 21:27:42 jdc Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsemul_vt100_chars.c,v 1.11 2005/12/11 12:24:12 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsemul_vt100_chars.c,v 1.11.92.1 2012/03/21 21:27:42 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -124,7 +124,7 @@ static const struct {
 	/* norwegian /danish */
 	{{0x0023, 0x0040, 0x00c6, 0x00d8, 0x00c5, 0x005e,
 	0x005f, 0x0060, 0x00e6, 0x00f8, 0x00e5, 0x007e}},
-	/* portugese */
+	/* portuguese */
 	{{0x0023, 0x0040, 0x00c3, 0x00c7, 0x00d5, 0x005e,
 	0x005f, 0x0060, 0x00e3, 0x00e7, 0x00f5, 0x007e}},
 	/* spanish */

Index: src/sys/dev/wscons/wsksymdef.h
diff -u src/sys/dev/wscons/wsksymdef.h:1.61 src/sys/dev/wscons/wsksymdef.h:1.61.14.1
--- src/sys/dev/wscons/wsksymdef.h:1.61	Wed May 21 07:39:24 2008
+++ src/sys/dev/wscons/wsksymdef.h	Wed Mar 21 21:27:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsksymdef.h,v 1.61 2008/05/21 07:39:24 ghen Exp $ */
+/*	$NetBSD: wsksymdef.h,v 1.61.14.1 2012/03/21 21:27:42 jdc Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -590,7 +590,7 @@ action(KB_IT,	0,	0x0500,	it,	,	Italia
 action(KB_JP,	0,	0x0800,	jp,	,	Japanese)	\
 action(KB_NO,	0,	0x0a00,	no,	,	Norwegian)	\
 action(KB_PL,	0,	0x0d00,	pl,	,	Polish)	\
-action(KB_PT,	0,	0x1100,	pt,	,	Portugese)	\
+action(KB_PT,	0,	0x1100,	pt,	,	Portuguese)	\
 action(KB_RU,	0,	0x0e00,	ru,	,	Russian)	\
 action(KB_ES,	0,	0x0b00,	es,	,	Spanish)	\
 action(KB_SV,	0,	0x0900,	sv,	,	Swedish)	\



CVS commit: [netbsd-5-1] src/sys/dev/wscons

2012-03-21 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Wed Mar 21 21:27:47 UTC 2012

Modified Files:
src/sys/dev/wscons [netbsd-5-1]: wsemul_vt100.c wsemul_vt100_chars.c
wsksymdef.h

Log Message:
Pull up revisions (requested by bouyer in ticket #1727):
  src/sys/dev/wscons/wsemul_vt100.c 1.31
  src/sys/dev/wscons/wsemul_vt100_chars.c   1.12
  src/sys/dev/wscons/wsksymdef.h1.62

s/portugese/portuguese/, spotted by Ari Constancio in PR misc/40202.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.74.1 src/sys/dev/wscons/wsemul_vt100.c
cvs rdiff -u -r1.11 -r1.11.96.1 src/sys/dev/wscons/wsemul_vt100_chars.c
cvs rdiff -u -r1.61.8.1 -r1.61.8.1.2.1 src/sys/dev/wscons/wsksymdef.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/wscons/wsemul_vt100.c
diff -u src/sys/dev/wscons/wsemul_vt100.c:1.30 src/sys/dev/wscons/wsemul_vt100.c:1.30.74.1
--- src/sys/dev/wscons/wsemul_vt100.c:1.30	Thu Nov 16 01:33:31 2006
+++ src/sys/dev/wscons/wsemul_vt100.c	Wed Mar 21 21:27:47 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100.c,v 1.30 2006/11/16 01:33:31 christos Exp $ */
+/* $NetBSD: wsemul_vt100.c,v 1.30.74.1 2012/03/21 21:27:47 jdc Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsemul_vt100.c,v 1.30 2006/11/16 01:33:31 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsemul_vt100.c,v 1.30.74.1 2012/03/21 21:27:47 jdc Exp $);
 
 #include opt_wsmsgattrs.h
 
@@ -662,7 +662,7 @@ wsemul_vt100_output_scs96(struct wsemul_
 	int nrc;
 
 	switch (c) {
-	case '%': /* probably portugese */
+	case '%': /* probably portuguese */
 		newstate = VT100_EMUL_STATE_SCS96_PERCENT;
 		break;
 	case 'A': /* ISO-latin-1 supplemental */
@@ -713,7 +713,7 @@ static u_int
 wsemul_vt100_output_scs96_percent(struct wsemul_vt100_emuldata *edp, u_char c)
 {
 	switch (c) {
-	case '6': /* portugese */
+	case '6': /* portuguese */
 		vt100_setnrc(edp, 8);
 		break;
 	default:

Index: src/sys/dev/wscons/wsemul_vt100_chars.c
diff -u src/sys/dev/wscons/wsemul_vt100_chars.c:1.11 src/sys/dev/wscons/wsemul_vt100_chars.c:1.11.96.1
--- src/sys/dev/wscons/wsemul_vt100_chars.c:1.11	Sun Dec 11 12:24:12 2005
+++ src/sys/dev/wscons/wsemul_vt100_chars.c	Wed Mar 21 21:27:47 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100_chars.c,v 1.11 2005/12/11 12:24:12 christos Exp $ */
+/* $NetBSD: wsemul_vt100_chars.c,v 1.11.96.1 2012/03/21 21:27:47 jdc Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsemul_vt100_chars.c,v 1.11 2005/12/11 12:24:12 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsemul_vt100_chars.c,v 1.11.96.1 2012/03/21 21:27:47 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -124,7 +124,7 @@ static const struct {
 	/* norwegian /danish */
 	{{0x0023, 0x0040, 0x00c6, 0x00d8, 0x00c5, 0x005e,
 	0x005f, 0x0060, 0x00e6, 0x00f8, 0x00e5, 0x007e}},
-	/* portugese */
+	/* portuguese */
 	{{0x0023, 0x0040, 0x00c3, 0x00c7, 0x00d5, 0x005e,
 	0x005f, 0x0060, 0x00e3, 0x00e7, 0x00f5, 0x007e}},
 	/* spanish */

Index: src/sys/dev/wscons/wsksymdef.h
diff -u src/sys/dev/wscons/wsksymdef.h:1.61.8.1 src/sys/dev/wscons/wsksymdef.h:1.61.8.1.2.1
--- src/sys/dev/wscons/wsksymdef.h:1.61.8.1	Sun Nov  1 16:13:10 2009
+++ src/sys/dev/wscons/wsksymdef.h	Wed Mar 21 21:27:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsksymdef.h,v 1.61.8.1 2009/11/01 16:13:10 bouyer Exp $ */
+/*	$NetBSD: wsksymdef.h,v 1.61.8.1.2.1 2012/03/21 21:27:47 jdc Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -652,7 +652,7 @@ action(KB_IT,	0,	0x0500,	it,	,	Italia
 action(KB_JP,	0,	0x0800,	jp,	,	Japanese)	\
 action(KB_NO,	0,	0x0a00,	no,	,	Norwegian)	\
 action(KB_PL,	0,	0x0d00,	pl,	,	Polish)	\
-action(KB_PT,	0,	0x1100,	pt,	,	Portugese)	\
+action(KB_PT,	0,	0x1100,	pt,	,	Portuguese)	\
 action(KB_RU,	0,	0x0e00,	ru,	,	Russian)	\
 action(KB_ES,	0,	0x0b00,	es,	,	Spanish)	\
 action(KB_SV,	0,	0x0900,	sv,	,	Swedish)	\



CVS commit: [netbsd-5] src/sys/arch/i386

2012-03-21 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Wed Mar 21 21:29:32 UTC 2012

Modified Files:
src/sys/arch/i386/i386 [netbsd-5]: gdt.c machdep.c
src/sys/arch/i386/include [netbsd-5]: segments.h

Log Message:
Apply patch (requested by bouyer in ticket #1738).

Do not special-case XEN and always use the proper selectors for %fs and %gs
in buildcontext() and setregs(). The consequence was that signal handlers
would have the wrong %fs/%gs. Found by running atf tests under Xen/i386.


To generate a diff of this commit:
cvs rdiff -u -r1.45.10.1 -r1.45.10.2 src/sys/arch/i386/i386/gdt.c
cvs rdiff -u -r1.644.4.12 -r1.644.4.13 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.50.4.1 -r1.50.4.2 src/sys/arch/i386/include/segments.h

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

Modified files:

Index: src/sys/arch/i386/i386/gdt.c
diff -u src/sys/arch/i386/i386/gdt.c:1.45.10.1 src/sys/arch/i386/i386/gdt.c:1.45.10.2
--- src/sys/arch/i386/i386/gdt.c:1.45.10.1	Sat Apr  4 17:39:09 2009
+++ src/sys/arch/i386/i386/gdt.c	Wed Mar 21 21:29:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: gdt.c,v 1.45.10.1 2009/04/04 17:39:09 snj Exp $	*/
+/*	$NetBSD: gdt.c,v 1.45.10.2 2012/03/21 21:29:31 jdc Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gdt.c,v 1.45.10.1 2009/04/04 17:39:09 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: gdt.c,v 1.45.10.2 2012/03/21 21:29:31 jdc Exp $);
 
 #include opt_multiprocessor.h
 #include opt_xen.h
@@ -66,7 +66,7 @@ void gdt_grow(int);
 int gdt_get_slot1(int);
 void gdt_put_slot1(int, int);
 
-static void
+void
 update_descriptor(union descriptor *table, union descriptor *entry)
 {
 #ifndef XEN

Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.644.4.12 src/sys/arch/i386/i386/machdep.c:1.644.4.13
--- src/sys/arch/i386/i386/machdep.c:1.644.4.12	Thu Apr 22 20:02:48 2010
+++ src/sys/arch/i386/i386/machdep.c	Wed Mar 21 21:29:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.644.4.12 2010/04/22 20:02:48 snj Exp $	*/
+/*	$NetBSD: machdep.c,v 1.644.4.13 2012/03/21 21:29:31 jdc 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.644.4.12 2010/04/22 20:02:48 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.644.4.13 2012/03/21 21:29:31 jdc Exp $);
 
 #include opt_beep.h
 #include opt_compat_ibcs2.h
@@ -577,6 +577,12 @@ i386_switch_context(lwp_t *l)
 
 	HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), pcb-pcb_esp0);
 
+	/* Update TLS segment pointers */
+	update_descriptor(ci-ci_gdt[GUFS_SEL],
+			  (union descriptor *) pcb-pcb_fsd);
+	update_descriptor(ci-ci_gdt[GUGS_SEL], 
+			  (union descriptor *) pcb-pcb_gsd);
+
 #ifdef XEN3
 	struct physdev_op physop;
 	physop.cmd = PHYSDEVOP_SET_IOPL;
@@ -754,13 +760,8 @@ buildcontext(struct lwp *l, int sel, voi
 {
 	struct trapframe *tf = l-l_md.md_regs;
 
-#ifndef XEN
 	tf-tf_gs = GSEL(GUGS_SEL, SEL_UPL);
 	tf-tf_fs = GSEL(GUFS_SEL, SEL_UPL);
-#else
-	tf-tf_gs = GSEL(GUDATA_SEL, SEL_UPL);
-	tf-tf_fs = GSEL(GUDATA_SEL, SEL_UPL);
-#endif
 	tf-tf_es = GSEL(GUDATA_SEL, SEL_UPL);
 	tf-tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
 	tf-tf_eip = (int)catcher;
@@ -1034,13 +1035,8 @@ setregs(struct lwp *l, struct exec_packa
 	memcpy(pcb-pcb_gsd, gdt[GUDATA_SEL], sizeof(pcb-pcb_gsd));
 
 	tf = l-l_md.md_regs;
-#ifndef XEN
 	tf-tf_gs = GSEL(GUGS_SEL, SEL_UPL);
 	tf-tf_fs = GSEL(GUFS_SEL, SEL_UPL);
-#else
-	tf-tf_gs = LSEL(LUDATA_SEL, SEL_UPL);
-	tf-tf_fs = LSEL(LUDATA_SEL, SEL_UPL);
-#endif
 	tf-tf_es = LSEL(LUDATA_SEL, SEL_UPL);
 	tf-tf_ds = LSEL(LUDATA_SEL, SEL_UPL);
 	tf-tf_edi = 0;

Index: src/sys/arch/i386/include/segments.h
diff -u src/sys/arch/i386/include/segments.h:1.50.4.1 src/sys/arch/i386/include/segments.h:1.50.4.2
--- src/sys/arch/i386/include/segments.h:1.50.4.1	Tue Nov 18 01:56:59 2008
+++ src/sys/arch/i386/include/segments.h	Wed Mar 21 21:29:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: segments.h,v 1.50.4.1 2008/11/18 01:56:59 snj Exp $	*/
+/*	$NetBSD: segments.h,v 1.50.4.2 2012/03/21 21:29:31 jdc Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -198,6 +198,7 @@ void setsegment(struct segment_descripto
 void setgdt(int, const void *, size_t, int, int, int, int);
 void unsetgate(struct gate_descriptor *);
 void cpu_init_idt(void);
+void update_descriptor(union descriptor *, union descriptor *);
 
 #if !defined(XEN)
 void idt_init(void);



CVS commit: [netbsd-5] src/doc

2012-03-21 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Wed Mar 21 21:30:57 UTC 2012

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Tickets 1727, 1738.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.152 -r1.1.2.153 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.152 src/doc/CHANGES-5.2:1.1.2.153
--- src/doc/CHANGES-5.2:1.1.2.152	Mon Mar 19 18:46:36 2012
+++ src/doc/CHANGES-5.2	Wed Mar 21 21:30:57 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.152 2012/03/19 18:46:36 bouyer Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.153 2012/03/21 21:30:57 jdc Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -6281,3 +6281,19 @@ gnu/dist/gcc4/gcc/unwind-dw2-fde-phdr.c	
 	screwed up if the right set of libraries isn't linked together.
 	[skrll, ticket #1725]
 
+sys/dev/wscons/wsemul_vt100.c			1.31
+sys/dev/wscons/wsemul_vt100_chars.c		1.12
+sys/dev/wscons/wsksymdef.h			1.62
+
+	s/portugese/portuguese/, spotted by Ari Constancio in PR misc/40202.
+	[bouyer, ticket #1727]
+
+src/sys/arch/i386/i386/gdt.c			patch
+src/sys/arch/i386/i386/machdep.c		patch
+src/sys/arch/i386/include/segments.h		patch
+
+	Do not special-case XEN and always use the proper selectors for %fs
+	and %gs in buildcontext() and setregs(). The consequence was that
+	signal handlers would have the wrong %fs/%gs. Found by running atf
+	tests under Xen/i386.
+	[bouyer, ticket #1738]



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

2012-03-21 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Wed Mar 21 21:31:04 UTC 2012

Modified Files:
src/doc [netbsd-5-0]: CHANGES-5.0.3

Log Message:
Ticket 1727.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.68 -r1.1.2.69 src/doc/CHANGES-5.0.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-5.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.68 src/doc/CHANGES-5.0.3:1.1.2.69
--- src/doc/CHANGES-5.0.3:1.1.2.68	Sat Mar 17 19:32:13 2012
+++ src/doc/CHANGES-5.0.3	Wed Mar 21 21:31:03 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.68 2012/03/17 19:32:13 bouyer Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.69 2012/03/21 21:31:03 jdc Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2998,3 +2998,9 @@ sbin/mount/mount.81.73, 1.74
 	Clarify UFS2 superblock format stuff. Bump date.  Fix PR 45166.
 	[dholland, ticket #1743]
 
+sys/dev/wscons/wsemul_vt100.c			1.31
+sys/dev/wscons/wsemul_vt100_chars.c		1.12
+sys/dev/wscons/wsksymdef.h			1.62
+
+	s/portugese/portuguese/, spotted by Ari Constancio in PR misc/40202.
+	[bouyer, ticket #1727]



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

2012-03-21 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Wed Mar 21 21:31:07 UTC 2012

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.3

Log Message:
Ticket 1727.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-5.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-5.1.3
diff -u src/doc/CHANGES-5.1.3:1.1.2.9 src/doc/CHANGES-5.1.3:1.1.2.10
--- src/doc/CHANGES-5.1.3:1.1.2.9	Sat Mar 17 19:33:04 2012
+++ src/doc/CHANGES-5.1.3	Wed Mar 21 21:31:06 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.3,v 1.1.2.9 2012/03/17 19:33:04 bouyer Exp $
+# $NetBSD: CHANGES-5.1.3,v 1.1.2.10 2012/03/21 21:31:06 jdc Exp $
 
 A complete list of changes from the NetBSD 5.1.2 release to the NetBSD 5.1.3
 release:
@@ -84,3 +84,9 @@ sbin/mount/mount.81.73, 1.74
 	Clarify UFS2 superblock format stuff. Bump date.  Fix PR 45166.
 	[dholland, ticket #1743]
 
+sys/dev/wscons/wsemul_vt100.c			1.31
+sys/dev/wscons/wsemul_vt100_chars.c		1.12
+sys/dev/wscons/wsksymdef.h			1.62
+
+	s/portugese/portuguese/, spotted by Ari Constancio in PR misc/40202.
+	[bouyer, ticket #1727]



CVS commit: src/lib/libarch/i386

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 21:37:29 UTC 2012

Modified Files:
src/lib/libarch/i386: i386_get_ioperm.c i386_get_ldt.c i386_iopl.c
i386_set_ioperm.c i386_set_ldt.c i386_vm86.c

Log Message:
c89 prototypes


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libarch/i386/i386_get_ioperm.c \
src/lib/libarch/i386/i386_get_ldt.c \
src/lib/libarch/i386/i386_set_ioperm.c \
src/lib/libarch/i386/i386_set_ldt.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libarch/i386/i386_iopl.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libarch/i386/i386_vm86.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/libarch/i386/i386_get_ioperm.c
diff -u src/lib/libarch/i386/i386_get_ioperm.c:1.6 src/lib/libarch/i386/i386_get_ioperm.c:1.7
--- src/lib/libarch/i386/i386_get_ioperm.c:1.6	Mon Apr 28 16:22:55 2008
+++ src/lib/libarch/i386/i386_get_ioperm.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_get_ioperm.c,v 1.6 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: i386_get_ioperm.c,v 1.7 2012/03/21 21:37:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,8 +37,7 @@
 int i386_get_ioperm(u_long *);
 
 int
-i386_get_ioperm(iomap)
-	u_long *iomap;
+i386_get_ioperm(u_long *iomap)
 {
 	struct i386_get_ioperm_args p;
 
Index: src/lib/libarch/i386/i386_get_ldt.c
diff -u src/lib/libarch/i386/i386_get_ldt.c:1.6 src/lib/libarch/i386/i386_get_ldt.c:1.7
--- src/lib/libarch/i386/i386_get_ldt.c:1.6	Fri Jul  2 11:14:07 1999
+++ src/lib/libarch/i386/i386_get_ldt.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_get_ldt.c,v 1.6 1999/07/02 15:14:07 simonb Exp $	*/
+/*	$NetBSD: i386_get_ldt.c,v 1.7 2012/03/21 21:37:29 christos Exp $	*/
 
 /*
  *  Copyright (c) 1993 John Brezak
@@ -36,10 +36,7 @@
 #include machine/sysarch.h
 
 int
-i386_get_ldt(start, desc, num)
-	int start;
-	union descriptor *desc;
-	int num;
+i386_get_ldt(int start, union descriptor *desc, int num)
 {
 	struct i386_get_ldt_args p;
 
Index: src/lib/libarch/i386/i386_set_ioperm.c
diff -u src/lib/libarch/i386/i386_set_ioperm.c:1.6 src/lib/libarch/i386/i386_set_ioperm.c:1.7
--- src/lib/libarch/i386/i386_set_ioperm.c:1.6	Mon Apr 28 16:22:55 2008
+++ src/lib/libarch/i386/i386_set_ioperm.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_set_ioperm.c,v 1.6 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: i386_set_ioperm.c,v 1.7 2012/03/21 21:37:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,8 +37,7 @@
 int i386_set_ioperm(u_long *);
 
 int
-i386_set_ioperm(iomap)
-	u_long *iomap;
+i386_set_ioperm(u_long *iomap)
 {
 	struct i386_set_ioperm_args p;
 
Index: src/lib/libarch/i386/i386_set_ldt.c
diff -u src/lib/libarch/i386/i386_set_ldt.c:1.6 src/lib/libarch/i386/i386_set_ldt.c:1.7
--- src/lib/libarch/i386/i386_set_ldt.c:1.6	Fri Jul  2 11:14:07 1999
+++ src/lib/libarch/i386/i386_set_ldt.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_set_ldt.c,v 1.6 1999/07/02 15:14:07 simonb Exp $	*/
+/*	$NetBSD: i386_set_ldt.c,v 1.7 2012/03/21 21:37:29 christos Exp $	*/
 
 /*
  *  Copyright (c) 1993 John Brezak
@@ -36,10 +36,7 @@
 #include machine/sysarch.h
 
 int
-i386_set_ldt(start, desc, num)
-	int start;
-	union descriptor *desc;
-	int num;
+i386_set_ldt(int start, union descriptor *desc, int num)
 {
 	struct i386_set_ldt_args p;
 

Index: src/lib/libarch/i386/i386_iopl.c
diff -u src/lib/libarch/i386/i386_iopl.c:1.5 src/lib/libarch/i386/i386_iopl.c:1.6
--- src/lib/libarch/i386/i386_iopl.c:1.5	Mon Apr 28 16:22:55 2008
+++ src/lib/libarch/i386/i386_iopl.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_iopl.c,v 1.5 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: i386_iopl.c,v 1.6 2012/03/21 21:37:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -35,8 +35,7 @@
 #include machine/sysarch.h
 
 int
-i386_iopl(iopl)
-	int iopl;
+i386_iopl(int iopl)
 {
 	struct i386_iopl_args p;
 

Index: src/lib/libarch/i386/i386_vm86.c
diff -u src/lib/libarch/i386/i386_vm86.c:1.9 src/lib/libarch/i386/i386_vm86.c:1.10
--- src/lib/libarch/i386/i386_vm86.c:1.9	Sun Oct 26 03:05:00 2008
+++ src/lib/libarch/i386/i386_vm86.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_vm86.c,v 1.9 2008/10/26 07:05:00 mrg Exp $	*/
+/*	$NetBSD: i386_vm86.c,v 1.10 2012/03/21 21:37:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -38,8 +38,7 @@
 #include i386/vm86.h
 
 int
-i386_vm86(vmcp)
-	struct vm86_struct *vmcp;
+i386_vm86(struct vm86_struct *vmcp)
 {
 
 	return sysarch(I386_VM86, (void *)vmcp);



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

2012-03-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 21 22:29:21 UTC 2012

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

Log Message:
For BookE kernels, use -mmultiple and -misel and enable -fstack-protector


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/powerpc/conf/Makefile.powerpc

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/conf/Makefile.powerpc
diff -u src/sys/arch/powerpc/conf/Makefile.powerpc:1.49 src/sys/arch/powerpc/conf/Makefile.powerpc:1.50
--- src/sys/arch/powerpc/conf/Makefile.powerpc:1.49	Wed Feb  1 21:46:02 2012
+++ src/sys/arch/powerpc/conf/Makefile.powerpc	Wed Mar 21 22:29:21 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.powerpc,v 1.49 2012/02/01 21:46:02 matt Exp $
+#	$NetBSD: Makefile.powerpc,v 1.50 2012/03/21 22:29:21 matt Exp $
 #
 # Makefile for NetBSD
 #
@@ -43,6 +43,11 @@ CWARNFLAGS+=	-Wreturn-type
 CFLAGS+=	-mno-strict-align
 CFLAGS+=	-Wa,-maltivec
 .endif
+.if ${PPCDIR} == booke
+DEFCOPTS=	-O2
+CFLAGS+=	-fstack-protector
+CFLAGS+=	-mmultiple -misel
+.endif
 CFLAGS+=	-msdata=none
 CFLAGS+=	-msoft-float ${CCPUOPTS}
 AFLAGS+=	${AOPTS} -D_NOREGNAMES



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

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 23:20:58 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-thread.c

Log Message:
Use tid - 1 for the thread id, so that thread 1 matches the main thread
before the threaded code gets loaded. fixes spurious breakpoints. Is
there a better way?


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/nbsd-thread.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.9 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.10
--- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.9	Sun Feb  5 12:40:48 2012
+++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c	Wed Mar 21 19:20:58 2012
@@ -90,7 +90,7 @@ static void nbsd_find_new_threads (struc
 #define IS_LWP(ptid)		(GET_LWP (ptid) != 0)
 #define IS_THREAD(ptid)		(GET_THREAD (ptid) != 0)
 
-#define BUILD_LWP(lwp, ptid)	ptid_build (GET_PID(ptid), lwp, 0)
+#define BUILD_LWP(lwp, ptid)	ptid_build (GET_PID(ptid), (lwp) - 1, 0)
 #define BUILD_THREAD(tid, ptid)	ptid_build (GET_PID(ptid), 0, tid)
 
 static td_proc_t *main_ta;



CVS commit: src/include

2012-03-21 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Mar 22 03:06:06 UTC 2012

Modified Files:
src/include: fenv.h

Log Message:
typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/include/fenv.h

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

Modified files:

Index: src/include/fenv.h
diff -u src/include/fenv.h:1.6 src/include/fenv.h:1.7
--- src/include/fenv.h:1.6	Fri May 20 21:42:48 2011
+++ src/include/fenv.h	Thu Mar 22 03:06:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fenv.h,v 1.6 2011/05/20 21:42:48 nakayama Exp $	*/
+/*	$NetBSD: fenv.h,v 1.7 2012/03/22 03:06:06 dholland Exp $	*/
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -55,7 +55,7 @@ int	feenableexcept(int mask);
 int	fedisableexcept(int mask);
 int	fegetexcept(void);
 
-#endif /* _NETBDS_SOURCE || _GNU_SOURCE */
+#endif /* _NETBSD_SOURCE || _GNU_SOURCE */
 
 __END_DECLS
 



CVS commit: src/lib/libc/arch/powerpc/gen

2012-03-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Mar 22 05:36:50 UTC 2012

Modified Files:
src/lib/libc/arch/powerpc/gen: _lwp.c

Log Message:
Make lint happy.
While here, make sure the top of stack is aligned properly.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/powerpc/gen/_lwp.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/arch/powerpc/gen/_lwp.c
diff -u src/lib/libc/arch/powerpc/gen/_lwp.c:1.6 src/lib/libc/arch/powerpc/gen/_lwp.c:1.7
--- src/lib/libc/arch/powerpc/gen/_lwp.c:1.6	Sat Mar 12 07:55:09 2011
+++ src/lib/libc/arch/powerpc/gen/_lwp.c	Thu Mar 22 05:36:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: _lwp.c,v 1.6 2011/03/12 07:55:09 matt Exp $	*/
+/*	$NetBSD: _lwp.c,v 1.7 2012/03/22 05:36:50 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -37,10 +37,11 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: _lwp.c,v 1.6 2011/03/12 07:55:09 matt Exp $);
+__RCSID($NetBSD: _lwp.c,v 1.7 2012/03/22 05:36:50 matt Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
+#include sys/param.h
 #include sys/types.h
 #include ucontext.h
 #include lwp.h
@@ -50,7 +51,7 @@ void
 _lwp_makecontext(ucontext_t *u, void (*start)(void *), void *arg,
 	void *tcb, caddr_t stack_base, size_t stack_size)
 {
-	void	**sp;
+	uintptr_t sp;
 
 	getcontext(u);
 	u-uc_link = NULL;
@@ -58,12 +59,14 @@ _lwp_makecontext(ucontext_t *u, void (*s
 	u-uc_stack.ss_sp = stack_base;
 	u-uc_stack.ss_size = stack_size;
 
-	sp = (void **) (stack_base + stack_size);
-
-	u-uc_mcontext.__gregs[3] = (int) arg;		/* arg1 */
-	u-uc_mcontext.__gregs[1] = ((int) sp) - 12;	/* stack */
-	u-uc_mcontext.__gregs[33] = (int) _lwp_exit;	/* LR */
-	u-uc_mcontext.__gregs[34] = (int) start;	/* PC */
+	sp = (uintptr_t)stack_base + stack_size;
+	sp -= STACK_ALIGNBYTES + 1;
+	sp = ~STACK_ALIGNBYTES;
+
+	u-uc_mcontext.__gregs[3] = (uintptr_t) arg;		/* arg1 */
+	u-uc_mcontext.__gregs[1] = sp;/* stack */
+	u-uc_mcontext.__gregs[33] = (uintptr_t) _lwp_exit;	/* LR */
+	u-uc_mcontext.__gregs[34] = (uintptr_t) start;		/* PC */
 	u-uc_mcontext.__gregs[_REG_R2] =
-	(__greg_t)tcb + TLS_TP_OFFSET + sizeof(struct tls_tcb);
+	(uintptr_t)tcb + TLS_TP_OFFSET + sizeof(struct tls_tcb);
 }