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

2011-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Apr 13 06:29:30 UTC 2011

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

Log Message:
move the include sys/types.h xor stdbool.h to the top of the file,
so that bool will be present when used later in the file.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/include/cpu.h

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

Modified files:

Index: src/sys/arch/x86/include/cpu.h
diff -u src/sys/arch/x86/include/cpu.h:1.31 src/sys/arch/x86/include/cpu.h:1.32
--- src/sys/arch/x86/include/cpu.h:1.31	Thu Feb 24 15:42:17 2011
+++ src/sys/arch/x86/include/cpu.h	Wed Apr 13 06:29:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.31 2011/02/24 15:42:17 jruoho Exp $	*/
+/*	$NetBSD: cpu.h,v 1.32 2011/04/13 06:29:30 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -37,6 +37,12 @@
 #ifndef _X86_CPU_H_
 #define _X86_CPU_H_
 
+#if defined(_KERNEL) || defined(_STANDALONE)
+#include sys/types.h
+#else
+#include stdbool.h
+#endif /* _KERNEL || _STANDALONE */
+
 #if defined(_KERNEL) || defined(_KMEMUSER)
 #if defined(_KERNEL_OPT)
 #include opt_xen.h
@@ -435,12 +441,6 @@
 
 #endif /* _KERNEL || __KMEMUSER */
 
-#if defined(_KERNEL) || defined(_STANDALONE)
-#include sys/types.h
-#else
-#include stdbool.h
-#endif /* _KERNEL || _STANDALONE */
-
 /*
  * CTL_MACHDEP definitions.
  */



CVS commit: src/lib/libc/stdlib

2011-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 13 06:35:48 UTC 2011

Modified Files:
src/lib/libc/stdlib: imaxabs.3

Log Message:
Fix obvious bug.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/stdlib/imaxabs.3

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

Modified files:

Index: src/lib/libc/stdlib/imaxabs.3
diff -u src/lib/libc/stdlib/imaxabs.3:1.2 src/lib/libc/stdlib/imaxabs.3:1.3
--- src/lib/libc/stdlib/imaxabs.3:1.2	Sun Mar 21 13:39:51 2010
+++ src/lib/libc/stdlib/imaxabs.3	Wed Apr 13 06:35:48 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: imaxabs.3,v 1.2 2010/03/21 13:39:51 jruoho Exp $
+.\	$NetBSD: imaxabs.3,v 1.3 2011/04/13 06:35:48 jruoho Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -33,7 +33,7 @@
 .\
 .\ from: @(#)labs.3	8.1 (Berkeley) 6/4/93
 .\
-.Dd March 6, 2000
+.Dd April 13, 2011
 .Dt IMAXABS 3
 .Os
 .Sh NAME
@@ -44,7 +44,7 @@
 .Sh SYNOPSIS
 .In inttypes.h
 .Ft intmax_t
-.Fn imaxabs intmax_t i
+.Fn imaxabs intmax_t x
 .Sh DESCRIPTION
 The
 .Fn imaxabs
@@ -52,7 +52,7 @@
 returns the absolute value of the
 .Vt imaxint_t
 integer
-.Ar j .
+.Ar x .
 .Sh SEE ALSO
 .Xr abs 3 ,
 .Xr cabs 3 ,



CVS commit: src/lib/libc/stdlib

2011-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 13 06:41:12 UTC 2011

Modified Files:
src/lib/libc/stdlib: imaxabs.3

Log Message:
Fix another bug (no 'imaxint_t' type).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/stdlib/imaxabs.3

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

Modified files:

Index: src/lib/libc/stdlib/imaxabs.3
diff -u src/lib/libc/stdlib/imaxabs.3:1.3 src/lib/libc/stdlib/imaxabs.3:1.4
--- src/lib/libc/stdlib/imaxabs.3:1.3	Wed Apr 13 06:35:48 2011
+++ src/lib/libc/stdlib/imaxabs.3	Wed Apr 13 06:41:11 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: imaxabs.3,v 1.3 2011/04/13 06:35:48 jruoho Exp $
+.\	$NetBSD: imaxabs.3,v 1.4 2011/04/13 06:41:11 jruoho Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -38,7 +38,7 @@
 .Os
 .Sh NAME
 .Nm imaxabs
-.Nd return the absolute value of a imaxint_t
+.Nd return the absolute value of a intmax_t
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -50,7 +50,7 @@
 .Fn imaxabs
 function
 returns the absolute value of the
-.Vt imaxint_t
+.Vt intmax_t
 integer
 .Ar x .
 .Sh SEE ALSO



CVS commit: src/lib/libc/stdlib

2011-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 13 06:56:51 UTC 2011

Modified Files:
src/lib/libc/stdlib: Makefile.inc abs.3
Removed Files:
src/lib/libc/stdlib: imaxabs.3 labs.3 llabs.3

Log Message:
Collect abs(3), labs(3), llabs(3), and imaxabs(3) to a single small page.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/lib/libc/stdlib/Makefile.inc
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdlib/abs.3
cvs rdiff -u -r1.4 -r0 src/lib/libc/stdlib/imaxabs.3
cvs rdiff -u -r1.11 -r0 src/lib/libc/stdlib/labs.3
cvs rdiff -u -r1.7 -r0 src/lib/libc/stdlib/llabs.3

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

Modified files:

Index: src/lib/libc/stdlib/Makefile.inc
diff -u src/lib/libc/stdlib/Makefile.inc:1.75 src/lib/libc/stdlib/Makefile.inc:1.76
--- src/lib/libc/stdlib/Makefile.inc:1.75	Sun Nov 14 18:11:43 2010
+++ src/lib/libc/stdlib/Makefile.inc	Wed Apr 13 06:56:50 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.75 2010/11/14 18:11:43 tron Exp $
+#	$NetBSD: Makefile.inc,v 1.76 2011/04/13 06:56:50 jruoho Exp $
 #	from: @(#)Makefile.inc	8.3 (Berkeley) 2/4/95
 
 # stdlib sources
@@ -43,9 +43,9 @@
 	exit.3 \
 	getenv.3 getopt.3 getopt_long.3 getsubopt.3 grantpt.3 \
 	hcreate.3 \
-	imaxabs.3 imaxdiv.3 insque.3 \
+	imaxdiv.3 insque.3 \
 	jemalloc.3 \
-	labs.3 ldiv.3 llabs.3 lldiv.3 lsearch.3 \
+	ldiv.3 lldiv.3 lsearch.3 \
 	malloc.3 memory.3 mi_vector_hash.3 \
 	posix_memalign.3 posix_openpt.3 ptsname.3 \
 	qabs.3 qdiv.3 qsort.3 \
@@ -56,6 +56,9 @@
 
 MLINKS+=a64l.3 l64a.3
 MLINKS+=a64l.3 l64a_r.3
+MLINKS+=abs.3 labs.3 \
+	abs.3 llabs.3 \
+	abs.3 imaxabs.3
 MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3
 MLINKS+=getenv.3 getenv_r.3
 MLINKS+=hcreate.3 hdestroy.3 hcreate.3 hsearch.3

Index: src/lib/libc/stdlib/abs.3
diff -u src/lib/libc/stdlib/abs.3:1.13 src/lib/libc/stdlib/abs.3:1.14
--- src/lib/libc/stdlib/abs.3:1.13	Mon Aug  4 21:29:27 2008
+++ src/lib/libc/stdlib/abs.3	Wed Apr 13 06:56:50 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: abs.3,v 1.13 2008/08/04 21:29:27 matt Exp $
+.\	$NetBSD: abs.3,v 1.14 2011/04/13 06:56:50 jruoho Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -33,44 +33,41 @@
 .\
 .\ from: @(#)abs.3	8.1 (Berkeley) 6/4/93
 .\
-.Dd June 4, 1993
+.Dd April 13, 2011
 .Dt ABS 3
 .Os
 .Sh NAME
-.Nm abs
-.Nd integer absolute value function
+.Nm abs ,
+.Nm labs ,
+.Nm llabs ,
+.Nm imaxabs
+.Nd functions for integer absolute value
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
 .In stdlib.h
 .Ft int
-.Fn abs int j
+.Fn abs int x
+.Ft long int
+.Fn labs long int x
+.Ft long long int
+.Fn llabs long long int x
+.In inttypes.h
+.Ft intmax_t
+.Fn imaxabs intmax_t x
 .Sh DESCRIPTION
-The
-.Fn abs
-function
-computes
-the absolute value of the integer
-.Ar j .
-.Sh RETURN VALUES
-The
-.Fn abs
-function
-returns
-the absolute value.
+These functions return the absolute value of the integer
+.Fa x .
+The listed functions differ only with respect
+to the type of the return value and
+.Fa x .
 .Sh SEE ALSO
 .Xr cabs 3 ,
 .Xr fabs 3 ,
 .Xr floor 3 ,
-.Xr hypot 3 ,
-.Xr imaxabs 3 ,
-.Xr labs 3 ,
-.Xr llabs 3 ,
 .Xr math 3
 .Sh STANDARDS
-The
-.Fn abs
-function conforms to
-.St -ansiC .
+The described functions conform to
+.St -isoC-99 .
 .Sh BUGS
 The absolute value of the most negative integer remains negative.



CVS commit: src/lib/libc/stdlib

2011-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 13 07:12:52 UTC 2011

Modified Files:
src/lib/libc/stdlib: Makefile.inc div.3
Removed Files:
src/lib/libc/stdlib: imaxdiv.3 ldiv.3 lldiv.3

Log Message:
Collect also the division functions to single place, div(3).


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/lib/libc/stdlib/Makefile.inc
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/stdlib/div.3
cvs rdiff -u -r1.1 -r0 src/lib/libc/stdlib/imaxdiv.3
cvs rdiff -u -r1.13 -r0 src/lib/libc/stdlib/ldiv.3
cvs rdiff -u -r1.7 -r0 src/lib/libc/stdlib/lldiv.3

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

Modified files:

Index: src/lib/libc/stdlib/Makefile.inc
diff -u src/lib/libc/stdlib/Makefile.inc:1.76 src/lib/libc/stdlib/Makefile.inc:1.77
--- src/lib/libc/stdlib/Makefile.inc:1.76	Wed Apr 13 06:56:50 2011
+++ src/lib/libc/stdlib/Makefile.inc	Wed Apr 13 07:12:52 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.76 2011/04/13 06:56:50 jruoho Exp $
+#	$NetBSD: Makefile.inc,v 1.77 2011/04/13 07:12:52 jruoho Exp $
 #	from: @(#)Makefile.inc	8.3 (Berkeley) 2/4/95
 
 # stdlib sources
@@ -43,9 +43,9 @@
 	exit.3 \
 	getenv.3 getopt.3 getopt_long.3 getsubopt.3 grantpt.3 \
 	hcreate.3 \
-	imaxdiv.3 insque.3 \
+	insque.3 \
 	jemalloc.3 \
-	ldiv.3 lldiv.3 lsearch.3 \
+	lsearch.3 \
 	malloc.3 memory.3 mi_vector_hash.3 \
 	posix_memalign.3 posix_openpt.3 ptsname.3 \
 	qabs.3 qdiv.3 qsort.3 \
@@ -59,6 +59,9 @@
 MLINKS+=abs.3 labs.3 \
 	abs.3 llabs.3 \
 	abs.3 imaxabs.3
+MLINKS+=div.3 ldiv.3 \
+	div.3 lldiv.3 \
+	div.3 imaxdiv.3
 MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3
 MLINKS+=getenv.3 getenv_r.3
 MLINKS+=hcreate.3 hdestroy.3 hcreate.3 hsearch.3

Index: src/lib/libc/stdlib/div.3
diff -u src/lib/libc/stdlib/div.3:1.12 src/lib/libc/stdlib/div.3:1.13
--- src/lib/libc/stdlib/div.3:1.12	Mon Aug  4 21:29:27 2008
+++ src/lib/libc/stdlib/div.3	Wed Apr 13 07:12:52 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: div.3,v 1.12 2008/08/04 21:29:27 matt Exp $
+.\	$NetBSD: div.3,v 1.13 2011/04/13 07:12:52 jruoho Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -31,41 +31,57 @@
 .\
 .\ from: @(#)div.3	8.1 (Berkeley) 6/4/93
 .\
-.Dd June 4, 1993
+.Dd April 13, 2011
 .Dt DIV 3
 .Os
 .Sh NAME
-.Nm div
-.Nd return quotient and remainder from division
+.Nm div ,
+.Nm ldiv ,
+.Nm lldiv ,
+.Nm imaxdiv
+.Nd quotient and remainder from division
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
 .In stdlib.h
 .Ft div_t
 .Fn div int num int denom
+.Ft ldiv_t
+.Fn ldiv long int num long int denom
+.Ft lldiv_t
+.Fn lldiv long long int num long long int denom
+.In inttypes.h
+.Ft imaxdiv_t
+.Fn imaxdiv intmax_t num intmax_t denom
 .Sh DESCRIPTION
-The
-.Fn div
-function
-computes the value
-.Fa num/denom
-and returns the quotient and remainder in a structure named
-.Fa div_t
-that contains two
-.Em int
-members named
-.Fa quot
+These functions compute the value of
+.Fa num / denom
+and return the quotient and remainder in a specific divison structure.
+The functions differ only with respect to the type of the return value and
+the parameters.
+.Pp
+The returned structure always contains two members named
+.Vt quot
 and
-.Fa rem .
+.Vt rem ,
+denoting the quotient and the remainder.
+The type of these correspond with the underlying type of the function.
+.Sh EXAMPLES
+The following example demonstrate the basic usage of the functions.
+.Bd -literal -offset indent
+div_t d;
+
+int a = 4321;
+int b = 1234;
+
+d = div(a, b);
+
+(void)printf(\*[q]%d %d\en\*[q], d.quot, d.rem);
+.Ed
 .Sh SEE ALSO
-.Xr imaxdiv 3 ,
-.Xr ldiv 3 ,
-.Xr lldiv 3 ,
+.Xr fast_divide32 3 ,
 .Xr math 3 ,
 .Xr qdiv 3
 .Sh STANDARDS
-The
-.Fn div
-function
-conforms to
-.St -ansiC .
+All described functions conform to
+.St -isoC-99 .



CVS commit: src/sys/sys

2011-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Apr 13 08:45:00 UTC 2011

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

Log Message:
expose the KSTACK_LOWEST_ADDR and KSTACK_SIZE to _KMEMUSER as well,
like the x86 versions do.  for crash(8).


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 src/sys/sys/proc.h

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

Modified files:

Index: src/sys/sys/proc.h
diff -u src/sys/sys/proc.h:1.302 src/sys/sys/proc.h:1.303
--- src/sys/sys/proc.h:1.302	Tue Mar  8 12:39:29 2011
+++ src/sys/sys/proc.h	Wed Apr 13 08:45:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.302 2011/03/08 12:39:29 pooka Exp $	*/
+/*	$NetBSD: proc.h,v 1.303 2011/04/13 08:45:00 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -534,6 +534,20 @@
 #define	tsleep(chan, pri, wmesg, timo)	\
 	ltsleep(chan, pri, wmesg, timo, NULL)
 
+#ifdef KSTACK_CHECK_MAGIC
+void	kstack_setup_magic(const struct lwp *);
+void	kstack_check_magic(const struct lwp *);
+#else
+#define	kstack_setup_magic(x)
+#define	kstack_check_magic(x)
+#endif
+
+extern struct emul emul_netbsd;
+
+#endif	/* _KERNEL */
+
+#if defined(_KMEMUSER) || defined(_KERNEL)
+
 /*
  * Kernel stack parameters.
  *
@@ -551,15 +565,6 @@
 #define	KSTACK_SIZE		(USPACE - ALIGN(sizeof(struct pcb)))
 #endif
 
-#ifdef KSTACK_CHECK_MAGIC
-void	kstack_setup_magic(const struct lwp *);
-void	kstack_check_magic(const struct lwp *);
-#else
-#define	kstack_setup_magic(x)
-#define	kstack_check_magic(x)
-#endif
+#endif	/* _KMEMUSER || _KERNEL */
 
-extern struct emul emul_netbsd;
-
-#endif	/* _KERNEL */
 #endif	/* !_SYS_PROC_H_ */



CVS commit: src/tests/lib/libcurses/slave

2011-04-13 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Apr 13 09:46:38 UTC 2011

Modified Files:
src/tests/lib/libcurses/slave: Makefile

Log Message:
Explicitly list -lterminfo after -lcurses, to support static builds.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/slave/Makefile

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

Modified files:

Index: src/tests/lib/libcurses/slave/Makefile
diff -u src/tests/lib/libcurses/slave/Makefile:1.1 src/tests/lib/libcurses/slave/Makefile:1.2
--- src/tests/lib/libcurses/slave/Makefile:1.1	Sun Apr 10 09:55:10 2011
+++ src/tests/lib/libcurses/slave/Makefile	Wed Apr 13 09:46:38 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/04/10 09:55:10 blymn Exp $
+#	$NetBSD: Makefile,v 1.2 2011/04/13 09:46:38 he Exp $
 #
 .include bsd.own.mk
 
@@ -12,6 +12,6 @@
 SRCS=	slave.c commands.c curses_commands.c
 
 CPPFLAGS+=	-g -I${.CURDIR} -I. -I${.CURDIR}/../director
-LDADD+=		-lcurses
+LDADD+=		-lcurses -lterminfo
 
 .include bsd.test.mk



CVS commit: src/sys/arch/x68k/stand/loadbsd

2011-04-13 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Apr 13 11:10:50 UTC 2011

Modified Files:
src/sys/arch/x68k/stand/loadbsd: Makefile

Log Message:
Convert to using -nostdinc, and set include paths and create symlinks
so that we include the source tree's sys/, machine/ and m68k/ headers,
and only as a last resort use DESTDIR's /usr/include.  For some reason
the host's bootinfo.h got included ahead of the x68k variant, causing
a build failure in my case.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x68k/stand/loadbsd/Makefile

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

Modified files:

Index: src/sys/arch/x68k/stand/loadbsd/Makefile
diff -u src/sys/arch/x68k/stand/loadbsd/Makefile:1.12 src/sys/arch/x68k/stand/loadbsd/Makefile:1.13
--- src/sys/arch/x68k/stand/loadbsd/Makefile:1.12	Thu Jun 29 03:46:43 2006
+++ src/sys/arch/x68k/stand/loadbsd/Makefile	Wed Apr 13 11:10:49 2011
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.12 2006/06/29 03:46:43 lukem Exp $
+#	$NetBSD: Makefile,v 1.13 2011/04/13 11:10:49 he Exp $
+
+S=	${.CURDIR}/../../../..
 
 BASE=	loadbsd
 PROG=	${BASE}.x	# Human68k .x executable
@@ -20,12 +22,22 @@
 
 CPPFLAGS=	-W -Wall -O -fomit-frame-pointer
 CPPFLAGS+=	-m68000 -Wa,-mc68000
+CPPFLAGS+=	-nostdinc 
+CPPFLAGS+=	-I$S -I.
 CPPFLAGS+=	-I${.CURDIR}/../libdos -I${.CURDIR}/../libiocs
+CPPFLAGS+=	-I${DESTDIR}/usr/include
 LDFLAGS=	-nostdlib -static -N
 LDLIBS=		-L${LIBDOS} -ldos -L${LIBIOCS} -liocs -L${DESTDIR}/usr/lib -lc
 DPADD+=		${AOUT2HUX}
 
 CLEANFILES+=	${BASE}1 ${BASE}2
+CLEANFILES+=	machine m68k
+
+.if !make(obj)  !make(clean)  !make(cleandir)
+.BEGIN:
+	rm -f machine  ln -s $S/arch/x68k/include machine
+	rm -f m68k  ln -s $S/arch/m68k/include m68k
+.endif
 
 ${PROG}: ${BASE}1 ${BASE}2
 	${_MKTARGET_LINK}



CVS commit: xsrc/external/mit/xf86-video-suncg6/dist/src

2011-04-13 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Apr 13 15:47:03 UTC 2011

Modified Files:
xsrc/external/mit/xf86-video-suncg6/dist/src: cg6_driver.c

Log Message:
xf86LoaderReqSymLists() is no more


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c
diff -u xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c:1.4 xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c:1.5
--- xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c:1.4	Wed Jun 10 00:53:19 2009
+++ xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c	Wed Apr 13 15:47:03 2011
@@ -417,7 +417,6 @@
 CG6FreeRec(pScrn);
 return FALSE;
 }
-xf86LoaderReqSymLists(xaaSymbols, NULL);
 
 /*
 set up clock and mode stuff



CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/common

2011-04-13 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Apr 13 16:00:38 UTC 2011

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/common: xf86AutoConfig.c

Log Message:
- get platform #ifdefs in a slightly more sane order
- look for SBus and UPA devices on sparc(64)
- add default drivers for shark and sgimips
- only try wsfb if we can't find any other usable device
With this Xorg without config file works fine on shark, sparc(64) and amd64,
should work on other archs as well.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86AutoConfig.c

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86AutoConfig.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86AutoConfig.c:1.4 xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86AutoConfig.c:1.5
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86AutoConfig.c:1.4	Tue Nov 23 06:38:03 2010
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86AutoConfig.c	Wed Apr 13 16:00:38 2011
@@ -49,6 +49,13 @@
 # include ctype.h
 #endif
 
+#ifdef __NetBSD__
+#if defined(__sparc__) || defined(__sparc64__)
+#include dev/sun/fbio.h
+extern struct sbus_devtable sbusDeviceTable[];
+#endif /* sparc / sparc64 */
+#endif /* NetBSD */
+
 /* Sections for the default built-in configuration. */
 
 #define BUILTIN_DEVICE_NAME \
@@ -198,6 +205,45 @@
 }
 i = 0;
 
+#ifdef __NetBSD__
+#if defined(__shark)
+matches[i++] = xnfstrdup(chips);
+matches[i++] = xnfstrdup(igs);
+#elif defined(__sgimips)
+matches[i++] = xnfstrdup(crime);
+matches[i++] = xnfstrdup(newport);
+#elif defined(__sparc) || defined(__sparc64)
+/* dig through /dev/fb* */
+{
+	struct fbtype fbt;
+	int j = 0, fd = 0, dev;
+	char fbpath[32];
+
+	for (j = 0; j  10; j++) {
+	snprintf(fbpath, 31, /dev/fb%d, j);
+	xf86Msg(X_ERROR,%s: trying %s\n, __func__, fbpath);
+	fd = open(fbpath, O_RDONLY, 0);
+	if (fd == -1) continue;
+	memset(fbt, 0, sizeof(fbt));
+	if (ioctl(fd, FBIOGTYPE, fbt) == -1) {
+		close(fd);
+		continue;
+	}
+	close(fd);
+	dev = 0;
+	while ((sbusDeviceTable[dev].fbType != 0) 
+	   (sbusDeviceTable[dev].fbType != fbt.fb_type))
+		dev++;
+	if (sbusDeviceTable[dev].fbType == fbt.fb_type) {
+		xf86Msg(X_ERROR,%s: found %s\n, __func__,
+		sbusDeviceTable[dev].driverName);
+		matches[i++] = xnfstrdup(sbusDeviceTable[dev].driverName);
+	}
+	}
+}
+#endif
+
+#else /* !NetBSD */
 #ifdef sun
 /* Check for driver type based on /dev/fb type and if valid, use
it instead of PCI bus probe results */
@@ -255,25 +301,33 @@
 	matches[i++] = xnfstrdup(sbusDriver);
 }
 #endif
