CVS commit: src/sys/external/bsd/drm/dist/shared-core

2011-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Feb 24 08:02:55 UTC 2011

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: i915_drm.h i915_drv.h
i915_irq.c

Log Message:
change int pipe into unsigned int pipe.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/sys/external/bsd/drm/dist/shared-core/i915_drm.h
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm/dist/shared-core/i915_drv.h
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm/dist/shared-core/i915_irq.c

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

Modified files:

Index: src/sys/external/bsd/drm/dist/shared-core/i915_drm.h
diff -u src/sys/external/bsd/drm/dist/shared-core/i915_drm.h:1.1.1.2 src/sys/external/bsd/drm/dist/shared-core/i915_drm.h:1.2
--- src/sys/external/bsd/drm/dist/shared-core/i915_drm.h:1.1.1.2	Fri Jun 19 03:22:24 2009
+++ src/sys/external/bsd/drm/dist/shared-core/i915_drm.h	Thu Feb 24 08:02:55 2011
@@ -254,6 +254,7 @@
 	 * out there check for HAVE_I915_FLIP and so might pick up this
 	 * version.
 	 */
+	/* XXXMRG: make this unsigned? */
 	int pipes;
 } drm_i915_flip_t;
 

Index: src/sys/external/bsd/drm/dist/shared-core/i915_drv.h
diff -u src/sys/external/bsd/drm/dist/shared-core/i915_drv.h:1.3 src/sys/external/bsd/drm/dist/shared-core/i915_drv.h:1.4
--- src/sys/external/bsd/drm/dist/shared-core/i915_drv.h:1.3	Thu Feb 24 07:59:44 2011
+++ src/sys/external/bsd/drm/dist/shared-core/i915_drv.h	Thu Feb 24 08:02:55 2011
@@ -440,10 +440,10 @@
 			struct drm_file *file_priv);
 
 void
-i915_enable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask);
+i915_enable_pipestat(drm_i915_private_t *dev_priv, unsigned int pipe, u32 mask);
 
 void
-i915_disable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask);
+i915_disable_pipestat(drm_i915_private_t *dev_priv, unsigned int pipe, u32 mask);
 
 
 /* i915_mem.c */

Index: src/sys/external/bsd/drm/dist/shared-core/i915_irq.c
diff -u src/sys/external/bsd/drm/dist/shared-core/i915_irq.c:1.4 src/sys/external/bsd/drm/dist/shared-core/i915_irq.c:1.5
--- src/sys/external/bsd/drm/dist/shared-core/i915_irq.c:1.4	Thu Feb 24 07:59:44 2011
+++ src/sys/external/bsd/drm/dist/shared-core/i915_irq.c	Thu Feb 24 08:02:55 2011
@@ -75,7 +75,7 @@
 }
 
 static inline u32
-i915_pipestat(int pipe)
+i915_pipestat(unsigned int pipe)
 {
 	if (pipe == 0)
 	return PIPEASTAT;
@@ -85,7 +85,7 @@
 }
 
 void