+#endif /* NetBSD */
 
 i = xf86PciMatchDriver(matches, nmatches);
 
-/* Fallback to platform default hardware */
-if (i  (nmatches - 1)) {
-#if defined(__i386__) || defined(__amd64__) || defined(__hurd__)
+/*
+ * Fallback to platform default frame buffer driver  if we didn't probe
+ * anything useful
+ */
+if (i == 0) {
+#ifdef __NetBSD__
+#if defined(__i386__) || defined(__amd64__)
 	matches[i++] = xnfstrdup(vesa);
-#elif defined(__sparc__)  !defined(sun)
-	matches[i++] = xnfstrdup(sunffb);
+#else
+	matches[i++] = xnfstrdup(wsfb);
 #endif
-}
-
-/* Fallback to platform default frame buffer driver */
-if (i  (nmatches - 1)) {
+#else /* !NetBSD */	
 #if !defined(__linux__)  defined(__sparc__)
 	matches[i++] = xnfstrdup(wsfb);
 #else
 	matches[i++] = xnfstrdup(fbdev);
 #endif
+#if defined(__i386__) || defined(__amd64__) || defined(__hurd__)
+	matches[i++] = xnfstrdup(vesa);
+#elif defined(__sparc__)  !defined(sun)
+	matches[i++] = xnfstrdup(sunffb);
+#endif
+#endif /* NetBSD */
 }
 }
 



CVS commit: src/external/mit/xorg/server/xorg-server/hw/xfree86/common

2011-04-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Apr 13 16:18:14 UTC 2011

Modified Files:
src/external/mit/xorg/server/xorg-server/hw/xfree86/common: Makefile

Log Message:
pass ${MACHINE} as -D__whatever so we can have arch-specific defaults


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile

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

Modified files:

Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile
diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile:1.17 src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile:1.18
--- src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile:1.17	Mon Feb 21 04:42:16 2011
+++ src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile	Wed Apr 13 16:18:14 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2011/02/21 04:42:16 mrg Exp $
+#	$NetBSD: Makefile,v 1.18 2011/04/13 16:18:14 macallan Exp $
 
 .include bsd.sys.mk # for HOST_SH
 
@@ -75,7 +75,8 @@
 		-I${X11SRCDIR.xorg-server}/render \
 		-I${X11SRCDIR.xorg-server}/randr \
 		-I. \
-		-I${X11SRCDIR.xorg-server}/../include
+		-I${X11SRCDIR.xorg-server}/../include \
+		-D__${MACHINE}
 
 CPPFLAGS+=	${X11FLAGS.EXTENSION} ${X11FLAGS.OS_DEFINES} \
 		${X11FLAGS.DIX} \



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

2011-04-13 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Apr 13 16:22:09 UTC 2011

Modified Files:
src/sys/arch/sgimips/dev: crmfb.c

Log Message:
use PRIx64 for printing 64-bit values


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sgimips/dev/crmfb.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/sgimips/dev/crmfb.c
diff -u src/sys/arch/sgimips/dev/crmfb.c:1.32 src/sys/arch/sgimips/dev/crmfb.c:1.33
--- src/sys/arch/sgimips/dev/crmfb.c:1.32	Thu Apr  7 01:20:31 2011
+++ src/sys/arch/sgimips/dev/crmfb.c	Wed Apr 13 16:22:09 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: crmfb.c,v 1.32 2011/04/07 01:20:31 macallan Exp $ */
+/* $NetBSD: crmfb.c,v 1.33 2011/04/13 16:22:09 plunky Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: crmfb.c,v 1.32 2011/04/07 01:20:31 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: crmfb.c,v 1.33 2011/04/13 16:22:09 plunky Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -968,7 +968,7 @@
 bus_space_write_8(sc-sc_iot, sc-sc_reh,
 CRIME_RE_TLB_A + tlbptr + lptr, 
 reg);
-DPRINTF(%04x: %016llx\n, tlbptr + lptr, reg);
+DPRINTF(%04x: %016PRIx64\n, tlbptr + lptr, reg);
 reg = 0;
 lptr += 8;
 			}
@@ -977,7 +977,7 @@
 		if (shift != 64) {
 			bus_space_write_8(sc-sc_iot, sc-sc_reh,
 			CRIME_RE_TLB_A + tlbptr + lptr, reg);
-			DPRINTF(%04x: %016llx\n, tlbptr + lptr, reg);
+			DPRINTF(%04x: %016PRIx64\n, tlbptr + lptr, reg);
 		}
 		tlbptr += 32;
 	}



CVS commit: xsrc/external/mit/xf86-input-keyboard/dist/src

2011-04-13 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Apr 13 16:23:29 UTC 2011

Modified Files:
xsrc/external/mit/xf86-input-keyboard/dist/src: kbd.c

Log Message:
default to wskbd
tested on amd64, sparc(64), shark
Now X without a config file should work on most hardware


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c

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

Modified files:

Index: xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c
diff -u xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c:1.1.1.4 xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c:1.2
--- xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c:1.1.1.4	Mon Nov 22 07:27:28 2010
+++ xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c	Wed Apr 13 16:23:29 2011
@@ -78,11 +78,16 @@
 };
 
 static const char *kbdDefaults[] = {
+#ifdef __NetBSD__
+Protocol,		wskbd,
+Device,		/dev/wskbd,
+#else /* NetBSD */
 #ifdef XQUEUE 
 Protocol,		Xqueue,
 #else
 Protocol,		standard,
 #endif
+#endif /* NetBSD */
 XkbRules,		base,
 XkbModel,		pc105,
 XkbLayout,	us,



CVS commit: src/crypto/external/bsd/heimdal/dist/lib/hdb

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 18:23:42 UTC 2011

Modified Files:
src/crypto/external/bsd/heimdal/dist/lib/hdb: hdb.c

Log Message:
Conditionalise the sqlite3 HDB backend.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/hdb/hdb.c

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

Modified files:

Index: src/crypto/external/bsd/heimdal/dist/lib/hdb/hdb.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/hdb/hdb.c:1.1.1.1 src/crypto/external/bsd/heimdal/dist/lib/hdb/hdb.c:1.2
--- src/crypto/external/bsd/heimdal/dist/lib/hdb/hdb.c:1.1.1.1	Wed Apr 13 18:14:42 2011
+++ src/crypto/external/bsd/heimdal/dist/lib/hdb/hdb.c	Wed Apr 13 18:23:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hdb.c,v 1.1.1.1 2011/04/13 18:14:42 elric Exp $	*/
+/*	$NetBSD: hdb.c,v 1.2 2011/04/13 18:23:42 elric Exp $	*/
 
 /*
  * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan
@@ -80,7 +80,9 @@
 { HDB_INTERFACE_VERSION, ldap:,	hdb_ldap_create},
 { HDB_INTERFACE_VERSION, ldapi:,	hdb_ldapi_create},
 #endif
+#ifdef SQLITE3
 { HDB_INTERFACE_VERSION, sqlite:, hdb_sqlite_create},
+#endif
 {0, NULL,	NULL}
 };
 



CVS commit: src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 18:30:04 UTC 2011

Modified Files:
src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5:
init_sec_context.c

Log Message:
_gss_DES3_get_mic_compat() requires that ctx-target has been defined, and,
well, it hasn't yet.  Move the call down to after it is defined and things
are better.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5/init_sec_context.c

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

Modified files:

Index: src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5/init_sec_context.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5/init_sec_context.c:1.1.1.1 src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5/init_sec_context.c:1.2
--- src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5/init_sec_context.c:1.1.1.1	Wed Apr 13 18:14:45 2011
+++ src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5/init_sec_context.c	Wed Apr 13 18:30:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sec_context.c,v 1.1.1.1 2011/04/13 18:14:45 elric Exp $	*/
+/*	$NetBSD: init_sec_context.c,v 1.2 2011/04/13 18:30:04 elric Exp $	*/
 
 /*
  * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan
@@ -424,10 +424,6 @@
 	goto failure;
 }
 
-ret = _gss_DES3_get_mic_compat(minor_status, ctx, context);
-if (ret)
-	goto failure;
-
 
 /*
  * This is hideous glue for (NFS) clients that wants to limit the
@@ -471,6 +467,10 @@
 
 ctx-lifetime = ctx-kcred-times.endtime;
 
+ret = _gss_DES3_get_mic_compat(minor_status, ctx, context);
+if (ret)
+	goto failure;
+
 ret = _gsskrb5_lifetime_left(minor_status,
  context,
  ctx-lifetime,



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

2011-04-13 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Wed Apr 13 18:32:21 UTC 2011

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

Log Message:
ExtClk for QNAP should be the same as for Synology's 266MHz systems.
This seems logical, as both boards are very similar, and the clock precision
is ok now.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sandpoint/stand/altboot/brdsetup.c

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

Modified files:

Index: src/sys/arch/sandpoint/stand/altboot/brdsetup.c
diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.13 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.14
--- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.13	Sat Apr  9 19:56:20 2011
+++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c	Wed Apr 13 18:32:21 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: brdsetup.c,v 1.13 2011/04/09 19:56:20 phx Exp $ */
+/* $NetBSD: brdsetup.c,v 1.14 2011/04/13 18:32:21 phx Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -83,15 +83,16 @@
 	synology,
 	Synology DS,
 	BRD_SYNOLOGY,
-	33164691,	/* from Synology/Linux source */
-	/* 33168000,		XXX better precision? */
+	33164691,	/* from Synology/Linux source*/
+			/* XXX should be 33165343 for the CS-406 */
 	eumb, 0x4500, 115200,
 	NULL, synobrdfix, NULL, synoreset },
 {
 	qnap,
 	QNAP TS,
 	BRD_QNAPTS,
-	0,
+	33164691,	/* Linux source says 3300, but the Synology  */
+			/* clock value delivers a much better precision. */
 	eumb, 0x4500, 115200,
 	NULL, qnapbrdfix, NULL, qnapreset },
 {



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

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 19:04:40 UTC 2011

Added Files:
src/crypto/external/bsd/heimdal: heimdal2netbsd

Log Message:
Script to convert a git clone of Heimdal into our dist format.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/heimdal2netbsd

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

Added files:

Index: src/crypto/external/bsd/heimdal/heimdal2netbsd
diff -u /dev/null src/crypto/external/bsd/heimdal/heimdal2netbsd:1.1
--- /dev/null	Wed Apr 13 19:04:40 2011
+++ src/crypto/external/bsd/heimdal/heimdal2netbsd	Wed Apr 13 19:04:40 2011
@@ -0,0 +1,258 @@
+#! /bin/sh
+#
+#	$NetBSD: heimdal2netbsd,v 1.1 2011/04/13 19:04:40 elric Exp $
+#
+# Copyright (c) 2011 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# heimdal2netbsd:  convert a heimdal source tree into a
+# netbsd amd source tree, under src/crypto/external/bsd/heimdal/dist
+# based on bind2netbsd by Bernd Ernesti and changes by Simon Burge
+#
+# Rough instructions for importing new heimdal release from their git
+# repository:
+#
+#	$ export SRCDIR=/usr/src
+#	$ export HEIMDAL_SRCDIR=src/crypto/external/bsd/heimdal
+#	$ cd /some/where/temporary
+#	$ git clone git://svn.h5l.org/heimdal.git
+#	$ sh $SRCDIR/$HEIMDAL_SRCDIR/heimdal2netbsd heimdal `pwd`
+#	$ cd $HEIMDAL_SRCDIR/dist
+#   $ cvs -d ... import $HEIMDAL_SRCDIR/dist HEIMDAL head-20110317
+#	$ cd /some/where/temporary/heimdal
+#	$ autoreconf -f -i
+#	$ ./configure
+#	$ make
+#	 merge newly generated config.h
+#	 with $HEIMDAL_SRCDIR/include/config.h
+#	 and check out diffs in generated headers
+#	 and C files.
+#	$ cd ..
+#	$ rm -r src heimdal
+#	$ cd $SRCDIR/$HEIMDAL_SRCDIR
+#	$ cvs commit -m Updated generated files for Heimdal head-20110317
+#
+#	- check makefiles to see if any extra sources have been added.
+#	- update distrib/sets if necessary.
+
+if [ $# -ne 2 ]; then echo heimdal2netbsd src dest; exit 1; fi
+
+r=$1
+d=$2/src/crypto/external/bsd/heimdal/dist
+
+case $d in
+	/*)
+		;;
+	*)
+		d=`/bin/pwd`/$d
+		;;
+esac
+
+case $r in
+	/*)
+		;;
+	*)
+		r=`/bin/pwd`/$r
+		;;
+esac
+
+echo preparing directory $d
+rm -rf $d
+mkdir -p $d
+
+### Copy the files and directories
+echo copying $r to $d
+cd $r
+pax -rw * $d
+
+### Remove unneeded files
+#echo removing unneeded directories and files
+#find $d/po -name '*[0-9] XXX:
+find $d -name '*.cat[0-9]' | xargs rm -f  echo removed catman pages
+find $d -name '*.info' | xargs rm -f	  echo removed info pages
+rm -rf $d/appl  echo removed appl
+rm -rf $d/lib/libedit			  echo removed lib/libedit
+rm -rf $d/lib/sqlite			  echo removed lib/sqlite
+rm -rf $d/doc/standardisation		  echo removed doc/standardisation
+
+# Fix man pages
+find $d -type f -name '*.[1358]' -print | while read f; do
+	sed \
+	-e 's,\.Os HEIMDAL,.Os,' \
+	-e 's,\.Pa krb5.h,.Pa krb5/krb5.h,' \
+	-e 's,\.In krb5.h,.In krb5/krb5.h,' \
+	-e 's,\.Pa gssapi.h,.Pa gssapi/gssapi.h,' \
+	-e 's,\.In gssapi.h,.In gssapi/gssapi.h,' \
+	-e 's,#include krb5.h,#include krb5/krb5.h,' \
+	 $f  /tmp/heimdal1f$$  mv /tmp/heimdal1f$$ $f  \
+	echo fixing man page $f
+done
+
+# Fix include usage
+
+KRB5_INCRE=asn1-common|asn1_err
+KRB5_INCRE=$KRB5_INCRE|base64
+KRB5_INCRE=$KRB5_INCRE|cms_asn1
+KRB5_INCRE=$KRB5_INCRE|com_err
+KRB5_INCRE=$KRB5_INCRE|com_right
+KRB5_INCRE=$KRB5_INCRE|crmf_asn1
+KRB5_INCRE=$KRB5_INCRE|der|der-protos
+KRB5_INCRE=$KRB5_INCRE|digest_asn1
+KRB5_INCRE=$KRB5_INCRE|getarg
+KRB5_INCRE=$KRB5_INCRE|hdb|hdb_err|hdb-protos|hdb_asn1
+KRB5_INCRE=$KRB5_INCRE|heim_asn1|heim_err

CVS commit: src/crypto/external/bsd/heimdal/include

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 19:15:27 UTC 2011

Added Files:
src/crypto/external/bsd/heimdal/include: heimntlm-protos.h

Log Message:
Autogenerated headers for heimdal head-20110412.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/heimdal/include/heimntlm-protos.h

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

Added files:

Index: src/crypto/external/bsd/heimdal/include/heimntlm-protos.h
diff -u /dev/null src/crypto/external/bsd/heimdal/include/heimntlm-protos.h:1.1
--- /dev/null	Wed Apr 13 19:15:27 2011
+++ src/crypto/external/bsd/heimdal/include/heimntlm-protos.h	Wed Apr 13 19:15:27 2011
@@ -0,0 +1,194 @@
+/* This is a generated file */
+#ifndef __heimntlm_protos_h__
+#define __heimntlm_protos_h__
+
+#include stdarg.h
+
+#ifdef __cplusplus
+extern C {
+#endif
+
+int
+heim_ntlm_build_ntlm1_master (
+	void */*key*/,
+	size_t /*len*/,
+	struct ntlm_buf */*session*/,
+	struct ntlm_buf */*master*/);
+
+int
+heim_ntlm_build_ntlm2_master (
+	void */*key*/,
+	size_t /*len*/,
+	struct ntlm_buf */*blob*/,
+	struct ntlm_buf */*session*/,
+	struct ntlm_buf */*master*/);
+
+int
+heim_ntlm_calculate_lm2 (
+	const void */*key*/,
+	size_t /*len*/,
+	const char */*username*/,
+	const char */*target*/,
+	const unsigned char serverchallenge[8],
+	unsigned char ntlmv2[16],
+	struct ntlm_buf */*answer*/);
+
+int
+heim_ntlm_calculate_ntlm1 (
+	void */*key*/,
+	size_t /*len*/,
+	unsigned char challenge[8],
+	struct ntlm_buf */*answer*/);
+
+int
+heim_ntlm_calculate_ntlm2 (
+	const void */*key*/,
+	size_t /*len*/,
+	const char */*username*/,
+	const char */*target*/,
+	const unsigned char serverchallenge[8],
+	const struct ntlm_buf */*infotarget*/,
+	unsigned char ntlmv2[16],
+	struct ntlm_buf */*answer*/);
+
+int
+heim_ntlm_calculate_ntlm2_sess (
+	const unsigned char clnt_nonce[8],
+	const unsigned char svr_chal[8],
+	const unsigned char ntlm_hash[16],
+	struct ntlm_buf */*lm*/,
+	struct ntlm_buf */*ntlm*/);
+
+int
+heim_ntlm_calculate_ntlm2_sess_hash (
+	const unsigned char clnt_nonce[8],
+	const unsigned char svr_chal[8],
+	unsigned char verifier[8]);
+
+int
+heim_ntlm_decode_targetinfo (
+	const struct ntlm_buf */*data*/,
+	int /*ucs2*/,
+	struct ntlm_targetinfo */*ti*/);
+
+int
+heim_ntlm_decode_type1 (
+	const struct ntlm_buf */*buf*/,
+	struct ntlm_type1 */*data*/);
+
+int
+heim_ntlm_decode_type2 (
+	const struct ntlm_buf */*buf*/,
+	struct ntlm_type2 */*type2*/);
+
+int
+heim_ntlm_decode_type3 (
+	const struct ntlm_buf */*buf*/,
+	int /*ucs2*/,
+	struct ntlm_type3 */*type3*/);
+
+void
+heim_ntlm_derive_ntlm2_sess (
+	const unsigned char sessionkey[16],
+	const unsigned char */*clnt_nonce*/,
+	size_t /*clnt_nonce_length*/,
+	const unsigned char svr_chal[8],
+	unsigned char derivedkey[16]);
+
+int
+heim_ntlm_encode_targetinfo (
+	const struct ntlm_targetinfo */*ti*/,
+	int /*ucs2*/,
+	struct ntlm_buf */*data*/);
+
+int
+heim_ntlm_encode_type1 (
+	const struct ntlm_type1 */*type1*/,
+	struct ntlm_buf */*data*/);
+
+int
+heim_ntlm_encode_type2 (
+	const struct ntlm_type2 */*type2*/,
+	struct ntlm_buf */*data*/);
+
+int
+heim_ntlm_encode_type3 (
+	const struct ntlm_type3 */*type3*/,
+	struct ntlm_buf */*data*/);
+
+void
+heim_ntlm_free_buf (struct ntlm_buf */*p*/);
+
+void
+heim_ntlm_free_targetinfo (struct ntlm_targetinfo */*ti*/);
+
+void
+heim_ntlm_free_type1 (struct ntlm_type1 */*data*/);
+
+void
+heim_ntlm_free_type2 (struct ntlm_type2 */*data*/);
+
+void
+heim_ntlm_free_type3 (struct ntlm_type3 */*data*/);
+
+int
+heim_ntlm_keyex_unwrap (
+	struct ntlm_buf */*baseKey*/,
+	struct ntlm_buf */*encryptedSession*/,
+	struct ntlm_buf */*session*/);
+
+int
+heim_ntlm_keyex_wrap (
+	struct ntlm_buf */*base_session*/,
+	struct ntlm_buf */*session*/,
+	struct ntlm_buf */*encryptedSession*/);
+
+int
+heim_ntlm_nt_key (
+	const char */*password*/,
+	struct ntlm_buf */*key*/);
+
+int
+heim_ntlm_ntlmv2_key (
+	const void */*key*/,
+	size_t /*len*/,
+	const char */*username*/,
+	const char */*target*/,
+	unsigned char ntlmv2[16]);
+
+size_t
+heim_ntlm_unparse_flags (
+	uint32_t /*flags*/,
+	char */*s*/,
+	size_t /*len*/);
+
+int
+heim_ntlm_v1_base_session (
+	void */*key*/,
+	size_t /*len*/,
+	struct ntlm_buf */*session*/);
+
+int
+heim_ntlm_v2_base_session (
+	void */*key*/,
+	size_t /*len*/,
+	struct ntlm_buf */*ntlmResponse*/,
+	struct ntlm_buf */*session*/);
+
+int
+heim_ntlm_verify_ntlm2 (
+	const void */*key*/,
+	size_t /*len*/,
+	const char */*username*/,
+	const char */*target*/,
+	time_t /*now*/,
+	const unsigned char serverchallenge[8],
+	const struct ntlm_buf */*answer*/,
+	struct ntlm_buf */*infotarget*/,
+	unsigned char ntlmv2[16]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __heimntlm_protos_h__ */



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Wed Apr 13 21:06:31 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_pcix.c

Log Message:
initialize mutex in attach


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/rmi/rmixl_pcix.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/mips/rmi/rmixl_pcix.c
diff -u src/sys/arch/mips/rmi/rmixl_pcix.c:1.3 src/sys/arch/mips/rmi/rmixl_pcix.c:1.4
--- src/sys/arch/mips/rmi/rmixl_pcix.c:1.3	Mon Apr  4 20:37:52 2011
+++ src/sys/arch/mips/rmi/rmixl_pcix.c	Wed Apr 13 21:06:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_pcix.c,v 1.3 2011/04/04 20:37:52 dyoung Exp $	*/
+/*	$NetBSD: rmixl_pcix.c,v 1.4 2011/04/13 21:06:30 cliff Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_pcix.c,v 1.3 2011/04/04 20:37:52 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_pcix.c,v 1.4 2011/04/13 21:06:30 cliff Exp $);
 
 #include opt_pci.h
 #include pci.h
@@ -316,6 +316,8 @@
 
 	aprint_normal(: RMI XLR PCI-X Interface\n);
 
+	mutex_init(sc-sc_mutex, MUTEX_DEFAULT, IPL_HIGH);
+
 	rmixl_pcix_intcfg(sc);
 
 	rmixl_pcix_errata(sc);



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Wed Apr 13 21:10:11 UTC 2011

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_pcix.c

Log Message:
initialize mutex in attach


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/arch/mips/rmi/rmixl_pcix.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/mips/rmi/rmixl_pcix.c
diff -u src/sys/arch/mips/rmi/rmixl_pcix.c:1.1.2.7 src/sys/arch/mips/rmi/rmixl_pcix.c:1.1.2.8
--- src/sys/arch/mips/rmi/rmixl_pcix.c:1.1.2.7	Mon Sep 20 19:42:31 2010
+++ src/sys/arch/mips/rmi/rmixl_pcix.c	Wed Apr 13 21:10:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_pcix.c,v 1.1.2.7 2010/09/20 19:42:31 cliff Exp $	*/
+/*	$NetBSD: rmixl_pcix.c,v 1.1.2.8 2011/04/13 21:10:11 cliff Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_pcix.c,v 1.1.2.7 2010/09/20 19:42:31 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_pcix.c,v 1.1.2.8 2011/04/13 21:10:11 cliff Exp $);
 
 #include opt_pci.h
 #include pci.h
@@ -316,6 +316,8 @@
 
 	aprint_normal(: RMI XLR PCI-X Interface\n);
 
+	mutex_init(sc-sc_mutex, MUTEX_DEFAULT, IPL_HIGH);
+
 	rmixl_pcix_intcfg(sc);
 
 	rmixl_pcix_errata(sc);



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

2011-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 13 22:16:52 UTC 2011

Modified Files:
src/crypto/external/bsd/heimdal: heimdal2netbsd

Log Message:
no more amd, factor out more stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/crypto/external/bsd/heimdal/heimdal2netbsd

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

Modified files:

Index: src/crypto/external/bsd/heimdal/heimdal2netbsd
diff -u src/crypto/external/bsd/heimdal/heimdal2netbsd:1.1 src/crypto/external/bsd/heimdal/heimdal2netbsd:1.2
--- src/crypto/external/bsd/heimdal/heimdal2netbsd:1.1	Wed Apr 13 15:04:40 2011
+++ src/crypto/external/bsd/heimdal/heimdal2netbsd	Wed Apr 13 18:16:52 2011
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: heimdal2netbsd,v 1.1 2011/04/13 19:04:40 elric Exp $
+#	$NetBSD: heimdal2netbsd,v 1.2 2011/04/13 22:16:52 christos Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -27,7 +27,7 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 # heimdal2netbsd:  convert a heimdal source tree into a
-# netbsd amd source tree, under src/crypto/external/bsd/heimdal/dist
+# netbsd heimdal source tree, under src/crypto/external/bsd/heimdal/dist
 # based on bind2netbsd by Bernd Ernesti and changes by Simon Burge
 #
 # Rough instructions for importing new heimdal release from their git
@@ -56,16 +56,18 @@
 #	- check makefiles to see if any extra sources have been added.
 #	- update distrib/sets if necessary.
 
-if [ $# -ne 2 ]; then echo heimdal2netbsd src dest; exit 1; fi
-
+prog=$(basename $0)
 r=$1
 d=$2/src/crypto/external/bsd/heimdal/dist
 
+if [ $# -ne 2 ]; then echo ${prog} src dest; exit 1; fi
+
+
 case $d in
 	/*)
 		;;
 	*)
-		d=`/bin/pwd`/$d
+		d=$(pwd)/$d
 		;;
 esac
 
@@ -73,7 +75,7 @@
 	/*)
 		;;
 	*)
-		r=`/bin/pwd`/$r
+		r=$(pwd)/$r
 		;;
 esac
 
@@ -211,26 +213,26 @@
 ### Add our NetBSD RCS Id
 find $d -type f -name '*.[chly]' -print | while read c; do
 	sed 1q  $c | grep -q '\$NetBSD' || (
-echo /*	\$NetBSD\$	*/ /tmp/amd3n$$
-echo  /tmp/amd3n$$
-cat $c   /tmp/amd3n$$
-mv /tmp/amd3n$$ $c  echo added NetBSD RCS tag to $c
+echo /*	\$NetBSD\$	*/ /tmp/${prog}3n$$
+echo  /tmp/${prog}3n$$
+cat $c   /tmp/${prog}3n$$
+mv /tmp/${prog}3n$$ $c  echo added NetBSD RCS tag to $c
 	)
 done
 
 find $d -type f -name '*.[0-9]' -print | while read m; do
 	sed 1q  $m | grep -q '\$NetBSD' || (
-echo .\\\	\$NetBSD\$ /tmp/amd2m$$
-echo .\\\ /tmp/amd2m$$
-cat $m  /tmp/amd2m$$
-mv /tmp/amd2m$$ $m  echo added NetBSD RCS tag to $m
+echo .\\\	\$NetBSD\$ /tmp/${prog}2m$$
+echo .\\\ /tmp/${prog}2m$$
+cat $m  /tmp/${prog}2m$$
+mv /tmp/${prog}2m$$ $m  echo added NetBSD RCS tag to $m
 	)
 done
 
 find $d -type f -name '*.texi' -print | while read t; do
 sed 2 s/^/@c \$NetBSD\$\\
-/  $t  /tmp/amd4t$$
-	mv /tmp/amd4t$$ $t  echo added NetBSD RCS tag to $t
+/  $t  /tmp/${prog}4t$$
+	mv /tmp/${prog}4t$$ $t  echo added NetBSD RCS tag to $t
 done
 
 echo done



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

2011-04-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Apr 13 23:31:25 UTC 2011

Modified Files:
src/sys/arch/sparc/dev: cgfourteen.c

Log Message:
use the same function whenever we change colour depth
also, when opening the fb device switch to 32bit and back to 8 on close, not
the other way around


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/sparc/dev/cgfourteen.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/sparc/dev/cgfourteen.c
diff -u src/sys/arch/sparc/dev/cgfourteen.c:1.65 src/sys/arch/sparc/dev/cgfourteen.c:1.66
--- src/sys/arch/sparc/dev/cgfourteen.c:1.65	Tue Aug 31 21:14:57 2010
+++ src/sys/arch/sparc/dev/cgfourteen.c	Wed Apr 13 23:31:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgfourteen.c,v 1.65 2010/08/31 21:14:57 macallan Exp $ */
+/*	$NetBSD: cgfourteen.c,v 1.66 2011/04/13 23:31:25 macallan Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -477,20 +477,10 @@
 	case CG14_SET_PIXELMODE: {
 		int depth = *(int *)data;
 
-		switch (depth) {
-		case 8:
-			bus_space_write_1(sc-sc_bustag, sc-sc_regh,
-			CG14_MCTL, CG14_MCTL_ENABLEVID | 
-			CG14_MCTL_PIXMODE_8 | CG14_MCTL_POWERCTL);
-			break;
-		case 32:
-			bus_space_write_1(sc-sc_bustag, sc-sc_regh,
-			CG14_MCTL, CG14_MCTL_ENABLEVID | 
-			CG14_MCTL_PIXMODE_32 | CG14_MCTL_POWERCTL);
-			break;
-		default:
+		if (sc-sc_mode == WSDISPLAYIO_MODE_EMUL)
 			return EINVAL;
-		}
+
+		cg14_set_depth(sc, depth);
 		}
 		break;
 	default:
@@ -586,6 +576,7 @@
 static void
 cg14_init(struct cgfourteen_softc *sc)
 {
+#if 0
 	volatile uint32_t *clut;
 	volatile uint8_t  *xlut;
 	int i;
@@ -613,12 +604,16 @@
 	 */
 	sc-sc_ctl-ctl_mctl = CG14_MCTL_ENABLEVID | CG14_MCTL_PIXMODE_8 |
 		CG14_MCTL_POWERCTL;
+#else
+	cg14_set_depth(sc, 32);
+#endif
 }
 
 static void
 /* Restore the state saved on cg14_init */
 cg14_reset(struct cgfourteen_softc *sc)
 {
+#if 0
 	volatile uint32_t *clut;
 	volatile uint8_t  *xlut;
 	int i;
@@ -646,6 +641,9 @@
 		clut[i] = sc-sc_saveclut.cm_chip[i];
 		xlut[i] = sc-sc_savexlut[i];
 	}
+#else
+	cg14_set_depth(sc, 8);
+#endif
 }
 
 /* Enable/disable video display; power down monitor if DPMS-capable */
@@ -932,10 +930,12 @@
 		bus_space_write_1(sc-sc_bustag,
 		sc-sc_regh,
 		CG14_CURSOR_CONTROL, 0);
+
 		cg14_set_depth(sc, 8);
 		cg14_init_cmap(sc);
 		vcons_redraw_screen(ms);
 	} else {
+
 		cg14_set_depth(sc, 32);
 	}
 }