-i915_enable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask)
+i915_enable_pipestat(drm_i915_private_t *dev_priv, unsigned int pipe, u32 mask)
 {
 	if ((dev_priv-pipestat[pipe]  mask) != mask) {
 		u32 reg = i915_pipestat(pipe);
@@ -98,7 +98,7 @@
 }
 
 void
-i915_disable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask)
+i915_disable_pipestat(drm_i915_private_t *dev_priv, unsigned int pipe, u32 mask)
 {
 	if ((dev_priv-pipestat[pipe]  mask) != 0) {
 		u32 reg = i915_pipestat(pipe);
@@ -119,7 +119,7 @@
  * before reading such registers if unsure.
  */
 static int
-i915_pipe_enabled(struct drm_device *dev, int pipe)
+i915_pipe_enabled(struct drm_device *dev, unsigned int pipe)
 {
 	drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev-dev_private;
 	unsigned long pipeconf = pipe ? PIPEBCONF : PIPEACONF;



CVS commit: src/external/mit/xorg/lib/libxcb/libxcb

2011-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Feb 24 08:15:13 UTC 2011

Modified Files:
src/external/mit/xorg/lib/libxcb/libxcb: Makefile

Log Message:
libxcb depends upon libXau.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libxcb/libxcb/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/lib/libxcb/libxcb/Makefile
diff -u src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.4 src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.5
--- src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.4	Wed Feb 23 06:04:31 2011
+++ src/external/mit/xorg/lib/libxcb/libxcb/Makefile	Thu Feb 24 08:15:13 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/02/23 06:04:31 mrg Exp $
+#	$NetBSD: Makefile,v 1.5 2011/02/24 08:15:13 mrg Exp $
 
 .include bsd.own.mk
 
@@ -26,6 +26,7 @@
 CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/xcb
 
 LIBDPLIBS=\
+	Xau	${.CURDIR}/../../libXau \
 	Xdmcp	${.CURDIR}/../../libXdmcp
 
 NOMAN=	# defined



CVS commit: xsrc/external/mit/libXext/dist

2011-02-24 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Thu Feb 24 08:18:04 UTC 2011

Modified Files:
xsrc/external/mit/libXext/dist/include/X11/extensions: Xdbe.h dpms.h
xsrc/external/mit/libXext/dist/src: extutil.c

Log Message:
revert local changes that are no longer necessary and infact hurt the build.
now we're back to being identical to upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/libXext/dist/include/X11/extensions/Xdbe.h
cvs rdiff -u -r1.5 -r1.6 \
xsrc/external/mit/libXext/dist/include/X11/extensions/dpms.h
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/libXext/dist/src/extutil.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/libXext/dist/include/X11/extensions/Xdbe.h
diff -u xsrc/external/mit/libXext/dist/include/X11/extensions/Xdbe.h:1.3 xsrc/external/mit/libXext/dist/include/X11/extensions/Xdbe.h:1.4
--- xsrc/external/mit/libXext/dist/include/X11/extensions/Xdbe.h:1.3	Sun Nov 21 05:52:55 2010
+++ xsrc/external/mit/libXext/dist/include/X11/extensions/Xdbe.h	Thu Feb 24 08:18:03 2011
@@ -34,7 +34,6 @@
 #define XDBE_H
 
 #include X11/Xfuncproto.h
-#include X11/extensions/dpms.h	/* XXXMRG makes Display available */
 #include X11/extensions/dbe.h
 
 typedef struct

Index: xsrc/external/mit/libXext/dist/include/X11/extensions/dpms.h
diff -u xsrc/external/mit/libXext/dist/include/X11/extensions/dpms.h:1.5 xsrc/external/mit/libXext/dist/include/X11/extensions/dpms.h:1.6
--- xsrc/external/mit/libXext/dist/include/X11/extensions/dpms.h:1.5	Sun Nov 21 05:52:55 2010
+++ xsrc/external/mit/libXext/dist/include/X11/extensions/dpms.h	Thu Feb 24 08:18:03 2011
@@ -29,18 +29,10 @@
 #ifndef _X11_EXTENSIONS_DPMS_H
 #define _X11_EXTENSIONS_DPMS_H 1
 
-#include X11/Xfuncproto.h
 #include X11/X.h
 #include X11/Xmd.h
 #include X11/extensions/dpmsconst.h
 
-#if !defined(_XKBSRV_H_)  !defined(_XLIB_H_)
-/* XXX: this is a hack to let old xf86-video-* build. Does not belong here. */
-typedef int Status;
-typedef pointer XPointer;
-typedef struct _XDisplay Display;
-#endif
-
 #ifndef DPMS_SERVER
 _XFUNCPROTOBEGIN
 

Index: xsrc/external/mit/libXext/dist/src/extutil.c
diff -u xsrc/external/mit/libXext/dist/src/extutil.c:1.4 xsrc/external/mit/libXext/dist/src/extutil.c:1.5
--- xsrc/external/mit/libXext/dist/src/extutil.c:1.4	Sun Nov 21 05:52:55 2010
+++ xsrc/external/mit/libXext/dist/src/extutil.c	Thu Feb 24 08:18:03 2011
@@ -52,6 +52,7 @@
 #include X11/Xlibint.h
 #include X11/extensions/Xext.h
 #include X11/extensions/extutil.h
+#include X11/extensions/ge.h
 
 /* defined in Xge.c */
 extern _X_HIDDEN Bool 
@@ -119,6 +120,11 @@
 	XESetWireToEvent (dpy, j, hooks-wire_to_event);
 	XESetEventToWire (dpy, j, hooks-event_to_wire);
 	}
+
+/* register extension for XGE */
+if (strcmp(ext_name, GE_NAME))
+xgeExtRegister(dpy, dpyinfo-codes-major_opcode, hooks);
+
 	if (hooks-create_gc)
 	  XESetCreateGC (dpy, dpyinfo-codes-extension, hooks-create_gc);
 	if (hooks-copy_gc)
@@ -236,7 +242,7 @@
 
 
 
-static int _default_exterror (Display *dpy, char *ext_name, char *reason)
+static int _default_exterror (Display *dpy, _Xconst char *ext_name, _Xconst char *reason)
 {
 fprintf (stderr, Xlib:  extension \%s\ %s on display \%s\.\n,
 	 ext_name, reason, DisplayString(dpy));
@@ -266,8 +272,8 @@
  */
 int XMissingExtension (Display *dpy, _Xconst char *ext_name)
 {
-int (*func)(Display*, char *, char *) = (_XExtensionErrorFunction ?
-		 _XExtensionErrorFunction : _default_exterror);
+XextErrorHandler func = (_XExtensionErrorFunction ?
+			 _XExtensionErrorFunction : _default_exterror);
 
 if (!ext_name) ext_name = X_EXTENSION_UNKNOWN;
 return (*func) (dpy, ext_name, X_EXTENSION_MISSING);



CVS commit: src/external/mit/xorg/lib/libXext

2011-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Feb 24 08:18:40 UTC 2011

Modified Files:
src/external/mit/xorg/lib/libXext: Makefile shlib_version

Log Message:
build Xge now that it builds, bump the minor.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mit/xorg/lib/libXext/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/lib/libXext/shlib_version

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

Modified files:

Index: src/external/mit/xorg/lib/libXext/Makefile
diff -u src/external/mit/xorg/lib/libXext/Makefile:1.6 src/external/mit/xorg/lib/libXext/Makefile:1.7
--- src/external/mit/xorg/lib/libXext/Makefile:1.6	Sun Nov 21 06:01:50 2010
+++ src/external/mit/xorg/lib/libXext/Makefile	Thu Feb 24 08:18:40 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2010/11/21 06:01:50 mrg Exp $
+#	$NetBSD: Makefile,v 1.7 2011/02/24 08:18:40 mrg Exp $
 
 .include bsd.own.mk
 
@@ -7,8 +7,22 @@
 .PATH:	${X11SRCDIR.${LIB}}/man
 .PATH:	${X11SRCDIR.${LIB}}/include/X11/extensions/
 
-SRCS=	DPMS.c MITMisc.c XAppgroup.c XEVI.c XLbx.c XMultibuf.c XSecurity.c \
-	XShape.c XShm.c XSync.c XTestExt1.c Xcup.c Xdbe.c extutil.c globals.c
+SRCS=	DPMS.c \
+	MITMisc.c \
+	XAppgroup.c \
+	XEVI.c \
+	XLbx.c \
+	XMultibuf.c \
+	XSecurity.c \
+	XShape.c \
+	XShm.c \
+	XSync.c \
+	XTestExt1.c \
+	Xcup.c \
+	Xdbe.c \
+	Xge.c \
+	extutil.c \
+	globals.c
 
 CPPFLAGS+=	${X11FLAGS.THREADLIB}
 

Index: src/external/mit/xorg/lib/libXext/shlib_version
diff -u src/external/mit/xorg/lib/libXext/shlib_version:1.2 src/external/mit/xorg/lib/libXext/shlib_version:1.3
--- src/external/mit/xorg/lib/libXext/shlib_version:1.2	Sun Jan 11 03:10:11 2009
+++ src/external/mit/xorg/lib/libXext/shlib_version	Thu Feb 24 08:18:40 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: shlib_version,v 1.2 2009/01/11 03:10:11 christos Exp $
+#	$NetBSD: shlib_version,v 1.3 2011/02/24 08:18:40 mrg Exp $
 #
 major=7
-minor=0
+minor=1



CVS commit: src/tests/rump/rumpkern

2011-02-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 24 08:40:06 UTC 2011

Modified Files:
src/tests/rump/rumpkern: t_sp.sh

Log Message:
in reconnect, ignore any all reconnect messages


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/rump/rumpkern/t_sp.sh

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

Modified files:

Index: src/tests/rump/rumpkern/t_sp.sh
diff -u src/tests/rump/rumpkern/t_sp.sh:1.10 src/tests/rump/rumpkern/t_sp.sh:1.11
--- src/tests/rump/rumpkern/t_sp.sh:1.10	Mon Jan 24 17:51:29 2011
+++ src/tests/rump/rumpkern/t_sp.sh	Thu Feb 24 08:40:06 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_sp.sh,v 1.10 2011/01/24 17:51:29 pooka Exp $
+#	$NetBSD: t_sp.sh,v 1.11 2011/02/24 08:40:06 pooka Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -99,7 +99,7 @@
 
 	export RUMP_SERVER=unix://commsock
 	atf_check -s exit:0 rump_server ${RUMP_SERVER}
-	atf_check -s exit:0 $(atf_get_srcdir)/h_client/h_reconcli 2
+	atf_check -s exit:0 -e ignore $(atf_get_srcdir)/h_client/h_reconcli 2
 }
 
 atf_init_test_cases()



CVS commit: src/distrib/sets/lists

2011-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Feb 24 08:52:59 UTC 2011

Modified Files:
src/distrib/sets/lists/xbase: shl.mi
src/distrib/sets/lists/xcomp: shl.mi

Log Message:
adjust for libXext.so minor bump.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/distrib/sets/lists/xbase/shl.mi
cvs rdiff -u -r1.28 -r1.29 src/distrib/sets/lists/xcomp/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/xbase/shl.mi
diff -u src/distrib/sets/lists/xbase/shl.mi:1.42 src/distrib/sets/lists/xbase/shl.mi:1.43
--- src/distrib/sets/lists/xbase/shl.mi:1.42	Wed Feb 23 07:53:28 2011
+++ src/distrib/sets/lists/xbase/shl.mi	Thu Feb 24 08:52:59 2011
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.42 2011/02/23 07:53:28 mrg Exp $
+# $NetBSD: shl.mi,v 1.43 2011/02/24 08:52:59 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -227,7 +227,7 @@
 ./usr/X11R7/lib/libXevie.so.2.0			-unknown-		xorg
 ./usr/X11R7/lib/libXext.so			-unknown-		xorg
 ./usr/X11R7/lib/libXext.so.7			-unknown-		xorg
-./usr/X11R7/lib/libXext.so.7.0			-unknown-		xorg
+./usr/X11R7/lib/libXext.so.7.1			-unknown-		xorg
 ./usr/X11R7/lib/libXfixes.so			-unknown-		xorg
 ./usr/X11R7/lib/libXfixes.so.4			-unknown-		xorg
 ./usr/X11R7/lib/libXfixes.so.4.0		-unknown-		xorg

Index: src/distrib/sets/lists/xcomp/shl.mi
diff -u src/distrib/sets/lists/xcomp/shl.mi:1.28 src/distrib/sets/lists/xcomp/shl.mi:1.29
--- src/distrib/sets/lists/xcomp/shl.mi:1.28	Wed Feb 23 07:53:29 2011
+++ src/distrib/sets/lists/xcomp/shl.mi	Thu Feb 24 08:52:59 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: shl.mi,v 1.28 2011/02/23 07:53:29 mrg Exp $
+#	$NetBSD: shl.mi,v 1.29 2011/02/24 08:52:59 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -208,7 +208,7 @@
 ./usr/libdata/debug/usr/X11R7/lib/libXdamage.so.2.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libXdmcp.so.7.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libXevie.so.2.0.debug	-unknown-		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/libXext.so.7.0.debug	-unknown-		xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/libXext.so.7.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libXfixes.so.4.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libXfont.so.3.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libXfontcache.so.2.0.debug	-unknown-		xorg,debug



CVS commit: src/sys/arch/hppa/hppa

2011-02-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 24 08:57:39 UTC 2011

Modified Files:
src/sys/arch/hppa/hppa: trap.S

Log Message:
No need to save CR_TLS twice in the DDB case.

hi joerg.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/hppa/hppa/trap.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/hppa/hppa/trap.S
diff -u src/sys/arch/hppa/hppa/trap.S:1.54 src/sys/arch/hppa/hppa/trap.S:1.55
--- src/sys/arch/hppa/hppa/trap.S:1.54	Thu Feb 24 04:28:45 2011
+++ src/sys/arch/hppa/hppa/trap.S	Thu Feb 24 08:57:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.54 2011/02/24 04:28:45 joerg Exp $	*/
+/*	$NetBSD: trap.S,v 1.55 2011/02/24 08:57:39 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -382,9 +382,6 @@
 	mfctl	%cr28, %arg1
 	stw	%arg0, TF_CR24-TRAPFRAME_SIZEOF(%sr1, %t3)
 	stw	%arg1, TF_CR28-TRAPFRAME_SIZEOF(%sr1, %t3)
-
-	mfctl	CR_TLS, %arg0
-	stw	%arg0, TF_CR27-TRAPFRAME_SIZEOF(%sr1, %t3)
 #endif
 
 	/* setup kernel context */



CVS commit: src

2011-02-24 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Feb 24 09:38:58 UTC 2011

Modified Files:
src/sbin/dump: snapshot.c
src/share/man/man4: fss.4
src/sys/dev: fss.c fssvar.h
src/sys/ufs/ffs: ffs_snapshot.c
src/usr.sbin/fssconfig: fssconfig.c

Log Message:
fss(4): Allow FSSIOCSET to set the initial flags.  Add a new flag
FSS_UNLINK_ON_CREATE to unlink the backing store before
the snapshot gets created.

With this change dump(8) no longer dumps the zero-sized, but named
snapshot it is working on.  Same applies to fsck_ffs(8).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/dump/snapshot.c
cvs rdiff -u -r1.14 -r1.15 src/share/man/man4/fss.4
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/fss.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/fssvar.h
cvs rdiff -u -r1.109 -r1.110 src/sys/ufs/ffs/ffs_snapshot.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/fssconfig/fssconfig.c

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

Modified files:

Index: src/sbin/dump/snapshot.c
diff -u src/sbin/dump/snapshot.c:1.5 src/sbin/dump/snapshot.c:1.6
--- src/sbin/dump/snapshot.c:1.5	Sun Apr 11 08:23:51 2010
+++ src/sbin/dump/snapshot.c	Thu Feb 24 09:38:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: snapshot.c,v 1.5 2010/04/11 08:23:51 hannken Exp $	*/
+/*	$NetBSD: snapshot.c,v 1.6 2011/02/24 09:38:57 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
 int
 snap_open(char *file, char *backup, time_t *snap_date, char **snap_dev)
 {
-	int i, n, fd, israw, fsinternal, dounlink, flags;
+	int i, n, fd, israw, fsinternal, dounlink;
 	char path[MAXPATHLEN], fss_dev[14], *cp;
 	dev_t mountdev;
 	struct fss_set fss;
@@ -144,6 +144,9 @@
 	if (close(fd)  0)
 		goto fail;
 
+	fss.fss_flags = FSS_UNCONFIG_ON_CLOSE;
+	if (dounlink)
+		fss.fss_flags |= FSS_UNLINK_ON_CREATE;
 	/*
 	 * Create the snapshot on the first free snapshot device.
 	 */
@@ -152,9 +155,6 @@
 		if ((fd = open(fss_dev, O_RDWR, 0))  0)
 			goto fail;
 
-		if (ioctl(fd, FSSIOFGET, flags)  0)
-			goto fail;
-
 		if (ioctl(fd, FSSIOCSET, fss)  0) {
 			if (errno != EBUSY)
 goto fail;
@@ -162,6 +162,7 @@
 			fd = -1;
 			continue;
 		}
+		dounlink = 0;
 
 		if (snap_dev != NULL) {
 			*snap_dev = strdup(fss_dev);
@@ -171,10 +172,7 @@
 			}
 		}
 
-		flags |= FSS_UNCONFIG_ON_CLOSE;
-		if (ioctl(fd, FSSIOCGET, fsg)  0 ||
-		ioctl(fd, FSSIOFSET, flags)  0 ||
-		(!israw  unlink(fss.fss_bstore)  0)) {
+		if (ioctl(fd, FSSIOCGET, fsg)  0) {
 			ioctl(fd, FSSIOCCLR);
 			goto fail;
 		}

Index: src/share/man/man4/fss.4
diff -u src/share/man/man4/fss.4:1.14 src/share/man/man4/fss.4:1.15
--- src/share/man/man4/fss.4:1.14	Fri Nov  5 10:02:53 2010
+++ src/share/man/man4/fss.4	Thu Feb 24 09:38:57 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: fss.4,v 1.14 2010/11/05 10:02:53 hannken Exp $	*/
+.\	$NetBSD: fss.4,v 1.15 2011/02/24 09:38:57 hannken Exp $	*/
 .\
 .\
 .\ Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd November 5, 2010
+.Dd February 24, 2011
 .Dt FSS 4
 .Os
 .Sh NAME
@@ -65,6 +65,7 @@
 	char *fss_mount;
 	char *fss_bstore;
 	blksize_t fss_csize;
+	int fss_flags;
 };
 .Ed
 .Pp
@@ -78,6 +79,9 @@
 The struct element
 .Va fss_csize
 is the preferred size of this data.
+The struct element
+.Va fss_flags
+is the initial set of flags.
 .It Dv FSSIOCGET(struct fss_get)
 Gets the status of a
 .Nm
@@ -120,6 +124,10 @@
 Unconfigure the
 .Nm
 device on the last close.
+.It Dv FSS_UNLINK_ON_CREATE
+Unlink the backing file before the
+.Nm
+device is created.
 .El
 .It Dv FSSIOFGET(int)
 Gets the flags of a

Index: src/sys/dev/fss.c
diff -u src/sys/dev/fss.c:1.72 src/sys/dev/fss.c:1.73
--- src/sys/dev/fss.c:1.72	Mon Dec 27 18:41:07 2010
+++ src/sys/dev/fss.c	Thu Feb 24 09:38:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.72 2010/12/27 18:41:07 hannken Exp $	*/
+/*	$NetBSD: fss.c,v 1.73 2011/02/24 09:38:57 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fss.c,v 1.72 2010/12/27 18:41:07 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: fss.c,v 1.73 2011/02/24 09:38:57 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -58,6 +58,7 @@
 #include sys/kthread.h
 #include sys/fstrans.h
 #include sys/simplelock.h
+#include sys/vfs_syscalls.h		/* For do_sys_unlink(). */
 
 #include miscfs/specfs/specdev.h
 
@@ -303,6 +304,9 @@
 	struct fss_get *fsg = (struct fss_get *)data;
 
 	switch (cmd) {
+	case FSSIOCSET50:
+		fss-fss_flags = 0;
+		/* Fall through */
 	case FSSIOCSET:
 		mutex_enter(sc-sc_lock);
 		if ((flag  FWRITE) == 0)
@@ -311,6 +315,8 @@
 			error = EBUSY;
 		else
 			error = fss_create_snapshot(sc, fss, l);
+		if (error == 0)
+			sc-sc_uflags = fss-fss_flags;
 		mutex_exit(sc-sc_lock);
 		

CVS commit: src/lib/librumpclient

2011-02-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 24 09:52:35 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c

Log Message:
Die with a sensible error message if a symbol cannot be found.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/librumpclient/rumpclient.c

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

Modified files:

Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.33 src/lib/librumpclient/rumpclient.c:1.34
--- src/lib/librumpclient/rumpclient.c:1.33	Fri Feb 18 16:22:10 2011
+++ src/lib/librumpclient/rumpclient.c	Thu Feb 24 09:52:34 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.33 2011/02/18 16:22:10 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.34 2011/02/24 09:52:34 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -43,6 +43,7 @@
 
 #include assert.h
 #include dlfcn.h
+#include err.h
 #include errno.h
 #include fcntl.h
 #include link.h
@@ -743,24 +744,29 @@
 	 */
 #define FINDSYM2(_name_,_syscall_)	\
 	if ((host_##_name_ = rumpclient_dlsym(RTLD_NEXT,		\
-	#_syscall_)) == NULL)	\
-		/* host_##_name_ = _syscall_ */;
+	#_syscall_)) == NULL) {	\
+		if (rumpclient_dlsym == dlsym)\
+			host_##_name_ = _name_; /* static fallback */	\
+		else			\
+			errx(1, cannot find %s: %s, #_syscall_,	\
+			dlerror());	\
+	}
 #define FINDSYM(_name_) FINDSYM2(_name_,_name_)
-	FINDSYM2(socket,__socket30);
-	FINDSYM(close);
-	FINDSYM(connect);
-	FINDSYM(fcntl);
-	FINDSYM(poll);
-	FINDSYM(read);
-	FINDSYM(sendto);
-	FINDSYM(setsockopt);
-	FINDSYM(dup);
-	FINDSYM(kqueue);
-	FINDSYM(execve);
+	FINDSYM2(socket,__socket30)
+	FINDSYM(close)
+	FINDSYM(connect)
+	FINDSYM(fcntl)
+	FINDSYM(poll)
+	FINDSYM(read)
+	FINDSYM(sendto)
+	FINDSYM(setsockopt)
+	FINDSYM(dup)
+	FINDSYM(kqueue)
+	FINDSYM(execve)
 #if !__NetBSD_Prereq__(5,99,7)
-	FINDSYM(kevent);
+	FINDSYM(kevent)
 #else
-	FINDSYM2(kevent,_sys___kevent50);
+	FINDSYM2(kevent,_sys___kevent50)
 #endif
 #undef	FINDSYM
 #undef	FINDSY2



CVS commit: src/tests

2011-02-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 24 10:24:24 UTC 2011

Modified Files:
src/tests: Makefile
Added Files:
src/tests/toolchain: Makefile
src/tests/toolchain/cc: Makefile t_hello.sh

Log Message:
Add tests to check cc can compile a working hello world.
(this test fails at least on riz's macppc)


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/tests/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/toolchain/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/toolchain/cc/Makefile \
src/tests/toolchain/cc/t_hello.sh

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

Modified files:

Index: src/tests/Makefile
diff -u src/tests/Makefile:1.29 src/tests/Makefile:1.30
--- src/tests/Makefile:1.29	Thu Feb  3 15:38:18 2011
+++ src/tests/Makefile	Thu Feb 24 10:24:23 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2011/02/03 15:38:18 pooka Exp $
+# $NetBSD: Makefile,v 1.30 2011/02/24 10:24:23 pooka Exp $
 
 .include bsd.own.mk
 
@@ -8,7 +8,7 @@
 ATFFILE=	yes
 
 SUBDIR=		crypto dev fs games include ipf kernel lib libexec net
-SUBDIR+=	rump sbin sys syscall usr.bin usr.sbin util
+SUBDIR+=	rump sbin sys syscall toolchain usr.bin usr.sbin util
 
 . if ${MACHINE} != evbppc  ${MKKMOD} != no
 SUBDIR+= modules

Added files:

Index: src/tests/toolchain/Makefile
diff -u /dev/null src/tests/toolchain/Makefile:1.1
--- /dev/null	Thu Feb 24 10:24:24 2011
+++ src/tests/toolchain/Makefile	Thu Feb 24 10:24:23 2011
@@ -0,0 +1,10 @@
+#	$NetBSD: Makefile,v 1.1 2011/02/24 10:24:23 pooka Exp $
+#
+
+.include bsd.own.mk
+
+TESTSDIR=   ${TESTSBASE}/toolchain
+
+TESTS_SUBDIRS+= cc
+
+.include bsd.test.mk

Index: src/tests/toolchain/cc/Makefile
diff -u /dev/null src/tests/toolchain/cc/Makefile:1.1
--- /dev/null	Thu Feb 24 10:24:24 2011
+++ src/tests/toolchain/cc/Makefile	Thu Feb 24 10:24:24 2011
@@ -0,0 +1,10 @@
+#	$NetBSD: Makefile,v 1.1 2011/02/24 10:24:24 pooka Exp $
+#
+
+.include bsd.own.mk
+
+TESTSDIR=	${TESTSBASE}/toolchain/cc
+
+TESTS_SH=	t_hello
+
+.include bsd.test.mk
Index: src/tests/toolchain/cc/t_hello.sh
diff -u /dev/null src/tests/toolchain/cc/t_hello.sh:1.1
--- /dev/null	Thu Feb 24 10:24:24 2011
+++ src/tests/toolchain/cc/t_hello.sh	Thu Feb 24 10:24:24 2011
@@ -0,0 +1,72 @@
+#	$NetBSD: t_hello.sh,v 1.1 2011/02/24 10:24:24 pooka 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.
+#
+
+atf_test_case hello
+hello_head() {
+	atf_set descr compile and run \hello world\
+}
+
+atf_test_case hello_pic
+hello_pic_head() {
+	atf_set descr compile and run PIC \hello world\
+}
+
+hello_body() {
+	cat  test.c  EOF
+#include stdio.h
+#include stdlib.h
+int main(void) {printf(hello world\n);exit(0);}
+EOF
+	atf_check -s exit:0 -o ignore -e ignore cc -o hello test.c
+	atf_check -s exit:0 -o inline:hello world\n ./hello
+}
+
+hello_pic_body() {
+	cat  test.c  EOF
+#include stdlib.h
+int main(void) {callpic();exit(0);}
+EOF
+	cat  pic.c  EOF
+#include stdio.h
+int callpic(void) {printf(hello world\n);}
+EOF
+
+	atf_check -s exit:0 -o ignore -e ignore \
+	cc -fPIC -dPIC -shared -o libtest.so pic.c
+	atf_check -s exit:0 -o ignore -e ignore \
+	cc -o hello test.c -L. -ltest
+
+	export LD_LIBRARY_PATH=.
+	atf_check -s exit:0 -o inline:hello world\n ./hello
+}
+
+atf_init_test_cases()
+{
+
+	atf_add_test_case hello
+	atf_add_test_case hello_pic
+}



CVS commit: src/etc/mtree

2011-02-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 24 10:29:04 UTC 2011

Modified Files:
src/etc/mtree: NetBSD.dist.tests

Log Message:
new testdirs


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/etc/mtree/NetBSD.dist.tests

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.28 src/etc/mtree/NetBSD.dist.tests:1.29
--- src/etc/mtree/NetBSD.dist.tests:1.28	Fri Feb 18 13:08:41 2011
+++ src/etc/mtree/NetBSD.dist.tests	Thu Feb 24 10:29:04 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.28 2011/02/18 13:08:41 pooka Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.29 2011/02/24 10:29:04 pooka Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -217,6 +217,8 @@
 ./usr/tests/sys
 ./usr/tests/sys/rc
 ./usr/tests/syscall
+./usr/tests/toolchain
+./usr/tests/toolchain/cc
 ./usr/tests/usr.bin
 ./usr/tests/usr.bin/rump_server
 ./usr/tests/usr.sbin



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

2011-02-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 24 10:30:03 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
+tests


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.253 src/distrib/sets/lists/tests/mi:1.254
--- src/distrib/sets/lists/tests/mi:1.253	Wed Feb 23 13:03:32 2011
+++ src/distrib/sets/lists/tests/mi	Thu Feb 24 10:30:03 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.253 2011/02/23 13:03:32 pooka Exp $
+# $NetBSD: mi,v 1.254 2011/02/24 10:30:03 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2030,6 +2030,11 @@
 ./usr/tests/syscall/Atffile			tests-syscall-tests	atf
 ./usr/tests/syscall/t_cmsg			tests-syscall-tests	atf
 ./usr/tests/syscall/t_timer			tests-syscall-tests	atf
+./usr/tests/toolchain	tests-syscall-tests	atf
+./usr/tests/toolchain/Atffile	tests-syscall-tests	atf
+./usr/tests/toolchain/cc	tests-syscall-tests	atf
+./usr/tests/toolchain/cc/Atffile	tests-syscall-tests	atf
+./usr/tests/toolchain/cc/t_hello	tests-syscall-tests	atf
 ./usr/tests/usr.bintests-util-tests
 ./usr/tests/usr.bin/Atffile			tests-sbin-tests	atf
 ./usr/tests/usr.bin/rump_server			tests-util-tests



CVS commit: src

2011-02-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 24 11:22:35 UTC 2011

Modified Files:
src/distrib/sets/lists/modules: md.amd64 md.i386
src/sys/modules: Makefile
Added Files:
src/sys/modules/powernow: Makefile powernow.ioconf

Log Message:
Add build glue for powernow(4).


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.65 -r1.66 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/powernow/Makefile \
src/sys/modules/powernow/powernow.ioconf

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

Modified files:

Index: src/distrib/sets/lists/modules/md.amd64
diff -u src/distrib/sets/lists/modules/md.amd64:1.17 src/distrib/sets/lists/modules/md.amd64:1.18
--- src/distrib/sets/lists/modules/md.amd64:1.17	Wed Feb 23 11:55:37 2011
+++ src/distrib/sets/lists/modules/md.amd64	Thu Feb 24 11:22:35 2011
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.17 2011/02/23 11:55:37 jruoho Exp $
+# $NetBSD: md.amd64,v 1.18 2011/02/24 11:22:35 jruoho Exp $
 ./@MODULEDIR@/acpiacadbase-kernel-modules	kmod
 ./@MODULEDIR@/acpiacad/acpiacad.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/acpibatbase-kernel-modules	kmod
@@ -61,6 +61,8 @@
 ./@MODULEDIR@/i915drm/i915drm.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/padbase-kernel-modules	kmod
 ./@MODULEDIR@/pad/pad.kmod			base-kernel-modules	kmod
+./@MODULEDIR@/powernowbase-kernel-modules	kmod
+./@MODULEDIR@/powernow/powernow.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/thinkpadbase-kernel-modules	kmod
 ./@MODULEDIR@/thinkpad/thinkpad.kmod		base-kernel-modules	kmod
 #./@MODULEDIR@/tprof_amdpmi			base-kernel-modules	kmod

Index: src/distrib/sets/lists/modules/md.i386
diff -u src/distrib/sets/lists/modules/md.i386:1.20 src/distrib/sets/lists/modules/md.i386:1.21
--- src/distrib/sets/lists/modules/md.i386:1.20	Wed Feb 23 11:55:37 2011
+++ src/distrib/sets/lists/modules/md.i386	Thu Feb 24 11:22:35 2011
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.20 2011/02/23 11:55:37 jruoho Exp $
+# $NetBSD: md.i386,v 1.21 2011/02/24 11:22:35 jruoho Exp $
 ./@MODULEDIR@/acpiacadbase-kernel-modules	kmod
 ./@MODULEDIR@/acpiacad/acpiacad.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/acpibatbase-kernel-modules	kmod
@@ -67,6 +67,8 @@
 ./@MODULEDIR@/pad/pad.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/padlockbase-kernel-modules	kmod
 ./@MODULEDIR@/padlock/padlock.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/powernowbase-kernel-modules	kmod
+./@MODULEDIR@/powernow/powernow.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/thinkpadbase-kernel-modules	kmod
 ./@MODULEDIR@/thinkpad/thinkpad.kmod		base-kernel-modules	kmod
 #./@MODULEDIR@/tprof_amdpmi			base-kernel-modules	kmod

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.65 src/sys/modules/Makefile:1.66
--- src/sys/modules/Makefile:1.65	Wed Feb 23 11:55:36 2011
+++ src/sys/modules/Makefile	Thu Feb 24 11:22:34 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.65 2011/02/23 11:55:36 jruoho Exp $
+#	$NetBSD: Makefile,v 1.66 2011/02/24 11:22:34 jruoho Exp $
 
 .include bsd.own.mk
 
@@ -88,6 +88,7 @@
 ${MACHINE_ARCH} == x86_64
 SUBDIR+=	coretemp
 SUBDIR+=	est
+SUBDIR+=	powernow
 SUBDIR+=	tprof_pmi
 #SUBDIR+=	tprof_amdpmi
 .endif

Added files:

Index: src/sys/modules/powernow/Makefile
diff -u /dev/null src/sys/modules/powernow/Makefile:1.1
--- /dev/null	Thu Feb 24 11:22:35 2011
+++ src/sys/modules/powernow/Makefile	Thu Feb 24 11:22:34 2011
@@ -0,0 +1,13 @@
+# $NetBSD: Makefile,v 1.1 2011/02/24 11:22:34 jruoho Exp $
+
+.include ../Makefile.inc
+
+.PATH:	${S}/arch/x86/x86
+
+KMOD=	powernow
+IOCONF=	powernow.ioconf
+SRCS=	powernow.c
+
+WARNS=	3
+
+.include bsd.kmodule.mk
Index: src/sys/modules/powernow/powernow.ioconf
diff -u /dev/null src/sys/modules/powernow/powernow.ioconf:1.1
--- /dev/null	Thu Feb 24 11:22:35 2011
+++ src/sys/modules/powernow/powernow.ioconf	Thu Feb 24 11:22:34 2011
@@ -0,0 +1,10 @@
+# $NetBSD: powernow.ioconf,v 1.1 2011/02/24 11:22:34 jruoho Exp $
+
+ioconf powernow
+
+include conf/files
+include arch/x86/conf/files.x86
+
+pseudo-root cpufeaturebus*
+
+powernow0 at cpufeaturebus?



CVS commit: src

2011-02-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 24 11:29:46 UTC 2011

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4/man4.x86: Makefile
Added Files:
src/share/man/man4/man4.x86: powernow.4

Log Message:
Add powernow(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1293 -r1.1294 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/man4.x86/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.x86/powernow.4

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1293 src/distrib/sets/lists/man/mi:1.1294
--- src/distrib/sets/lists/man/mi:1.1293	Wed Feb 23 11:50:03 2011
+++ src/distrib/sets/lists/man/mi	Thu Feb 24 11:29:45 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1293 2011/02/23 11:50:03 jruoho Exp $
+# $NetBSD: mi,v 1.1294 2011/02/24 11:29:45 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1791,6 +1791,7 @@
 ./usr/share/man/cat4/x86/hpet.0			man-sys-catman		.cat
 ./usr/share/man/cat4/x86/ichlpcib.0		man-sys-catman		.cat
 ./usr/share/man/cat4/x86/ioapic.0		man-sys-catman		.cat
+./usr/share/man/cat4/x86/powernow.0		man-sys-catman		.cat
 ./usr/share/man/cat4/xbd.0			man-sys-catman		.cat
 ./usr/share/man/cat4/xbdback.0			man-sys-catman		.cat
 ./usr/share/man/cat4/xbox.0			man-sys-catman		.cat
@@ -4476,6 +4477,7 @@
 ./usr/share/man/html4/x86/hpet.html		man-sys-htmlman		html
 ./usr/share/man/html4/x86/ichlpcib.html		man-sys-htmlman		html
 ./usr/share/man/html4/x86/ioapic.html		man-sys-htmlman		html
+./usr/share/man/html4/x86/powernow.html		man-sys-htmlman		html
 ./usr/share/man/html4/xbd.html			man-sys-htmlman		html
 ./usr/share/man/html4/xbdback.html		man-sys-htmlman		html
 ./usr/share/man/html4/xbox.html			man-sys-htmlman		html
@@ -7096,6 +7098,7 @@
 ./usr/share/man/man4/x86/hpet.4			man-sys-man		.man
 ./usr/share/man/man4/x86/ichlpcib.4		man-sys-man		.man
 ./usr/share/man/man4/x86/ioapic.4		man-sys-man		.man
+./usr/share/man/man4/x86/powernow.4		man-sys-man		.man
 ./usr/share/man/man4/xbd.4			man-sys-man		.man
 ./usr/share/man/man4/xbdback.4			man-sys-man		.man
 ./usr/share/man/man4/xbox.4			man-sys-man		.man

Index: src/share/man/man4/man4.x86/Makefile
diff -u src/share/man/man4/man4.x86/Makefile:1.7 src/share/man/man4/man4.x86/Makefile:1.8
--- src/share/man/man4/man4.x86/Makefile:1.7	Wed Feb 23 11:50:03 2011
+++ src/share/man/man4/man4.x86/Makefile	Thu Feb 24 11:29:46 2011
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.7 2011/02/23 11:50:03 jruoho Exp $
+#	$NetBSD: Makefile,v 1.8 2011/02/24 11:29:46 jruoho Exp $
 
 MAN=	amdpcib.4 balloon.4 coretemp.4 est.4 \
-	fwhrng.4 hpet.4 ichlpcib.4 ioapic.4
+	fwhrng.4 hpet.4 ichlpcib.4 ioapic.4 powernow.4
 
 MANSUBDIR=/x86
 

Added files:

Index: src/share/man/man4/man4.x86/powernow.4
diff -u /dev/null src/share/man/man4/man4.x86/powernow.4:1.1
--- /dev/null	Thu Feb 24 11:29:46 2011
+++ src/share/man/man4/man4.x86/powernow.4	Thu Feb 24 11:29:46 2011
@@ -0,0 +1,76 @@
+.\ $NetBSD: powernow.4,v 1.1 2011/02/24 11:29:46 jruoho Exp $
+.\
+.\ Copyright (c) 2011 Jukka Ruohonen jruoho...@iki.fi
+.\ 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. Neither the name of the author nor the names of any
+.\contributors may be used to endorse or promote products derived
+.\from this software without specific prior written permission.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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.
+.\
+.Dd February 24, 2011
+.Dt POWERNOW 4
+.Os
+.Sh NAME
+.Nm powernow
+.Nd AMD PowerNow! and Cool'n'Quiet
+.Sh SYNOPSIS
+.Cd powernow0 at cpu0
+.Sh DESCRIPTION
+The
+.Nm
+driver supports
+.Tn AMD
+.Dq PowerNow!
+and
+.Dq Cool'n'Quiet
+.Tn CPU
+frequency scaling technologies.
+The following
+.Xr sysctl 8
+variables are available with
+.Nm :
+.Bl -tag -width machdep.powernow.frequency.available -offset 2n
+.It Ic 

CVS commit: src/share/man/man4/man4.x86

2011-02-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 24 11:31:06 UTC 2011

Modified Files:
src/share/man/man4/man4.x86: est.4

Log Message:
Xref powernow(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.x86/est.4

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

Modified files:

Index: src/share/man/man4/man4.x86/est.4
diff -u src/share/man/man4/man4.x86/est.4:1.1 src/share/man/man4/man4.x86/est.4:1.2
--- src/share/man/man4/man4.x86/est.4:1.1	Wed Feb 23 11:50:03 2011
+++ src/share/man/man4/man4.x86/est.4	Thu Feb 24 11:31:06 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: est.4,v 1.1 2011/02/23 11:50:03 jruoho Exp $
+.\ $NetBSD: est.4,v 1.2 2011/02/24 11:31:06 jruoho Exp $
 .\
 .\ Copyright (c) 2011 Jukka Ruohonen jruoho...@iki.fi
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd February 23, 2011
+.Dd February 24, 2011
 .Dt EST 4
 .Os
 .Sh NAME
@@ -56,7 +56,8 @@
 not guaranteed to exist in the future versions of
 .Nx .
 .Sh SEE ALSO
-.Xr acpicpu 4
+.Xr acpicpu 4 ,
+.Xr powernow 4
 .Sh CAVEATS
 The
 .Nm



CVS commit: src/share/man/man4

2011-02-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 24 11:33:41 UTC 2011

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

Log Message:
Update.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/share/man/man4/acpicpu.4

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

Modified files:

Index: src/share/man/man4/acpicpu.4
diff -u src/share/man/man4/acpicpu.4:1.22 src/share/man/man4/acpicpu.4:1.23
--- src/share/man/man4/acpicpu.4:1.22	Wed Feb 23 12:38:47 2011
+++ src/share/man/man4/acpicpu.4	Thu Feb 24 11:33:41 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: acpicpu.4,v 1.22 2011/02/23 12:38:47 jruoho Exp $
+.\ $NetBSD: acpicpu.4,v 1.23 2011/02/24 11:33:41 jruoho Exp $
 .\
 .\ Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd February 23, 2011
+.Dd February 24, 2011
 .Dt ACPICPU 4
 .Os
 .Sh NAME
@@ -255,11 +255,10 @@
 .Nm
 driver uses the same
 .Xr sysctl 8
-controls for P-states as the ones provided by the kernel configuration
-.Xr options 4
-.Dv ENHANCED_SPEEDSTEP
+controls for P-states as the ones provided by
+.Xr est 4
 and
-.Dv POWERNOW_K8 .
+.Xr powernow 4 .
 Depending on the processor, the second-level node is either
 .Ic machdep.est
 or
@@ -294,12 +293,12 @@
 The
 .Nm
 driver conflicts with
-.Xr est 4 ,
-and with the following kernel configuration
-.Xr options 4 :
-.Dv POWERNOW_K8
+.Xr est 4
 and
-.Dv INTEL_ONDEMAND_CLOCKMOD .
+.Xr powernow 4
+in addition to the
+.Dv INTEL_ONDEMAND_CLOCKMOD
+kernel configuration option.
 These must be disabled if
 .Nm
 is used.
@@ -323,6 +322,8 @@
 .Sh SEE ALSO
 .Xr acpi 4 ,
 .Xr acpitz 4 ,
+.Xr est 4 ,
+.Xr powernow 4 ,
 .Xr cpu_idle 9
 .Sh HISTORY
 The



CVS commit: src/lib

2011-02-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 24 12:25:45 UTC 2011

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

Log Message:
Make the rumphijack dlsym trampoline call from rumpclient a real
function call instead of a call through a function pointer.
Apparently powerpc ld.elf_so gets __hackish_return_address() wrong
if the call is done through a function pointer (digging deeper into
that stuff is beyond my interest).

Thanks to riz for providing access to a macppc for debugging.
Unthanks to the broken toolchain in the default installation which
wasted approximately 4 hours of time last night.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/librumpclient/rumpclient.c
cvs rdiff -u -r1.66 -r1.67 src/lib/librumphijack/hijack.c

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

Modified files:

Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.34 src/lib/librumpclient/rumpclient.c:1.35
--- src/lib/librumpclient/rumpclient.c:1.34	Thu Feb 24 09:52:34 2011
+++ src/lib/librumpclient/rumpclient.c	Thu Feb 24 12:25:44 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.34 2011/02/24 09:52:34 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.35 2011/02/24 12:25:44 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -717,7 +717,16 @@
 	return 0;
 }
 
-void *(*rumpclient_dlsym)(void *, const char *);
+void *rumpclient__dlsym(void *, const char *);
+void *rumphijack_dlsym(void *, const char *);
+void *
+rumpclient__dlsym(void *handle, const char *symbol)
+{
+
+	return dlsym(handle, symbol);
+}
+__weak_alias(rumphijack_dlsym,rumpclient__dlsym);
+
 static int init_done = 0;
 
 int
@@ -734,18 +743,14 @@
 
 	sigfillset(fullset);
 
-	/* dlsym overrided by rumphijack? */
-	if (!rumpclient_dlsym)
-		rumpclient_dlsym = dlsym;
-
 	/*
 	 * sag mir, wo die symbol sind.  zogen fort, der krieg beginnt.
 	 * wann wird man je verstehen?  wann wird man je verstehen?
 	 */
 #define FINDSYM2(_name_,_syscall_)	\
-	if ((host_##_name_ = rumpclient_dlsym(RTLD_NEXT,		\
+	if ((host_##_name_ = rumphijack_dlsym(RTLD_NEXT,		\
 	#_syscall_)) == NULL) {	\
-		if (rumpclient_dlsym == dlsym)\
+		if (rumphijack_dlsym == dlsym)\
 			host_##_name_ = _name_; /* static fallback */	\
 		else			\
 			errx(1, cannot find %s: %s, #_syscall_,	\

Index: src/lib/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.66 src/lib/librumphijack/hijack.c:1.67
--- src/lib/librumphijack/hijack.c:1.66	Wed Feb 23 15:44:38 2011
+++ src/lib/librumphijack/hijack.c	Thu Feb 24 12:25:44 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.66 2011/02/23 15:44:38 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.67 2011/02/24 12:25:44 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hijack.c,v 1.66 2011/02/23 15:44:38 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.67 2011/02/24 12:25:44 pooka Exp $);
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -429,10 +429,8 @@
 rcinit(void)
 {
 	char buf[1024];
-	extern void *(*rumpclient_dlsym)(void *, const char *);
 	unsigned i, j;
 
-	rumpclient_dlsym = rumphijack_dlsym;
 	host_fork = dlsym(RTLD_NEXT, fork);
 	host_daemon = dlsym(RTLD_NEXT, daemon);
 	host_execve = dlsym(RTLD_NEXT, execve);



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

2011-02-24 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Feb 24 13:19:37 UTC 2011

Modified Files:
src/sys/arch/x86/acpi: acpi_cpu_md.c

Log Message:
add support for Family 14h (AMD Fusion)


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/x86/acpi/acpi_cpu_md.c

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

Modified files:

Index: src/sys/arch/x86/acpi/acpi_cpu_md.c
diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.39 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.40
--- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.39	Tue Feb 15 17:50:46 2011
+++ src/sys/arch/x86/acpi/acpi_cpu_md.c	Thu Feb 24 13:19:36 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.39 2011/02/15 17:50:46 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.40 2011/02/24 13:19:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.39 2011/02/15 17:50:46 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.40 2011/02/24 13:19:36 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -60,7 +60,7 @@
 #define MSR_CMPHALT_BMSTS	__BIT(29)
 
 /*
- * AMD families 10h and 11h.
+ * AMD families 10h, 11h, and 14h
  */
 #define MSR_10H_LIMIT		0xc0010061
 #define MSR_10H_CONTROL		0xc0010062
@@ -271,6 +271,10 @@
 
 		case 0x10:
 		case 0x11:
+			val |= ACPICPU_FLAG_C_C1E;
+			/* FALLTHROUGH */
+
+		case 0x14: /* AMD Fusion */
 
 			if ((regs[3]  CPUID_APM_TSC) != 0)
 val = ~ACPICPU_FLAG_C_TSC;
@@ -281,7 +285,6 @@
 			if ((regs[3]  CPUID_APM_CPB) != 0)
 val |= ACPICPU_FLAG_P_TURBO;
 
-			val |= ACPICPU_FLAG_C_C1E;
 			break;
 		}
 
@@ -495,6 +498,7 @@
 
 		case 0x10:
 		case 0x11:
+		case 0x14: /* AMD Fusion */
 			msr.ps_control_addr = MSR_10H_CONTROL;
 			msr.ps_control_mask = __BITS(0, 2);
 



CVS commit: src/sys/arch

2011-02-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 24 13:58:39 UTC 2011

Modified Files:
src/sys/arch/i386/conf: ALL GENERIC
src/sys/arch/x86/conf: files.x86
src/sys/arch/x86/x86: cpu.c identcpu.c viac7temp.c

Log Message:
Move VIA_C7TEMP to the cpufeaturebus.


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1022 -r1.1023 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/x86/conf/files.x86
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/x86/x86/identcpu.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/viac7temp.c

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

Modified files:

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.295 src/sys/arch/i386/conf/ALL:1.296
--- src/sys/arch/i386/conf/ALL:1.295	Thu Feb 24 10:56:01 2011
+++ src/sys/arch/i386/conf/ALL	Thu Feb 24 13:58:39 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.295 2011/02/24 10:56:01 jruoho Exp $
+# $NetBSD: ALL,v 1.296 2011/02/24 13:58:39 jruoho Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		ALL-$Revision: 1.295 $
+#ident 		ALL-$Revision: 1.296 $
 
 maxusers	64		# estimated number of users
 
@@ -34,6 +34,7 @@
 est0		at cpu0		# Intel Enhanced SpeedStep (non-ACPI)
 padlock0	at cpu0		# VIA PadLock
 powernow0	at cpu0		# AMD PowerNow! and Cool'n'Quiet (non-ACPI)
+viac7temp*	at cpu?		# VIA C7 temperature sensor
 
 # Intel(R) On Demand Clock Modulation (aka ODCM)
 options 	INTEL_ONDEMAND_CLOCKMOD
@@ -682,9 +683,6 @@
 alipm*	at pci? dev ? function ?
 iic*	at alipm?
 
-# VIA C7 Temperature sensor
-options 	VIA_C7TEMP
-
 # Intel ICH SMBus controller
 ichsmb* at pci? dev ? function ?
 iic*	at ichsmb?

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1022 src/sys/arch/i386/conf/GENERIC:1.1023
--- src/sys/arch/i386/conf/GENERIC:1.1022	Thu Feb 24 10:56:01 2011
+++ src/sys/arch/i386/conf/GENERIC	Thu Feb 24 13:58:39 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1022 2011/02/24 10:56:01 jruoho Exp $
+# $NetBSD: GENERIC,v 1.1023 2011/02/24 13:58:39 jruoho Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1022 $
+#ident 		GENERIC-$Revision: 1.1023 $
 
 maxusers	64		# estimated number of users
 
@@ -42,6 +42,7 @@
 est0		at cpu0		# Intel Enhanced SpeedStep (non-ACPI)
 #padlock0	at cpu0		# VIA PadLock
 powernow0	at cpu0		# AMD PowerNow! and Cool'n'Quiet (non-ACPI)
+viac7temp*	at cpu?		# VIA C7 temperature sensor
 
 # Intel(R) On Demand Clock Modulation (aka ODCM)
 #options 	INTEL_ONDEMAND_CLOCKMOD
@@ -636,9 +637,6 @@
 alipm*	at pci? dev ? function ?
 iic*	at alipm?
 
-# VIA C7 Temperature sensor
-options 	VIA_C7TEMP
-
 # Intel ICH SMBus controller
 ichsmb* at pci? dev ? function ?
 iic*	at ichsmb?

Index: src/sys/arch/x86/conf/files.x86
diff -u src/sys/arch/x86/conf/files.x86:1.61 src/sys/arch/x86/conf/files.x86:1.62
--- src/sys/arch/x86/conf/files.x86:1.61	Thu Feb 24 10:56:02 2011
+++ src/sys/arch/x86/conf/files.x86	Thu Feb 24 13:58:39 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.x86,v 1.61 2011/02/24 10:56:02 jruoho Exp $
+#	$NetBSD: files.x86,v 1.62 2011/02/24 13:58:39 jruoho Exp $
 
 # options for MP configuration through the MP spec
 defflag opt_mpbios.h MPBIOS MPVERBOSE MPDEBUG MPBIOS_SCANPCI
@@ -16,9 +16,6 @@
 # Pentium 4+ Thermal Monitor ODCM (aka On Demand Clock Modulation)
 defflag opt_intel_odcm.h 	INTEL_ONDEMAND_CLOCKMOD
 
-# VIA C7 Temperature sensor
-defflag	opt_via_c7temp.h	VIA_C7TEMP: sysmon_envsys
-
 # To be able to test for NetBSD/xen in shared files
 defflag	opt_xen.h		DO_NOT_DEFINE
 
@@ -51,6 +48,10 @@
 attach	powernow at cpufeaturebus
 file	arch/x86/x86/powernow.c		powernow
 
+device	viac7temp: sysmon_envsys
+attach	viac7temp at cpufeaturebus
+file	arch/x86/x86/viac7temp.c	viac7temp
+
 file	arch/x86/x86/apic.c		ioapic | lapic
 file	arch/x86/x86/bus_dma.c
 file	arch/x86/x86/bus_space.c
@@ -102,9 +103,6 @@
 # Intel On Demand Clock Modulation
 file	arch/x86/x86/iclockmod.c	intel_ondemand_clockmod
 
-# VIA C7 Temperature sensor
-file	arch/x86/x86/viac7temp.c	via_c7temp
-
 # IPMI device
 device	ipmi: sysmon_envsys, sysmon_wdog
 attach	ipmi at ipmibus

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.84 src/sys/arch/x86/x86/cpu.c:1.85
--- src/sys/arch/x86/x86/cpu.c:1.84	Thu Feb 24 10:56:02 2011
+++ src/sys/arch/x86/x86/cpu.c	Thu Feb 24 13:58:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.84 2011/02/24 10:56:02 jruoho Exp $	*/
+/*	$NetBSD: cpu.c,v 1.85 2011/02/24 13:58:39 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 

CVS commit: src

2011-02-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 24 14:20:29 UTC 2011

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4/man4.i386: Makefile
Added Files:
src/share/man/man4/man4.i386: viac7temp.4

Log Message:
Add viac7temp(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1294 -r1.1295 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.73 -r1.74 src/share/man/man4/man4.i386/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.i386/viac7temp.4

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1294 src/distrib/sets/lists/man/mi:1.1295
--- src/distrib/sets/lists/man/mi:1.1294	Thu Feb 24 11:29:45 2011
+++ src/distrib/sets/lists/man/mi	Thu Feb 24 14:20:28 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1294 2011/02/24 11:29:45 jruoho Exp $
+# $NetBSD: mi,v 1.1295 2011/02/24 14:20:28 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1121,6 +1121,7 @@
 ./usr/share/man/cat4/i386/spic.0		man-sys-catman		.cat
 ./usr/share/man/cat4/i386/vald.0		man-obsolete		obsolete
 ./usr/share/man/cat4/i386/vesafb.0		man-obsolete		obsolete
+./usr/share/man/cat4/i386/viac7temp.0		man-sys-catman		.cat
 ./usr/share/man/cat4/i4b.0			man-obsolete		obsolete
 ./usr/share/man/cat4/i4bctl.0			man-obsolete		obsolete
 ./usr/share/man/cat4/i4bipr.0			man-obsolete		obsolete
@@ -3865,6 +3866,7 @@
 ./usr/share/man/html4/i386/spic.html		man-sys-htmlman		html
 ./usr/share/man/html4/i386/vald.html		man-obsolete		obsolete
 ./usr/share/man/html4/i386/vesafb.html		man-obsolete		obsolete
+./usr/share/man/html4/i386/viac7temp.html	man-sys-htmlman		html
 ./usr/share/man/html4/i915drm.html		man-sys-htmlman		html
 ./usr/share/man/html4/iavc.html			man-sys-htmlman		html
 ./usr/share/man/html4/ibmhawk.html		man-sys-htmlman		html
@@ -6428,6 +6430,7 @@
 ./usr/share/man/man4/i386/spic.4		man-sys-man		.man
 ./usr/share/man/man4/i386/vald.4		man-obsolete		obsolete
 ./usr/share/man/man4/i386/vesafb.4		man-obsolete		obsolete
+./usr/share/man/man4/i386/viac7temp.4		man-sys-man		.man
 ./usr/share/man/man4/i4b.4			man-obsolete		obsolete
 ./usr/share/man/man4/i4bctl.4			man-obsolete		obsolete
 ./usr/share/man/man4/i4bipr.4			man-obsolete		obsolete

Index: src/share/man/man4/man4.i386/Makefile
diff -u src/share/man/man4/man4.i386/Makefile:1.73 src/share/man/man4/man4.i386/Makefile:1.74
--- src/share/man/man4/man4.i386/Makefile:1.73	Sat Apr 10 17:55:25 2010
+++ src/share/man/man4/man4.i386/Makefile	Thu Feb 24 14:20:29 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.73 2010/04/10 17:55:25 jruoho Exp $
+#	$NetBSD: Makefile,v 1.74 2011/02/24 14:20:29 jruoho Exp $
 #	from: @(#)Makefile	8.1 (Berkeley) 6/5/93
 
 MAN=	apm.4 autoconf.4 \
@@ -7,7 +7,7 @@
 	fdc.4 \
 	gcscide.4 gcscpcib.4 geodewdog.4 geodecntr.4 glxsb.4 gscpcib.4 \
 	intro.4 io.4 lms.4 lpt.4 mem.4 mms.4 npx.4 ndis.4 \
-	pcibios.4 pnpbios.4 spic.4
+	pcibios.4 pnpbios.4 spic.4 viac7temp.4
 MLINKS=	mem.4 kmem.4
 MLINKS+=lpt.4 lpa.4
 MLINKS+=pcibios.4 PCIBIOS.4

Added files:

Index: src/share/man/man4/man4.i386/viac7temp.4
diff -u /dev/null src/share/man/man4/man4.i386/viac7temp.4:1.1
--- /dev/null	Thu Feb 24 14:20:29 2011
+++ src/share/man/man4/man4.i386/viac7temp.4	Thu Feb 24 14:20:29 2011
@@ -0,0 +1,51 @@
+.\ $NetBSD: viac7temp.4,v 1.1 2011/02/24 14:20:29 jruoho Exp $
+.\
+.\ Copyright (c) 2011 Jukka Ruohonen jruoho...@iki.fi
+.\ 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. Neither the name of the author nor the names of any
+.\contributors may be used to endorse or promote products derived
+.\from this software without specific prior written permission.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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.
+.\
+.Dd February 24, 2011
+.Dt VIAC7TEMP 4
+.Os
+.Sh NAME
+.Nm viac7temp
+.Nd VIA C7 temperature sensor
+.Sh SYNOPSIS
+.Cd viac7temp* at cpu?
+.Sh 

CVS commit: src/lib/librumpclient

2011-02-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 24 14:22:04 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c

Log Message:
Fix static fallback path.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/lib/librumpclient/rumpclient.c

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

Modified files:

Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.35 src/lib/librumpclient/rumpclient.c:1.36
--- src/lib/librumpclient/rumpclient.c:1.35	Thu Feb 24 12:25:44 2011
+++ src/lib/librumpclient/rumpclient.c	Thu Feb 24 14:22:04 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.35 2011/02/24 12:25:44 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.36 2011/02/24 14:22:04 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -750,9 +750,9 @@
 #define FINDSYM2(_name_,_syscall_)	\
 	if ((host_##_name_ = rumphijack_dlsym(RTLD_NEXT,		\
 	#_syscall_)) == NULL) {	\
-		if (rumphijack_dlsym == dlsym)\
+		if (rumphijack_dlsym == rumpclient__dlsym)		\
 			host_##_name_ = _name_; /* static fallback */	\
-		else			\
+		if (host_##_name_ == NULL)\
 			errx(1, cannot find %s: %s, #_syscall_,	\
 			dlerror());	\
 	}



CVS commit: src/sys/arch/ews4800mips/ews4800mips

2011-02-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Feb 24 14:40:43 UTC 2011

Modified Files:
src/sys/arch/ews4800mips/ews4800mips: tr2a_intr.c

Log Message:
Check and update intc_cause on each iteration of interrupt handler loop.
Fixes silent hang during SCSI probe.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/ews4800mips/ews4800mips/tr2a_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/ews4800mips/ews4800mips/tr2a_intr.c
diff -u src/sys/arch/ews4800mips/ews4800mips/tr2a_intr.c:1.13 src/sys/arch/ews4800mips/ews4800mips/tr2a_intr.c:1.14
--- src/sys/arch/ews4800mips/ews4800mips/tr2a_intr.c:1.13	Sun Feb 20 07:55:20 2011
+++ src/sys/arch/ews4800mips/ews4800mips/tr2a_intr.c	Thu Feb 24 14:40:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tr2a_intr.c,v 1.13 2011/02/20 07:55:20 matt Exp $	*/
+/*	$NetBSD: tr2a_intr.c,v 1.14 2011/02/24 14:40:43 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tr2a_intr.c,v 1.13 2011/02/20 07:55:20 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: tr2a_intr.c,v 1.14 2011/02/24 14:40:43 tsutsui Exp $);
 
 #define __INTR_PRIVATE
 #include sys/param.h
@@ -287,6 +287,7 @@
 			*INTC_CLEAR_REG = 0x14;
 			*INTC_STATUS_REG;
 		}
+		intc_cause = *INTC_STATUS_REG  *INTC_MASK_REG;
 	}
 }
 



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

2011-02-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Feb 24 15:25:07 UTC 2011

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

Log Message:
Fix comment mangled in rev 1.142 back in 2002.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/arch/mips/mips/locore.S

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

Modified files:

Index: src/sys/arch/mips/mips/locore.S
diff -u src/sys/arch/mips/mips/locore.S:1.177 src/sys/arch/mips/mips/locore.S:1.178
--- src/sys/arch/mips/mips/locore.S:1.177	Sun Feb 20 16:58:33 2011
+++ src/sys/arch/mips/mips/locore.S	Thu Feb 24 15:25:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.177 2011/02/20 16:58:33 matt Exp $	*/
+/*	$NetBSD: locore.S,v 1.178 2011/02/24 15:25:07 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -621,13 +621,11 @@
 	 nop
 
 /*
- * We got an unimplemented operation trap so
- * We received an unimplemented operation trap.
+ * We received an unimplemented operation trap so
+ * fetch the instruction and emulate the instruction.
  *
  * We check whether it's an unimplemented FP instruction here rather
  * than invoking MachEmulateInst(), since it is faster.
- *
- * fetch the instruction and emulate the instruction.
  */
 	bgez		a2, 1f			# Check the branch delay bit.
 	 nop



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

2011-02-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Feb 24 15:27:00 UTC 2011

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

Log Message:
MachEmulateInst() - mips_emul_inst() in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/sys/arch/mips/mips/locore.S

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

Modified files:

Index: src/sys/arch/mips/mips/locore.S
diff -u src/sys/arch/mips/mips/locore.S:1.178 src/sys/arch/mips/mips/locore.S:1.179
--- src/sys/arch/mips/mips/locore.S:1.178	Thu Feb 24 15:25:07 2011
+++ src/sys/arch/mips/mips/locore.S	Thu Feb 24 15:27:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.178 2011/02/24 15:25:07 tsutsui Exp $	*/
+/*	$NetBSD: locore.S,v 1.179 2011/02/24 15:27:00 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -625,7 +625,7 @@
  * fetch the instruction and emulate the instruction.
  *
  * We check whether it's an unimplemented FP instruction here rather
- * than invoking MachEmulateInst(), since it is faster.
+ * than invoking mips_emul_inst(), since it is faster.
  */
 	bgez		a2, 1f			# Check the branch delay bit.
 	 nop



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

2011-02-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Feb 24 15:52:23 UTC 2011

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

Log Message:
Fix wrong register usage in mips_fpu_trap():
 - trapframe is the second arg a1, not a3
 - cause is now loaded in a2, not t0 or t3

Fixes kernel panic during tests/lib/libc/ieeefp:
---
tps-count: 4
tp-start: t_except, 6
tc-start: masked_double
pid 645(t_except): trap: cpu0, TLB modification in kernel mode
status=0x2000ff03, cause=0x4, epc=0x80001420, vaddr=0x4026c8
tf=0xc8b15d00 ksp=0xc8b15da0 ra=0x8024af80 ppl=0x7fff5cd0
kernel: TLB modification trap
Stopped in pid 645.1 (t_except) at  \
netbsd:mips_fpu_intr+0x74:  sw  t3,144(a3)
db

though the ieeefp tests still fail in various places.


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/arch/mips/mips/locore.S

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

Modified files:

Index: src/sys/arch/mips/mips/locore.S
diff -u src/sys/arch/mips/mips/locore.S:1.179 src/sys/arch/mips/mips/locore.S:1.180
--- src/sys/arch/mips/mips/locore.S:1.179	Thu Feb 24 15:27:00 2011
+++ src/sys/arch/mips/mips/locore.S	Thu Feb 24 15:52:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.179 2011/02/24 15:27:00 tsutsui Exp $	*/
+/*	$NetBSD: locore.S,v 1.180 2011/02/24 15:52:23 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -653,11 +653,11 @@
 /*
  * Send a floating point exception signal to the current LWP.
  */
-	srl		t0, 8
-	sll		t0, 8
-	ori		t3, T_RES_INST  MIPS_CR_EXC_CODE_SHIFT
+	srl		a2, 8
+	sll		a2, 8
+	ori		a2, T_RES_INST  MIPS_CR_EXC_CODE_SHIFT
 	REG_PROLOGUE
-	REG_S		t3, TF_REG_CAUSE(a3)
+	REG_S		a2, TF_REG_CAUSE(a1)
 	REG_EPILOGUE
 
 	move		a1, a0# code = instruction
@@ -673,7 +673,7 @@
  */
 3:
 	REG_PROLOGUE
-	REG_S		t3, TF_REG_CAUSE(a3)
+	REG_S		a2, TF_REG_CAUSE(a1)
 	REG_EPILOGUE
 
 	and		a0, t0, ~MIPS_FPU_EXCEPTION_BITS



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

2011-02-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Feb 24 16:21:51 UTC 2011

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

Log Message:
- use correct address to fetch an instruction that causes FP trap
  not in BDslot (broken since the first mips64 partial merge)
- also fix leftover confusing comment that should have been removed
  when rev 1.82 was committed back in 1999.

Previously the most ieeefp tests dump core:
---
tp-start: t_except, 6
tc-start: masked_double
tc-end: masked_double, failed, Test program received signal 4 (core dumped)
tc-start: masked_float
tc-end: masked_float, failed, Test program received signal 4 (core dumped)
tc-start: masked_long_double
tc-end: masked_long_double, failed, Test program received signal 4 (core dumped)
tc-start: unmasked_double
tc-end: unmasked_double, failed, Test program received signal 4 (core dumped)
tc-start: unmasked_float
tc-end: unmasked_float, failed, Test program received signal 4 (core dumped)
tc-start: unmasked_long_double
tc-end: unmasked_long_double, failed, Test program received signal 4 (core 
dumped)
tp-end: t_except
 :
tp-start: t_subnormal, 2
tc-start: test_double
tc-end: test_double, failed, Test program received signal 4 (core dumped)
tc-start: test_float
tc-end: test_float, failed, Test program received signal 4 (core dumped)
tp-end: t_subnormal
---

Now they fail differently:
---
tp-start: t_except, 6
tc-start: masked_double
tc-end: masked_double, failed, Test program received signal 4 (core dumped)
tc-start: masked_float
tc-end: masked_float, passed
tc-start: masked_long_double
tc-se:*** Check failed: /usr/src/tests/lib/libc/ieeefp/t_except.c:227: ex1  
t-mask != t-mask
tc-end: masked_long_double, failed, 1 checks failed; see output for more details
tc-start: unmasked_double
tc-se:*** Check failed: /usr/src/tests/lib/libc/ieeefp/t_except.c:269: sicode 
!= t-sicode
tc-end: unmasked_double, failed, 1 checks failed; see output for more details
tc-start: unmasked_float
tc-se:*** Check failed: /usr/src/tests/lib/libc/ieeefp/t_except.c:269: sicode 
!= t-sicode
tc-end: unmasked_float, failed, 1 checks failed; see output for more details
tc-start: unmasked_long_double
tc-se:*** Check failed: /usr/src/tests/lib/libc/ieeefp/t_except.c:269: sicode 
!= t-sicode
tc-end: unmasked_long_double, failed, 1 checks failed; see output for more 
details
tp-end: t_except
 :
tp-start: t_subnormal, 2
tc-start: test_double
tc-end: test_double, failed, Test program received signal 4 (core dumped)
tc-start: test_float
tc-end: test_float, failed, Test program received signal 4 (core dumped)
tp-end: t_subnormal
---


To generate a diff of this commit:
cvs rdiff -u -r1.180 -r1.181 src/sys/arch/mips/mips/locore.S

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

Modified files:

Index: src/sys/arch/mips/mips/locore.S
diff -u src/sys/arch/mips/mips/locore.S:1.180 src/sys/arch/mips/mips/locore.S:1.181
--- src/sys/arch/mips/mips/locore.S:1.180	Thu Feb 24 15:52:23 2011
+++ src/sys/arch/mips/mips/locore.S	Thu Feb 24 16:21:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.180 2011/02/24 15:52:23 tsutsui Exp $	*/
+/*	$NetBSD: locore.S,v 1.181 2011/02/24 16:21:50 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -635,11 +635,10 @@
 	b		2f
 	 INT_L		a0, 4(a0)		# a0 = coproc instruction
 /*
- * This is not in the branch delay slot so calculate the resulting
- * PC (epc + 4) into v0 and continue to MachEmulateFP().
+ * This is not in the branch delay slot.
  */
 1:
-	INT_L		a0, 4(a0)		# a0 = coproc instruction
+	INT_L		a0, 0(a0)		# a0 = coproc instruction
 2:
 
 /*



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

2011-02-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Feb 24 16:49:15 UTC 2011

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

Log Message:
Resurrect silently removed lines in rev 1.37 that update FPU_CSR
in double's inexact or overflow cases.

Now the following tests are passed:
---
tp-start: t_except, 6
tc-start: masked_double
tc-end: masked_double, passed
 :
tc-start: masked_long_double
tc-end: masked_long_double, passed
 :
tp-start: t_subnormal, 2
tc-start: test_double
tc-end: test_double, passed
---

The following ones still fail:
---
tp-start: t_except, 6
 :
tc-start: unmasked_double
tc-se:*** Check failed: /usr/src/tests/lib/libc/ieeefp/t_except.c:269: sicode 
!= t-sicode
tc-end: unmasked_double, failed, 1 checks failed; see output for more details
tc-start: unmasked_float
tc-se:*** Check failed: /usr/src/tests/lib/libc/ieeefp/t_except.c:269: sicode 
!= t-sicode
tc-end: unmasked_float, failed, 1 checks failed; see output for more details
tc-start: unmasked_long_double
tc-se:*** Check failed: /usr/src/tests/lib/libc/ieeefp/t_except.c:269: sicode 
!= t-sicode
tc-end: unmasked_long_double, failed, 1 checks failed; see output for more 
details
tp-end: t_except
 :
tp-start: t_subnormal, 2
 :
tc-start: test_float
tc-end: test_float, failed, Test program received signal 4 (core dumped)
tp-end: t_subnormal
---

- t_except unmasked failures are mentioned in PR port-mips/35327.
- t_subnormal float failure seems trap caused by a FP insn in BDslot
  (I'm not sure if we can use TF_REG_CAUSE in trapframe to see BD bit)


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mips/mips/fp.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/fp.S
diff -u src/sys/arch/mips/mips/fp.S:1.38 src/sys/arch/mips/mips/fp.S:1.39
--- src/sys/arch/mips/mips/fp.S:1.38	Sun Feb 20 07:45:47 2011
+++ src/sys/arch/mips/mips/fp.S	Thu Feb 24 16:49:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fp.S,v 1.38 2011/02/20 07:45:47 matt Exp $	*/
+/*	$NetBSD: fp.S,v 1.39 2011/02/24 16:49:15 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -2593,6 +2593,8 @@
 	PTR_L	v0, L_PCB(MIPS_CURLWP)		# get pcb of current lwp
 	#nop
 	INT_S	a2, PCB_FPREGS+FRAME_FSR(v0)
+#else
+	ctc1	a2, MIPS_FPU_CSR		# save exceptions
 #endif
 	b	done
 



CVS commit: src/tests/fs/hfs

2011-02-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 24 17:26:46 UTC 2011

Modified Files:
src/tests/fs/hfs: t_pathconvert.c

Log Message:
xfail PR kern/44631 on sparc64


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/hfs/t_pathconvert.c

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

Modified files:

Index: src/tests/fs/hfs/t_pathconvert.c
diff -u src/tests/fs/hfs/t_pathconvert.c:1.2 src/tests/fs/hfs/t_pathconvert.c:1.3
--- src/tests/fs/hfs/t_pathconvert.c:1.2	Tue Feb 22 18:41:04 2011
+++ src/tests/fs/hfs/t_pathconvert.c	Thu Feb 24 17:26:46 2011
@@ -1,9 +1,10 @@
-/*	$NetBSD: t_pathconvert.c,v 1.2 2011/02/22 18:41:04 pooka Exp $	*/
+/*	$NetBSD: t_pathconvert.c,v 1.3 2011/02/24 17:26:46 pooka Exp $	*/
 
 #include sys/types.h
 #include sys/mount.h
 
 #include atf-c.h
+#include atf-c/config.h
 #include dirent.h
 #include errno.h
 #include fcntl.h
@@ -40,6 +41,9 @@
 	int offset, nbytes;
 	bool ok = false;
 
+	if (strcmp(atf_config_get(atf_arch), sparc64) == 0)
+		atf_tc_expect_signal(-1, PR kern/44631);
+
 	snprintf(thecmd, sizeof(thecmd), uudecode %s/colon.hfs.bz2.uue,
 	atf_tc_get_config_var(tc, srcdir));
 	RZ(system(thecmd));



CVS commit: src/tests/fs/hfs

2011-02-24 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 24 17:29:49 UTC 2011

Modified Files:
src/tests/fs/hfs: t_pathconvert.c

Log Message:
adjust location of xfail in previous for more accuracy


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/hfs/t_pathconvert.c

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

Modified files:

Index: src/tests/fs/hfs/t_pathconvert.c
diff -u src/tests/fs/hfs/t_pathconvert.c:1.3 src/tests/fs/hfs/t_pathconvert.c:1.4
--- src/tests/fs/hfs/t_pathconvert.c:1.3	Thu Feb 24 17:26:46 2011
+++ src/tests/fs/hfs/t_pathconvert.c	Thu Feb 24 17:29:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_pathconvert.c,v 1.3 2011/02/24 17:26:46 pooka Exp $	*/
+/*	$NetBSD: t_pathconvert.c,v 1.4 2011/02/24 17:29:48 pooka Exp $	*/
 
 #include sys/types.h
 #include sys/mount.h
@@ -41,9 +41,6 @@
 	int offset, nbytes;
 	bool ok = false;
 
-	if (strcmp(atf_config_get(atf_arch), sparc64) == 0)
-		atf_tc_expect_signal(-1, PR kern/44631);
-
 	snprintf(thecmd, sizeof(thecmd), uudecode %s/colon.hfs.bz2.uue,
 	atf_tc_get_config_var(tc, srcdir));
 	RZ(system(thecmd));
@@ -57,6 +54,9 @@
 
 	RL(rump_sys_mkdir(/mp, 0777));
 	RZ(rump_pub_etfs_register(FAKEBLK, IMGNAME, RUMP_ETFS_BLK));
+
+	if (strcmp(atf_config_get(atf_arch), sparc64) == 0)
+		atf_tc_expect_signal(-1, PR kern/44631);
 	RL(rump_sys_mount(MOUNT_HFS, /mp, 0, args, sizeof args));
 
 	RL(dirfd = rump_sys_open(/mp, O_RDONLY));



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

2011-02-24 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb 24 17:42:16 UTC 2011

Modified Files:
src/sys/arch/i386/conf: ALL

Log Message:
Some cleanup:
- voyagerfb has no business on x86, so throw it out
- add igsfb, unlike the above it exists in real life on PC graphics cards
- remove duplicate genfb and machfb entries
- remove duplicate wsdisplay entries


To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 src/sys/arch/i386/conf/ALL

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

Modified files:

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.296 src/sys/arch/i386/conf/ALL:1.297
--- src/sys/arch/i386/conf/ALL:1.296	Thu Feb 24 13:58:39 2011
+++ src/sys/arch/i386/conf/ALL	Thu Feb 24 17:42:16 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.296 2011/02/24 13:58:39 jruoho Exp $
+# $NetBSD: ALL,v 1.297 2011/02/24 17:42:16 macallan Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		ALL-$Revision: 1.296 $
+#ident 		ALL-$Revision: 1.297 $
 
 maxusers	64		# estimated number of users
 
@@ -562,30 +562,23 @@
 vga0		at isa?
 vga*		at pci? dev ? function ?
 pcdisplay0	at isa?			# CGA, MDA, EGA, HGA
-genfb*		at pci? dev ? function ? # generic linear framebuffer driver
-machfb* 	at pci? dev ? function ? # ATI Mach64 framebuffer driver
-wsdisplay*	at vga? console ?
-wsdisplay*	at pcdisplay? console ?
-wsdisplay*	at wsemuldisplaydev?
-wsdisplay* 	at machfb? console ?
 wskbd*		at pckbd? console ?
 wsmouse*	at pms? mux 0
 
 chipsfb*	at pci? dev ? function ?
 genfb*		at pci? dev ? function ?
+igsfb*		at pci? dev ? function ?
 machfb*		at pci? dev ? function ?
 pm2fb*		at pci? dev ? function ?
 r128fb*		at pci? dev ? function ?
 radeonfb*	at pci? dev ? function ?
 unichromefb*	at pci? dev ? function ?  # VIA Unichrome framebuffer console
 voodoofb*	at pci? dev ? function ?
-voyagerfb*	at pci? dev ? function ?
 wcfb*	at pci? dev ? function ?
-wsdisplay*	at unichromefb?
+wsdisplay*	at wsemuldisplaydev?
 
 # XBOX framebuffer console
 xboxfb0 	at pci? dev ? function ?
-wsdisplay*	at xboxfb? console ?
 
 # DRI driver
 i915drm*	at drm?		# Intel i915, i945 DRM driver
@@ -1226,7 +1219,6 @@
 
 # USB LCDs and USB-VGA adaptors
 udl*	at uhub? port ?		# DisplayLink DL-1x0/1x5
-wsdisplay* at udl?
 
 # USB Printer
 ulpt*	at uhub? port ? configuration ? interface ?



CVS commit: src/sys/dist/ipf/netinet

2011-02-24 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Thu Feb 24 18:35:40 UTC 2011

Modified Files:
src/sys/dist/ipf/netinet: ip_rpcb_pxy.c

Log Message:
avoid #ifdef/#endif inside sprint() argument list, as with USE_FORT=yes
sprint becomes a macro


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dist/ipf/netinet/ip_rpcb_pxy.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/dist/ipf/netinet/ip_rpcb_pxy.c
diff -u src/sys/dist/ipf/netinet/ip_rpcb_pxy.c:1.14 src/sys/dist/ipf/netinet/ip_rpcb_pxy.c:1.15
--- src/sys/dist/ipf/netinet/ip_rpcb_pxy.c:1.14	Wed Aug 19 08:36:12 2009
+++ src/sys/dist/ipf/netinet/ip_rpcb_pxy.c	Thu Feb 24 18:35:40 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_rpcb_pxy.c,v 1.14 2009/08/19 08:36:12 darrenr Exp $	*/
+/*	$NetBSD: ip_rpcb_pxy.c,v 1.15 2011/02/24 18:35:40 plunky Exp $	*/
 
 /*
  * Copyright (C) 2002-2003 by Ryan Beasley ry...@goddamnbastard.org
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: ip_rpcb_pxy.c,v 1.14 2009/08/19 08:36:12 darrenr Exp $);
+__KERNEL_RCSID(1, $NetBSD: ip_rpcb_pxy.c,v 1.15 2011/02/24 18:35:40 plunky Exp $);
 
 #define	IPF_RPCB_PROXY
 
@@ -793,11 +793,13 @@
 	bzero(uaddr, sizeof(uaddr)); /* Just in case we need padding. */
 #if defined(SNPRINTF)  defined(_KERNEL)
 	SNPRINTF(uaddr, sizeof(uaddr),
+		   %u.%u.%u.%u.%u.%u, i[0]  0xff, i[1]  0xff,
+		   i[2]  0xff, i[3]  0xff, p[0]  0xff, p[1]  0xff);
 #else
 	(void) sprintf(uaddr,
-#endif
 		   %u.%u.%u.%u.%u.%u, i[0]  0xff, i[1]  0xff,
 		   i[2]  0xff, i[3]  0xff, p[0]  0xff, p[1]  0xff);
+#endif
 	len = strlen(uaddr);
 	xlen = XDRALIGN(len);
 
@@ -1323,11 +1325,13 @@
 	bzero(uaddr, sizeof(uaddr)); /* Just in case we need padding. */
 #if defined(SNPRINTF)  defined(_KERNEL)
 	SNPRINTF(uaddr, sizeof(uaddr),
+		   %u.%u.%u.%u.%u.%u, i[0]  0xff, i[1]  0xff,
+		   i[2]  0xff, i[3]  0xff, p[0]  0xff, p[1]  0xff);
 #else
 	(void) sprintf(uaddr,
-#endif
 		   %u.%u.%u.%u.%u.%u, i[0]  0xff, i[1]  0xff,
 		   i[2]  0xff, i[3]  0xff, p[0]  0xff, p[1]  0xff);
+#endif
 	len = strlen(uaddr);
 	xlen = XDRALIGN(len);
 
@@ -1403,12 +1407,15 @@
 		padding. */
 #if defined(SNPRINTF)  defined(_KERNEL)
 		SNPRINTF(uaddr, sizeof(uaddr),
+			   %u.%u.%u.%u.%u.%u, i[0]  0xff,
+			   i[1]  0xff, i[2]  0xff, i[3]  0xff,
+			   p[0]  0xff, p[1]  0xff);
 #else
 		(void) sprintf(uaddr,
-#endif
 			   %u.%u.%u.%u.%u.%u, i[0]  0xff,
 			   i[1]  0xff, i[2]  0xff, i[3]  0xff,
 			   p[0]  0xff, p[1]  0xff);
+#endif
 		len = strlen(uaddr);
 		xlen = XDRALIGN(len);
 



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

2011-02-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Feb 24 19:00:59 UTC 2011

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

Log Message:
Catch up with x86 on cpufeaturebus.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/xen/x86/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/xen/x86/cpu.c
diff -u src/sys/arch/xen/x86/cpu.c:1.54 src/sys/arch/xen/x86/cpu.c:1.55
--- src/sys/arch/xen/x86/cpu.c:1.54	Thu Feb 24 10:56:03 2011
+++ src/sys/arch/xen/x86/cpu.c	Thu Feb 24 19:00:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.54 2011/02/24 10:56:03 jruoho Exp $	*/
+/*	$NetBSD: cpu.c,v 1.55 2011/02/24 19:00:58 jruoho Exp $	*/
 /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp  */
 
 /*-
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.54 2011/02/24 10:56:03 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.55 2011/02/24 19:00:58 jruoho Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -286,13 +286,7 @@
 	if (ifattr_match(ifattr, cpufeaturebus)) {
 
 		if (ci-ci_frequency == NULL) {
-			cfaa.name = est;
-			ci-ci_frequency = config_found_ia(self,
-			cpufeaturebus, cfaa, NULL);
-		}
-
-		if (ci-ci_frequency == NULL) {
-			cfaa.name = powernow;
+			cfaa.name = frequency;
 			ci-ci_frequency = config_found_ia(self,
 			cpufeaturebus, cfaa, NULL);
 		}



CVS commit: src/sys/opencrypto

2011-02-24 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Thu Feb 24 19:28:04 UTC 2011

Modified Files:
src/sys/opencrypto: criov.c

Log Message:
Don't panic, just truncate, if the iov is too short in a COPYBACK.
This case can be triggered from userland cryptodev if the buffer
for decompressed data is too small.
(It would look cleaner if the lengths would be passed explicitely
everywhere, but that would thwart the abstraction done by COPYDATA/COPYBACK
which allows to treat mbufs and iovs the same way.)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/opencrypto/criov.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/opencrypto/criov.c
diff -u src/sys/opencrypto/criov.c:1.7 src/sys/opencrypto/criov.c:1.8
--- src/sys/opencrypto/criov.c:1.7	Sat Mar 14 21:04:26 2009
+++ src/sys/opencrypto/criov.c	Thu Feb 24 19:28:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: criov.c,v 1.7 2009/03/14 21:04:26 dsl Exp $ */
+/*	$NetBSD: criov.c,v 1.8 2011/02/24 19:28:03 drochner Exp $ */
 /*  $OpenBSD: criov.c,v 1.11 2002/06/10 19:36:43 espie Exp $	*/
 
 /*
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: criov.c,v 1.7 2009/03/14 21:04:26 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: criov.c,v 1.8 2011/02/24 19:28:03 drochner Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -90,8 +90,12 @@
 	if (len  0)
 		panic(cuio_copyback: len %d  0, len);
 	while (off  0) {
-		if (iol == 0)
-			panic(cuio_copyback: empty in skip);
+		if (iol == 0) {
+#ifdef DEBUG
+			printf(cuio_copyback: empty in skip\n);
+#endif
+			return;
+		}
 		if (off  iov-iov_len)
 			break;
 		off -= iov-iov_len;
@@ -99,8 +103,12 @@
 		iov++;
 	}
 	while (len  0) {
-		if (iol == 0)
-			panic(uio_copyback: empty);
+		if (iol == 0) {
+#ifdef DEBUG
+			printf(uio_copyback: empty\n);
+#endif
+			return;
+		}
 		count = min(iov-iov_len - off, len);
 		memcpy((char *)iov-iov_base + off, cp, count);
 		len -= count;



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

2011-02-24 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Thu Feb 24 19:32:34 UTC 2011

Modified Files:
src/sys/arch/sandpoint/sandpoint: com_eumb.c satmgr.c

Log Message:
Print interrupting at. Improved style guide conformance.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sandpoint/sandpoint/com_eumb.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sandpoint/sandpoint/satmgr.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/sandpoint/com_eumb.c
diff -u src/sys/arch/sandpoint/sandpoint/com_eumb.c:1.5 src/sys/arch/sandpoint/sandpoint/com_eumb.c:1.6
--- src/sys/arch/sandpoint/sandpoint/com_eumb.c:1.5	Thu Jul 30 05:57:27 2009
+++ src/sys/arch/sandpoint/sandpoint/com_eumb.c	Thu Feb 24 19:32:34 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: com_eumb.c,v 1.5 2009/07/30 05:57:27 nisimura Exp $ */
+/* $NetBSD: com_eumb.c,v 1.6 2011/02/24 19:32:34 phx Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: com_eumb.c,v 1.5 2009/07/30 05:57:27 nisimura Exp $);
+__KERNEL_RCSID(0, $NetBSD: com_eumb.c,v 1.6 2011/02/24 19:32:34 phx Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -56,12 +56,12 @@
 static struct com_regs cnregs;
 
 /*
- * There are two different UART configurations, single 4-wire UART
- * and dual 2-wire.  DCR register selects one of the two operating
- * mode.  A certain group of NAS boxes uses the 2nd UART as system
- * console while the 1st to communicate power management satellite
- * processor. unit locator helps to reverse the two.  Default is a
- * single 4-wire UART as console.
+ * There are two different UART configurations: single 4-wire UART
+ * and dual 2-wire.  The DCR register selects one of the two operating
+ * modes.  A certain group of NAS boxes uses the 2nd UART as system
+ * console while using the 1st to communicate with the power management
+ * satellite processor. The unit locator helps to reverse the two.
+ * Default is a single 4-wire UART as console.
  */
 int
 com_eumb_match(device_t parent, cfdata_t cf, void *aux)
@@ -70,10 +70,10 @@
 	int unit = eaa-eumb_unit;
 
 	if (unit == EUMBCF_UNIT_DEFAULT  found == 0)
-		return (1);
+		return 1;
 	if (unit == 0 || unit == 1)
-		return (1);
-	return (0);
+		return 1;
+	return 0;
 }
 
 void
@@ -92,8 +92,7 @@
 	if (com_is_console(eaa-eumb_bt, comaddr, ioh)) {
 		cnregs.cr_ioh = ioh;
 		sc-sc_regs = cnregs;
-	}
-	else {
+	} else {
 		bus_space_map(eaa-eumb_bt, comaddr, COM_NPORTS, 0, ioh);
 		COM_INIT_REGS(sc-sc_regs, eaa-eumb_bt, ioh, comaddr);
 	}
@@ -101,7 +100,9 @@
 	epicirq = (eaa-eumb_unit == 1) ? 25 : 24;
 
 	com_attach_subr(sc);
+
 	intr_establish(epicirq + 16, IST_LEVEL, IPL_SERIAL, comintr, sc);
+	aprint_normal_dev(self, interrupting at irq %d\n, epicirq + 16);
 }
 
 int

Index: src/sys/arch/sandpoint/sandpoint/satmgr.c
diff -u src/sys/arch/sandpoint/sandpoint/satmgr.c:1.3 src/sys/arch/sandpoint/sandpoint/satmgr.c:1.4
--- src/sys/arch/sandpoint/sandpoint/satmgr.c:1.3	Thu Feb 10 13:54:45 2011
+++ src/sys/arch/sandpoint/sandpoint/satmgr.c	Thu Feb 24 19:32:34 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: satmgr.c,v 1.3 2011/02/10 13:54:45 nisimura Exp $ */
+/* $NetBSD: satmgr.c,v 1.4 2011/02/24 19:32:34 phx Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -71,10 +71,12 @@
 	uint32_t		sc_ierror, sc_overr;
 	kmutex_t		sc_lock;
 	kcondvar_t		sc_rdcv, sc_wrcv;
-	char sc_rd_buf[16], *sc_rd_lim, *sc_rd_cur, *sc_rd_ptr;
-	char sc_wr_buf[16], *sc_wr_lim, *sc_wr_cur, *sc_wr_ptr;
-	int sc_rd_cnt, sc_wr_cnt;
-	int sc_btnstate;
+	char			sc_rd_buf[16];
+	char			*sc_rd_lim, *sc_rd_cur, *sc_rd_ptr;
+	char			sc_wr_buf[16];
+	char			*sc_wr_lim, *sc_wr_cur, *sc_wr_ptr;
+	int			sc_rd_cnt, sc_wr_cnt;
+	int			sc_btnstate;
 	struct satops		*sc_ops;
 };
 
@@ -155,10 +157,10 @@
 	int unit = eaa-eumb_unit;
 
 	if (unit == EUMBCF_UNIT_DEFAULT  found == 0)
-		return (1);
+		return 1;
 	if (unit == 0 || unit == 1)
-		return (1);
-	return (0);
+		return 1;
+	return 0;
 }
 
 static void
@@ -208,6 +210,7 @@
 
 	epicirq = (eaa-eumb_unit == 0) ? 24 : 25;
 	intr_establish(epicirq + 16, IST_LEVEL, IPL_SERIAL, hwintr, sc);
+	aprint_normal_dev(self, interrupting at irq %d\n, epicirq + 16);
 	sc-sc_si = softint_establish(SOFTINT_SERIAL, swintr, sc);
 
 	CSR_WRITE(sc, IER, 0x7f); /* all but MSR */
@@ -289,8 +292,7 @@
 		callout_setfunc(sc-sc_ch_wdog, wdog_tickle, sc);
 		callout_schedule(sc-sc_ch_wdog, 90 * hz);
 		send_sat(sc, JJ);
-	}
-	else {
+	} else {
 		callout_stop(sc-sc_ch_wdog);
 		send_sat(sc, KK);
 	}
@@ -466,8 +468,9 @@
 	return (kn-kn_data  0);
 }
 
-static const struct filterops read_filtops =
-	{ 1, NULL, filt_rdetach, filt_read };			
+static const struct filterops read_filtops = {
+	1, NULL, filt_rdetach, filt_read
+};			
 
 static int
 satkqfilter(dev_t dev, struct knote *kn)
@@ -482,7 +485,7 @@
 		break;
 
 	default:
-		return 

CVS commit: src/sys/opencrypto

2011-02-24 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Thu Feb 24 19:35:46 UTC 2011

Modified Files:
src/sys/opencrypto: crypto.c

Log Message:
make the crypto softint MPSAFE -- I see no reason not to do it, and
it didn't cause trouble for me. (It doesn't give additional parallelization
as things look now, just saves the acquisition of KERNEL_LOCK.)


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/opencrypto/crypto.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/opencrypto/crypto.c
diff -u src/sys/opencrypto/crypto.c:1.37 src/sys/opencrypto/crypto.c:1.38
--- src/sys/opencrypto/crypto.c:1.37	Wed Jan 26 19:52:16 2011
+++ src/sys/opencrypto/crypto.c	Thu Feb 24 19:35:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: crypto.c,v 1.37 2011/01/26 19:52:16 christos Exp $ */
+/*	$NetBSD: crypto.c,v 1.38 2011/02/24 19:35:46 drochner Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $	*/
 /*	$OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $	*/
 
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: crypto.c,v 1.37 2011/01/26 19:52:16 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: crypto.c,v 1.38 2011/02/24 19:35:46 drochner Exp $);
 
 #include sys/param.h
 #include sys/reboot.h
@@ -76,7 +76,7 @@
 /* below are kludges for residual code wrtitten to FreeBSD interfaces */
   #define SWI_CRYPTO 17
   #define register_swi(lvl, fn)  \
-  softint_establish(SOFTINT_NET, (void (*)(void *))fn, NULL)
+  softint_establish(SOFTINT_NET|SOFTINT_MPSAFE, (void (*)(void *))fn, NULL)
   #define unregister_swi(lvl, fn)  softint_disestablish(softintr_cookie)
   #define setsoftcrypto(x) softint_schedule(x)
 



CVS commit: src/sys/dev/pci

2011-02-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 24 20:01:00 UTC 2011

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

Log Message:
Update desc for RT3090.  Add Intel NM10_LPC


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

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1063 src/sys/dev/pci/pcidevs:1.1064
--- src/sys/dev/pci/pcidevs:1.1063	Thu Feb 24 00:33:17 2011
+++ src/sys/dev/pci/pcidevs	Thu Feb 24 20:00:59 2011
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1063 2011/02/24 00:33:17 matt Exp $
+$NetBSD: pcidevs,v 1.1064 2011/02/24 20:00:59 matt Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2674,6 +2674,7 @@
 product INTEL 82945GME_IGD	0x27ae	82945GME Integrated Graphics Device
 product INTEL 82801G_LPC	0x27b8	82801GB/GR LPC Interface Bridge
 product INTEL 82801GBM_LPC	0x27b9	82801GBM LPC Interface Bridge
+product INTEL NM10_LPC		0x27bc	NM10 Family LPC Interface Bridge
 product INTEL 82801GHM_LPC	0x27bd	82801GHM LPC Interface Bridge
 product INTEL 82801G_SATA	0x27c0	82801GB/GR SATA Controller
 product INTEL 82801G_SATA_AHCI	0x27c1	82801GB/GR AHCI SATA Controller
@@ -3891,7 +3892,7 @@
 product	RALINK	RT2561S		0x0301	RT2561S 802.11b/g
 product	RALINK	RT2561		0x0302	RT2561 802.11b/g
 product	RALINK	RT2661		0x0401	RT2661 802.11b/g/n
-product	RALINK	RT3090		0x3090	RT3090 802.11b/g/n w/ BlueTooth
+product	RALINK	RT3090		0x3090	RT3090 802.11b/g/n
 
 /* RATOC Systems products */
 product RATOC	REXPCI31	0x0853	REX PCI-31/33 SCSI



CVS commit: src/sys/dev/pci

2011-02-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 24 20:01:53 UTC 2011

Modified Files:
src/sys/dev/pci: agp.c agp_i810.c

Log Message:
Add Intel Pineview support


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/pci/agp.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/agp_i810.c

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

Modified files:

Index: src/sys/dev/pci/agp.c
diff -u src/sys/dev/pci/agp.c:1.77 src/sys/dev/pci/agp.c:1.78
--- src/sys/dev/pci/agp.c:1.77	Tue Feb 15 08:57:01 2011
+++ src/sys/dev/pci/agp.c	Thu Feb 24 20:01:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp.c,v 1.77 2011/02/15 08:57:01 jmcneill Exp $	*/
+/*	$NetBSD: agp.c,v 1.78 2011/02/24 20:01:53 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: agp.c,v 1.77 2011/02/15 08:57:01 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: agp.c,v 1.78 2011/02/24 20:01:53 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -210,6 +210,10 @@
 	  NULL, 		agp_i810_attach },
 	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_IRONLAKE_MC2_HB,
 	  NULL, 		agp_i810_attach },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_PINEVIEW_HB,
+	  NULL, 		agp_i810_attach },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_PINEVIEW_M_HB,
+	  NULL, 		agp_i810_attach },
 #endif
 
 #if NAGP_INTEL  0

Index: src/sys/dev/pci/agp_i810.c
diff -u src/sys/dev/pci/agp_i810.c:1.71 src/sys/dev/pci/agp_i810.c:1.72
--- src/sys/dev/pci/agp_i810.c:1.71	Sun Jan 30 23:43:08 2011
+++ src/sys/dev/pci/agp_i810.c	Thu Feb 24 20:01:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp_i810.c,v 1.71 2011/01/30 23:43:08 gsutre Exp $	*/
+/*	$NetBSD: agp_i810.c,v 1.72 2011/02/24 20:01:53 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.71 2011/01/30 23:43:08 gsutre Exp $);
+__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.72 2011/02/24 20:01:53 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -220,6 +220,8 @@
 	case PCI_PRODUCT_INTEL_82B43_IGD:
 	case PCI_PRODUCT_INTEL_IRONLAKE_D_IGD:
 	case PCI_PRODUCT_INTEL_IRONLAKE_M_IGD:
+	case PCI_PRODUCT_INTEL_PINEVIEW_IGD:
+	case PCI_PRODUCT_INTEL_PINEVIEW_M_IGD:
 		return (1);
 	}
 
@@ -304,6 +306,8 @@
 	case PCI_PRODUCT_INTEL_82945GM_IGD_1:
 	case PCI_PRODUCT_INTEL_82945GME_IGD:
 	case PCI_PRODUCT_INTEL_E7221_IGD:
+	case PCI_PRODUCT_INTEL_PINEVIEW_IGD:
+	case PCI_PRODUCT_INTEL_PINEVIEW_M_IGD:
 		isc-chiptype = CHIP_I915;
 		break;
 	case PCI_PRODUCT_INTEL_82965Q_IGD:



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

2011-02-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 24 20:02:20 UTC 2011

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

Log Message:
Add Intel Pineview support


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x86/pci/pchb.c

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

Modified files:

Index: src/sys/arch/x86/pci/pchb.c
diff -u src/sys/arch/x86/pci/pchb.c:1.23 src/sys/arch/x86/pci/pchb.c:1.24
--- src/sys/arch/x86/pci/pchb.c:1.23	Fri Jul 23 00:43:21 2010
+++ src/sys/arch/x86/pci/pchb.c	Thu Feb 24 20:02:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pchb.c,v 1.23 2010/07/23 00:43:21 jakllsch Exp $ */
+/*	$NetBSD: pchb.c,v 1.24 2011/02/24 20:02:20 matt Exp $ */
 
 /*-
  * Copyright (c) 1996, 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pchb.c,v 1.23 2010/07/23 00:43:21 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: pchb.c,v 1.24 2011/02/24 20:02:20 matt Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -394,6 +394,8 @@
 		case PCI_PRODUCT_INTEL_IRONLAKE_M_HB:
 		case PCI_PRODUCT_INTEL_IRONLAKE_MA_HB:
 		case PCI_PRODUCT_INTEL_IRONLAKE_MC2_HB:
+		case PCI_PRODUCT_INTEL_PINEVIEW_HB:
+		case PCI_PRODUCT_INTEL_PINEVIEW_M_HB:
 			/*
 			 * The host bridge is either in GFX mode (internal
 			 * graphics) or in AGP mode. In GFX mode, we pretend



CVS commit: src/sys

2011-02-24 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Thu Feb 24 20:03:41 UTC 2011

Modified Files:
src/sys/netipsec: xform_ipcomp.c
src/sys/opencrypto: cryptodev.h cryptosoft.c cryptosoft_xform.c
deflate.c deflate.h xform.c xform.h

Log Message:
small modifications in dealing with the unknown result size of compression/
decompression:
-seperate the IPCOMP specific rule that compression must not grow the
 data from general compression semantics: Introduce a special name
 CRYPTO_DEFLATE_COMP_NOGROW/comp_algo_deflate_nogrow to describe
 the IPCOMP semantics and use it there. (being here, fix the check
 so that equal size is considered failure as well as required by
 RFC2393)
 Customers of CRYPTO_DEFLATE_COMP/comp_algo_deflate now always get
 deflated data back, even if they are not smaller than the original.
-allow to pass a size hint to the DEFLATE decompression function
 which is used for the initial buffer allocation. Due to the changes
 done there, additional allocations and extra copies are avoided if the
 initial allocation is sufficient. Set the size hint to MCLBYTES (=2k)
 in IPCOMP which should be good for many use cases.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/netipsec/xform_ipcomp.c
cvs rdiff -u -r1.17 -r1.18 src/sys/opencrypto/cryptodev.h
cvs rdiff -u -r1.27 -r1.28 src/sys/opencrypto/cryptosoft.c
cvs rdiff -u -r1.13 -r1.14 src/sys/opencrypto/cryptosoft_xform.c
cvs rdiff -u -r1.18 -r1.19 src/sys/opencrypto/deflate.c \
src/sys/opencrypto/xform.c
cvs rdiff -u -r1.7 -r1.8 src/sys/opencrypto/deflate.h
cvs rdiff -u -r1.10 -r1.11 src/sys/opencrypto/xform.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/netipsec/xform_ipcomp.c
diff -u src/sys/netipsec/xform_ipcomp.c:1.24 src/sys/netipsec/xform_ipcomp.c:1.25
--- src/sys/netipsec/xform_ipcomp.c:1.24	Fri Feb 18 20:40:58 2011
+++ src/sys/netipsec/xform_ipcomp.c	Thu Feb 24 20:03:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_ipcomp.c,v 1.24 2011/02/18 20:40:58 drochner Exp $	*/
+/*	$NetBSD: xform_ipcomp.c,v 1.25 2011/02/24 20:03:41 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_ipcomp.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /* $OpenBSD: ip_ipcomp.c,v 1.1 2001/07/05 12:08:52 jjbg Exp $ */
 
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xform_ipcomp.c,v 1.24 2011/02/18 20:40:58 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: xform_ipcomp.c,v 1.25 2011/02/24 20:03:41 drochner Exp $);
 
 /* IP payload compression protocol (IPComp), see RFC 2393 */
 #include opt_inet.h
@@ -96,7 +96,7 @@
 		return NULL;
 	switch (alg) {
 	case SADB_X_CALG_DEFLATE:
-		return comp_algo_deflate;
+		return comp_algo_deflate_nogrow;
 	}
 	return NULL;
 }
@@ -190,6 +190,7 @@
 
 	/* Crypto operation descriptor */
 	crp-crp_ilen = m-m_pkthdr.len - (skip + hlen);
+	crp-crp_olen = MCLBYTES; /* hint to decompression code */
 	crp-crp_flags = CRYPTO_F_IMBUF;
 	crp-crp_buf = m;
 	crp-crp_callback = ipcomp_input_cb;

Index: src/sys/opencrypto/cryptodev.h
diff -u src/sys/opencrypto/cryptodev.h:1.17 src/sys/opencrypto/cryptodev.h:1.18
--- src/sys/opencrypto/cryptodev.h:1.17	Fri Sep  4 08:58:44 2009
+++ src/sys/opencrypto/cryptodev.h	Thu Feb 24 20:03:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptodev.h,v 1.17 2009/09/04 08:58:44 he Exp $ */
+/*	$NetBSD: cryptodev.h,v 1.18 2011/02/24 20:03:41 drochner Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/cryptodev.h,v 1.2.2.6 2003/07/02 17:04:50 sam Exp $	*/
 /*	$OpenBSD: cryptodev.h,v 1.33 2002/07/17 23:52:39 art Exp $	*/
 
@@ -132,8 +132,9 @@
 #define CRYPTO_MD5_HMAC_96	19 
 #define CRYPTO_SHA1_HMAC_96	20
 #define CRYPTO_RIPEMD160_HMAC_96	21
-#define CRYPTO_GZIP_COMP	22 /* Deflate compression algorithm */
-#define CRYPTO_ALGORITHM_MAX	23 /* Keep updated - see below */
+#define CRYPTO_GZIP_COMP	22 /* gzip compression algorithm */
+#define CRYPTO_DEFLATE_COMP_NOGROW 23 /* Deflate, fail if not compressible */
+#define CRYPTO_ALGORITHM_MAX	24 /* Keep updated - see below */
 
 /* Algorithm flags */
 #define	CRYPTO_ALG_FLAG_SUPPORTED	0x01 /* Algorithm is supported */

Index: src/sys/opencrypto/cryptosoft.c
diff -u src/sys/opencrypto/cryptosoft.c:1.27 src/sys/opencrypto/cryptosoft.c:1.28
--- src/sys/opencrypto/cryptosoft.c:1.27	Thu Feb 10 21:00:42 2011
+++ src/sys/opencrypto/cryptosoft.c	Thu Feb 24 20:03:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptosoft.c,v 1.27 2011/02/10 21:00:42 drochner Exp $ */
+/*	$NetBSD: cryptosoft.c,v 1.28 2011/02/24 20:03:41 drochner Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /*	$OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $	*/
 
@@ -24,7 +24,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cryptosoft.c,v 1.27 2011/02/10 21:00:42 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: cryptosoft.c,v 1.28 2011/02/24 20:03:41 drochner Exp $);
 
 #include sys/param.h
 

CVS commit: xsrc/external/mit/libXext/dist/src

2011-02-24 Thread Matt Thomas
Module Name:xsrc
Committed By:   matt
Date:   Thu Feb 24 22:36:12 UTC 2011

Modified Files:
xsrc/external/mit/libXext/dist/src: Xge.c

Log Message:
xgeExtRegister is X_HIDDEN in extutil.c, make sure it is in Xge.c


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 xsrc/external/mit/libXext/dist/src/Xge.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/libXext/dist/src/Xge.c
diff -u xsrc/external/mit/libXext/dist/src/Xge.c:1.1.1.2 xsrc/external/mit/libXext/dist/src/Xge.c:1.2
--- xsrc/external/mit/libXext/dist/src/Xge.c:1.1.1.2	Sun Nov 21 05:47:49 2010
+++ xsrc/external/mit/libXext/dist/src/Xge.c	Thu Feb 24 22:36:12 2011
@@ -291,7 +291,7 @@
 /*
  * Extensions need to register callbacks for their events.
  */
-Bool
+Bool _X_HIDDEN
 xgeExtRegister(Display* dpy, int offset, XExtensionHooks* callbacks)
 {
 XGEExtNode* newExt;



CVS commit: src/sys/fs/hfs

2011-02-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 24 23:48:59 UTC 2011

Modified Files:
src/sys/fs/hfs: hfs_subr.c

Log Message:
simplify and handle unaligned pointer access.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/fs/hfs/hfs_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/fs/hfs/hfs_subr.c
diff -u src/sys/fs/hfs/hfs_subr.c:1.14 src/sys/fs/hfs/hfs_subr.c:1.15
--- src/sys/fs/hfs/hfs_subr.c:1.14	Thu Jun 24 09:03:09 2010
+++ src/sys/fs/hfs/hfs_subr.c	Thu Feb 24 18:48:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hfs_subr.c,v 1.14 2010/06/24 13:03:09 hannken Exp $	*/
+/*	$NetBSD: hfs_subr.c,v 1.15 2011/02/24 23:48:59 christos Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */ 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hfs_subr.c,v 1.14 2010/06/24 13:03:09 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: hfs_subr.c,v 1.15 2011/02/24 23:48:59 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -366,55 +366,38 @@
 uint16_t be16tohp(void** inout_ptr)
 {
 	uint16_t	result;
-	uint16_t *ptr;
 	
-	if(inout_ptr==NULL)
+	if(inout_ptr == NULL)
 		return 0;
 		
-	ptr = *inout_ptr;
-
-	result = be16toh(*ptr);
-
-	ptr++;
-	*inout_ptr = ptr;
+	memcpy(result, *inout_ptr, sizeof(result));
+	*inout_ptr = (char *)*inout_ptr + sizeof(result);
 	
-	return result;
+	return be16toh(result);
 }
 
 uint32_t be32tohp(void** inout_ptr)
 {
 	uint32_t	result;
-	uint32_t *ptr;
 	
-	if(inout_ptr==NULL)
+	if(inout_ptr == NULL)
 		return 0;
 
-	ptr = *inout_ptr;
-
-	result = be32toh(*ptr);
-
-	ptr++;
-	*inout_ptr = ptr;
-	
-	return result;
+	memcpy(result, *inout_ptr, sizeof(result));
+	*inout_ptr = (char *)*inout_ptr + sizeof(result);
+	return be32toh(result);
 }
 
 uint64_t be64tohp(void** inout_ptr)
 {
 	uint64_t	result;
-	uint64_t *ptr;
 	
-	if(inout_ptr==NULL)
+	if(inout_ptr == NULL)
 		return 0;
 
-	ptr = *inout_ptr;
-
-	result = be64toh(*ptr);
-
-	ptr++;
-	*inout_ptr = ptr;
-	
-	return result;
+	memcpy(result, *inout_ptr, sizeof(result));
+	*inout_ptr = (char *)*inout_ptr + sizeof(result);
+	return be64toh(result);
 }
 
 enum vtype



CVS commit: src/sys/fs/hfs

2011-02-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 24 23:49:26 UTC 2011

Modified Files:
src/sys/fs/hfs: libhfs.c

Log Message:
simplify and avoid pointer gymnastics


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/fs/hfs/libhfs.c

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

Modified files:

Index: src/sys/fs/hfs/libhfs.c
diff -u src/sys/fs/hfs/libhfs.c:1.9 src/sys/fs/hfs/libhfs.c:1.10
--- src/sys/fs/hfs/libhfs.c:1.9	Fri Nov 27 10:58:39 2009
+++ src/sys/fs/hfs/libhfs.c	Thu Feb 24 18:49:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: libhfs.c,v 1.9 2009/11/27 15:58:39 pooka Exp $	*/
+/*	$NetBSD: libhfs.c,v 1.10 2011/02/24 23:49:26 christos Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: libhfs.c,v 1.9 2009/11/27 15:58:39 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: libhfs.c,v 1.10 2011/02/24 23:49:26 christos Exp $);
 
 #include libhfs.h
 
@@ -460,14 +460,11 @@
 		goto exit;
 	
 	/* copy only the bytes that are actually used */
-	memcpy(*out_unicode+2, path + path_offset, total_path_length*2);
+	memcpy(*out_unicode + 2, path + path_offset, total_path_length*2);
 
 	/* insert forward slash at start */
-	(*out_unicode)[0] = 0x00;
-	(*out_unicode)[1] = 0x2F;
-	ptr = (uint16_t*)*out_unicode;
-	uchar = be16tohp((void*)ptr);
-	*(ptr-1) = uchar;
+	uchar = be16toh(0x2F);
+	memcpy(*out_unicode, uchar, sizeof(uchar));
 
 	/* insert null char at end */
 	(*out_unicode)[total_path_length*2+2] = 0x00;



CVS commit: src/sys

2011-02-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 25 00:17:36 UTC 2011

Modified Files:
src/sys/arch/mvme68k/stand/sboot: etherfun.c
src/sys/lib/libsa: stand.h subr_prf.c

Log Message:
Move HEXDIGIT to mvme68k's sboot. It seems to be the only user.
Save a byte by explicitly specifying the size.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mvme68k/stand/sboot/etherfun.c
cvs rdiff -u -r1.70 -r1.71 src/sys/lib/libsa/stand.h
cvs rdiff -u -r1.17 -r1.18 src/sys/lib/libsa/subr_prf.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/mvme68k/stand/sboot/etherfun.c
diff -u src/sys/arch/mvme68k/stand/sboot/etherfun.c:1.10 src/sys/arch/mvme68k/stand/sboot/etherfun.c:1.11
--- src/sys/arch/mvme68k/stand/sboot/etherfun.c:1.10	Wed Feb  2 17:53:41 2011
+++ src/sys/arch/mvme68k/stand/sboot/etherfun.c	Fri Feb 25 00:17:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: etherfun.c,v 1.10 2011/02/02 17:53:41 chuck Exp $	*/
+/*	$NetBSD: etherfun.c,v 1.11 2011/02/25 00:17:35 joerg Exp $	*/
 
 /*
  * Copyright (c) 1995 Charles D. Cranor and Seth Widoff
@@ -90,6 +90,7 @@
 
 /* Send a tftp read request or acknowledgement 
mesgtype 0 is a read request, 1 is an aknowledgement */
+static const char HEXDIGITS[16] = 0123456789ABCDEF;
 
 void 
 do_send_tftp(int mesgtype) 

Index: src/sys/lib/libsa/stand.h
diff -u src/sys/lib/libsa/stand.h:1.70 src/sys/lib/libsa/stand.h:1.71
--- src/sys/lib/libsa/stand.h:1.70	Fri Dec 24 23:12:28 2010
+++ src/sys/lib/libsa/stand.h	Fri Feb 25 00:17:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: stand.h,v 1.70 2010/12/24 23:12:28 christos Exp $	*/
+/*	$NetBSD: stand.h,v 1.71 2011/02/25 00:17:36 joerg Exp $	*/
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -285,7 +285,6 @@
 off_t	olseek(int, off_t, int);
 #endif
 
-extern const char HEXDIGITS[];
 extern const char hexdigits[];
 
 /* XXX: These should be removed eventually. */

Index: src/sys/lib/libsa/subr_prf.c
diff -u src/sys/lib/libsa/subr_prf.c:1.17 src/sys/lib/libsa/subr_prf.c:1.18
--- src/sys/lib/libsa/subr_prf.c:1.17	Tue Jan 19 15:26:45 2010
+++ src/sys/lib/libsa/subr_prf.c	Fri Feb 25 00:17:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_prf.c,v 1.17 2010/01/19 15:26:45 tsutsui Exp $	*/
+/*	$NetBSD: subr_prf.c,v 1.18 2011/02/25 00:17:36 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -66,7 +66,6 @@
 
 static char *sbuf, *ebuf;
 
-const char HEXDIGITS[] = 0123456789ABCDEF;
 const char hexdigits[] = 0123456789abcdef;
 
 #define LONG		0x01



CVS commit: src/sys/lib/libsa

2011-02-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 25 00:20:36 UTC 2011

Modified Files:
src/sys/lib/libsa: subr_prf.c

Log Message:
No trailing 0 byte for hexdigits.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/lib/libsa/subr_prf.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/lib/libsa/subr_prf.c
diff -u src/sys/lib/libsa/subr_prf.c:1.18 src/sys/lib/libsa/subr_prf.c:1.19
--- src/sys/lib/libsa/subr_prf.c:1.18	Fri Feb 25 00:17:36 2011
+++ src/sys/lib/libsa/subr_prf.c	Fri Feb 25 00:20:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_prf.c,v 1.18 2011/02/25 00:17:36 joerg Exp $	*/
+/*	$NetBSD: subr_prf.c,v 1.19 2011/02/25 00:20:36 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -66,7 +66,7 @@
 
 static char *sbuf, *ebuf;
 
-const char hexdigits[] = 0123456789abcdef;
+const char hexdigits[16] = 0123456789abcdef;
 
 #define LONG		0x01
 #ifdef LIBSA_PRINTF_LONGLONG_SUPPORT



CVS commit: src/sys/dev/pci

2011-02-24 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 25 01:33:35 UTC 2011

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

Log Message:
add AMD Family14h host bridge IDs


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

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1064 src/sys/dev/pci/pcidevs:1.1065
--- src/sys/dev/pci/pcidevs:1.1064	Thu Feb 24 20:00:59 2011
+++ src/sys/dev/pci/pcidevs	Fri Feb 25 01:33:34 2011
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1064 2011/02/24 20:00:59 matt Exp $
+$NetBSD: pcidevs,v 1.1065 2011/02/25 01:33:34 jmcneill Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -925,6 +925,15 @@
 product AMD AMD64_F11_DRAM	0x1302	AMD64 Family11h DRAM Configuration
 product AMD AMD64_F11_MISC	0x1303	AMD64 Family11h Miscellaneous Configuration
 product AMD AMD64_F11_LINK	0x1304	AMD64 Family11h Link Configuration
+product AMD F14_RC	0x1510	Family14h Root Complex
+product AMD F14_HT	0x1700	Family14h HyperTransport Configuration
+product AMD F14_ADDR	0x1701	Family14h Address Map Configuration
+product AMD F14_DRAM	0x1702	Family14h DRAM Configuration
+product AMD F14_NB	0x1703	Family14h North Bridge Configuration
+product AMD F14_CSTATE	0x1704	Family14h CPU C-state Configuration
+product AMD F14_MISC	0x1716	Family14h Misc. Configuration
+product AMD F14_HB18	0x1718	Family14h Host Bridge
+product AMD F14_HB19	0x1719	Family14h Host Bridge
 product AMD PCNET_PCI	0x2000	PCnet-PCI Ethernet
 product AMD PCNET_HOME	0x2001	PCnet-Home HomePNA Ethernet
 product AMD AM_1771_MBW	0x2003	Alchemy AM 1771 MBW



CVS commit: src/sys/dev/pci

2011-02-24 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 25 01:36:18 UTC 2011

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

Log Message:
add AMD (ATI) Radeon HD 6310 Graphics ID


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

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1065 src/sys/dev/pci/pcidevs:1.1066
--- src/sys/dev/pci/pcidevs:1.1065	Fri Feb 25 01:33:34 2011
+++ src/sys/dev/pci/pcidevs	Fri Feb 25 01:36:18 2011
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1065 2011/02/25 01:33:34 jmcneill Exp $
+$NetBSD: pcidevs,v 1.1066 2011/02/25 01:36:18 jmcneill Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1414,10 +1414,11 @@
 product ATI RS690_PPB_7915	0x7915	RS690 PCI to PCI-Express Port 1 Bridge
 product ATI RS690_PPB_7916	0x7916	RS690 PCI to PCI-Express Port 2 Bridge
 product ATI RS690_PPB_7917	0x7917	RS690 PCI to PCI-Express Port 3 Bridge
+product ATI RADEON_HD2600_XT	0x9588 	Radeon HD2600 XT GDDR3
 product ATI RADEON_HD4250_S	0x95C5	Radeon HD4250 GPU (RV610) Secondary
 product ATI RADEON_HD4200	0x9712	Radeon HD4200 Mobility
 product ATI RADEON_HD4250	0x9715	Radeon HD4250 GPU (RS880)
-product ATI RADEON_HD2600_XT	0x9588 	Radeon HD2600 XT GDDR3
+product ATI RADEON_HD6310	0x9802	Radeon HD6310 Graphics
 product ATI RADEON_HD2600_HD	0xaa08	Radeon HD2600 HD Audio Controller
 product ATI RADEON_HD5600_HDMI	0xaa60	Redwood HDMI Audio
 



CVS commit: src/sys/dev/acpi

2011-02-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Feb 25 05:07:43 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_cpu_tstate.c

Log Message:
Clarify a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/acpi/acpi_cpu_tstate.c

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

Modified files:

Index: src/sys/dev/acpi/acpi_cpu_tstate.c
diff -u src/sys/dev/acpi/acpi_cpu_tstate.c:1.21 src/sys/dev/acpi/acpi_cpu_tstate.c:1.22
--- src/sys/dev/acpi/acpi_cpu_tstate.c:1.21	Wed Feb 23 06:17:55 2011
+++ src/sys/dev/acpi/acpi_cpu_tstate.c	Fri Feb 25 05:07:43 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_tstate.c,v 1.21 2011/02/23 06:17:55 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_tstate.c,v 1.22 2011/02/25 05:07:43 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_cpu_tstate.c,v 1.21 2011/02/23 06:17:55 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_cpu_tstate.c,v 1.22 2011/02/25 05:07:43 jruoho Exp $);
 
 #include sys/param.h
 #include sys/evcnt.h
@@ -518,8 +518,14 @@
 		return AE_AML_ILLEGAL_ADDRESS;
 
 	/*
-	 * A zero DUTY_WIDTH is used announce that
-	 * T-states are not available via FADT.
+	 * A zero DUTY_WIDTH may be used announce
+	 * that T-states are not available via FADT
+	 * (ACPI 4.0, p. 121). See also (section 9.3):
+	 *
+	 *	Advanced Micro Devices: BIOS and Kernel
+	 *	Developer's Guide for AMD Athlon 64 and
+	 *	AMD Opteron Processors. Revision 3.30,
+	 *	February 2006.
 	 */
 	if (width == 0 || width + offset  4)
 		return AE_AML_BAD_RESOURCE_VALUE;