@@ -1038,6 +1038,7 @@
 
 	if (sc-sc_depth == depth)
 		return;
+
 	switch (depth) {
 		case 8:
 			bus_space_write_1(sc-sc_bustag, sc-sc_regh,



CVS commit: src/sys/kern

2011-04-13 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Thu Apr 14 00:32:23 UTC 2011

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

Log Message:
Minor comment fix.  Use fd_close() in sys__ksem_destroy(), it is cleaner.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/uipc_sem.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/uipc_sem.c
diff -u src/sys/kern/uipc_sem.c:1.31 src/sys/kern/uipc_sem.c:1.32
--- src/sys/kern/uipc_sem.c:1.31	Tue Apr 12 20:37:25 2011
+++ src/sys/kern/uipc_sem.c	Thu Apr 14 00:32:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_sem.c,v 1.31 2011/04/12 20:37:25 rmind Exp $	*/
+/*	$NetBSD: uipc_sem.c,v 1.32 2011/04/14 00:32:23 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_sem.c,v 1.31 2011/04/12 20:37:25 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_sem.c,v 1.32 2011/04/14 00:32:23 rmind Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -460,7 +460,7 @@
 		}
 
 		/*
-		 * Finally, insert semaphore into the hash.
+		 * Finally, insert semaphore into the list.
 		 * Note: it already has the initial reference.
 		 */
 		ks = ksnew;
@@ -676,7 +676,6 @@
 		intptr_t id;
 	} */
 	int fd = (int)SCARG(uap, id), error;
-	struct sys_close_args cuap;
 	ksem_t *ks;
 
 	error = ksem_get(fd, ks);
@@ -697,10 +696,9 @@
 	}
 out:
 	mutex_exit(ks-ks_lock);
-	fd_putfile(fd);
 	if (error) {
+		fd_putfile(fd);
 		return error;
 	}
-	SCARG(cuap, fd) = fd;
-	return sys_close(l, (const void *)cuap, retval);
+	return fd_close(fd);
 }



CVS commit: src/usr.bin/fstat

2011-04-13 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Thu Apr 14 00:35:35 UTC 2011

Modified Files:
src/usr.bin/fstat: fstat.c

Log Message:
Add DTYPE_SEM.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/usr.bin/fstat/fstat.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/fstat/fstat.c
diff -u src/usr.bin/fstat/fstat.c:1.89 src/usr.bin/fstat/fstat.c:1.90
--- src/usr.bin/fstat/fstat.c:1.89	Sun May 24 21:41:44 2009
+++ src/usr.bin/fstat/fstat.c	Thu Apr 14 00:35:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstat.c,v 1.89 2009/05/24 21:41:44 ad Exp $	*/
+/*	$NetBSD: fstat.c,v 1.90 2011/04/14 00:35:35 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)fstat.c	8.3 (Berkeley) 5/2/95;
 #else
-__RCSID($NetBSD: fstat.c,v 1.89 2009/05/24 21:41:44 ad Exp $);
+__RCSID($NetBSD: fstat.c,v 1.90 2011/04/14 00:35:35 rmind Exp $);
 #endif
 #endif /* not lint */
 
@@ -407,6 +407,7 @@
 	case DTYPE_KQUEUE:
 	case DTYPE_CRYPTO:
 	case DTYPE_MQUEUE:
+	case DTYPE_SEM:
 		if (checkfile == 0)
 			misctrans(file);
 		break;



CVS commit: src/sys/compat/linux/common

2011-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 14 00:59:06 UTC 2011

Modified Files:
src/sys/compat/linux/common: linux_file.c linux_pipe.c

Log Message:
move dup3 to a more appropriate place because pipe is special. Gotta love
linux.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/compat/linux/common/linux_file.c
cvs rdiff -u -r1.64 -r1.65 src/sys/compat/linux/common/linux_pipe.c

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

Modified files:

Index: src/sys/compat/linux/common/linux_file.c
diff -u src/sys/compat/linux/common/linux_file.c:1.102 src/sys/compat/linux/common/linux_file.c:1.103
--- src/sys/compat/linux/common/linux_file.c:1.102	Sun Apr 10 11:49:56 2011
+++ src/sys/compat/linux/common/linux_file.c	Wed Apr 13 20:59:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file.c,v 1.102 2011/04/10 15:49:56 christos Exp $	*/
+/*	$NetBSD: linux_file.c,v 1.103 2011/04/14 00:59:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,13 +35,14 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.102 2011/04/10 15:49:56 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_file.c,v 1.103 2011/04/14 00:59:06 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/namei.h
 #include sys/proc.h
 #include sys/file.h
+#include sys/fcntl.h
 #include sys/stat.h
 #include sys/filedesc.h
 #include sys/ioctl.h
@@ -621,6 +622,25 @@
 	return sys_pwrite(l, pra, retval);
 }
 
+int
+linux_sys_dup3(struct lwp *l, const struct linux_sys_dup3_args *uap,
+register_t *retval)
+{
+	/* {
+		syscallarg(int) from;
+		syscallarg(int) to;
+		syscallarg(int) flags;
+	} */
+	int error;
+	if ((error = sys_dup2(l, (const struct sys_dup2_args *)uap, retval)))
+		return error;
+
+	if (SCARG(uap, flags)  LINUX_O_CLOEXEC)
+		fd_set_exclose(l, SCARG(uap, to), true);
+
+	return 0;
+}
+
 #define LINUX_NOT_SUPPORTED(fun) \
 int \
 fun(struct lwp *l, const struct fun##_args *uap, register_t *retval) \

Index: src/sys/compat/linux/common/linux_pipe.c
diff -u src/sys/compat/linux/common/linux_pipe.c:1.64 src/sys/compat/linux/common/linux_pipe.c:1.65
--- src/sys/compat/linux/common/linux_pipe.c:1.64	Sun Apr 10 11:50:34 2011
+++ src/sys/compat/linux/common/linux_pipe.c	Wed Apr 13 20:59:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_pipe.c,v 1.64 2011/04/10 15:50:34 christos Exp $	*/
+/*	$NetBSD: linux_pipe.c,v 1.65 2011/04/14 00:59:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_pipe.c,v 1.64 2011/04/10 15:50:34 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_pipe.c,v 1.65 2011/04/14 00:59:06 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -130,22 +130,3 @@
 	return linux_pipe_return(l, SCARG(uap, pfds), retval,
 	SCARG(uap, flags));
 }
-
-int
-linux_sys_dup3(struct lwp *l, const struct linux_sys_dup3_args *uap,
-register_t *retval)
-{
-	/* {
-		syscallarg(int) from;
-		syscallarg(int) to;
-		syscallarg(int) flags;
-	} */
-	int error;
-	if ((error = sys_dup2(l, (const struct sys_dup2_args *)uap, retval)))
-		return error;
-
-	if (SCARG(uap, flags)  LINUX_O_CLOEXEC)
-		fd_set_exclose(l, SCARG(uap, to), true);
-
-	return 0;
-}



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:05:35 UTC 2011

Modified Files:
src/sys/arch/evbmips/conf: XLSATX

Log Message:
- remove options LOCKDEBUG; is set in XLSATX64.MP
- option MIPS_DDB_WATCH is deprecated, removed


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/conf/XLSATX

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/evbmips/conf/XLSATX
diff -u src/sys/arch/evbmips/conf/XLSATX:1.3 src/sys/arch/evbmips/conf/XLSATX:1.4
--- src/sys/arch/evbmips/conf/XLSATX:1.3	Fri Mar 18 02:14:55 2011
+++ src/sys/arch/evbmips/conf/XLSATX	Thu Apr 14 05:05:35 2011
@@ -1,8 +1,8 @@
-#	$NetBSD: XLSATX,v 1.3 2011/03/18 02:14:55 cliff Exp $
+#	$NetBSD: XLSATX,v 1.4 2011/04/14 05:05:35 cliff Exp $
 
 include 	arch/evbmips/conf/std.rmixl
 
-#ident 		XLSATX-$Revision: 1.3 $
+#ident 		XLSATX-$Revision: 1.4 $
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
@@ -39,13 +39,11 @@
 options 	USERCONF	# userconf(4) support
 #options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 options 	DDB		# kernel dynamic debugger
-options 	MIPS_DDB_WATCH	# enable T_WATCH (see IEU_DEFAUTURE[DBE])
 options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 makeoptions 	DEBUG=-g	# compile full symbol table
 options 	SYMTAB_SPACE=50	# size for embedded symbol table
 #options 	DDB_COMMANDONENTER=trace;show registers
 options 	DB_MAX_LINE=-1
-options 	LOCKDEBUG
 
 # Compatibility options
 #options 	COMPAT_43	# compatibility with 4.3BSD binaries



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:06:10 UTC 2011

Modified Files:
src/sys/arch/evbmips/conf: XLSATX32

Log Message:
- 32 bit kernel must MEMLIMIT to 512MB


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/conf/XLSATX32

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/evbmips/conf/XLSATX32
diff -u src/sys/arch/evbmips/conf/XLSATX32:1.2 src/sys/arch/evbmips/conf/XLSATX32:1.3
--- src/sys/arch/evbmips/conf/XLSATX32:1.2	Sun Feb 20 07:48:33 2011
+++ src/sys/arch/evbmips/conf/XLSATX32	Thu Apr 14 05:06:10 2011
@@ -1,8 +1,10 @@
-# $NetBSD: XLSATX32,v 1.2 2011/02/20 07:48:33 matt Exp $
+# $NetBSD: XLSATX32,v 1.3 2011/04/14 05:06:10 cliff Exp $
 #
 
+#ident 		XLSATX32-$Revision: 1.3 $
+
 include arch/evbmips/conf/XLSATX
 
-#ident 		XLSATX32-$Revision: 1.2 $
+options 	MEMLIMIT=0x2000 # 512MB 
 
 makeoptions	LP64=no



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:06:39 UTC 2011

Modified Files:
src/sys/arch/evbmips/conf: XLSATX64.MP

Log Message:
- remove cpucore and cpu reconfiguration stuff
cares and threads can be specified here,
but it's easier to do at boot time from firmmware
e.g. using 'userapp_mask_cpus mask' command


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/conf/XLSATX64.MP

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/evbmips/conf/XLSATX64.MP
diff -u src/sys/arch/evbmips/conf/XLSATX64.MP:1.2 src/sys/arch/evbmips/conf/XLSATX64.MP:1.3
--- src/sys/arch/evbmips/conf/XLSATX64.MP:1.2	Sun Feb 20 07:48:34 2011
+++ src/sys/arch/evbmips/conf/XLSATX64.MP	Thu Apr 14 05:06:39 2011
@@ -1,4 +1,4 @@
-# $NetBSD: XLSATX64.MP,v 1.2 2011/02/20 07:48:34 matt Exp $
+# $NetBSD: XLSATX64.MP,v 1.3 2011/04/14 05:06:39 cliff Exp $
 #
 include arch/evbmips/conf/XLSATX64
 
@@ -7,13 +7,3 @@
 
 pseudo-device	lockstat
 
-no cpucore*
-no cpu*
-cpucore0 at cpunode0 core 0
-cpu0 at cpucore0 thread 0
-cpucore1 at cpunode0 core 1
-cpu4 at cpucore1 thread 0
-#cpucore2 at cpunode0 core 2
-#cpu8 at cpucore2 thread 0
-#cpucore3 at cpunode0 core 3
-#cpu12 at cpucore3 thread 0



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:07:00 UTC 2011

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

Log Message:
- option MIPS_DDB_WATCH is deprecated, removed


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/mips/conf/files.mips

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/mips/conf/files.mips
diff -u src/sys/arch/mips/conf/files.mips:1.67 src/sys/arch/mips/conf/files.mips:1.68
--- src/sys/arch/mips/conf/files.mips:1.67	Wed Apr  6 05:47:54 2011
+++ src/sys/arch/mips/conf/files.mips	Thu Apr 14 05:07:00 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.mips,v 1.67 2011/04/06 05:47:54 matt Exp $
+#	$NetBSD: files.mips,v 1.68 2011/04/14 05:07:00 cliff Exp $
 #
 
 defflag	opt_cputype.h		NOFPU FPEMUL
@@ -19,7 +19,6 @@
 defflag opt_mips3_wired.h		ENABLE_MIPS3_WIRED_MAP
 
 defflag	opt_ddb.h		DDB_TRACE
-defflag	opt_ddb.h		MIPS_DDB_WATCH
 
 file	arch/mips/mips/locore_mips1.S		mips1
 file	arch/mips/mips/locore_mips3.S		mips3|mips4|mips32|mips32r2|mips64|mips64r2



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:07:31 UTC 2011

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

Log Message:
- MIPS CPU (COP0) watchpoint support moved from db_machdep.h to cpu.h
- CPU watchpoints are per-cpu; add ci_cpuwatch_count, ci_watchpoint_tab[]
to struct cpuinfo


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/mips/include/cpu.h

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

Modified files:

Index: src/sys/arch/mips/include/cpu.h
diff -u src/sys/arch/mips/include/cpu.h:1.100 src/sys/arch/mips/include/cpu.h:1.101
--- src/sys/arch/mips/include/cpu.h:1.100	Wed Apr  6 05:42:21 2011
+++ src/sys/arch/mips/include/cpu.h	Thu Apr 14 05:07:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.100 2011/04/06 05:42:21 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.101 2011/04/14 05:07:30 cliff Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -56,6 +56,30 @@
 #include sys/device_if.h
 #include sys/evcnt.h
 
+typedef struct cpu_watchpoint {
+	register_t	cw_addr;
+	register_t	cw_mask;
+	uint32_t	cw_asid;
+	uint32_t	cw_mode;
+} cpu_watchpoint_t;
+/* (abstract) mode bits */
+#define CPUWATCH_WRITE	__BIT(0)
+#define CPUWATCH_READ	__BIT(1)
+#define CPUWATCH_EXEC	__BIT(2)
+#define CPUWATCH_MASK	__BIT(3)
+#define CPUWATCH_ASID	__BIT(4)
+#define CPUWATCH_RWX	(CPUWATCH_EXEC|CPUWATCH_READ|CPUWATCH_WRITE)
+
+#define CPUWATCH_MAX	8	/* max possible number of watchpoints */
+
+u_int		  cpuwatch_discover(void);
+void		  cpuwatch_free(cpu_watchpoint_t *);
+cpu_watchpoint_t *cpuwatch_alloc(void);
+void		  cpuwatch_set_all(void);
+void		  cpuwatch_clr_all(void);
+void		  cpuwatch_set(cpu_watchpoint_t *);
+void		  cpuwatch_clr(cpu_watchpoint_t *);
+
 struct cpu_info {
 	struct cpu_data ci_data;	/* MI per-cpu data */
 	struct cpu_info *ci_next;	/* Next CPU in list */
@@ -96,6 +120,8 @@
 	vaddr_t ci_pmap_dstbase;	/* starting VA of ephemeral dst space */
 #endif
 
+	u_int ci_cpuwatch_count;	/* number of watchpoints on this CPU */
+	cpu_watchpoint_t ci_cpuwatch_tab[CPUWATCH_MAX];
 
 #ifdef MULTIPROCESSOR
 	volatile u_long ci_flags;



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:07:56 UTC 2011

Modified Files:
src/sys/arch/mips/include: db_machdep.h

Log Message:
- remove include mips/proc.h, unused
- db_mach_watch_set_all() is deprecated, removed,
superceded by cpuwatch_set_all()


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/mips/include/db_machdep.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/mips/include/db_machdep.h
diff -u src/sys/arch/mips/include/db_machdep.h:1.25 src/sys/arch/mips/include/db_machdep.h:1.26
--- src/sys/arch/mips/include/db_machdep.h:1.25	Wed Apr  6 05:53:27 2011
+++ src/sys/arch/mips/include/db_machdep.h	Thu Apr 14 05:07:56 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.25 2011/04/06 05:53:27 matt Exp $ */
+/* $NetBSD: db_machdep.h,v 1.26 2011/04/14 05:07:56 cliff Exp $ */
 
 /*
  * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@@ -38,7 +38,6 @@
 #include mips/trap.h			/* T_BREAK */
 #include mips/reg.h			/* register state */
 #include mips/regnum.h		/* symbolic register indices */
-#include mips/proc.h
 #include mips/pcb.h
 
 
@@ -117,9 +116,6 @@
 bool ddb_running_on_this_cpu_p(void);
 bool ddb_running_on_any_cpu_p(void);
 void db_resume_others(void);
-#ifdef MIPS_DDB_WATCH
-void db_mach_watch_set_all(void);
-#endif
 
 /*
  * We have machine-dependent commands.



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:08:22 UTC 2011

Modified Files:
src/sys/arch/mips/include: locore.h

Log Message:
- add lsw_cpu_run function pointer to struct locoresw


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/mips/include/locore.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/mips/include/locore.h
diff -u src/sys/arch/mips/include/locore.h:1.87 src/sys/arch/mips/include/locore.h:1.88
--- src/sys/arch/mips/include/locore.h:1.87	Tue Apr 12 22:54:31 2011
+++ src/sys/arch/mips/include/locore.h	Thu Apr 14 05:08:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.h,v 1.87 2011/04/12 22:54:31 matt Exp $ */
+/* $NetBSD: locore.h,v 1.88 2011/04/14 05:08:22 cliff Exp $ */
 
 /*
  * This file should not be included by MI code!!!
@@ -362,6 +362,7 @@
 	int		(*lsw_send_ipi)(struct cpu_info *, int);
 	void		(*lsw_cpu_offline_md)(void);
 	void		(*lsw_cpu_init)(struct cpu_info *);
+	void		(*lsw_cpu_run)(struct cpu_info *);
 	int		(*lsw_bus_error)(unsigned int);
 };
 



CVS commit: src/sys/arch/mips/mips

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:08:51 UTC 2011

Modified Files:
src/sys/arch/mips/mips: cpu_subr.c

Log Message:
- MIPS CPU (COP0) watchpoint support moved from db_interface.c to cpu_subr.c
see the cpuwatch_* functions
- ci_cpuwatch_count in allocated cpu_info is inherited from cpu_info_store
- cpu_hatch() calls lsw_cpu_run (if not NULL)
to optionally allow running MIPS chip-specific code
after subordinate cpus have been set running
- #ifdef DDB cpu_debug_dump() to allow compile when DDB not defined


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/mips/cpu_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/arch/mips/mips/cpu_subr.c
diff -u src/sys/arch/mips/mips/cpu_subr.c:1.6 src/sys/arch/mips/mips/cpu_subr.c:1.7
--- src/sys/arch/mips/mips/cpu_subr.c:1.6	Wed Apr  6 05:53:27 2011
+++ src/sys/arch/mips/mips/cpu_subr.c	Thu Apr 14 05:08:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.6 2011/04/06 05:53:27 matt Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.7 2011/04/14 05:08:51 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.6 2011/04/06 05:53:27 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.7 2011/04/14 05:08:51 cliff Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -101,7 +101,6 @@
 static int  cpu_ipi_wait(volatile __cpuset_t *, u_long);
 static void cpu_ipi_error(const char *, __cpuset_t, __cpuset_t);
 
-
 static struct cpu_info *cpu_info_last = cpu_info_store;
 
 struct cpu_info *
@@ -151,6 +150,7 @@
 ci-ci_cycles_per_hz = cpu_info_store.ci_cycles_per_hz;
 ci-ci_divisor_delay = cpu_info_store.ci_divisor_delay;
 ci-ci_divisor_recip = cpu_info_store.ci_divisor_recip;
+ci-ci_cpuwatch_count = cpu_info_store.ci_cpuwatch_count;
 
 	/*
 	 * Attach its TLB info (which must be direct-mapped)
@@ -785,9 +785,6 @@
 #endif
 		break;
 	}
-#if defined(DDB)  defined(MIPS_DDB_WATCH)
-	db_mach_watch_set_all();
-#endif
 
 	splx(s);
 }
@@ -848,6 +845,7 @@
 	return CPUSET_HAS_P(cpus_paused, index);
 }
 
+#ifdef DDB
 void
 cpu_debug_dump(void)
 {
@@ -871,6 +869,7 @@
 			ci-ci_active_ipis, ci-ci_request_ipis);
 	}
 }
+#endif
 
 void
 cpu_hatch(struct cpu_info *ci)
@@ -934,6 +933,13 @@
 	ci-ci_data.cpu_cc_skew = 0;
 
 	/*
+	 * Let this CPU do its own post-running initialization
+	 * (for things that have to be done on the local CPU).
+	 */
+	if (mips_locoresw.lsw_cpu_run != NULL)
+		(*mips_locoresw.lsw_cpu_run)(ci);
+
+	/*
 	 * Now turn on interrupts.
 	 */
 	spl0();
@@ -1007,3 +1013,136 @@
 #endif
 	return 0;
 }
+
+
+#if (CPUWATCH_MAX != 8)
+# error CPUWATCH_MAX
+#endif
+
+/*
+ * cpuwatch_discover - determine how many COP0 watchpoints this CPU supports
+ */
+u_int
+cpuwatch_discover(void)
+{
+	int i;
+
+	for (i=0; i  CPUWATCH_MAX; i++) {
+		uint32_t watchhi = mipsNN_cp0_watchhi_read(i);
+		if ((watchhi  __BIT(31)) == 0)	/* test 'M' bit */
+			break;
+	}
+	return i + 1;
+}
+
+void
+cpuwatch_free(cpu_watchpoint_t *cwp)
+{
+#ifdef DIAGNOSTIC
+	struct cpu_info * const ci = curcpu();
+	KASSERT(cwp = ci-ci_cpuwatch_tab[0] 
+		cwp = ci-ci_cpuwatch_tab[ci-ci_cpuwatch_count-1]);
+#endif
+	cwp-cw_mode = 0;
+	cwp-cw_asid = 0;
+	cwp-cw_addr = 0;
+	cpuwatch_clr(cwp);
+}
+
+/*
+ * cpuwatch_alloc
+ * 	find an empty slot
+ *	no locking for the table since it is CPU private
+ */
+cpu_watchpoint_t *
+cpuwatch_alloc(void)
+{
+	struct cpu_info * const ci = curcpu();
+	cpu_watchpoint_t *cwp;
+
+	for (int i=0; i  ci-ci_cpuwatch_count; i++) {
+		cwp = ci-ci_cpuwatch_tab[i];
+		if ((cwp-cw_mode  CPUWATCH_RWX) == 0)
+			return cwp;
+	}
+	return NULL;
+}
+
+
+void
+cpuwatch_set_all(void)
+{
+	struct cpu_info * const ci = curcpu();
+	cpu_watchpoint_t *cwp;
+	int i;
+
+	for (i=0; i  ci-ci_cpuwatch_count; i++) {
+		cwp = ci-ci_cpuwatch_tab[i];
+		if ((cwp-cw_mode  CPUWATCH_RWX) != 0)
+			cpuwatch_set(cwp);
+	}
+}
+
+void
+cpuwatch_clr_all(void)
+{
+	struct cpu_info * const ci = curcpu();
+	cpu_watchpoint_t *cwp;
+	int i;
+
+	for (i=0; i  ci-ci_cpuwatch_count; i++) {
+		cwp = ci-ci_cpuwatch_tab[i];
+		if ((cwp-cw_mode  CPUWATCH_RWX) != 0)
+			cpuwatch_clr(cwp);
+	}
+}
+
+/*
+ * cpuwatch_set - establish a MIPS COP0 watchpoint
+ */
+void
+cpuwatch_set(cpu_watchpoint_t *cwp)
+{
+	struct cpu_info * const ci = curcpu();
+	uint32_t watchhi;
+	register_t watchlo;
+	int cwnum = cwp - ci-ci_cpuwatch_tab[0];
+
+	KASSERT(cwp = ci-ci_cpuwatch_tab[0] 
+		cwp = ci-ci_cpuwatch_tab[ci-ci_cpuwatch_count-1]);
+
+	watchlo = cwp-cw_addr;
+	if (cwp-cw_mode  CPUWATCH_WRITE)
+		watchlo |= __BIT(0);
+	if (cwp-cw_mode  CPUWATCH_READ)
+		watchlo |= __BIT(1);
+	if (cwp-cw_mode  CPUWATCH_EXEC)
+		watchlo |= __BIT(2);
+
+	if (cwp-cw_mode  CPUWATCH_ASID)
+		watchhi = cwp-cw_asid  16;	/* addr qualified by asid */
+	else
+		watchhi = __BIT(30);		

CVS commit: src/sys/arch/mips/mips

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:09:34 UTC 2011

Modified Files:
src/sys/arch/mips/mips: db_interface.c

Log Message:
- option MIPS_DDB_WATCH is dedprecated, removed; now using
(MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2)  0 for conditional
compile of db_mach_watch stuff
- MIPS CPU (COP0) watchpoint support moved from db_interface.c
to cpu_subr.c, cpu.h; ddb_mach_watch etc now use those cpu functions.
- ddb_cpu now volatile
- 'struct db_mach_watch' definition etc moved to mips/include/db_machdep.h
- db_mach_watch_tab is replaced by curcpu()-ci_watch_tab
to allow per-cpu watchpoint control
- improve MP function in kdb_trap()
- fix conditions for printing cp0 regs


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/mips/mips/db_interface.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/mips/mips/db_interface.c
diff -u src/sys/arch/mips/mips/db_interface.c:1.70 src/sys/arch/mips/mips/db_interface.c:1.71
--- src/sys/arch/mips/mips/db_interface.c:1.70	Wed Apr  6 05:53:27 2011
+++ src/sys/arch/mips/mips/db_interface.c	Thu Apr 14 05:09:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.70 2011/04/06 05:53:27 matt Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.71 2011/04/14 05:09:34 cliff Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_interface.c,v 1.70 2011/04/06 05:53:27 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_interface.c,v 1.71 2011/04/14 05:09:34 cliff Exp $);
 
 #include opt_multiprocessor.h
 #include opt_cputype.h	/* which mips CPUs do we support? */
@@ -67,34 +67,15 @@
 #endif
 
 #define NOCPU   ~0
-u_int ddb_cpu = NOCPU;
+volatile u_int ddb_cpu = NOCPU;
 
 int		db_active = 0;
 db_regs_t	ddb_regs;
 
-#ifdef MIPS_DDB_WATCH
-struct db_mach_watch {
-	register_t	addr;
-	register_t	mask;
-	uint32_t	asid;
-	uint32_t	mode;
-};
-/* mode bits */
-#define DB_WATCH_WRITE	__BIT(0)
-#define DB_WATCH_READ	__BIT(1)
-#define DB_WATCH_EXEC	__BIT(2)
-#define DB_WATCH_MASK	__BIT(3)
-#define DB_WATCH_ASID	__BIT(4)
-#define DB_WATCH_RWX	(DB_WATCH_EXEC|DB_WATCH_READ|DB_WATCH_WRITE)
-
-#define DBNWATCH	1
-static volatile struct db_mach_watch db_mach_watch_tab[DBNWATCH];
-
-static void db_mach_watch_set(int, register_t, register_t, uint32_t, uint32_t,
-	bool);
+#if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2)  0
 static void db_watch_cmd(db_expr_t, bool, db_expr_t, const char *);
 static void db_unwatch_cmd(db_expr_t, bool, db_expr_t, const char *);
-#endif	/* MIPS_DDB_WATCH */
+#endif	/* (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2)  0 */
 
 #ifdef MULTIPROCESSOR
 static void db_mach_cpu(db_expr_t, bool, db_expr_t, const char *);
@@ -146,6 +127,8 @@
 		break;
 	}
 
+	s = splhigh();
+
 #ifdef MULTIPROCESSOR
 	bool first_in_ddb = false;
 	const u_int cpu_me = cpu_number();
@@ -155,26 +138,25 @@
 		cpu_pause_others();
 	} else {
 		if (old_ddb_cpu != cpu_me) {
+			KASSERT(cpu_is_paused(cpu_me));
 			cpu_pause(regs);
+			splx(s);
 			return 1;
 		}
 	}
+	KASSERT(! cpu_is_paused(cpu_me));
 #endif
 
-	/* Should switch to kdb`s own stack here. */
 	ddb_regs = *regs;
-
-	s = splhigh();
 	db_active++;
 	cnpollc(1);
 	db_trap(type  ~T_USER, 0 /*code*/);
 	cnpollc(0);
 	db_active--;
-	splx(s);
+	*regs = ddb_regs;
 
 #ifdef MULTIPROCESSOR
-	if (ddb_cpu == cpu_me) {
-		ddb_cpu = NOCPU;
+	if (atomic_cas_uint(ddb_cpu, cpu_me, NOCPU) == cpu_me) {
 		cpu_resume_others();
 	} else {
 		cpu_resume(ddb_cpu);
@@ -183,9 +165,8 @@
 	}
 #endif
 
-	*regs = ddb_regs;
-
-	return (1);
+	splx(s);
+	return 1;
 }
 
 void
@@ -411,10 +392,12 @@
 		SHOW32(MIPS_COP_0_COUNT, count);
 	}
 
-	if ((cp0flags  MIPS_CP0FL_EIRR) != 0)
-		SHOW64SEL(9, 6, eirr);
-	if ((cp0flags  MIPS_CP0FL_EIMR) != 0)
-		SHOW64SEL(9, 7, eimr);
+	if ((cp0flags  MIPS_CP0FL_USE) != 0) {
+		if ((cp0flags  MIPS_CP0FL_EIRR) != 0)
+			SHOW64SEL(9, 6, eirr);
+		if ((cp0flags  MIPS_CP0FL_EIMR) != 0)
+			SHOW64SEL(9, 7, eimr);
+	}
 
 	if (CPUIS64BITS) {
 		SHOW64(MIPS_COP_0_TLB_HI, entryhi);
@@ -479,146 +462,98 @@
 			else
 SHOW32(MIPS_COP_0_LLADDR, lladdr);
 		}
+	}
 
-		SHOW32(MIPS_COP_0_WATCH_HI, watchhi);
-		if (CPUIS64BITS)
-			SHOW64(MIPS_COP_0_WATCH_LO, watchlo);
-		else
-			SHOW32(MIPS_COP_0_WATCH_LO, watchlo);
-
+#if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2)  0
+	for (int i=0; i  curcpu()-ci_cpuwatch_count; i++) {
+		uint32_t r = mipsNN_cp0_watchlo_read(i);
+		printf(  %s%d:%*s %#x\n, watchlo, i, FLDWIDTH - 8, , r);
+	}
+	for (int i=0; i  curcpu()-ci_cpuwatch_count; i++) {
 		if (CPUIS64BITS) {
-			SHOW64(MIPS_COP_0_TLB_XCONTEXT, xcontext);
-		}
-
-		if (CPUISMIPSNN) {
-			if (CPUIS64BITS) {
-SHOW64(MIPS_COP_0_PERFCNT, perfcnt);
-			} else {
-SHOW32(MIPS_COP_0_PERFCNT, perfcnt);
-			}
+			uint32_t r = mipsNN_cp0_watchhi_read(i);
+			printf(  %s%d:%*s %#x\n,
+watchhi, i, FLDWIDTH - 8, , r);
+		} else {
+			uint64_t r = mipsNN_cp0_watchhi_read(i);
+	

CVS commit: src/sys/arch/mips/mips

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:10:04 UTC 2011

Modified Files:
src/sys/arch/mips/mips: mips_machdep.c

Log Message:
- add mips_watchpoint_init() to discover number of CPU watchpoints,
and call that from {mips32,mips32r2,mips64,mips64r2}_vector_init()


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/arch/mips/mips/mips_machdep.c

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

Modified files:

Index: src/sys/arch/mips/mips/mips_machdep.c
diff -u src/sys/arch/mips/mips/mips_machdep.c:1.238 src/sys/arch/mips/mips/mips_machdep.c:1.239
--- src/sys/arch/mips/mips/mips_machdep.c:1.238	Wed Apr  6 05:50:39 2011
+++ src/sys/arch/mips/mips/mips_machdep.c	Thu Apr 14 05:10:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_machdep.c,v 1.238 2011/04/06 05:50:39 matt Exp $	*/
+/*	$NetBSD: mips_machdep.c,v 1.239 2011/04/14 05:10:04 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: mips_machdep.c,v 1.238 2011/04/06 05:50:39 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: mips_machdep.c,v 1.239 2011/04/14 05:10:04 cliff Exp $);
 
 #define __INTR_PRIVATE
 #include opt_cputype.h
@@ -188,6 +188,10 @@
 u_long	cpu_dump_mempagecnt(void);
 int	cpu_dump(void);
 
+#if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2)  0
+static void mips_watchpoint_init(void);
+#endif
+
 #if defined(MIPS3_PLUS)
 uint32_t mips3_cp0_tlb_page_mask_probe(void);
 uint64_t mips3_cp0_tlb_entry_hi_probe(void);
@@ -784,6 +788,8 @@
 
 	/* Clear BEV in SR so we start handling our own exceptions */
 	mips_cp0_status_write(mips_cp0_status_read()  ~MIPS_SR_BEV);
+
+	mips_watchpoint_init();
 }
 #endif /* MIPS32 */
 
@@ -849,6 +855,8 @@
 
 	/* Clear BEV in SR so we start handling our own exceptions */
 	mips_cp0_status_write(mips_cp0_status_read()  ~MIPS_SR_BEV);
+
+	mips_watchpoint_init();
 }
 #endif /* MIPS32R2 */
 
@@ -902,6 +910,8 @@
 
 	/* Clear BEV in SR so we start handling our own exceptions */
 	mips_cp0_status_write(mips_cp0_status_read()  ~MIPS_SR_BEV);
+
+	mips_watchpoint_init();
 }
 #endif /* MIPS64 */
 
@@ -972,6 +982,8 @@
 
 	/* Clear BEV in SR so we start handling our own exceptions */
 	mips_cp0_status_write(mips_cp0_status_read()  ~MIPS_SR_BEV);
+
+	mips_watchpoint_init();
 }
 #endif /* MIPS64R2 */
 
@@ -2196,3 +2208,14 @@
 	KASSERT(ci-ci_cpl == IPL_NONE);
 }
 #endif /* PARANOIA */
+
+#if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2)  0
+static void
+mips_watchpoint_init(void)
+{
+	/*
+	 * determine number of CPU watchpoints
+	 */
+	curcpu()-ci_cpuwatch_count = cpuwatch_discover();
+}
+#endif



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:12:58 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_cpu.c

Log Message:
- add cpu_rmixl_run(), and set in mips_locoresw.lsw_cpu_run
to be called from cpu_hatch() once cpus are running,
so we can determine what threads are configured
and running, and can finish initialization of per-core registers
depending on that.
- in cpu_rmixl_db_watch_init() clear IEU_DEFEATURE[DBE],
and init all COP0 watchpoint regs
- option MIPS_DDB_WATCH is deprecated, removed; use of cpu watchpoints
is longer depends on that or DDB


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/rmi/rmixl_cpu.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/mips/rmi/rmixl_cpu.c
diff -u src/sys/arch/mips/rmi/rmixl_cpu.c:1.2 src/sys/arch/mips/rmi/rmixl_cpu.c:1.3
--- src/sys/arch/mips/rmi/rmixl_cpu.c:1.2	Sun Feb 20 07:48:37 2011
+++ src/sys/arch/mips/rmi/rmixl_cpu.c	Thu Apr 14 05:12:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_cpu.c,v 1.2 2011/02/20 07:48:37 matt Exp $	*/
+/*	$NetBSD: rmixl_cpu.c,v 1.3 2011/04/14 05:12:58 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -38,7 +38,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_cpu.c,v 1.2 2011/02/20 07:48:37 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_cpu.c,v 1.3 2011/04/14 05:12:58 cliff Exp $);
 
 #include opt_multiprocessor.h
 #include opt_ddb.h
@@ -78,6 +78,7 @@
 
 #ifdef MULTIPROCESSOR
 void		cpu_rmixl_hatch(struct cpu_info *);
+void		cpu_rmixl_run(struct cpu_info *);
 #if 0
 static void	cpu_setup_trampoline_ipi(struct device *, struct cpu_info *);
 #endif
@@ -98,19 +99,25 @@
 static struct rmixl_cpu_trampoline_args rmixl_cpu_trampoline_args;
 #endif
 
-#if defined(DDB)  defined(MIPS_DDB_WATCH)
 /*
  * cpu_rmixl_db_watch_init - initialize COP0 watchpoint stuff
  *
  * clear IEU_DEFEATURE[DBE] to ensure T_WATCH on watchpoint exception
  * set COP0 watchhi and watchlo
+ *
+ * disable all watchpoints
  */
 static void
 cpu_rmixl_db_watch_init(void)
 {
-	db_mach_watch_set_all();
+	uint32_t r;
+
+	r = rmixl_mfcr(RMIXL_PCR_IEU_DEFEATURE);
+	r = ~__BIT(7);		/* DBE */
+	rmixl_mtcr(RMIXL_PCR_IEU_DEFEATURE, r);
+
+	cpuwatch_clr_all();
 }
-#endif	/* DDB  MIPS_DDB_WATCH */
 
 /*
  * cpu_xls616_erratum
@@ -186,6 +193,7 @@
 
 #ifdef MULTIPROCESSOR
 		mips_locoresw.lsw_cpu_init = cpu_rmixl_hatch;
+		mips_locoresw.lsw_cpu_run = cpu_rmixl_run;
 	} else {
 		struct cpucore_attach_args *ca = aux;
 		struct cpucore_softc * const ccsc = device_private(parent);
@@ -255,9 +263,7 @@
 	asm volatile(dmfc0 %0, $15, 1; : =r(ebase));
 	ci-ci_cpuid = ebase  __BITS(9,0);
 
-#if defined(DDB)  defined(MIPS_DDB_WATCH)
 	cpu_rmixl_db_watch_init();
-#endif
 
 	rmixl_fmn_init();
 
@@ -295,6 +301,18 @@
 
 #ifdef MULTIPROCESSOR
 /*
+ * cpu_rmixl_run
+ *
+ * - chip-specific post-running code called from cpu_hatch via lsw_cpu_run
+ */
+void
+cpu_rmixl_run(struct cpu_info *ci)
+{
+	struct rmixl_cpu_softc * const sc = (void *)ci-ci_softc;
+	cpucore_rmixl_run(device_parent(sc-sc_dev));
+}
+
+/*
  * cpu_rmixl_hatch
  *
  * - chip-specific hatch code called from cpu_hatch via lsw_cpu_init
@@ -318,9 +336,7 @@
 
 	cpucore_rmixl_hatch(device_parent(sc-sc_dev));
 
-#if defined(DDB)  defined(MIPS_DDB_WATCH)
 	cpu_rmixl_db_watch_init();
-#endif
 }
 
 static int
@@ -359,8 +375,8 @@
 	 *   RMI firmware only passes the lower 32-bit half of 'ta'
 	 *   to rmixl_cpu_trampoline (the upper half is clear)
 	 *   so rmixl_cpu_trampoline must reconstruct the missing upper half
-	 *   rmixl_cpu_trampoline knows to use MIPS_KSEG0_START
-	 *   to reconstruct upper half of 'ta'.
+	 *   rmixl_cpu_trampoline knows 'ta' is a KSEG0 address
+	 *   and sign-extends to make an LP64 KSEG0 address.
 	 */
 	KASSERT(MIPS_KSEG0_P(ta));
 



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:14:23 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_cpucore.c

Log Message:
- in cpucore_rmixl_attach(), keep track of which threads are
enabled by firmware and configured and attach, or not.
- add cpucore_rmixl_run() to do the post-running initialization:
disable unused threads in RMIXL_PCR_THREADEN, and
set Round Robin thread scheduling mode.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/rmi/rmixl_cpucore.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/mips/rmi/rmixl_cpucore.c
diff -u src/sys/arch/mips/rmi/rmixl_cpucore.c:1.2 src/sys/arch/mips/rmi/rmixl_cpucore.c:1.3
--- src/sys/arch/mips/rmi/rmixl_cpucore.c:1.2	Sun Feb 20 07:48:37 2011
+++ src/sys/arch/mips/rmi/rmixl_cpucore.c	Thu Apr 14 05:14:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_cpucore.c,v 1.2 2011/02/20 07:48:37 matt Exp $	*/
+/*	$NetBSD: rmixl_cpucore.c,v 1.3 2011/04/14 05:14:23 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -38,7 +38,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_cpucore.c,v 1.2 2011/02/20 07:48:37 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_cpucore.c,v 1.3 2011/04/14 05:14:23 cliff Exp $);
 
 #include opt_multiprocessor.h
 
@@ -145,25 +145,44 @@
 		(u_int)(rcp-rc_psb_info.userapp_cpu_map  core_shft)  thread_mask;
 	u_int threads_dis = (~threads_enb)  thread_mask;
 
+	sc-sc_threads_dis = threads_dis;
 	if (threads_dis != 0) {
 		aprint_normal_dev(self, threads);
-		while (threads_dis != 0) {
-			u_int t = ffs(threads_dis) - 1;
-			threads_dis ^= (1  t);
-			aprint_normal( %d%s,
-t, (threads_dis==0) ?  : ,);
+		u_int d = threads_dis;
+		while (d != 0) {
+			u_int t = ffs(d) - 1;
+			d ^= (1  t);
+			aprint_normal( %d%s, t, (d==0) ?  : ,);
 		}
 		aprint_normal( offline (disabled by firmware)\n);
 	}
 
-	while (threads_enb != 0) {
-		u_int t = ffs(threads_enb) - 1;
-		threads_enb ^= (1  t);
+	u_int threads_try_attach = threads_enb;
+	while (threads_try_attach != 0) {
+		u_int t = ffs(threads_try_attach) - 1;
+		threads_try_attach ^= (1  t);
 		ca.ca_name = cpu;
 		ca.ca_thread = t;
 		ca.ca_core = sc-sc_core;
-		config_found(self, ca, cpucore_rmixl_print);
+		if (config_found(self, ca, cpucore_rmixl_print) == NULL) {
+			/*
+			 * thread did not attach, e.g. not configured
+			 * arrange to have it disabled in THREADEN PCR
+			 */
+			u_int bit = 1  t;
+			threads_enb ^= bit;
+			threads_dis |= bit;
+		}
 	}
+	sc-sc_threads_enb = threads_enb;
+	sc-sc_threads_dis = threads_dis;
+
+	/*
+	 * when attaching the core of the primary cpu,
+	 * do the post-running initialization here
+	 */
+	if (sc-sc_core == RMIXL_CPU_CORE((curcpu()-ci_cpuid)))
+		cpucore_rmixl_run(self);
 }
 
 static int
@@ -178,6 +197,25 @@
 	return (UNCONF);
 }
 
+/*
+ * cpucore_rmixl_run
+ *	called from cpu_rmixl_hatch for each cpu
+ *	the first call for each cpucore causes init of per-core features:
+ *	- disable unused threads
+ *	- set Fine-grained (Round Robin) thread scheduling mode
+ */
+void
+cpucore_rmixl_run(device_t self)
+{
+	struct cpucore_softc * const sc = device_private(self);
+
+	if (sc-sc_running == false) {
+		sc-sc_running = true;
+		rmixl_mtcr(RMIXL_PCR_THREADEN, sc-sc_threads_enb);
+		rmixl_mtcr(RMIXL_PCR_SCHEDULING, 0);
+	}
+}
+
 #ifdef MULTIPROCESSOR
 /*
  * cpucore_rmixl_hatch



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:15:22 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_cpucorevar.h

Log Message:
- add sc_running flag to allow cpucore_rmixl_run() to do once-per-core
initializations once we know what threads are configured
- add sc_threads_enb and sc_threads_dis to track what threads are
enabled by firmware and configured and attach, or not.
- add prototype for cpucore_rmixl_run()


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/rmi/rmixl_cpucorevar.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/mips/rmi/rmixl_cpucorevar.h
diff -u src/sys/arch/mips/rmi/rmixl_cpucorevar.h:1.2 src/sys/arch/mips/rmi/rmixl_cpucorevar.h:1.3
--- src/sys/arch/mips/rmi/rmixl_cpucorevar.h:1.2	Sun Feb 20 07:48:37 2011
+++ src/sys/arch/mips/rmi/rmixl_cpucorevar.h	Thu Apr 14 05:15:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_cpucorevar.h,v 1.2 2011/02/20 07:48:37 matt Exp $	*/
+/*	$NetBSD: rmixl_cpucorevar.h,v 1.3 2011/04/14 05:15:22 cliff Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -38,7 +38,10 @@
 struct cpucore_softc {
 	device_t	sc_dev;
 	bool		sc_attached;
+	bool		sc_running;
 	u_int		sc_core;
+	u_int		sc_threads_enb;
+	u_int		sc_threads_dis;
 	bool		sc_hatched;
 #ifdef MULTIPROCESSOR
 	struct pmap_tlb_info *sc_tlbinfo;
@@ -52,5 +55,6 @@
 };
 
 extern void cpucore_rmixl_hatch(device_t);
+extern void cpucore_rmixl_run(device_t);
 
 #endif	/* _ARCH_MIPS_RMI_RMIXL_CPUCOREVAR_H_ */



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:16:00 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_intr.c

Log Message:
- in evbmips_iointr(), call assembly function rmixl_eirr_ack()
to ack the EIRR, instead of using a bunch of asm() here.
- in rmixl_ipi_intr(), remove overly paranoid assert that the given
IPI request is pending; if the request is clear, it was previously processed.
- in rmixl_vecnames_common[], give ipi vectors unique (numbered) names


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/rmi/rmixl_intr.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/mips/rmi/rmixl_intr.c
diff -u src/sys/arch/mips/rmi/rmixl_intr.c:1.3 src/sys/arch/mips/rmi/rmixl_intr.c:1.4
--- src/sys/arch/mips/rmi/rmixl_intr.c:1.3	Sun Feb 20 07:48:37 2011
+++ src/sys/arch/mips/rmi/rmixl_intr.c	Thu Apr 14 05:16:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_intr.c,v 1.3 2011/02/20 07:48:37 matt Exp $	*/
+/*	$NetBSD: rmixl_intr.c,v 1.4 2011/04/14 05:16:00 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_intr.c,v 1.3 2011/02/20 07:48:37 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_intr.c,v 1.4 2011/04/14 05:16:00 cliff Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -292,15 +292,15 @@
 	vec 5,		/*  5 */
 	vec 6,		/*  6 */
 	vec 7,		/*  7 */
-	vec 8 (ipi),		/*  8 */
-	vec 9 (ipi),		/*  9 */
-	vec 10 (ipi),		/* 10 */
-	vec 11 (ipi),		/* 11 */
-	vec 12 (ipi),		/* 12 */
-	vec 13 (ipi),		/* 13 */
-	vec 14 (ipi),		/* 14 */
-	vec 15 (ipi),		/* 15 */
-	vec 16 (fmn),		/* 16 */
+	vec 8 (ipi 0),	/*  8 */
+	vec 9 (ipi 1),	/*  9 */
+	vec 10 (ipi 2),	/* 10 */
+	vec 11 (ipi 3),	/* 11 */
+	vec 12 (ipi 4),	/* 12 */
+	vec 13 (ipi 5),	/* 13 */
+	vec 14 (ipi 6),	/* 14 */
+	vec 15 (fmn),		/* 15 */
+	vec 16,		/* 16 */
 	vec 17,		/* 17 */
 	vec 18,		/* 18 */
 	vec 19,		/* 19 */
@@ -920,18 +920,10 @@
 		KASSERT ((vecbit  RMIXL_EIRR_PRESERVE_MASK) == 0);
 
 		/*
-		 * ack in EIRR the irq we are about to handle
-		 * disable all interrupt to prevent a race that would allow
-		 * e.g. softints set from a higher interrupt getting
-		 * clobbered by the EIRR read-modify-write 
+		 * ack in EIRR, and in PIC if needed,
+		 * the irq we are about to handle
 		 */
-		asm volatile(dmtc0 $0, $9, 7;);
-		asm volatile(dmfc0 %0, $9, 6; : =r(eirr));
-		eirr = RMIXL_EIRR_PRESERVE_MASK;
-		eirr |= vecbit;
-		asm volatile(dmtc0 %0, $9, 6; :: r(eirr));
-		asm volatile(dmtc0 %0, $9, 7; :: r(eimr));
-
+		rmixl_eirr_ack(eimr, vecbit, RMIXL_EIRR_PRESERVE_MASK);
 		if (RMIXL_VECTOR_IS_IRT(vec))
 			RMIXL_PICREG_WRITE(RMIXL_PIC_INTRACK,
 1  RMIXL_VECTOR_IRT(vec));
@@ -993,12 +985,14 @@
 rmixl_ipi_intr(void *arg)
 {
 	struct cpu_info * const ci = curcpu();
+	const uint64_t ipi_mask = 1  (uintptr_t)arg;
 
 	KASSERT(ci-ci_cpl = IPL_SCHED);
-
 	KASSERT((uintptr_t)arg  NIPIS);
-	const uint64_t ipi_mask = 1  (uintptr_t)arg;
-	KASSERT((ci-ci_request_ipis  ipi_mask) != 0);
+
+	/* if the request is clear, it was previously processed */
+	if ((ci-ci_request_ipis  ipi_mask) == 0)
+		return 0;
 
 	atomic_or_64(ci-ci_active_ipis, ipi_mask);
 	atomic_and_64(ci-ci_request_ipis, ~ipi_mask);



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:16:28 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_intr.h

Log Message:
- add compile time check in case NIPIS ever exceeds number of available vectors


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/rmi/rmixl_intr.h

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

Modified files:

Index: src/sys/arch/mips/rmi/rmixl_intr.h
diff -u src/sys/arch/mips/rmi/rmixl_intr.h:1.2 src/sys/arch/mips/rmi/rmixl_intr.h:1.3
--- src/sys/arch/mips/rmi/rmixl_intr.h:1.2	Sun Feb 20 07:48:37 2011
+++ src/sys/arch/mips/rmi/rmixl_intr.h	Thu Apr 14 05:16:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_intr.h,v 1.2 2011/02/20 07:48:37 matt Exp $	*/
+/*	$NetBSD: rmixl_intr.h,v 1.3 2011/04/14 05:16:28 cliff Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -56,7 +56,12 @@
 /*
  * vectors (0 = vec  8)  are CAUSE[8..15] (including softintrs and count/compare)
  * vectors (8 = vec  31) are for other non-IRT based interrupts
+ * we use one for FMN, and each IPI currently gets own vector;
+ * if NIPIS = (32 - 8 - 1), then redesign so IPIs share vector(s)
  */
+#if NIPIS = 23
+# error too many IPIs
+#endif
 #define RMIXL_INTRVEC_IPI	8
 #define RMIXL_INTRVEC_FMN	(RMIXL_INTRVEC_IPI + NIPIS)
 



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:20:53 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_usbi.c

Log Message:
- report of BIST result is information only; don't fail attach because of it


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/rmi/rmixl_usbi.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/mips/rmi/rmixl_usbi.c
diff -u src/sys/arch/mips/rmi/rmixl_usbi.c:1.2 src/sys/arch/mips/rmi/rmixl_usbi.c:1.3
--- src/sys/arch/mips/rmi/rmixl_usbi.c:1.2	Sun Feb 20 07:48:37 2011
+++ src/sys/arch/mips/rmi/rmixl_usbi.c	Thu Apr 14 05:20:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_usbi.c,v 1.2 2011/02/20 07:48:37 matt Exp $	*/
+/*	$NetBSD: rmixl_usbi.c,v 1.3 2011/04/14 05:20:52 cliff Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_usbi.c,v 1.2 2011/02/20 07:48:37 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_usbi.c,v 1.3 2011/04/14 05:20:52 cliff Exp $);
 
 #include locators.h
 
@@ -148,10 +148,10 @@
 r = RMIXL_IOREG_READ(RMIXL_IO_DEV_GPIO + RMIXL_GPIO_BIST_EACH_STS);
 	aprint_normal(: BIST status=);
 	if ((r  __BIT(18)) == 0) {			/* XXX USB_BIST */
-		aprint_normal(FAIL\n);
-		return;
+		aprint_normal(FAIL,);
+	} else {
+		aprint_normal(OK,);
 	}
-	aprint_normal(OK);
 
 	/*
 	 * set BYTESWAP_EN register nonzero when software is little endian



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:21:22 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixlvar.h

Log Message:
- add prototype for rmixl_eirr_ack()


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/rmi/rmixlvar.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/mips/rmi/rmixlvar.h
diff -u src/sys/arch/mips/rmi/rmixlvar.h:1.4 src/sys/arch/mips/rmi/rmixlvar.h:1.5
--- src/sys/arch/mips/rmi/rmixlvar.h:1.4	Fri Mar 18 00:58:54 2011
+++ src/sys/arch/mips/rmi/rmixlvar.h	Thu Apr 14 05:21:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixlvar.h,v 1.4 2011/03/18 00:58:54 cliff Exp $	*/
+/*	$NetBSD: rmixlvar.h,v 1.5 2011/04/14 05:21:22 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -164,6 +164,7 @@
 
 extern uint64_t rmixl_mfcr(u_int);
 extern void rmixl_mtcr(uint64_t, u_int);
+extern void rmixl_eirr_ack(uint64_t, uint64_t, uint64_t);
 
 
 /*



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:22:03 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_pcie.c

Log Message:
- in rmixl_pcie_intr_string(), convert irq to vector when calling
rmixl_intr_string()


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/rmi/rmixl_pcie.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/mips/rmi/rmixl_pcie.c
diff -u src/sys/arch/mips/rmi/rmixl_pcie.c:1.4 src/sys/arch/mips/rmi/rmixl_pcie.c:1.5
--- src/sys/arch/mips/rmi/rmixl_pcie.c:1.4	Mon Apr  4 20:37:52 2011
+++ src/sys/arch/mips/rmi/rmixl_pcie.c	Thu Apr 14 05:22:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_pcie.c,v 1.4 2011/04/04 20:37:52 dyoung Exp $	*/
+/*	$NetBSD: rmixl_pcie.c,v 1.5 2011/04/14 05:22:03 cliff Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_pcie.c,v 1.4 2011/04/04 20:37:52 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_pcie.c,v 1.5 2011/04/14 05:22:03 cliff Exp $);
 
 #include opt_pci.h
 #include pci.h
@@ -1112,7 +1112,7 @@
 		switch (irq) {
 		case 26:
 		case 27:
-			name = rmixl_intr_string(irq);
+			name = rmixl_intr_string(RMIXL_IRT_VECTOR(irq));
 			break;
 		}
 		break;
@@ -1123,7 +1123,7 @@
 		case 24:
 		case 26:
 		case 27:
-			name = rmixl_intr_string(irq);
+			name = rmixl_intr_string(RMIXL_IRT_VECTOR(irq));
 			break;
 		}
 		break;
@@ -1137,7 +1137,7 @@
 		case 27:
 		case 28:
 		case 29:
-			name = rmixl_intr_string(irq);
+			name = rmixl_intr_string(RMIXL_IRT_VECTOR(irq));
 			break;
 		}
 		break;



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:22:47 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_pcix.c

Log Message:
- in rmixl_pcix_intr_string() convert irq to vector when calling
rmixl_intr_string()
- in rmixl_pcix_intr_establish(), initialize dispatch data 'counts' pointer
- in rmixl_pcix_pip_add_1(), zero out pip_new after allocated.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/rmi/rmixl_pcix.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/mips/rmi/rmixl_pcix.c
diff -u src/sys/arch/mips/rmi/rmixl_pcix.c:1.4 src/sys/arch/mips/rmi/rmixl_pcix.c:1.5
--- src/sys/arch/mips/rmi/rmixl_pcix.c:1.4	Wed Apr 13 21:06:30 2011
+++ src/sys/arch/mips/rmi/rmixl_pcix.c	Thu Apr 14 05:22:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_pcix.c,v 1.4 2011/04/13 21:06:30 cliff Exp $	*/
+/*	$NetBSD: rmixl_pcix.c,v 1.5 2011/04/14 05:22:47 cliff Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_pcix.c,v 1.4 2011/04/13 21:06:30 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_pcix.c,v 1.5 2011/04/14 05:22:47 cliff Exp $);
 
 #include opt_pci.h
 #include pci.h
@@ -797,7 +797,7 @@
 		panic(%s: cpu %#x not supported\n,
 			__func__, mips_options.mips_cpu_id);
 
-	return rmixl_intr_string(irq);
+	return rmixl_intr_string(RMIXL_IRT_VECTOR(irq));
 }
 
 const struct evcnt *
@@ -925,6 +925,7 @@
 	dip-irq = irq;
 	dip-func = func;
 	dip-arg = arg;
+	dip-counts = RMIXL_PCIX_EVCNT(sc, bitno, 0);
 #if NEVER
 	snprintf(dip-count_name, sizeof(dip-count_name),
 		pin %d, bitno + 1);
@@ -990,6 +991,8 @@
 		return NULL;
 	}
 
+	memset(pip_new, 0, size);
+
 	if (pip_old == NULL) {
 		/* initialize the interrupt struct */
 		pip_new-sc = sc;



CVS commit: src/sys/arch/mips/mips

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:50:44 UTC 2011

Modified Files:
src/sys/arch/mips/mips: locore_mips1.S

Log Message:
- add loocoresw slot for lsw_cpu_run
- fix comments for locoresw entries


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/mips/mips/locore_mips1.S

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

Modified files:

Index: src/sys/arch/mips/mips/locore_mips1.S
diff -u src/sys/arch/mips/mips/locore_mips1.S:1.77 src/sys/arch/mips/mips/locore_mips1.S:1.78
--- src/sys/arch/mips/mips/locore_mips1.S:1.77	Wed Apr  6 14:12:36 2011
+++ src/sys/arch/mips/mips/locore_mips1.S	Thu Apr 14 05:50:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_mips1.S,v 1.77 2011/04/06 14:12:36 tsutsui Exp $	*/
+/*	$NetBSD: locore_mips1.S,v 1.78 2011/04/14 05:50:43 cliff Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -1697,12 +1697,13 @@
 
 	.globl _C_LABEL(MIPSX(locoresw))
 _C_LABEL(MIPSX(locoresw)):
-	PTR_WORD _C_LABEL(MIPSX(wbflush))		# wbflush
-	PTR_WORD _C_LABEL(nullop)			# idle
-	PTR_WORD _C_LABEL(nullop)			# send ipi
-	PTR_WORD _C_LABEL(nullop)			# cpu_offline_md
-	PTR_WORD _C_LABEL(nullop)			# spare
-	PTR_WORD _C_LABEL(nullop)			# spare
+	PTR_WORD _C_LABEL(MIPSX(wbflush))		# lsw_wbflush
+	PTR_WORD _C_LABEL(nullop)			# lsw_cpu_idle
+	PTR_WORD _C_LABEL(nullop)			# lsw_send_ipi
+	PTR_WORD _C_LABEL(nullop)			# lsw_cpu_offline_md
+	PTR_WORD _C_LABEL(nullop)			# lsw_cpu_init
+	PTR_WORD _C_LABEL(nullop)			# lsw_cpu_run
+	PTR_WORD _C_LABEL(nullop)			# lsw_bus_error
 
 MIPSX(excpt_sw):
 	



CVS commit: src/sys/arch/mips/mips

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:51:28 UTC 2011

Modified Files:
src/sys/arch/mips/mips: mipsX_subr.S

Log Message:
- add loocoresw slot for lsw_cpu_run
- fix comments for locoresw fields


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/mips/mips/mipsX_subr.S

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

Modified files:

Index: src/sys/arch/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.43 src/sys/arch/mips/mips/mipsX_subr.S:1.44
--- src/sys/arch/mips/mips/mipsX_subr.S:1.43	Wed Apr  6 14:04:32 2011
+++ src/sys/arch/mips/mips/mipsX_subr.S	Thu Apr 14 05:51:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.43 2011/04/06 14:04:32 tsutsui Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.44 2011/04/14 05:51:27 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -2569,12 +2569,13 @@
 
 	.globl _C_LABEL(MIPSX(locoresw))
 _C_LABEL(MIPSX(locoresw)):
-	PTR_WORD _C_LABEL(MIPSX(wbflush)) # wbflush
-	PTR_WORD _C_LABEL(nullop)	# cpu_idle
-	PTR_WORD _C_LABEL(nullop)	# send ipi
-	PTR_WORD _C_LABEL(nullop)	# cpu_offline_md
-	PTR_WORD _C_LABEL(nullop)	# cpu_init_md
-	PTR_WORD _C_LABEL(nullop)	# lsw_bus_error
+	PTR_WORD _C_LABEL(MIPSX(wbflush))	# lsw_wbflush
+	PTR_WORD _C_LABEL(nullop)		# lsw_cpu_idle
+	PTR_WORD _C_LABEL(nullop)		# lsw_send_ipi
+	PTR_WORD _C_LABEL(nullop)		# lsw_cpu_offline_md
+	PTR_WORD _C_LABEL(nullop)		# lsw_cpu_init
+	PTR_WORD _C_LABEL(nullop)		# lsw_cpu_run
+	PTR_WORD _C_LABEL(nullop)		# lsw_bus_error
 
 MIPSX(excpt_sw):
 	



CVS commit: src/sys/kern

2011-04-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Apr 14 05:53:53 UTC 2011

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

Log Message:
Add a KASSERT


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/subr_percpu.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/subr_percpu.c
diff -u src/sys/kern/subr_percpu.c:1.10 src/sys/kern/subr_percpu.c:1.11
--- src/sys/kern/subr_percpu.c:1.10	Wed Oct 21 21:12:06 2009
+++ src/sys/kern/subr_percpu.c	Thu Apr 14 05:53:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_percpu.c,v 1.10 2009/10/21 21:12:06 rmind Exp $	*/
+/*	$NetBSD: subr_percpu.c,v 1.11 2011/04/14 05:53:53 matt Exp $	*/
 
 /*-
  * Copyright (c)2007,2008 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_percpu.c,v 1.10 2009/10/21 21:12:06 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_percpu.c,v 1.11 2011/04/14 05:53:53 matt Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -90,10 +90,11 @@
 	percpu_cpu_t * const newpcc = p2;
 	percpu_cpu_t * const pcc = cpu_percpu(ci);
 
+	KASSERT(ci == curcpu());
+
 	/*
 	 * swap *pcc and *newpcc unless anyone has beaten us.
 	 */
-
 	rw_enter(percpu_swap_lock, RW_WRITER);
 	if (newpcc-pcc_size  pcc-pcc_size) {
 		percpu_cpu_t tmp;



CVS commit: src/sys/arch/mips/mips

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:54:24 UTC 2011

Modified Files:
src/sys/arch/mips/mips: cpu_subr.c

Log Message:
- no need to check lsw_cpu_run != NULL before calling, nullop is default


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/cpu_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/arch/mips/mips/cpu_subr.c
diff -u src/sys/arch/mips/mips/cpu_subr.c:1.7 src/sys/arch/mips/mips/cpu_subr.c:1.8
--- src/sys/arch/mips/mips/cpu_subr.c:1.7	Thu Apr 14 05:08:51 2011
+++ src/sys/arch/mips/mips/cpu_subr.c	Thu Apr 14 05:54:24 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.7 2011/04/14 05:08:51 cliff Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.8 2011/04/14 05:54:24 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.7 2011/04/14 05:08:51 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.8 2011/04/14 05:54:24 cliff Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -936,8 +936,7 @@
 	 * Let this CPU do its own post-running initialization
 	 * (for things that have to be done on the local CPU).
 	 */
-	if (mips_locoresw.lsw_cpu_run != NULL)
-		(*mips_locoresw.lsw_cpu_run)(ci);
+	(*mips_locoresw.lsw_cpu_run)(ci);
 
 	/*
 	 * Now turn on interrupts.



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

2011-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Apr 13 06:29:30 UTC 2011

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

Log Message:
move the include sys/types.h xor stdbool.h to the top of the file,
so that bool will be present when used later in the file.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/include/cpu.h

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



CVS commit: src/lib/libc/stdlib

2011-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 13 06:35:48 UTC 2011

Modified Files:
src/lib/libc/stdlib: imaxabs.3

Log Message:
Fix obvious bug.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/stdlib/imaxabs.3

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



CVS commit: src/lib/libc/stdlib

2011-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 13 06:41:12 UTC 2011

Modified Files:
src/lib/libc/stdlib: imaxabs.3

Log Message:
Fix another bug (no 'imaxint_t' type).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/stdlib/imaxabs.3

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



CVS commit: src/lib/libc/stdlib

2011-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 13 06:56:51 UTC 2011

Modified Files:
src/lib/libc/stdlib: Makefile.inc abs.3
Removed Files:
src/lib/libc/stdlib: imaxabs.3 labs.3 llabs.3

Log Message:
Collect abs(3), labs(3), llabs(3), and imaxabs(3) to a single small page.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/lib/libc/stdlib/Makefile.inc
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdlib/abs.3
cvs rdiff -u -r1.4 -r0 src/lib/libc/stdlib/imaxabs.3
cvs rdiff -u -r1.11 -r0 src/lib/libc/stdlib/labs.3
cvs rdiff -u -r1.7 -r0 src/lib/libc/stdlib/llabs.3

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



CVS commit: src/lib/libc/stdlib

2011-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr 13 07:12:52 UTC 2011

Modified Files:
src/lib/libc/stdlib: Makefile.inc div.3
Removed Files:
src/lib/libc/stdlib: imaxdiv.3 ldiv.3 lldiv.3

Log Message:
Collect also the division functions to single place, div(3).


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/lib/libc/stdlib/Makefile.inc
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/stdlib/div.3
cvs rdiff -u -r1.1 -r0 src/lib/libc/stdlib/imaxdiv.3
cvs rdiff -u -r1.13 -r0 src/lib/libc/stdlib/ldiv.3
cvs rdiff -u -r1.7 -r0 src/lib/libc/stdlib/lldiv.3

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



CVS commit: src/sys/sys

2011-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Apr 13 08:45:00 UTC 2011

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

Log Message:
expose the KSTACK_LOWEST_ADDR and KSTACK_SIZE to _KMEMUSER as well,
like the x86 versions do.  for crash(8).


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 src/sys/sys/proc.h

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



CVS commit: src/tests/lib/libcurses/slave

2011-04-13 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Apr 13 09:46:38 UTC 2011

Modified Files:
src/tests/lib/libcurses/slave: Makefile

Log Message:
Explicitly list -lterminfo after -lcurses, to support static builds.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/slave/Makefile

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



CVS commit: src/sys/arch/x68k/stand/loadbsd

2011-04-13 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Apr 13 11:10:50 UTC 2011

Modified Files:
src/sys/arch/x68k/stand/loadbsd: Makefile

Log Message:
Convert to using -nostdinc, and set include paths and create symlinks
so that we include the source tree's sys/, machine/ and m68k/ headers,
and only as a last resort use DESTDIR's /usr/include.  For some reason
the host's bootinfo.h got included ahead of the x68k variant, causing
a build failure in my case.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x68k/stand/loadbsd/Makefile

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



CVS commit: src/lib/librumphijack

2011-04-13 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Apr 13 12:40:54 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
Move the forward declaration of _sys_readlink() outside of the #if,
so that the build succeeds even if _FORTIFY_SOURCE isn't  0.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/lib/librumphijack/hijack.c

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



CVS commit: xsrc/external/mit/xf86-video-suncg6/dist/src

2011-04-13 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Apr 13 15:47:03 UTC 2011

Modified Files:
xsrc/external/mit/xf86-video-suncg6/dist/src: cg6_driver.c

Log Message:
xf86LoaderReqSymLists() is no more


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c

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



CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/common

2011-04-13 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Apr 13 16:00:38 UTC 2011

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/common: xf86AutoConfig.c

Log Message:
- get platform #ifdefs in a slightly more sane order
- look for SBus and UPA devices on sparc(64)
- add default drivers for shark and sgimips
- only try wsfb if we can't find any other usable device
With this Xorg without config file works fine on shark, sparc(64) and amd64,
should work on other archs as well.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86AutoConfig.c

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



CVS commit: src/external/mit/xorg/server/xorg-server/hw/xfree86/common

2011-04-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Apr 13 16:18:14 UTC 2011

Modified Files:
src/external/mit/xorg/server/xorg-server/hw/xfree86/common: Makefile

Log Message:
pass ${MACHINE} as -D__whatever so we can have arch-specific defaults


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile

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



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

2011-04-13 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Apr 13 16:22:09 UTC 2011

Modified Files:
src/sys/arch/sgimips/dev: crmfb.c

Log Message:
use PRIx64 for printing 64-bit values


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sgimips/dev/crmfb.c

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



CVS commit: xsrc/external/mit/xf86-input-keyboard/dist/src

2011-04-13 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Apr 13 16:23:29 UTC 2011

Modified Files:
xsrc/external/mit/xf86-input-keyboard/dist/src: kbd.c

Log Message:
default to wskbd
tested on amd64, sparc(64), shark
Now X without a config file should work on most hardware


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c

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



CVS commit: src/crypto/external/bsd/heimdal/dist/lib/hdb

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 18:23:42 UTC 2011

Modified Files:
src/crypto/external/bsd/heimdal/dist/lib/hdb: hdb.c

Log Message:
Conditionalise the sqlite3 HDB backend.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/hdb/hdb.c

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



CVS commit: src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 18:30:04 UTC 2011

Modified Files:
src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5:
init_sec_context.c

Log Message:
_gss_DES3_get_mic_compat() requires that ctx-target has been defined, and,
well, it hasn't yet.  Move the call down to after it is defined and things
are better.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/gssapi/krb5/init_sec_context.c

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



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

2011-04-13 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Wed Apr 13 18:32:21 UTC 2011

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

Log Message:
ExtClk for QNAP should be the same as for Synology's 266MHz systems.
This seems logical, as both boards are very similar, and the clock precision
is ok now.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sandpoint/stand/altboot/brdsetup.c

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



CVS commit: src/crypto/external/bsd/heimdal/include

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 19:03:58 UTC 2011

Added Files:
src/crypto/external/bsd/heimdal/include: config.h der-private.h
der-protos.h gsskrb5-private.h hdb-private.h hdb-protos.h
hx509-private.h hx509-protos.h kadm5-private.h kadm5-protos.h
kcm-protos.h kdc-private.h kdc-protos.h krb5-private.h
krb5-protos.h krb5-types.h ntlm-private.h roken.h spnego-private.h
version.h

Log Message:
Autogenerated headers for heimdal head-20110412.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/include/config.h \
src/crypto/external/bsd/heimdal/include/der-private.h \
src/crypto/external/bsd/heimdal/include/der-protos.h \
src/crypto/external/bsd/heimdal/include/gsskrb5-private.h \
src/crypto/external/bsd/heimdal/include/hdb-private.h \
src/crypto/external/bsd/heimdal/include/hdb-protos.h \
src/crypto/external/bsd/heimdal/include/hx509-private.h \
src/crypto/external/bsd/heimdal/include/hx509-protos.h \
src/crypto/external/bsd/heimdal/include/kadm5-private.h \
src/crypto/external/bsd/heimdal/include/kadm5-protos.h \
src/crypto/external/bsd/heimdal/include/kcm-protos.h \
src/crypto/external/bsd/heimdal/include/kdc-private.h \
src/crypto/external/bsd/heimdal/include/kdc-protos.h \
src/crypto/external/bsd/heimdal/include/krb5-private.h \
src/crypto/external/bsd/heimdal/include/krb5-protos.h \
src/crypto/external/bsd/heimdal/include/krb5-types.h \
src/crypto/external/bsd/heimdal/include/ntlm-private.h \
src/crypto/external/bsd/heimdal/include/roken.h \
src/crypto/external/bsd/heimdal/include/spnego-private.h \
src/crypto/external/bsd/heimdal/include/version.h

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



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

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 19:04:40 UTC 2011

Added Files:
src/crypto/external/bsd/heimdal: heimdal2netbsd

Log Message:
Script to convert a git clone of Heimdal into our dist format.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/heimdal2netbsd

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



CVS commit: src/crypto/external/bsd/heimdal/lib/libwind

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 19:08:57 UTC 2011

Added Files:
src/crypto/external/bsd/heimdal/lib/libwind: bidi_table.c bidi_table.h
combining_table.c combining_table.h errorlist_table.c
errorlist_table.h map_table.c map_table.h normalize_table.c
normalize_table.h

Log Message:
Autogenerated files for HEIMDAL head-20110412.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/heimdal/lib/libwind/bidi_table.c \
src/crypto/external/bsd/heimdal/lib/libwind/bidi_table.h \
src/crypto/external/bsd/heimdal/lib/libwind/combining_table.c \
src/crypto/external/bsd/heimdal/lib/libwind/combining_table.h \
src/crypto/external/bsd/heimdal/lib/libwind/errorlist_table.c \
src/crypto/external/bsd/heimdal/lib/libwind/errorlist_table.h \
src/crypto/external/bsd/heimdal/lib/libwind/map_table.c \
src/crypto/external/bsd/heimdal/lib/libwind/map_table.h \
src/crypto/external/bsd/heimdal/lib/libwind/normalize_table.c \
src/crypto/external/bsd/heimdal/lib/libwind/normalize_table.h

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



CVS commit: src/crypto/external/bsd/heimdal/include

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 19:15:27 UTC 2011

Added Files:
src/crypto/external/bsd/heimdal/include: heimntlm-protos.h

Log Message:
Autogenerated headers for heimdal head-20110412.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/heimdal/include/heimntlm-protos.h

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



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

2011-04-13 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Wed Apr 13 19:17:01 UTC 2011

Added Files:
src/crypto/external/bsd/heimdal: Makefile Makefile.inc
Makefile.rules.inc
src/crypto/external/bsd/heimdal/bin: Makefile Makefile.inc
src/crypto/external/bsd/heimdal/bin/gsstool: Makefile
src/crypto/external/bsd/heimdal/bin/hxtool: Makefile
src/crypto/external/bsd/heimdal/bin/kcc: Makefile
src/crypto/external/bsd/heimdal/bin/kdestroy: Makefile
src/crypto/external/bsd/heimdal/bin/kgetcred: Makefile
src/crypto/external/bsd/heimdal/bin/kinit: Makefile
src/crypto/external/bsd/heimdal/bin/kpasswd: Makefile
src/crypto/external/bsd/heimdal/bin/krb5-config: Makefile
src/crypto/external/bsd/heimdal/bin/string2key: Makefile
src/crypto/external/bsd/heimdal/bin/verify_krb5_conf: Makefile
src/crypto/external/bsd/heimdal/lib: Makefile Makefile.inc
src/crypto/external/bsd/heimdal/lib/libasn1: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libasn1/asn1_compile: Makefile
src/crypto/external/bsd/heimdal/lib/libcom_err: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libcom_err/compile_et: Makefile
src/crypto/external/bsd/heimdal/lib/libgssapi: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libhdb: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libheimbase: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libheimntlm: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libhx509: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libipc: Makefile
src/crypto/external/bsd/heimdal/lib/libkadm5clnt: Makefile
shlib_version
src/crypto/external/bsd/heimdal/lib/libkadm5srv: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libkafs: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libkdc: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libkrb5: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libroken: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libsl: Makefile shlib_version
src/crypto/external/bsd/heimdal/lib/libsl/slc: Makefile
src/crypto/external/bsd/heimdal/lib/libvers: Makefile
src/crypto/external/bsd/heimdal/lib/libwind: Makefile shlib_version
src/crypto/external/bsd/heimdal/libexec: Makefile Makefile.inc
src/crypto/external/bsd/heimdal/libexec/digest-service: Makefile
src/crypto/external/bsd/heimdal/libexec/hpropd: Makefile
src/crypto/external/bsd/heimdal/libexec/ipropd-master: Makefile
src/crypto/external/bsd/heimdal/libexec/ipropd-slave: Makefile
src/crypto/external/bsd/heimdal/libexec/kadmind: Makefile
src/crypto/external/bsd/heimdal/libexec/kpasswdd: Makefile
src/crypto/external/bsd/heimdal/sbin: Makefile Makefile.inc
src/crypto/external/bsd/heimdal/sbin/hprop: Makefile
src/crypto/external/bsd/heimdal/sbin/iprop-log: Makefile
src/crypto/external/bsd/heimdal/sbin/kadmin: Makefile
src/crypto/external/bsd/heimdal/sbin/kcm: Makefile
src/crypto/external/bsd/heimdal/sbin/kdc: Makefile
src/crypto/external/bsd/heimdal/sbin/kdigest: Makefile
src/crypto/external/bsd/heimdal/sbin/kimpersonate: Makefile
src/crypto/external/bsd/heimdal/sbin/kstash: Makefile
src/crypto/external/bsd/heimdal/sbin/ktutil: Makefile

Log Message:
Build framework for Heimdal.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/Makefile \
src/crypto/external/bsd/heimdal/Makefile.inc \
src/crypto/external/bsd/heimdal/Makefile.rules.inc
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/bin/Makefile \
src/crypto/external/bsd/heimdal/bin/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/bin/gsstool/Makefile
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/bin/hxtool/Makefile
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/bin/kcc/Makefile
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/bin/kdestroy/Makefile
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/bin/kgetcred/Makefile
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/bin/kinit/Makefile
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/bin/kpasswd/Makefile
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/heimdal/bin/krb5-config/Makefile
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/heimdal/bin/string2key/Makefile
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/heimdal/bin/verify_krb5_conf/Makefile
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/lib/Makefile \
src/crypto/external/bsd/heimdal/lib/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/heimdal/lib/libasn1/Makefile \

CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Wed Apr 13 21:06:31 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_pcix.c

Log Message:
initialize mutex in attach


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/rmi/rmixl_pcix.c

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



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Wed Apr 13 21:10:11 UTC 2011

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_pcix.c

Log Message:
initialize mutex in attach


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/arch/mips/rmi/rmixl_pcix.c

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



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

2011-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 13 22:16:52 UTC 2011

Modified Files:
src/crypto/external/bsd/heimdal: heimdal2netbsd

Log Message:
no more amd, factor out more stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/crypto/external/bsd/heimdal/heimdal2netbsd

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



CVS commit: src/sys/dev/pci

2011-04-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 13 22:24:12 UTC 2011

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

Log Message:
+ ATI Radeon HD4650.


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

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



CVS commit: src/sys/dev/pci

2011-04-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 13 22:24:46 UTC 2011

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

Log Message:
regen (+ ATI Radeon HD4650)


To generate a diff of this commit:
cvs rdiff -u -r1.1067 -r1.1068 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1066 -r1.1067 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.



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

2011-04-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Apr 13 23:31:25 UTC 2011

Modified Files:
src/sys/arch/sparc/dev: cgfourteen.c

Log Message:
use the same function whenever we change colour depth
also, when opening the fb device switch to 32bit and back to 8 on close, not
the other way around


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

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



CVS commit: src/sys/kern

2011-04-13 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Thu Apr 14 00:32:23 UTC 2011

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

Log Message:
Minor comment fix.  Use fd_close() in sys__ksem_destroy(), it is cleaner.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/uipc_sem.c

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



CVS commit: src/usr.bin/fstat

2011-04-13 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Thu Apr 14 00:35:35 UTC 2011

Modified Files:
src/usr.bin/fstat: fstat.c

Log Message:
Add DTYPE_SEM.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/usr.bin/fstat/fstat.c

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



CVS commit: src/sys/compat/linux/common

2011-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 14 00:59:06 UTC 2011

Modified Files:
src/sys/compat/linux/common: linux_file.c linux_pipe.c

Log Message:
move dup3 to a more appropriate place because pipe is special. Gotta love
linux.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/compat/linux/common/linux_file.c
cvs rdiff -u -r1.64 -r1.65 src/sys/compat/linux/common/linux_pipe.c

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



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

2011-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 14 01:03:24 UTC 2011

Modified Files:
src/sys/compat/linux/arch/alpha: linux_pipe.c

Log Message:
add the special pipe2.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/compat/linux/arch/alpha/linux_pipe.c

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



CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src

2011-04-13 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Thu Apr 14 01:37:22 UTC 2011

Modified Files:
xsrc/external/mit/xf86-video-suncg14/dist/src: cg14.h cg14_driver.c

Log Message:
use ioctl(FBIOSVIDEO) in CG14SaveScreen(), now the Xserver can actually turn
the monitor off
TODO: hw cursor


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c

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



CVS commit: othersrc/external/bsd/hmac

2011-04-13 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Thu Apr 14 04:52:46 UTC 2011

Update of /cvsroot/othersrc/external/bsd/hmac
In directory ivanova.netbsd.org:/tmp/cvs-serv1497

Log Message:
Initial import of the libhmac(3) library and hmac(1) utility to
calculate an HMAC value.

Some tests based on the IETF SHA2 HMAC tests are included, although
not installed by default.

Examples of usage:

 % hmac -k '  ' -a sha256 Makefile
 sha256 (Makefile) = 
9612652f4e2371dc41e75f7d1b80e305a7be54b171b6a6002ba5caa072f3e825
 % hmac -a sha256 Makefile
 hmac key:
 sha256 (Makefile) = 
9612652f4e2371dc41e75f7d1b80e305a7be54b171b6a6002ba5caa072f3e825
 % hmac -a sha256  Makefile
 hmac key:
 9612652f4e2371dc41e75f7d1b80e305a7be54b171b6a6002ba5caa072f3e825
 %

Hashing algorithms supported are:  md5, rmd160, sha1, sha224, sha256,
sha384 and sha512 (using code from libc).  Default algorithm is sha512.

Status:

Vendor Tag: CROOKS
Release Tags:   hmac-base

N othersrc/external/bsd/hmac/Makefile
N othersrc/external/bsd/hmac/libhmac/shlib_version
N othersrc/external/bsd/hmac/libhmac/Makefile
N othersrc/external/bsd/hmac/dist/hmacwrap.c
N othersrc/external/bsd/hmac/dist/tests.c
N othersrc/external/bsd/hmac/dist/hmacwrap.h
N othersrc/external/bsd/hmac/dist/hmac.h
N othersrc/external/bsd/hmac/dist/hmac.c
N othersrc/external/bsd/hmac/dist/libhmac.c
N othersrc/external/bsd/hmac/dist/hmac.1
N othersrc/external/bsd/hmac/dist/libhmac.3
N othersrc/external/bsd/hmac/hmac/Makefile
N othersrc/external/bsd/hmac/tests/Makefile

No conflicts created by this import



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:05:35 UTC 2011

Modified Files:
src/sys/arch/evbmips/conf: XLSATX

Log Message:
- remove options LOCKDEBUG; is set in XLSATX64.MP
- option MIPS_DDB_WATCH is deprecated, removed


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/conf/XLSATX

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



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:06:10 UTC 2011

Modified Files:
src/sys/arch/evbmips/conf: XLSATX32

Log Message:
- 32 bit kernel must MEMLIMIT to 512MB


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/conf/XLSATX32

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



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:06:39 UTC 2011

Modified Files:
src/sys/arch/evbmips/conf: XLSATX64.MP

Log Message:
- remove cpucore and cpu reconfiguration stuff
cares and threads can be specified here,
but it's easier to do at boot time from firmmware
e.g. using 'userapp_mask_cpus mask' command


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/conf/XLSATX64.MP

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



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:07:00 UTC 2011

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

Log Message:
- option MIPS_DDB_WATCH is deprecated, removed


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/mips/conf/files.mips

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



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

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:08:22 UTC 2011

Modified Files:
src/sys/arch/mips/include: locore.h

Log Message:
- add lsw_cpu_run function pointer to struct locoresw


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/mips/include/locore.h

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



CVS commit: src/sys/arch/mips/mips

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:08:51 UTC 2011

Modified Files:
src/sys/arch/mips/mips: cpu_subr.c

Log Message:
- MIPS CPU (COP0) watchpoint support moved from db_interface.c to cpu_subr.c
see the cpuwatch_* functions
- ci_cpuwatch_count in allocated cpu_info is inherited from cpu_info_store
- cpu_hatch() calls lsw_cpu_run (if not NULL)
to optionally allow running MIPS chip-specific code
after subordinate cpus have been set running
- #ifdef DDB cpu_debug_dump() to allow compile when DDB not defined


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/mips/cpu_subr.c

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



CVS commit: src/sys/arch/mips/mips

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:09:34 UTC 2011

Modified Files:
src/sys/arch/mips/mips: db_interface.c

Log Message:
- option MIPS_DDB_WATCH is dedprecated, removed; now using
(MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2)  0 for conditional
compile of db_mach_watch stuff
- MIPS CPU (COP0) watchpoint support moved from db_interface.c
to cpu_subr.c, cpu.h; ddb_mach_watch etc now use those cpu functions.
- ddb_cpu now volatile
- 'struct db_mach_watch' definition etc moved to mips/include/db_machdep.h
- db_mach_watch_tab is replaced by curcpu()-ci_watch_tab
to allow per-cpu watchpoint control
- improve MP function in kdb_trap()
- fix conditions for printing cp0 regs


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/mips/mips/db_interface.c

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



CVS commit: src/sys/arch/mips/mips

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:10:04 UTC 2011

Modified Files:
src/sys/arch/mips/mips: mips_machdep.c

Log Message:
- add mips_watchpoint_init() to discover number of CPU watchpoints,
and call that from {mips32,mips32r2,mips64,mips64r2}_vector_init()


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/arch/mips/mips/mips_machdep.c

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



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:12:58 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_cpu.c

Log Message:
- add cpu_rmixl_run(), and set in mips_locoresw.lsw_cpu_run
to be called from cpu_hatch() once cpus are running,
so we can determine what threads are configured
and running, and can finish initialization of per-core registers
depending on that.
- in cpu_rmixl_db_watch_init() clear IEU_DEFEATURE[DBE],
and init all COP0 watchpoint regs
- option MIPS_DDB_WATCH is deprecated, removed; use of cpu watchpoints
is longer depends on that or DDB


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/rmi/rmixl_cpu.c

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



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:14:23 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_cpucore.c

Log Message:
- in cpucore_rmixl_attach(), keep track of which threads are
enabled by firmware and configured and attach, or not.
- add cpucore_rmixl_run() to do the post-running initialization:
disable unused threads in RMIXL_PCR_THREADEN, and
set Round Robin thread scheduling mode.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/rmi/rmixl_cpucore.c

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



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:15:22 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_cpucorevar.h

Log Message:
- add sc_running flag to allow cpucore_rmixl_run() to do once-per-core
initializations once we know what threads are configured
- add sc_threads_enb and sc_threads_dis to track what threads are
enabled by firmware and configured and attach, or not.
- add prototype for cpucore_rmixl_run()


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/rmi/rmixl_cpucorevar.h

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



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:16:00 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_intr.c

Log Message:
- in evbmips_iointr(), call assembly function rmixl_eirr_ack()
to ack the EIRR, instead of using a bunch of asm() here.
- in rmixl_ipi_intr(), remove overly paranoid assert that the given
IPI request is pending; if the request is clear, it was previously processed.
- in rmixl_vecnames_common[], give ipi vectors unique (numbered) names


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/rmi/rmixl_intr.c

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



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:16:28 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_intr.h

Log Message:
- add compile time check in case NIPIS ever exceeds number of available vectors


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/rmi/rmixl_intr.h

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



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:20:08 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_subr.S

Log Message:
- fix RCSID
- add rmixl_eirr_ack() to ack the EIRR, using COP0_SYNC  JR_HB_RA as needed
- in rmixl_cpu_trampoline, remove old KSEG0 address reconstruction
of trampoline args pointer, and comment/explain the new way
- also in rmixl_cpu_trampoline, remove old watchpoint hack used for debugging


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/rmi/rmixl_subr.S

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



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:21:22 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixlvar.h

Log Message:
- add prototype for rmixl_eirr_ack()


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/rmi/rmixlvar.h

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



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:22:03 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_pcie.c

Log Message:
- in rmixl_pcie_intr_string(), convert irq to vector when calling
rmixl_intr_string()


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/rmi/rmixl_pcie.c

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



CVS commit: src/sys/arch/mips/rmi

2011-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Apr 14 05:22:47 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_pcix.c

Log Message:
- in rmixl_pcix_intr_string() convert irq to vector when calling
rmixl_intr_string()
- in rmixl_pcix_intr_establish(), initialize dispatch data 'counts' pointer
- in rmixl_pcix_pip_add_1(), zero out pip_new after allocated.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/rmi/rmixl_pcix.c

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



CVS commit: src/sys/kern

2011-04-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Apr 14 05:33:20 UTC 2011

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

Log Message:
Add an assert to make sure no unexpected spinlocks are held in mi_switch


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 src/sys/kern/kern_synch.c

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



  1   2   >