CVS commit: src/share/man/man3

2011-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Feb  8 09:35:32 UTC 2011

Modified Files:
src/share/man/man3: intro.3

Log Message:
New sentence, new line. Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/share/man/man3/intro.3

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/man3/intro.3
diff -u src/share/man/man3/intro.3:1.24 src/share/man/man3/intro.3:1.25
--- src/share/man/man3/intro.3:1.24	Tue Feb  8 03:20:16 2011
+++ src/share/man/man3/intro.3	Tue Feb  8 09:35:32 2011
@@ -1,4 +1,4 @@
-.\"	$NetBSD: intro.3,v 1.24 2011/02/08 03:20:16 haad Exp $
+.\"	$NetBSD: intro.3,v 1.25 2011/02/08 09:35:32 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)intro.3	8.1 (Berkeley) 6/5/93
 .\"
-.Dd October 4, 2001
+.Dd February 8, 2011
 .Dt INTRO 3
 .Os
 .Sh NAME
@@ -63,11 +63,13 @@
 Block-sorting compressor library providing routines for fast and
 efficient compression.
 .It Em libc Pq Fl l Ns Ar c
-The standard C library.  When using the C compiler
+The standard C library.
+When using the C compiler
 .Xr cc 1 ,
 it is not necessary to supply the linker flag
 .Fl l Ns Ar c
-for these functions.  There are several subsystems included inside
+for these functions.
+There are several subsystems included inside
 .Em libc :
 .Pp
 .Bl -tag -width "XX"
@@ -102,7 +104,8 @@
 .Xr signal 3
 .El
 .It Em libcom_err Pq Fl l Ns Ar com_err
-The common error description library.  See
+The common error description library.
+See
 .Xr com_err 3 .
 .It Em libcompat Pq Fl l Ns Ar compat
 Functions which are obsolete but are available for compatibility with
@@ -110,14 +113,17 @@
 In particular, a number of system call interfaces provided in previous
 releases of
 .Bx
-have been included for source code compatibility.  Use of these
-routines should, for the most part, be avoided.  The manual page entry
+have been included for source code compatibility.
+Use of these routines should, for the most part, be avoided.
+The manual page entry
 for each compatibility routine indicates the proper interface to use.
 .It Em libcrypt Pq Fl l Ns Ar crypt
-The crypt library.  See
+The crypt library.
+See
 .Xr crypt 3 .
 .It Em libcrypto Pq Fl l Ns Ar crypto
-The OpenSSL cryptographic library.  See
+The OpenSSL cryptographic library.
+See
 .Xr crypto 3 .
 .It Em libcrypto_idea Pq Fl l Ns Ar crypto_idea
 The OpenSSL cryptographic library routines for the IDEA algorithm.
@@ -129,10 +135,12 @@
 protected by patents and its use is restricted.
 .It Em libcurses Pq Fl l Ns Ar curses Fl l Ns Ar termcap
 Terminal independent screen management routines
-for two dimensional non-bitmap display terminals.  See
+for two dimensional non-bitmap display terminals.
+See
 .Xr curses 3 .
 .It Em libdes Pq Fl l Ns Ar des
-The OpenSSL cryptographic library for the DES algorithms.  See
+The OpenSSL cryptographic library for the DES algorithms.
+See
 .Xr des 3 .
 .It Em libdm Pq Fl l Ns Ar dm
 The device-mapper driver access library used for communication with
@@ -142,31 +150,38 @@
 .Xr lvm 8
 subsystem.
 .It Em libedit Pq Fl l Ns Ar edit
-The command-line editor or editline library.  The editline library
-provides generic editing and history functions.  See
+The command-line editor or editline library.
+The editline library provides generic editing and history functions.
+See
 .Xr editline 3 .
 .It Em libform Pq Fl l Ns Ar form
 The curses form library provides a terminal-independent form system
-using the curses library.  The form library provides facilities for
-defining forms on terminals.  See
+using the curses library.
+The form library provides facilities for defining forms on terminals.
+See
 .Xr forms 3 .
 .It Em libgssapi Pq Fl l Ns Ar gssapi
-The Generic Security Services (GSS) API library.  This library provides
+The Generic Security Services (GSS) API library.
+This library provides
 verification services to applications and usually sits above the
 cryptographic libraries.
 .It Em libhesiod Pq Fl l Ns Ar hesiod
-The Hesiod library.  This library provides routines for performing
+The Hesiod library.
+This library provides routines for performing
 lookups of Hesiod information, which is stored as text records in the
-Domain Name Service.  See
+Domain Name Service.
+See
 .Xr hesiod 3 .
 .It Em libhdb Pq Fl l Ns Ar hdb
 The Heimdal Kerberos 5 authentication/authorisation database access
 library.
 .It Em libintl Pq Fl l Ns Ar intl
-The internationalized message handling library.  See
+The internationalized message handling library.
+See
 .Xr gettext 3 .
 .It Em libipsec Pq Fl l Ns Ar ipsec
-The IPsec policy control library.  See
+The IPsec policy control library.
+See
 .Xr ipsec_set_policy 3
 and
 .Xr ipsec_strerror 3 .
@@ -177,25 +192,29 @@
 .It Em libkadm5srv Pq Fl l Ns Ar kadm5srv
 The Kerberos 5

CVS commit: src/lib/libdm

2011-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Feb  8 09:49:08 UTC 2011

Modified Files:
src/lib/libdm: dm.3

Log Message:
Improve a bit.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libdm/dm.3

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

Modified files:

Index: src/lib/libdm/dm.3
diff -u src/lib/libdm/dm.3:1.1 src/lib/libdm/dm.3:1.2
--- src/lib/libdm/dm.3:1.1	Tue Feb  8 03:20:15 2011
+++ src/lib/libdm/dm.3	Tue Feb  8 09:49:07 2011
@@ -1,4 +1,4 @@
-.\" $NetBSD: dm.3,v 1.1 2011/02/08 03:20:15 haad Exp $
+.\" $NetBSD: dm.3,v 1.2 2011/02/08 09:49:07 wiz Exp $
 .\"
 .\" Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -26,7 +26,7 @@
 .\" 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 Januar, 22
+.Dd January 22, 2011
 .Dt DM 3
 .Os
 .Sh NAME
@@ -127,7 +127,7 @@
 .Ft int
 .Fn libdm_dev_set_newname "const char *newname" "libdm_cmd_t libdm_cmd"
 .Sh DESCRIPTION
-Every object in libdm have it's own create and destroy routine.
+Every object in libdm has its own create and destroy routine.
 .Bl -bullet -offset indent -compact
 .It
 libdm_task_t
@@ -140,15 +140,14 @@
 Except
 .Vt libdm_dev_t
 which is received from kernel as list of physical devices on which
-logical device depends.
+the logical device depends.
 .Vt libdm_target_t
-which is received from kernel as list of available targets for use .
+which is received from kernel as list of available targets to use.
 .Vt libdm_iter_t
-which is used as itteration counter for array entries in task structure.
-.Pp
-Every object attribute in libdm can be set and get by appropriate routines,
-therofore there is always set and get routine.
+which is used as iteration counter for array entries in the task structure.
 .Pp
+Every object attribute in libdm can be set and gotten by appropriate routines,
+therefore there always are set and get routines.
 .Ss LIBDM TASK
 The
 .Fn libdm_task_create
@@ -158,7 +157,7 @@
 .Fa command
 is
 .Dv NULL ,
-libdm_task_t is not created and function return
+libdm_task_t is not created and the function returns
 .Dv NULL .
 .Pp
 .Fn libdm_task_destroy
@@ -170,7 +169,7 @@
 .Fn libdm_task_run
 Sends created
 .Fa libdm_task
-to kernel and receive new one as reply.
+to kernel and receives new one as reply.
 .Pp
 List of attributes avaialable in
 .Vt libdm_task_t :
@@ -185,99 +184,109 @@
 .It Li DM_IOCTL_FLAGS Ta Device status flags Ta Read-Write
 .El
 .Pp
-
 .Fn libdm_task_set_name
 and
 .Fn libdm_task_get_name
-Set name of device for commands which need to have dm device identifier.
-Device-mapper later uses device name to lookup device from list of all devices.
-Get routine will fetch device name from task dictionary.
+Set name of the device for commands which need to have a dm device
+identifier.
+The device-mapper later uses the device name to look up the device
+from the list of all devices.
+The get routine will fetch the device name from the task dictionary.
 .Pp
 .Fn libdm_task_set_uuid
 and
 .Fn libdm_task_get_uuid
-Set uuid of device for commands which need to have dm device identifier.
-Device-mapper later uses device uuid to lookup device from list of all devices.
-Get routine will fetch device uuid from task dictionary.
+Set uuid of device for commands which need to have a dm device
+identifier.
+The device-mapper later uses the device uuid to look up the device
+from the list of all devices.
+The get routine will fetch the device uuid from the task dictionary.
 .Pp
 .Fn libdm_task_set_minor
 and
 .Fn libdm_task_get_minor
-Set minor device number of device for commands which need to have dm device identifier.
-Device-mapper later uses device minor number to lookup device from list of all devices.
-Get routine will fetch device minor number from task dictionary.
+Set minor device number of device for commands which need to have
+a dm device identifier.
+The device-mapper later uses the device minor number to look up
+the device from the list of all devices.
+The get routine will fetch the device minor number from the task
+dictionary.
 .Pp
 .Fn libdm_task_set_flags
 and
 .Fn libdm_task_get_flags
-Set/Fetch device status flags from task dictionary.
+Set/fetch device status flags from the task dictionary.
 .Pp
 .Fn libdm_task_get_open_num
-Fetch number of opened devices from kernel and return them as
+Fetch number of opened devices from the kernel and return them as
 .Rt count .
 .Pp
 .Fn libdm_task_get_target_num
-Fetch number of opened devices from kernel and return them as
+Fetch number of opened devices from the kernel and return them as
 .Rt count .
 .Pp
 .Fn libdm_task_get_cmd_version
-Get dm driver in kernel version and set is as array
+Get the version of the dm driver in the kernel as array
 .Fa uint32_t *ver
-with
-.Fa size
-size.
+of size

CVS commit: src/sbin/dmctl

2011-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Feb  8 09:51:17 UTC 2011

Modified Files:
src/sbin/dmctl: dmctl.8

Log Message:
Improve a bit.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sbin/dmctl/dmctl.8

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

Modified files:

Index: src/sbin/dmctl/dmctl.8
diff -u src/sbin/dmctl/dmctl.8:1.1 src/sbin/dmctl/dmctl.8:1.2
--- src/sbin/dmctl/dmctl.8:1.1	Tue Feb  8 03:20:15 2011
+++ src/sbin/dmctl/dmctl.8	Tue Feb  8 09:51:17 2011
@@ -1,4 +1,4 @@
-.\" $NetBSD: dmctl.8,v 1.1 2011/02/08 03:20:15 haad Exp $
+.\" $NetBSD: dmctl.8,v 1.2 2011/02/08 09:51:17 wiz Exp $
 .\"
 .\" Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -26,18 +26,18 @@
 .\" 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 Januar 23, 2011
+.Dd January 23, 2011
 .Dt DMCTL 8
 .Os
 .Sh NAME
 .Nm dmctl
-.Nd "Manipulate device-mapper driver command"
+.Nd manipulate device-mapper driver command
 .Sh SYNOPSIS
 .Nm
 .Sh DESCRIPTION
 .Nm
-work with device-mapper kernel driver it can send/receive information and
-commands from dm driver.
+works with the device-mapper kernel driver.
+It can send and receive information and commands from the dm driver.
 .Bl -column -offset indent "suspend" "Switch active and passive tables for"
 .Ii Li version Ta Print driver and lib version.
 .It Li targets Ta List available kernel targets.
@@ -54,12 +54,14 @@
 .It Li table Ta Print active table for device with [dm device name].
 .El
 .Sh SEE ALSO
-.Xr dm 4 ,
-.Xr libdm 3
+.Xr dm 3 ,
+.Xr dm 4
 .Sh HISTORY
 The
 .Nm
 was written and contributed to
 .Nx
-by Adam Hamsik and first appeared in
+by
+.An Adam Hamsik
+and first appeared in
 .Nx 6.0 .



CVS commit: src/sbin/dmctl

2011-02-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Feb  8 09:51:55 UTC 2011

Modified Files:
src/sbin/dmctl: README

Log Message:
Fix typos.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sbin/dmctl/README

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

Modified files:

Index: src/sbin/dmctl/README
diff -u src/sbin/dmctl/README:1.1 src/sbin/dmctl/README:1.2
--- src/sbin/dmctl/README:1.1	Tue Feb  8 03:20:15 2011
+++ src/sbin/dmctl/README	Tue Feb  8 09:51:55 2011
@@ -1,9 +1,8 @@
-
 = RUMP howto =
 
-Build rump dm library, buidl libdm with RUMP_ACTION, build dmct with RUMP_ACTION.
+Build rump dm library, build libdm with RUMP_ACTION, build dmct with RUMP_ACTION.
 
-cd local/lib/libdm/
+cd lib/libdm/
 RUMP_ACTION=1 USETOOLS=no make
 
 cd ../../sbin/dmctl



CVS commit: src/tests/net

2011-02-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  8 10:11:29 UTC 2011

Modified Files:
src/tests/net: Makefile
Added Files:
src/tests/net/route: Makefile t_change.sh

Log Message:
Time to start adding tests for the routing code to make that part
of the kernel more approachable.

Begin the task with an xfail test for PR kern/40455.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/net/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/route/Makefile \
src/tests/net/route/t_change.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/net/Makefile
diff -u src/tests/net/Makefile:1.8 src/tests/net/Makefile:1.9
--- src/tests/net/Makefile:1.8	Tue Jan 11 10:51:45 2011
+++ src/tests/net/Makefile	Tue Feb  8 10:11:28 2011
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.8 2011/01/11 10:51:45 pooka Exp $
+# $NetBSD: Makefile,v 1.9 2011/02/08 10:11:28 pooka Exp $
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/net
 
-TESTS_SUBDIRS=		bpf carp icmp if if_loop net sys
+TESTS_SUBDIRS=		bpf carp icmp if if_loop net route sys
 
 .include 

Added files:

Index: src/tests/net/route/Makefile
diff -u /dev/null src/tests/net/route/Makefile:1.1
--- /dev/null	Tue Feb  8 10:11:29 2011
+++ src/tests/net/route/Makefile	Tue Feb  8 10:11:29 2011
@@ -0,0 +1,10 @@
+#	$NetBSD: Makefile,v 1.1 2011/02/08 10:11:29 pooka Exp $
+#
+
+.include 
+
+TESTSDIR=	${TESTSBASE}/net/route
+
+TESTS_SH=	t_change
+
+.include 
Index: src/tests/net/route/t_change.sh
diff -u /dev/null src/tests/net/route/t_change.sh:1.1
--- /dev/null	Tue Feb  8 10:11:29 2011
+++ src/tests/net/route/t_change.sh	Tue Feb  8 10:11:29 2011
@@ -0,0 +1,65 @@
+#	$NetBSD: t_change.sh,v 1.1 2011/02/08 10:11:29 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.
+#
+
+netserver=\
+"rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet"
+export RUMP_SERVER=unix://commsock
+
+atf_test_case reject2blackhole cleanup
+reject2blackhole_head()
+{
+
+	atf_set "descr" "Change a reject route to blackhole"
+}
+
+reject2blackhole_body()
+{
+
+	atf_check -s exit:0 ${netserver} ${RUMP_SERVER}
+
+	atf_check -s exit:0 -o ignore \
+	rump.route add 207.46.197.32 127.0.0.1 -reject
+	atf_check -s exit:0 -o match:UGHR sh -c \
+	"rump.route -n show -inet | grep ^207.46"
+	atf_check -s exit:0 -o ignore \
+	rump.route change 207.46.197.32 127.0.0.1 -blackhole
+	atf_expect_fail "PR kern/40455"
+	atf_check -s exit:0 -o match:' UGHBS ' -e ignore \
+	sh -c "rump.netstat -rn -f inet | grep ^207.46| grep ^207.46"
+}
+
+reject2blackhole_cleanup()
+{
+
+	env RUMP_SERVER=unix://commsock rump.halt
+}
+
+atf_init_test_cases()
+{
+
+	atf_add_test_case reject2blackhole
+}



CVS commit: src

2011-02-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  8 10:13:13 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests

Log Message:
oh no, more tests


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.25 -r1.26 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/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.243 src/distrib/sets/lists/tests/mi:1.244
--- src/distrib/sets/lists/tests/mi:1.243	Sun Feb  6 18:47:55 2011
+++ src/distrib/sets/lists/tests/mi	Tue Feb  8 10:13:13 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.243 2011/02/06 18:47:55 pooka Exp $
+# $NetBSD: mi,v 1.244 2011/02/08 10:13:13 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1942,6 +1942,9 @@
 ./usr/tests/net/nettests-net-tests
 ./usr/tests/net/net/Atffile			tests-net-tests		atf
 ./usr/tests/net/net/t_raw		tests-net-tests		atf
+./usr/tests/net/routetests-net-tests
+./usr/tests/net/route/Atffile			tests-net-tests		atf
+./usr/tests/net/route/t_change		tests-net-tests		atf
 ./usr/tests/net/systests-net-tests
 ./usr/tests/net/sys/Atffile			tests-net-tests		atf
 ./usr/tests/net/sys/t_connect			tests-net-tests		atf

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.25 src/etc/mtree/NetBSD.dist.tests:1.26
--- src/etc/mtree/NetBSD.dist.tests:1.25	Sun Feb  6 18:47:55 2011
+++ src/etc/mtree/NetBSD.dist.tests	Tue Feb  8 10:13:13 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.25 2011/02/06 18:47:55 pooka Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.26 2011/02/08 10:13:13 pooka Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -200,6 +200,7 @@
 ./usr/tests/net/if
 ./usr/tests/net/if_loop
 ./usr/tests/net/net
+./usr/tests/net/route
 ./usr/tests/net/sys
 ./usr/tests/rump
 ./usr/tests/rump/modautoload



CVS commit: src/external/gpl2/lvm2/lib/libdevmapper

2011-02-08 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Tue Feb  8 10:45:40 UTC 2011

Modified Files:
src/external/gpl2/lvm2/lib/libdevmapper: libdm-netbsd.h

Log Message:
Build fix.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl2/lvm2/lib/libdevmapper/libdm-netbsd.h

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

Modified files:

Index: src/external/gpl2/lvm2/lib/libdevmapper/libdm-netbsd.h
diff -u src/external/gpl2/lvm2/lib/libdevmapper/libdm-netbsd.h:1.2 src/external/gpl2/lvm2/lib/libdevmapper/libdm-netbsd.h:1.3
--- src/external/gpl2/lvm2/lib/libdevmapper/libdm-netbsd.h:1.2	Tue Feb  8 03:26:13 2011
+++ src/external/gpl2/lvm2/lib/libdevmapper/libdm-netbsd.h	Tue Feb  8 10:45:40 2011
@@ -1,4 +1,4 @@
-/*$NetBSD: libdm-netbsd.h,v 1.2 2011/02/08 03:26:13 haad Exp $
+/*$NetBSD: libdm-netbsd.h,v 1.3 2011/02/08 10:45:40 rmind Exp $
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define __LIB_DM_H__
 
 #include 
-#include 
+#include 
 
 #  define MAJOR(x) major((x))
 #  define MINOR(x) minor((x))



CVS commit: src/sys

2011-02-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb  8 10:52:57 UTC 2011

Modified Files:
src/sys/arch/x86/x86: genfb_machdep.c x86_autoconf.c
src/sys/dev/wsfb: genfb.c genfbvar.h

Log Message:
add a 'setmode' callback to genfb and use it to setup write-combining
MTRRs on x86 whenever switching to WSDISPLAYIO_MODE_EMUL


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/x86/genfb_machdep.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/x86/x86/x86_autoconf.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/wsfb/genfb.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/wsfb/genfbvar.h

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

Modified files:

Index: src/sys/arch/x86/x86/genfb_machdep.c
diff -u src/sys/arch/x86/x86/genfb_machdep.c:1.4 src/sys/arch/x86/x86/genfb_machdep.c:1.5
--- src/sys/arch/x86/x86/genfb_machdep.c:1.4	Wed Apr 28 19:17:04 2010
+++ src/sys/arch/x86/x86/genfb_machdep.c	Tue Feb  8 10:52:56 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_machdep.c,v 1.4 2010/04/28 19:17:04 dyoung Exp $ */
+/* $NetBSD: genfb_machdep.c,v 1.5 2011/02/08 10:52:56 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill 
@@ -31,16 +31,20 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.4 2010/04/28 19:17:04 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.5 2011/02/08 10:52:56 jmcneill Exp $");
+
+#include "opt_mtrr.h"
 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -70,6 +74,40 @@
 	NULL
 };
 
+void
+x86_genfb_mtrr_init(uint64_t physaddr, uint32_t size)
+{
+#ifdef MTRR
+	struct mtrr mtrr;
+	int error, n;
+
+	if (mtrr_funcs == NULL) {
+		aprint_debug("%s: no mtrr funcs\n", __func__);
+		return;
+	}
+
+	mtrr.base = physaddr;
+	mtrr.len = size;
+	mtrr.type = MTRR_TYPE_WC;
+	mtrr.flags = MTRR_VALID;
+	mtrr.owner = 0;
+
+	aprint_debug("%s: 0x%llx-0x%llx\n", __func__,
+	mtrr.base, mtrr.base + mtrr.len - 1);
+
+	n = 1;
+	KERNEL_LOCK(1, NULL);
+	error = mtrr_set(&mtrr, &n, curlwp->l_proc, MTRR_GETSET_KERNEL);
+	if (n != 0)
+		mtrr_commit();
+	KERNEL_UNLOCK_ONE(NULL);
+
+	aprint_debug("%s: mtrr_set returned %d\n", __func__, error);
+#else
+	aprint_debug("%s: kernel lacks MTRR option\n", __func__);
+#endif
+}
+
 int
 x86_genfb_cnattach(void)
 {

Index: src/sys/arch/x86/x86/x86_autoconf.c
diff -u src/sys/arch/x86/x86/x86_autoconf.c:1.53 src/sys/arch/x86/x86/x86_autoconf.c:1.54
--- src/sys/arch/x86/x86/x86_autoconf.c:1.53	Mon Jan 10 21:26:38 2011
+++ src/sys/arch/x86/x86/x86_autoconf.c	Tue Feb  8 10:52:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_autoconf.c,v 1.53 2011/01/10 21:26:38 jakllsch Exp $	*/
+/*	$NetBSD: x86_autoconf.c,v 1.54 2011/02/08 10:52:56 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.53 2011/01/10 21:26:38 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.54 2011/02/08 10:52:56 jmcneill Exp $");
 
 #include 
 #include 
@@ -72,6 +72,7 @@
 #include 
 #endif
 #include 
+#include 
 #if NPCI > 0
 #include 
 #endif
@@ -80,6 +81,7 @@
 #if NPCI > 0
 static struct genfb_colormap_callback gfb_cb;
 static struct genfb_pmf_callback pmf_cb;
+static struct genfb_mode_callback mode_cb;
 #endif
 #ifdef VGA_POST
 static struct vga_post *vga_posth = NULL;
@@ -99,6 +101,15 @@
 }
 
 static bool
+x86_genfb_setmode(struct genfb_softc *sc, int newmode)
+{
+	if (newmode == WSDISPLAYIO_MODE_EMUL)
+		x86_genfb_mtrr_init(sc->sc_fboffset,
+		sc->sc_height * sc->sc_stride);
+	return true;
+}
+
+static bool
 x86_genfb_suspend(device_t dev, const pmf_qual_t *qual)
 {
 	return true;
@@ -675,6 +686,12 @@
 	prop_dictionary_set_uint64(dict,
 	"cmap_callback", (uint64_t)&gfb_cb);
 }
+if (fbinfo->physaddr != 0) {
+	mode_cb.gmc_setmode = x86_genfb_setmode;
+	prop_dictionary_set_uint64(dict,
+	"mode_callback",
+	(uint64_t)&mode_cb);
+}
 			}
 			prop_dictionary_set_bool(dict, "is_console", true);
 			prop_dictionary_set_bool(dict, "clear-screen", false);

Index: src/sys/dev/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.33 src/sys/dev/wsfb/genfb.c:1.34
--- src/sys/dev/wsfb/genfb.c:1.33	Sun Feb  6 23:25:17 2011
+++ src/sys/dev/wsfb/genfb.c	Tue Feb  8 10:52:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.33 2011/02/06 23:25:17 jmcneill Exp $ */
+/*	$NetBSD: genfb.c,v 1.34 2011/02/08 10:52:56 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.33 2011/02/06 23:25:17 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.34 2011/02/08 10:52:56 jmcneill Exp $");
 
 #include 
 #include 
@@ -102,7 +102,7 @@
 genfb_init(struct genfb_softc *sc)
 {
 	prop_dictionary_t dict;
-	uint64_t cmap_cb, pmf_cb, bl_cb;
+	uint64_t cmap_cb, pmf_cb, mode_cb, bl_cb;
 	

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

2011-02-08 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Feb  8 11:09:14 UTC 2011

Modified Files:
src/sys/arch/ews4800mips/conf: RAMDISK

Log Message:
Disable more file-system and pseudo-devices to shrink install floppies.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/ews4800mips/conf/RAMDISK

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/conf/RAMDISK
diff -u src/sys/arch/ews4800mips/conf/RAMDISK:1.12 src/sys/arch/ews4800mips/conf/RAMDISK:1.13
--- src/sys/arch/ews4800mips/conf/RAMDISK:1.12	Mon Dec  7 08:57:38 2009
+++ src/sys/arch/ews4800mips/conf/RAMDISK	Tue Feb  8 11:09:14 2011
@@ -1,4 +1,4 @@
-# 	$NetBSD: RAMDISK,v 1.12 2009/12/07 08:57:38 pooka Exp $
+# 	$NetBSD: RAMDISK,v 1.13 2011/02/08 11:09:14 tsutsui Exp $
 #
 # kernel config file with memory disk for installation
 #
@@ -40,6 +40,7 @@
 no file-system	KERNFS
 no file-system	NULLFS
 no file-system	OVERLAY
+no file-system	PUFFS
 no file-system	UMAPFS
 no file-system	UNION
 no file-system	PTYFS
@@ -61,6 +62,7 @@
 no pseudo-device	raid
 no pseudo-device	vnd
 no pseudo-device	fss
+no pseudo-device	putter
 no pseudo-device	ipfilter
 no pseudo-device	ppp
 no pseudo-device	pppoe
@@ -73,6 +75,8 @@
 no pseudo-device	vlan
 no pseudo-device	bridge
 no pseudo-device	agr
+no pseudo-device	accf_data
+no pseudo-device	accf_http
 no pseudo-device	clockctl
 no pseudo-device	ksyms
 no pseudo-device	wsmux



CVS commit: src/lib/librumpuser

2011-02-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  8 11:21:23 UTC 2011

Modified Files:
src/lib/librumpuser: rumpuser_sp.c

Log Message:
Turn the "idle workers available" from a flag into a counter so
that we can finally avoid all races (*knock knock*).


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/lib/librumpuser/rumpuser_sp.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/librumpuser/rumpuser_sp.c
diff -u src/lib/librumpuser/rumpuser_sp.c:1.39 src/lib/librumpuser/rumpuser_sp.c:1.40
--- src/lib/librumpuser/rumpuser_sp.c:1.39	Sun Feb  6 18:25:48 2011
+++ src/lib/librumpuser/rumpuser_sp.c	Tue Feb  8 11:21:22 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpuser_sp.c,v 1.39 2011/02/06 18:25:48 pooka Exp $	*/
+/*  $NetBSD: rumpuser_sp.c,v 1.40 2011/02/08 11:21:22 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: rumpuser_sp.c,v 1.39 2011/02/06 18:25:48 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_sp.c,v 1.40 2011/02/08 11:21:22 pooka Exp $");
 
 #include 
 #include 
@@ -604,7 +604,7 @@
 };
 static pthread_mutex_t sbamtx;
 static pthread_cond_t sbacv;
-static int nworker, idleworker;
+static int nworker, idleworker, nwork;
 static TAILQ_HEAD(, sysbouncearg) syslist = TAILQ_HEAD_INITIALIZER(syslist);
 
 /*ARGSUSED*/
@@ -620,13 +620,16 @@
 			pthread_mutex_unlock(&sbamtx);
 			break;
 		}
-		if (TAILQ_EMPTY(&syslist))
-			idleworker++;
-		while (TAILQ_EMPTY(&syslist))
+		idleworker++;
+		while (TAILQ_EMPTY(&syslist)) {
+			_DIAGASSERT(nwork == 0);
 			pthread_cond_wait(&sbacv, &sbamtx);
+		}
+		idleworker--;
 
 		sba = TAILQ_FIRST(&syslist);
 		TAILQ_REMOVE(&syslist, sba, sba_entries);
+		nwork--;
 		pthread_mutex_unlock(&sbamtx);
 
 		serv_handlesyscall(sba->sba_spc,
@@ -948,10 +951,10 @@
 
 	pthread_mutex_lock(&sbamtx);
 	TAILQ_INSERT_TAIL(&syslist, sba, sba_entries);
-	if (idleworker > 0) {
+	nwork++;
+	if (nwork <= idleworker) {
 		/* do we have a daemon's tool (i.e. idle threads)? */
 		pthread_cond_signal(&sbacv);
-		idleworker--;
 	} else if (nworker < rumpsp_maxworker) {
 		/*
 		 * Else, need to create one



CVS commit: src/lib/librumphijack

2011-02-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  8 12:20:11 UTC 2011

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

Log Message:
add std dprint to fdcall


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.32 src/lib/librumphijack/hijack.c:1.33
--- src/lib/librumphijack/hijack.c:1.32	Mon Feb  7 19:34:39 2011
+++ src/lib/librumphijack/hijack.c	Tue Feb  8 12:20:11 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.32 2011/02/07 19:34:39 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.33 2011/02/08 12:20:11 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: hijack.c,v 1.32 2011/02/07 19:34:39 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.33 2011/02/08 12:20:11 pooka Exp $");
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -161,6 +161,7 @@
 {	\
 	type (*fun) proto;		\
 	\
+	DPRINTF(("%s -> %d\n", __STRING(name), fd));			\
 	if (fd_isrump(fd)) {		\
 		fun = syscalls[rcname].bs_rump;\
 		fd = fd_host2rump(fd);	\



CVS commit: src/sys/arch/sandpoint

2011-02-08 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Tue Feb  8 12:21:26 UTC 2011

Modified Files:
src/sys/arch/sandpoint: README.NAS

Log Message:
Added LevelOne NASCon and some Nettronix based devices.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sandpoint/README.NAS

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/README.NAS
diff -u src/sys/arch/sandpoint/README.NAS:1.10 src/sys/arch/sandpoint/README.NAS:1.11
--- src/sys/arch/sandpoint/README.NAS:1.10	Mon Feb  7 19:20:35 2011
+++ src/sys/arch/sandpoint/README.NAS	Tue Feb  8 12:21:26 2011
@@ -1,4 +1,4 @@
-$NetBSD: README.NAS,v 1.10 2011/02/07 19:20:35 phx Exp $
+$NetBSD: README.NAS,v 1.11 2011/02/08 12:21:26 phx Exp $
 
  MPC8241/8245 NAS products 
 
@@ -28,6 +28,10 @@
 			>> Not yet recognized, research in progress <<
 re.15	satalink.13 	QNAP TS-201
 stge.15	acardide.16	D-Link DSM-G600
+re.?	iteide.16	Allnet ALL6250
+re.?	satalink.?	Allnet ALL6260, Longshine LCS-8311, Nettronix NH231,
+			Fujitsu-Siemens SBLAN2
+?	?		LevelOne NASCon FNS-5000B (GBit, SATA)
 
 
 PCI line/pin and EPIC IRQ assignments



CVS commit: src/distrib/amd64/floppies/common

2011-02-08 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Tue Feb  8 12:25:36 UTC 2011

Modified Files:
src/distrib/amd64/floppies/common: Makefile.bootfloppy

Log Message:
FLOPPYPAD + ${MACHINE} instead of hardcoding amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/distrib/amd64/floppies/common/Makefile.bootfloppy

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

Modified files:

Index: src/distrib/amd64/floppies/common/Makefile.bootfloppy
diff -u src/distrib/amd64/floppies/common/Makefile.bootfloppy:1.10 src/distrib/amd64/floppies/common/Makefile.bootfloppy:1.11
--- src/distrib/amd64/floppies/common/Makefile.bootfloppy:1.10	Tue Nov  4 23:02:52 2008
+++ src/distrib/amd64/floppies/common/Makefile.bootfloppy	Tue Feb  8 12:25:36 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootfloppy,v 1.10 2008/11/04 23:02:52 dbj Exp $
+#	$NetBSD: Makefile.bootfloppy,v 1.11 2011/02/08 12:25:36 jym Exp $
 #
 # Makefile snippet to create a set of USTAR floppies
 #
@@ -31,9 +31,10 @@
 FLOPPYKERNOBJ!=		cd ${.CURDIR}/../../${FLOPPYKERNDIR} && ${PRINTOBJDIR}
 
 FLOPPY_BOOT?=		${MDEC}/boot
-FLOPPY_BOOT_CFG?=	${DISTRIBDIR}/amd64/floppies/common/boot.cfg
+FLOPPY_BOOT_CFG?=	${DISTRIBDIR}/${MACHINE}/floppies/common/boot.cfg
 FLOPPY_NETBSD=		${FLOPPYKERNOBJ}/${FLOPPYKERNEL}
 FLOPPYFILES=		boot boot.cfg ${FLOPPYMETAFILE} netbsd
+FLOPPYPAD=		1
 
 FLOPPY_RELEASEDIR=	installation/floppy
 



CVS commit: src/sys/dev/wscons

2011-02-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb  8 12:45:04 UTC 2011

Modified Files:
src/sys/dev/wscons: files.wscons wsdisplay_vcons.c wsdisplay_vconsvar.h

Log Message:
add support for command buffering in vcons. still a WIP, same limitations
as async drawing (no ddb, needs interrupts). you can try it with options
VCONS_DRAW_INTR. as with async, there are still occasional glitches.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/wscons/files.wscons
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/wscons/wsdisplay_vcons.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/wscons/wsdisplay_vconsvar.h

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

Modified files:

Index: src/sys/dev/wscons/files.wscons
diff -u src/sys/dev/wscons/files.wscons:1.42 src/sys/dev/wscons/files.wscons:1.43
--- src/sys/dev/wscons/files.wscons:1.42	Tue Jan 25 20:28:21 2011
+++ src/sys/dev/wscons/files.wscons	Tue Feb  8 12:45:04 2011
@@ -1,4 +1,4 @@
-# $NetBSD: files.wscons,v 1.42 2011/01/25 20:28:21 macallan Exp $
+# $NetBSD: files.wscons,v 1.43 2011/02/08 12:45:04 jmcneill Exp $
 
 #
 # "Workstation Console" glue; attaches frame buffer to emulator & keyboard,
@@ -76,3 +76,4 @@
 file	dev/wscons/wsdisplay_vcons.c		vcons
 file	dev/wscons/wsdisplay_vcons_util.c	vcons
 defflag	opt_vcons.h		VCONS_DRAW_ASYNC VCONS_ASYNC_DEBUG
+VCONS_DRAW_INTR VCONS_INTR_DEBUG

Index: src/sys/dev/wscons/wsdisplay_vcons.c
diff -u src/sys/dev/wscons/wsdisplay_vcons.c:1.19 src/sys/dev/wscons/wsdisplay_vcons.c:1.20
--- src/sys/dev/wscons/wsdisplay_vcons.c:1.19	Tue Jan 25 20:28:21 2011
+++ src/sys/dev/wscons/wsdisplay_vcons.c	Tue Feb  8 12:45:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsdisplay_vcons.c,v 1.19 2011/01/25 20:28:21 macallan Exp $ */
+/*	$NetBSD: wsdisplay_vcons.c,v 1.20 2011/02/08 12:45:04 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.19 2011/01/25 20:28:21 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.20 2011/02/08 12:45:04 jmcneill Exp $");
 
 #include 
 #include 
@@ -55,6 +55,10 @@
 #include "opt_wsdisplay_compat.h"
 #include "opt_vcons.h"
 
+#if defined(VCONS_DRAW_ASYNC) && defined(VCONS_DRAW_INTR)
+#error VCONS_DRAW_ASYNC and VCONS_DRAW_INTR cannot be defined together
+#endif
+
 static void vcons_dummy_init_screen(void *, struct vcons_screen *, int, 
 	long *);
 
@@ -117,6 +121,10 @@
 #ifdef VCONS_DRAW_ASYNC
 static void vcons_kthread(void *);
 #endif
+#ifdef VCONS_DRAW_INTR
+static void vcons_intr(void *);
+static void vcons_intr_work(struct work *, void *);
+#endif
 
 int
 vcons_init(struct vcons_data *vd, void *cookie, struct wsscreen_descr *def,
@@ -163,6 +171,13 @@
 	kthread_create(PRI_NONE, 0, NULL, vcons_kthread, vd,
 	&vd->drawing_thread, "vcons_draw");
 #endif
+#ifdef VCONS_DRAW_INTR
+	workqueue_create(&vd->intr_wq, "vcons_draw",
+	vcons_intr_work, vd, PRI_KTHREAD, IPL_TTY, WQ_MPSAFE);
+	callout_init(&vd->intr, 0);
+	callout_setfunc(&vd->intr, vcons_intr, vd);
+	callout_schedule(&vd->intr, mstohz(33));
+#endif
 	return 0;
 }
 
@@ -562,16 +577,23 @@
 	memmove(&scr->scr_chars[to], &scr->scr_chars[from],
 	ncols * sizeof(uint16_t));
 #endif
+
+#ifdef VCONS_DRAW_INTR
+	scr->scr_dirty++;
+#endif
 }
 
 static void
 vcons_copycols(void *cookie, int row, int srccol, int dstcol, int ncols)
 {
+#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
 	struct rasops_info *ri = cookie;
 	struct vcons_screen *scr = ri->ri_hw;
+#endif
 
 	vcons_copycols_buffer(cookie, row, srccol, dstcol, ncols);
 
+#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
 	vcons_lock(scr);
 	if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
 #ifdef VCONS_DRAW_ASYNC
@@ -583,6 +605,7 @@
 			scr->scr_vd->copycols(cookie, row, srccol, dstcol, ncols);
 	}
 	vcons_unlock(scr);
+#endif
 }
 
 static void
@@ -630,16 +653,23 @@
 		scr->scr_chars[i] = 0x20;
 	}
 #endif
+
+#ifdef VCONS_DRAW_INTR
+	scr->scr_dirty++;
+#endif
 }
 
 static void
 vcons_erasecols(void *cookie, int row, int startcol, int ncols, long fillattr)
 {
+#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
 	struct rasops_info *ri = cookie;
 	struct vcons_screen *scr = ri->ri_hw;
+#endif
 
 	vcons_erasecols_buffer(cookie, row, startcol, ncols, fillattr);
 
+#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
 	vcons_lock(scr);
 	if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
 #ifdef VCONS_DRAW_ASYNC
@@ -653,6 +683,7 @@
 			fillattr);
 	}
 	vcons_unlock(scr);
+#endif
 }
 
 static void
@@ -689,16 +720,23 @@
 	len * sizeof(long));
 	memmove(&scr->scr_chars[to], &scr->scr_chars[from],
 	len * sizeof(uint16_t));
+
+#ifdef VCONS_DRAW_INTR
+	scr->scr_dirty++;
+#endif
 }
 
 static void
 vcons_copyrows(void *cookie, int srcrow, int dstrow, int nrows)
 {
+#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
 	struct rasops_in

CVS commit: src/sys/dev/wscons

2011-02-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb  8 13:40:35 UTC 2011

Modified Files:
src/sys/dev/wscons: wsdisplay_vcons.c wsdisplay_vconsvar.h

Log Message:
abuse config_interrupts to make sure we don't switch to 'intr' mode until
interrupts are enabled


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/wscons/wsdisplay_vcons.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/wscons/wsdisplay_vconsvar.h

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

Modified files:

Index: src/sys/dev/wscons/wsdisplay_vcons.c
diff -u src/sys/dev/wscons/wsdisplay_vcons.c:1.20 src/sys/dev/wscons/wsdisplay_vcons.c:1.21
--- src/sys/dev/wscons/wsdisplay_vcons.c:1.20	Tue Feb  8 12:45:04 2011
+++ src/sys/dev/wscons/wsdisplay_vcons.c	Tue Feb  8 13:40:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsdisplay_vcons.c,v 1.20 2011/02/08 12:45:04 jmcneill Exp $ */
+/*	$NetBSD: wsdisplay_vcons.c,v 1.21 2011/02/08 13:40:35 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.20 2011/02/08 12:45:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.21 2011/02/08 13:40:35 jmcneill Exp $");
 
 #include 
 #include 
@@ -124,6 +124,7 @@
 #ifdef VCONS_DRAW_INTR
 static void vcons_intr(void *);
 static void vcons_intr_work(struct work *, void *);
+static void vcons_intr_enable(device_t);
 #endif
 
 int
@@ -176,7 +177,9 @@
 	vcons_intr_work, vd, PRI_KTHREAD, IPL_TTY, WQ_MPSAFE);
 	callout_init(&vd->intr, 0);
 	callout_setfunc(&vd->intr, vcons_intr, vd);
-	callout_schedule(&vd->intr, mstohz(33));
+
+	/* XXX assume that the 'dev' arg is never dereferenced */
+	config_interrupts((device_t)vd, vcons_intr_enable);
 #endif
 	return 0;
 }
@@ -586,14 +589,16 @@
 static void
 vcons_copycols(void *cookie, int row, int srccol, int dstcol, int ncols)
 {
-#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
 	struct rasops_info *ri = cookie;
 	struct vcons_screen *scr = ri->ri_hw;
-#endif
 
 	vcons_copycols_buffer(cookie, row, srccol, dstcol, ncols);
 
-#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
+#if defined(VCONS_DRAW_INTR)
+	if (scr->scr_vd->use_intr)
+		return;
+#endif
+
 	vcons_lock(scr);
 	if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
 #ifdef VCONS_DRAW_ASYNC
@@ -605,7 +610,6 @@
 			scr->scr_vd->copycols(cookie, row, srccol, dstcol, ncols);
 	}
 	vcons_unlock(scr);
-#endif
 }
 
 static void
@@ -662,14 +666,16 @@
 static void
 vcons_erasecols(void *cookie, int row, int startcol, int ncols, long fillattr)
 {
-#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
 	struct rasops_info *ri = cookie;
 	struct vcons_screen *scr = ri->ri_hw;
-#endif
 
 	vcons_erasecols_buffer(cookie, row, startcol, ncols, fillattr);
 
-#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
+#if defined(VCONS_DRAW_INTR)
+	if (scr->scr_vd->use_intr)
+		return;
+#endif
+
 	vcons_lock(scr);
 	if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
 #ifdef VCONS_DRAW_ASYNC
@@ -683,7 +689,6 @@
 			fillattr);
 	}
 	vcons_unlock(scr);
-#endif
 }
 
 static void
@@ -729,14 +734,16 @@
 static void
 vcons_copyrows(void *cookie, int srcrow, int dstrow, int nrows)
 {
-#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
 	struct rasops_info *ri = cookie;
 	struct vcons_screen *scr = ri->ri_hw;
-#endif
 
 	vcons_copyrows_buffer(cookie, srcrow, dstrow, nrows);
 
-#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
+#if defined(VCONS_DRAW_INTR)
+	if (scr->scr_vd->use_intr)
+		return;
+#endif
+
 	vcons_lock(scr);
 	if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
 #ifdef VCONS_DRAW_ASYNC
@@ -748,7 +755,6 @@
 			scr->scr_vd->copyrows(cookie, srcrow, dstrow, nrows);
 	}
 	vcons_unlock(scr);
-#endif
 }
 
 static void
@@ -807,14 +813,16 @@
 static void
 vcons_eraserows(void *cookie, int row, int nrows, long fillattr)
 {
-#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
 	struct rasops_info *ri = cookie;
 	struct vcons_screen *scr = ri->ri_hw;
-#endif
 
 	vcons_eraserows_buffer(cookie, row, nrows, fillattr);
 
-#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
+#if defined(VCONS_DRAW_INTR)
+	if (scr->scr_vd->use_intr)
+		return;
+#endif
+
 	vcons_lock(scr);
 	if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
 #ifdef VCONS_DRAW_ASYNC
@@ -826,7 +834,6 @@
 			scr->scr_vd->eraserows(cookie, row, nrows, fillattr);
 	}
 	vcons_unlock(scr);
-#endif
 }
 
 static void
@@ -863,14 +870,16 @@
 static void
 vcons_putchar(void *cookie, int row, int col, u_int c, long attr)
 {
-#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
 	struct rasops_info *ri = cookie;
 	struct vcons_screen *scr = ri->ri_hw;
-#endif
 	
 	vcons_putchar_buffer(cookie, row, col, c, attr);
-	
-#if !defined(VCONS_DRAW_INTR) || defined(VCONS_INTR_DEBUG)
+
+#if defined(VCONS_DRAW_INTR)
+	if (scr->scr_vd->use_intr)
+		return;
+#endif
+
 

CVS commit: src/sbin/dmctl

2011-02-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Feb  8 13:58:54 UTC 2011

Modified Files:
src/sbin/dmctl: dmctl.c

Log Message:
Use PRIu64 to fix build on amd64 (and presumably other 64-bit ports)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sbin/dmctl/dmctl.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/dmctl/dmctl.c
diff -u src/sbin/dmctl/dmctl.c:1.1 src/sbin/dmctl/dmctl.c:1.2
--- src/sbin/dmctl/dmctl.c:1.1	Tue Feb  8 03:20:16 2011
+++ src/sbin/dmctl/dmctl.c	Tue Feb  8 13:58:54 2011
@@ -474,7 +474,7 @@
 	while ((params = parse_stdin(file_path)) != NULL) {
 		table = libdm_table_create();
 
-		sscanf(params, "%llu %llu %s %n", &start, &length, target, &len);
+		sscanf(params, "%"PRIu64" %"PRIu64" %s %n", &start, &length, target, &len);
 
 		libdm_table_set_start(start, table);
 		libdm_table_set_length(length, table);



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

2011-02-08 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Feb  8 14:25:00 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: shl.mi

Log Message:
Add missing debug keyword for libdm.so.0.0.debug.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/distrib/sets/lists/comp/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/comp/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.159 src/distrib/sets/lists/comp/shl.mi:1.160
--- src/distrib/sets/lists/comp/shl.mi:1.159	Tue Feb  8 03:20:14 2011
+++ src/distrib/sets/lists/comp/shl.mi	Tue Feb  8 14:24:59 2011
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.159 2011/02/08 03:20:14 haad Exp $
+# $NetBSD: shl.mi,v 1.160 2011/02/08 14:24:59 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -231,7 +231,7 @@
 ./usr/libdata/debug/usr/lib/libcurses.so.7.0.debug	comp-sys-debug	debug
 ./usr/libdata/debug/usr/lib/libdes.so.8.1.debug		comp-crypto-debug	crypto,debug
 ./usr/libdata/debug/usr/lib/libdevmapper.so.1.0.debug	comp-lvm-debug	lvm,debug
-./usr/libdata/debug/usr/lib/libdm.so.0.0.debug 		comp-sys-debug
+./usr/libdata/debug/usr/lib/libdm.so.0.0.debug 		comp-sys-debug	debug
 ./usr/libdata/debug/usr/lib/libdns.so.5.2.debug		comp-bind-debug	debug
 ./usr/libdata/debug/usr/lib/libdns_sd.so.0.0.debug	comp-mdns-debug	mdns,debug
 ./usr/libdata/debug/usr/lib/libdtrace.so.2.0.debug	comp-sys-debug	dtrace,debug



CVS commit: src/lib/librumphijack

2011-02-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  8 14:45:35 UTC 2011

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

Log Message:
Make sure we can do host kevent since the -current (and recent nb5)
libc resolver uses it.  Error out in case of rump fd kevent (TODO).
Fixes one more problem pointed out by Alexander Nasonov.

Also, implement dup().
(TODO: implement it along the fcntl path too)


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.33 src/lib/librumphijack/hijack.c:1.34
--- src/lib/librumphijack/hijack.c:1.33	Tue Feb  8 12:20:11 2011
+++ src/lib/librumphijack/hijack.c	Tue Feb  8 14:45:35 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.33 2011/02/08 12:20:11 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.34 2011/02/08 14:45:35 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: hijack.c,v 1.33 2011/02/08 12:20:11 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.34 2011/02/08 14:45:35 pooka Exp $");
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -66,8 +66,10 @@
 	DUALCALL_GETSOCKOPT, DUALCALL_SETSOCKOPT,
 	DUALCALL_SHUTDOWN,
 	DUALCALL_READ, DUALCALL_READV,
-	DUALCALL_DUP2, DUALCALL_CLOSE,
+	DUALCALL_DUP, DUALCALL_DUP2,
+	DUALCALL_CLOSE,
 	DUALCALL_POLLTS,
+	DUALCALL_KEVENT,
 	DUALCALL__NUM
 };
 
@@ -81,15 +83,19 @@
 #if !__NetBSD_Prereq__(5,99,7)
 #define REALSELECT select
 #define REALPOLLTS pollts
+#define REALKEVENT kevent
 #else
 #define REALSELECT _sys___select50
 #define REALPOLLTS _sys___pollts50
+#define REALKEVENT _sys___kevent50
 #endif
 #define REALREAD _sys_read
 
 int REALSELECT(int, fd_set *, fd_set *, fd_set *, struct timeval *);
 int REALPOLLTS(struct pollfd *, nfds_t,
 	   const struct timespec *, const sigset_t *);
+int REALKEVENT(int, const struct kevent *, size_t, struct kevent *, size_t,
+	   const struct timespec *);
 ssize_t REALREAD(int, void *, size_t);
 
 #define S(a) __STRING(a)
@@ -118,9 +124,11 @@
 	{ DUALCALL_WRITEV,	"writev",	RSYS_NAME(WRITEV)	},
 	{ DUALCALL_IOCTL,	"ioctl",	RSYS_NAME(IOCTL)	},
 	{ DUALCALL_FCNTL,	"fcntl",	RSYS_NAME(FCNTL)	},
+	{ DUALCALL_DUP,		"dup",		RSYS_NAME(DUP)		},
 	{ DUALCALL_DUP2,	"dup2",		RSYS_NAME(DUP2)		},
 	{ DUALCALL_CLOSE,	"close",	RSYS_NAME(CLOSE)	},
 	{ DUALCALL_POLLTS,	S(REALPOLLTS),	RSYS_NAME(POLLTS)	},
+	{ DUALCALL_KEVENT,	S(REALKEVENT),	RSYS_NAME(KEVENT)	},
 };
 #undef S
 
@@ -269,7 +277,6 @@
 
 /* XXX: need runtime selection.  low for now due to FD_SETSIZE */
 #define HIJACK_FDOFF 128
-#define HIJACK_SELECT 128 /* XXX */
 #define HIJACK_ASSERT 128 /* XXX */
 static int
 fd_rump2host(int fd)
@@ -375,6 +382,8 @@
 	return rv;
 }
 
+
+/* TODO: support F_DUPFD, F_CLOSEM, F_MAXFD */
 int
 fcntl(int fd, int cmd, ...)
 {
@@ -444,6 +453,28 @@
 	return rv;
 }
 
+int
+dup(int oldd)
+{
+	int (*op_dup)(int);
+	int newd;
+
+	DPRINTF(("dup -> %d\n", oldd));
+	if (fd_isrump(oldd)) {
+		op_dup = GETSYSCALL(rump, DUP);
+	} else {
+		op_dup = GETSYSCALL(host, DUP);
+	}
+
+	newd = op_dup(oldd);
+
+	if (fd_isrump(oldd))
+		newd = fd_rump2host(newd);
+	DPRINTF(("dup <- %d\n", newd));
+
+	return newd;
+}
+
 /*
  * We just wrap fork the appropriate rump client calls to preserve
  * the file descriptors of the forked parent in the child, but
@@ -818,26 +849,32 @@
 }
 
 int
-kqueue(void)
-{
-
-	if (!ISDUP2D(STDERR_FILENO) && isatty(STDERR_FILENO)) {
-		fprintf(stderr, "rumphijack: kqueue currently unsupported\n");
-	}
-	errno = ENOSYS;
-	return -1;
-}
-
-/*ARGSUSED*/
-int
-kevent(int kq, const struct kevent *changelist, size_t nchanges,
+REALKEVENT(int kq, const struct kevent *changelist, size_t nchanges,
 	struct kevent *eventlist, size_t nevents,
 	const struct timespec *timeout)
 {
+	int (*op_kevent)(int, const struct kevent *, size_t,
+		struct kevent *, size_t, const struct timespec *);
+	const struct kevent *ev;
+	size_t i;
+
+	/*
+	 * Check that we don't attempt to kevent rump kernel fd's.
+	 * That needs similar treatment to select/poll, but is slightly
+	 * trickier since we need to manage to different kq descriptors.
+	 * (TODO, in case you're wondering).
+	 */
+	for (i = 0; i < nchanges; i++) {
+		ev = &changelist[i];
+		if (ev->filter == EVFILT_READ || ev->filter == EVFILT_WRITE ||
+		ev->filter == EVFILT_VNODE) {
+			if (fd_isrump(ev->ident))
+return ENOTSUP;
+		}
+	}
 
-	fprintf(stderr, "kevent impossible\n");
-	abort();
-	/*NOTREACHED*/
+	op_kevent = GETSYSCALL(host, ACCEPT);
+	return op_kevent(kq, changelist, nchanges, eventlist, nevents, timeout);
 }
 
 /*



CVS commit: [bouyer-quota2] src/usr.sbin/makefs/ffs

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 14:48:05 UTC 2011

Modified Files:
src/usr.sbin/makefs/ffs [bouyer-quota2]: ffs_alloc.c

Log Message:
ffs_clusteracct() moved to ffs_subr.c, so remove it from this copy of
ffs_alloc.c (otherwise we have duplicate symbols at link time).
Always use UFS_FSNEEDSWAP(fs) even if !KERNEL; so we can use for makefs too.
other !KERNEL consumers will have UFS_FSNEEDSWAP(fs) == 0 anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.30.1 src/usr.sbin/makefs/ffs/ffs_alloc.c

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

Modified files:

Index: src/usr.sbin/makefs/ffs/ffs_alloc.c
diff -u src/usr.sbin/makefs/ffs/ffs_alloc.c:1.17 src/usr.sbin/makefs/ffs/ffs_alloc.c:1.17.30.1
--- src/usr.sbin/makefs/ffs/ffs_alloc.c:1.17	Mon Dec 18 21:03:29 2006
+++ src/usr.sbin/makefs/ffs/ffs_alloc.c	Tue Feb  8 14:48:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_alloc.c,v 1.17 2006/12/18 21:03:29 christos Exp $	*/
+/*	$NetBSD: ffs_alloc.c,v 1.17.30.1 2011/02/08 14:48:05 bouyer Exp $	*/
 /* From: NetBSD: ffs_alloc.c,v 1.50 2001/09/06 02:16:01 lukem Exp */
 
 /*
@@ -47,7 +47,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs_alloc.c,v 1.17 2006/12/18 21:03:29 christos Exp $");
+__RCSID("$NetBSD: ffs_alloc.c,v 1.17.30.1 2011/02/08 14:48:05 bouyer Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -600,93 +600,3 @@
 	errx(1, "ffs_alloccg: block not in map: bno %lld", (long long)bno);
 	return (-1);
 }
-
-/*
- * Update the cluster map because of an allocation or free.
- *
- * Cnt == 1 means free; cnt == -1 means allocating.
- */
-void
-ffs_clusteracct(struct fs *fs, struct cg *cgp, int32_t blkno, int cnt)
-{
-	int32_t *sump;
-	int32_t *lp;
-	u_char *freemapp, *mapp;
-	int i, start, end, forw, back, map, bit;
-	const int needswap = UFS_FSNEEDSWAP(fs);
-
-	if (fs->fs_contigsumsize <= 0)
-		return;
-	freemapp = cg_clustersfree(cgp, needswap);
-	sump = cg_clustersum(cgp, needswap);
-	/*
-	 * Allocate or clear the actual block.
-	 */
-	if (cnt > 0)
-		setbit(freemapp, blkno);
-	else
-		clrbit(freemapp, blkno);
-	/*
-	 * Find the size of the cluster going forward.
-	 */
-	start = blkno + 1;
-	end = start + fs->fs_contigsumsize;
-	if (end >= ufs_rw32(cgp->cg_nclusterblks, needswap))
-		end = ufs_rw32(cgp->cg_nclusterblks, needswap);
-	mapp = &freemapp[start / NBBY];
-	map = *mapp++;
-	bit = 1 << (start % NBBY);
-	for (i = start; i < end; i++) {
-		if ((map & bit) == 0)
-			break;
-		if ((i & (NBBY - 1)) != (NBBY - 1)) {
-			bit <<= 1;
-		} else {
-			map = *mapp++;
-			bit = 1;
-		}
-	}
-	forw = i - start;
-	/*
-	 * Find the size of the cluster going backward.
-	 */
-	start = blkno - 1;
-	end = start - fs->fs_contigsumsize;
-	if (end < 0)
-		end = -1;
-	mapp = &freemapp[start / NBBY];
-	map = *mapp--;
-	bit = 1 << (start % NBBY);
-	for (i = start; i > end; i--) {
-		if ((map & bit) == 0)
-			break;
-		if ((i & (NBBY - 1)) != 0) {
-			bit >>= 1;
-		} else {
-			map = *mapp--;
-			bit = 1 << (NBBY - 1);
-		}
-	}
-	back = start - i;
-	/*
-	 * Account for old cluster and the possibly new forward and
-	 * back clusters.
-	 */
-	i = back + forw + 1;
-	if (i > fs->fs_contigsumsize)
-		i = fs->fs_contigsumsize;
-	ufs_add32(sump[i], cnt, needswap);
-	if (back > 0)
-		ufs_add32(sump[back], -cnt, needswap);
-	if (forw > 0)
-		ufs_add32(sump[forw], -cnt, needswap);
-
-	/*
-	 * Update cluster summary information.
-	 */
-	lp = &sump[fs->fs_contigsumsize];
-	for (i = fs->fs_contigsumsize; i > 0; i--)
-		if (ufs_rw32(*lp--, needswap) > 0)
-			break;
-	fs->fs_maxcluster[ufs_rw32(cgp->cg_cgx, needswap)] = i;
-}



CVS commit: [bouyer-quota2] src/sbin/fsck_ffs

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 14:50:37 UTC 2011

Modified Files:
src/sbin/fsck_ffs [bouyer-quota2]: quota2.c

Log Message:
Q2V_ -> QL_ rename


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sbin/fsck_ffs/quota2.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/fsck_ffs/quota2.c
diff -u src/sbin/fsck_ffs/quota2.c:1.1.2.1 src/sbin/fsck_ffs/quota2.c:1.1.2.2
--- src/sbin/fsck_ffs/quota2.c:1.1.2.1	Thu Jan 20 14:24:54 2011
+++ src/sbin/fsck_ffs/quota2.c	Tue Feb  8 14:50:37 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: quota2.c,v 1.1.2.1 2011/01/20 14:24:54 bouyer Exp $ */
+/* $NetBSD: quota2.c,v 1.1.2.2 2011/02/08 14:50:37 bouyer Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -117,8 +117,8 @@
 
 	memcpy(q2e, &q2h->q2h_defentry, sizeof(*q2e));
 	q2e->q2e_uid = iswap32(uid);
-	q2e->q2e_val[Q2V_BLOCK].q2v_cur = iswap64(u_b);
-	q2e->q2e_val[Q2V_FILE].q2v_cur = iswap64(u_i);
+	q2e->q2e_val[QL_BLOCK].q2v_cur = iswap64(u_b);
+	q2e->q2e_val[QL_FILE].q2v_cur = iswap64(u_i);
 	/* insert in hash list */
 	q2e->q2e_next = q2h->q2h_entries[uid & q2h_hash_mask];
 	q2h->q2h_entries[uid & q2h_hash_mask] = iswap64(off);
@@ -439,21 +439,21 @@
 	else
 		remove_uquot(a->uquot_hash, uq);
 		
-	if (iswap64(q2e->q2e_val[Q2V_BLOCK].q2v_cur) == uq->uq_b && 
-	iswap64(q2e->q2e_val[Q2V_FILE].q2v_cur) == uq->uq_i)
+	if (iswap64(q2e->q2e_val[QL_BLOCK].q2v_cur) == uq->uq_b && 
+	iswap64(q2e->q2e_val[QL_FILE].q2v_cur) == uq->uq_i)
 		return 0;
 	pwarn("%s QUOTA MISMATCH FOR ID %d: %" PRIu64 "/%" PRIu64 " SHOULD BE "
 	"%" PRIu64 "/%" PRIu64, a->capstrtype, uid,
-	iswap64(q2e->q2e_val[Q2V_BLOCK].q2v_cur),
-	iswap64(q2e->q2e_val[Q2V_FILE].q2v_cur), uq->uq_b, uq->uq_i);
+	iswap64(q2e->q2e_val[QL_BLOCK].q2v_cur),
+	iswap64(q2e->q2e_val[QL_FILE].q2v_cur), uq->uq_b, uq->uq_i);
 	if (preen) {
 		printf(" (FIXED)\n");
 	} else if (!reply("FIX")) {
 		markclean = 0;
 		return 0;
 	}
-	q2e->q2e_val[Q2V_BLOCK].q2v_cur = iswap64(uq->uq_b);
-	q2e->q2e_val[Q2V_FILE].q2v_cur = iswap64(uq->uq_i);
+	q2e->q2e_val[QL_BLOCK].q2v_cur = iswap64(uq->uq_b);
+	q2e->q2e_val[QL_FILE].q2v_cur = iswap64(uq->uq_i);
 	return Q2WL_DIRTY;
 }
 



CVS commit: [bouyer-quota2] src/sbin/newfs

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 14:51:36 UTC 2011

Modified Files:
src/sbin/newfs [bouyer-quota2]: mkfs.c

Log Message:
Q2V -> QL


To generate a diff of this commit:
cvs rdiff -u -r1.108.2.1 -r1.108.2.2 src/sbin/newfs/mkfs.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/newfs/mkfs.c
diff -u src/sbin/newfs/mkfs.c:1.108.2.1 src/sbin/newfs/mkfs.c:1.108.2.2
--- src/sbin/newfs/mkfs.c:1.108.2.1	Thu Jan 20 14:24:54 2011
+++ src/sbin/newfs/mkfs.c	Tue Feb  8 14:51:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkfs.c,v 1.108.2.1 2011/01/20 14:24:54 bouyer Exp $	*/
+/*	$NetBSD: mkfs.c,v 1.108.2.2 2011/02/08 14:51:36 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1980, 1989, 1993
@@ -73,7 +73,7 @@
 #if 0
 static char sccsid[] = "@(#)mkfs.c	8.11 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: mkfs.c,v 1.108.2.1 2011/01/20 14:24:54 bouyer Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.108.2.2 2011/02/08 14:51:36 bouyer Exp $");
 #endif
 #endif /* not lint */
 
@@ -1182,8 +1182,8 @@
 		q2h->q2h_free = q2e->q2e_next;
 		memcpy(q2e, &q2h->q2h_defentry, sizeof(*q2e));
 		q2e->q2e_uid = ufs_rw32(uid, needswap);
-		q2e->q2e_val[Q2V_BLOCK].q2v_cur = ufs_rw64(qblocks, needswap);
-		q2e->q2e_val[Q2V_FILE].q2v_cur = ufs_rw64(qinos, needswap);
+		q2e->q2e_val[QL_BLOCK].q2v_cur = ufs_rw64(qblocks, needswap);
+		q2e->q2e_val[QL_FILE].q2v_cur = ufs_rw64(qinos, needswap);
 		/* add to the hash entry */
 		q2e->q2e_next = q2h->q2h_entries[uid & q2h_hash_mask];
 		q2h->q2h_entries[uid & q2h_hash_mask] =



CVS commit: [bouyer-quota2] src/sbin/dmctl

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 18:09:39 UTC 2011

Added Files:
src/sbin/dmctl [bouyer-quota2]: Makefile README dmctl.8 dmctl.c

Log Message:
Sync with HEAD


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.2 src/sbin/dmctl/Makefile
cvs rdiff -u -r0 -r1.2.2.2 src/sbin/dmctl/README src/sbin/dmctl/dmctl.8 \
src/sbin/dmctl/dmctl.c

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

Added files:

Index: src/sbin/dmctl/Makefile
diff -u /dev/null src/sbin/dmctl/Makefile:1.1.2.2
--- /dev/null	Tue Feb  8 18:09:40 2011
+++ src/sbin/dmctl/Makefile	Tue Feb  8 18:09:39 2011
@@ -0,0 +1,24 @@
+PROG=   dmctl
+MAN=		dmctl.8
+WARN= 		4
+SRC=		dmctl.c
+
+BINDIR=		/sbin
+
+#LIBDM_INCLUDE= ${NETBSDSRCDIR}/lib/libdm/
+#LIBDM_OBJDIR= ${NETBSDSRCDIR}/lib/libdm/
+#CFLAGS+= -fno-inline -Wall -O0 -g
+#CPPFLAGS+= -I. -I${LIBDM_INCLUDE}
+
+LDADD+= -ldm
+
+.ifdef RUMP_ACTION
+CPPFLAGS+=  -D RUMP_ACTION
+LDADD+= -lrumpclient
+.endif
+
+LDADD+= -lprop
+
+#LDSTATIC= -static
+
+.include 

Index: src/sbin/dmctl/README
diff -u /dev/null src/sbin/dmctl/README:1.2.2.2
--- /dev/null	Tue Feb  8 18:09:40 2011
+++ src/sbin/dmctl/README	Tue Feb  8 18:09:39 2011
@@ -0,0 +1,22 @@
+= RUMP howto =
+
+Build rump dm library, build libdm with RUMP_ACTION, build dmct with RUMP_ACTION.
+
+cd lib/libdm/
+RUMP_ACTION=1 USETOOLS=no make
+
+cd ../../sbin/dmctl
+RUMP_ACTION=1 USETOOLS=no make
+RUMP_ACTION=1 USETOOLS=no make -f Makefile.server
+
+== Server Startup ==
+
+RUMP_SP_SERVER=unix:///tmp/dmc
+env RUMP_VERBOSE=1 ./dmctl_server
+
+Server uses /home/haad/test.img file as disk1 device.
+
+== Client Startup ==
+
+RUMP_SP_CLIENT=unix:///tmp/dmc
+./dmctl version
Index: src/sbin/dmctl/dmctl.8
diff -u /dev/null src/sbin/dmctl/dmctl.8:1.2.2.2
--- /dev/null	Tue Feb  8 18:09:40 2011
+++ src/sbin/dmctl/dmctl.8	Tue Feb  8 18:09:39 2011
@@ -0,0 +1,67 @@
+.\" $NetBSD: dmctl.8,v 1.2.2.2 2011/02/08 18:09:39 bouyer Exp $
+.\"
+.\" Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Adam Hamsik.
+.\"
+.\" 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.
+.Dd January 23, 2011
+.Dt DMCTL 8
+.Os
+.Sh NAME
+.Nm dmctl
+.Nd manipulate device-mapper driver command
+.Sh SYNOPSIS
+.Nm
+.Sh DESCRIPTION
+.Nm
+works with the device-mapper kernel driver.
+It can send and receive information and commands from the dm driver.
+.Bl -column -offset indent "suspend" "Switch active and passive tables for"
+.Ii Li version Ta Print driver and lib version.
+.It Li targets Ta List available kernel targets.
+.It Li create Ta Create device with [dm device name].
+.It Li ls Ta List existing dm devices.
+.It Li info Ta Get info about device with [dm device name].
+.It Li rename Ta Rename device with [dm device name] to [dm device new name].
+.It Li remove Ta Remove device with [dm device name].
+.It Li resume Ta Resume IO on dm device [dm device name].
+.It Li suspend Ta Suspend IO on dm device [dm device name].
+.It Li deps Ta Print physical dependiences for dm device [dm device name].
+.It Li reload Ta Switch active and passive tables for [dm device name].
+.It Li status Ta Print status for device with [dm device name].
+.It Li table Ta Print active table for device with [dm device name].
+.El
+.Sh SEE ALSO
+.Xr dm 3 ,
+.Xr dm 4
+.Sh HISTORY
+The
+.Nm
+was written and contributed to
+.Nx
+by
+.An Adam Hamsik
+and first appeared in
+.Nx 6.0 .
Index: src/sbin/dmctl/dmctl.c
diff -u /dev/null src/sbin/dmctl/dmctl.c:1.2.2.2
--- /dev/null	Tue Feb  8 18:09:40 2011
+++ src/sbin/dmctl/dmctl.c	Tu

CVS commit: src/usr.bin/sdpquery

2011-02-08 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Feb  8 18:14:00 UTC 2011

Modified Files:
src/usr.bin/sdpquery: command.c

Log Message:
use built-in macro ___STRING() rather than rolling our own


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/sdpquery/command.c

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

Modified files:

Index: src/usr.bin/sdpquery/command.c
diff -u src/usr.bin/sdpquery/command.c:1.3 src/usr.bin/sdpquery/command.c:1.4
--- src/usr.bin/sdpquery/command.c:1.3	Sat Dec  5 16:54:13 2009
+++ src/usr.bin/sdpquery/command.c	Tue Feb  8 18:14:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: command.c,v 1.3 2009/12/05 16:54:13 plunky Exp $	*/
+/*	$NetBSD: command.c,v 1.4 2011/02/08 18:14:00 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: command.c,v 1.3 2009/12/05 16:54:13 plunky Exp $");
+__RCSID("$NetBSD: command.c,v 1.4 2011/02/08 18:14:00 plunky Exp $");
 
 #include 
 #include 
@@ -97,9 +97,7 @@
 int
 do_sdp_browse(int argc, const char **argv)
 {
-#define STR(x)	__STRING(x)
-	const char *av = STR(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP);
-#undef STR
+	const char *av = ___STRING(SDP_SERVICE_CLASS_PUBLIC_BROWSE_GROUP);
 
 	if (argc > 1)
 		errx(EXIT_FAILURE, "Too many arguments");



CVS commit: [bouyer-quota2] src/share/man

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 18:15:42 UTC 2011

Added Files:
src/share/man/man4/man4.emips [bouyer-quota2]: Makefile ace.4
autoconf.4 dz.4 ebus.4 eclock.4 enic.4 intro.4
src/share/man/man4/man4.sandpoint [bouyer-quota2]: Makefile satmgr.4
src/share/man/man8/man8.emips [bouyer-quota2]: Makefile boot.8
src/share/man/man8/man8.sandpoint [bouyer-quota2]: Makefile altboot.8

Log Message:
Sync with HEAD


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.2 src/share/man/man4/man4.emips/Makefile \
src/share/man/man4/man4.emips/ace.4 \
src/share/man/man4/man4.emips/autoconf.4 \
src/share/man/man4/man4.emips/dz.4 src/share/man/man4/man4.emips/ebus.4 \
src/share/man/man4/man4.emips/eclock.4 \
src/share/man/man4/man4.emips/enic.4 \
src/share/man/man4/man4.emips/intro.4
cvs rdiff -u -r0 -r1.1.2.2 src/share/man/man4/man4.sandpoint/Makefile
cvs rdiff -u -r0 -r1.3.2.2 src/share/man/man4/man4.sandpoint/satmgr.4
cvs rdiff -u -r0 -r1.1.2.2 src/share/man/man8/man8.emips/Makefile \
src/share/man/man8/man8.emips/boot.8
cvs rdiff -u -r0 -r1.2.22.1 src/share/man/man8/man8.sandpoint/Makefile
cvs rdiff -u -r0 -r1.3.2.2 src/share/man/man8/man8.sandpoint/altboot.8

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

Added files:

Index: src/share/man/man4/man4.emips/Makefile
diff -u /dev/null src/share/man/man4/man4.emips/Makefile:1.1.2.2
--- /dev/null	Tue Feb  8 18:15:42 2011
+++ src/share/man/man4/man4.emips/Makefile	Tue Feb  8 18:15:41 2011
@@ -0,0 +1,7 @@
+#	$NetBSD: Makefile,v 1.1.2.2 2011/02/08 18:15:41 bouyer Exp $
+#	from: @(#)Makefile	8.2 (Berkeley) 2/16/94
+
+MAN=	ace.4 autoconf.4 dz.4 ebus.4 eclock.4 enic.4 intro.4
+MANSUBDIR=/emips
+
+.include 
Index: src/share/man/man4/man4.emips/ace.4
diff -u /dev/null src/share/man/man4/man4.emips/ace.4:1.1.2.2
--- /dev/null	Tue Feb  8 18:15:42 2011
+++ src/share/man/man4/man4.emips/ace.4	Tue Feb  8 18:15:41 2011
@@ -0,0 +1,58 @@
+.\"
+.\" Copyright (c) 2010 Microsoft Corp.
+.\" Copyright (c) 2010 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 AUTHOR ``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 AUTHOR 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.
+.\"
+.\"	$NetBSD: ace.4,v 1.1.2.2 2011/02/08 18:15:41 bouyer Exp $
+.\"
+.Dd July 17, 2010
+.Dt ACE 4 emips
+.Os
+.Sh NAME
+.Nm ace
+.Nd
+ACE disk adaptor
+.Sh SYNOPSIS
+.Cd "ace* at ebus0 addr ?
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the
+.Tn Xilinx
+SystemACE Compact-FLASH card adaptor used in the Xilinx XUP, ML401, ML401.
+.Pp
+The
+.Nm
+is a medium-performance implementation of the CF interface.
+.Pp
+The
+.Nm
+chip currently does not support DMA and the CPU must copy data using programmed-I/O.
+.Sh SEE ALSO
+.Xr ebus 4 ,
+.Xr intro 4 ,
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx 6.0 .
Index: src/share/man/man4/man4.emips/autoconf.4
diff -u /dev/null src/share/man/man4/man4.emips/autoconf.4:1.1.2.2
--- /dev/null	Tue Feb  8 18:15:42 2011
+++ src/share/man/man4/man4.emips/autoconf.4	Tue Feb  8 18:15:41 2011
@@ -0,0 +1,60 @@
+.\"
+.\" Copyright (c) 2010 Microsoft Corp.
+.\" Copyright (c) 2010 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.
+.\"
+.

CVS commit: src/external/bsd/pcc/usr.bin/pcc

2011-02-08 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Feb  8 18:26:25 UTC 2011

Modified Files:
src/external/bsd/pcc/usr.bin/pcc: Makefile

Log Message:
newer pcc front end provides some definitions according to arch,
so provide the TARGMACH definition to the compiler here.

(makes no difference to the currently imported sources, but
will be easier for people wanting to try newer sources)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/pcc/usr.bin/pcc/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/bsd/pcc/usr.bin/pcc/Makefile
diff -u src/external/bsd/pcc/usr.bin/pcc/Makefile:1.5 src/external/bsd/pcc/usr.bin/pcc/Makefile:1.6
--- src/external/bsd/pcc/usr.bin/pcc/Makefile:1.5	Thu Jun  3 19:17:22 2010
+++ src/external/bsd/pcc/usr.bin/pcc/Makefile	Tue Feb  8 18:26:25 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2010/06/03 19:17:22 plunky Exp $
+#	$NetBSD: Makefile,v 1.6 2011/02/08 18:26:25 plunky Exp $
 
 WARNS?=	2
 
@@ -14,8 +14,10 @@
 SRCS=	cc.c
 MAN=	pcc.1
 
+CPPFLAGS+=	-DTARGMACH=${TARGMACH}
 CPPFLAGS+=	-I${PCC_DIST}/mip
 CPPFLAGS+=	-I${PCC_DIST}/os/${TARGOS}
+CPPFLAGS+=	-I${PCC_DIST}/arch/${TARGMACH}
 
 pcc.1:	cc.1
 	${TOOL_SED} -e "s,Nm cc,Nm pcc,"	\



CVS commit: [matt-nb5-mips64] src/sys/lib/libkern

2011-02-08 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Feb  8 19:00:15 UTC 2011

Modified Files:
src/sys/lib/libkern [matt-nb5-mips64]: softfloat.c

Log Message:
- remove erroneous include of opt_multiprocessor.h
("MULTIPROCESSOR" instance was inside a comment)


To generate a diff of this commit:
cvs rdiff -u -r1.4.94.1 -r1.4.94.2 src/sys/lib/libkern/softfloat.c

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

Modified files:

Index: src/sys/lib/libkern/softfloat.c
diff -u src/sys/lib/libkern/softfloat.c:1.4.94.1 src/sys/lib/libkern/softfloat.c:1.4.94.2
--- src/sys/lib/libkern/softfloat.c:1.4.94.1	Sat Feb  5 06:00:14 2011
+++ src/sys/lib/libkern/softfloat.c	Tue Feb  8 19:00:14 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat.c,v 1.4.94.1 2011/02/05 06:00:14 cliff Exp $ */
+/* $NetBSD: softfloat.c,v 1.4.94.2 2011/02/08 19:00:14 cliff Exp $ */
 
 /*
  * This version hacked for use with gcc -msoft-float by bjh21.
@@ -47,11 +47,9 @@
 /* If you need this in a boot program, you have bigger problems... */
 #ifndef _STANDALONE
 
-#include "opt_multiprocessor.h"
-
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: softfloat.c,v 1.4.94.1 2011/02/05 06:00:14 cliff Exp $");
+__RCSID("$NetBSD: softfloat.c,v 1.4.94.2 2011/02/08 19:00:14 cliff Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef SOFTFLOAT_FOR_GCC



CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf

2011-02-08 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Feb  8 19:04:44 UTC 2011

Modified Files:
src/sys/arch/evbmips/conf [matt-nb5-mips64]: XLSATX

Log Message:
- improve formatting: a space char followed by tab char follows "options"


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

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

Modified files:

Index: src/sys/arch/evbmips/conf/XLSATX
diff -u src/sys/arch/evbmips/conf/XLSATX:1.1.2.12 src/sys/arch/evbmips/conf/XLSATX:1.1.2.13
--- src/sys/arch/evbmips/conf/XLSATX:1.1.2.12	Sat Feb  5 06:02:09 2011
+++ src/sys/arch/evbmips/conf/XLSATX	Tue Feb  8 19:04:43 2011
@@ -1,8 +1,8 @@
-#	$NetBSD: XLSATX,v 1.1.2.12 2011/02/05 06:02:09 cliff Exp $
+#	$NetBSD: XLSATX,v 1.1.2.13 2011/02/08 19:04:43 cliff Exp $
 
 include 	"arch/evbmips/conf/std.rmixl"
 
-#ident 		"XLSATX-$Revision: 1.1.2.12 $"
+#ident 		"XLSATX-$Revision: 1.1.2.13 $"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
@@ -11,13 +11,13 @@
 #
 # MEMSIZE can be used to limit memory amount used
 #
-##options		MEMSIZE=0x1000		# 256MB 
+#options 		MEMSIZE=0x1000		# 256MB 
 
 #
 # MEMLIMIT can be used to limit memory address used
 #
 defparam opt_memsize.h MEMLIMIT
-##options	MEMLIMIT=0x1000			# 256MB 
+#options 	MEMLIMIT=0x1000			# 256MB 
 
 options 	NOFPU		# No FPU
 #options 	FPEMUL		# emulate FPU insn
@@ -39,12 +39,12 @@
 options 	USERCONF	# userconf(4) support
 #options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 options 	DDB		# kernel dynamic debugger
-options		MIPS_DDB_WATCH	# enable T_WATCH (see IEU_DEFAUTURE[DBE])
+options 	MIPS_DDB_WATCH	# enable T_WATCH (see IEU_DEFAUTURE[DBE])
 options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 makeoptions 	DEBUG="-g"	# compile full symbol table
 options 	SYMTAB_SPACE=50	# size for embedded symbol table
-#options	DDB_COMMANDONENTER="trace;show registers"
-options		DB_MAX_LINE=-1
+#options 	DDB_COMMANDONENTER="trace;show registers"
+options 	DB_MAX_LINE=-1
 
 # Compatibility options
 #options 	COMPAT_43	# compatibility with 4.3BSD binaries
@@ -146,7 +146,7 @@
 obio0		at cpunode?
 com0		at obio0	addr 0x14000 intr 9
 com1		at obio0	addr 0x15000 intr 10
-options		COM_REGMAP
+options 	COM_REGMAP
 rmixl_pcix0	at obio0
 pci*		at rmixl_pcix0
 rmixl_pcie0	at obio0



CVS commit: src/lib/librumphijack

2011-02-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  8 19:12:54 UTC 2011

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

Log Message:
Fix pasto, use GETSYSCALLS() where possible


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.34 src/lib/librumphijack/hijack.c:1.35
--- src/lib/librumphijack/hijack.c:1.34	Tue Feb  8 14:45:35 2011
+++ src/lib/librumphijack/hijack.c	Tue Feb  8 19:12:54 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.34 2011/02/08 14:45:35 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.35 2011/02/08 19:12:54 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: hijack.c,v 1.34 2011/02/08 14:45:35 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.35 2011/02/08 19:12:54 pooka Exp $");
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -684,7 +684,7 @@
 	struct pollarg *parg = arg;
 	intptr_t rv;
 
-	op_pollts = syscalls[DUALCALL_POLLTS].bs_host;
+	op_pollts = GETSYSCALL(host, POLLTS);
 	rv = op_pollts(parg->pfds, parg->nfds, parg->ts, parg->sigmask);
 	if (rv == -1)
 		parg->errnum = errno;
@@ -777,7 +777,7 @@
 		parg.pipefd = rpipe[1];
 		pthread_create(&pt, NULL, hostpoll, &parg);
 
-		op_pollts = syscalls[DUALCALL_POLLTS].bs_rump;
+		op_pollts = GETSYSCALL(rump, POLLTS);
 		lrv = op_pollts(pfd_rump, nfds+1, ts, NULL);
 		sverrno = errno;
 		write(hpipe[1], &rv, sizeof(rv));
@@ -804,7 +804,7 @@
 		}
 
  out:
-		host_close = syscalls[DUALCALL_CLOSE].bs_host;
+		host_close = GETSYSCALL(host, CLOSE);
 		if (rpipe[0] != -1)
 			rump_sys_close(rpipe[0]);
 		if (rpipe[1] != -1)
@@ -818,9 +818,9 @@
 		errno = sverrno;
 	} else {
 		if (hostcall) {
-			op_pollts = syscalls[DUALCALL_POLLTS].bs_host;
+			op_pollts = GETSYSCALL(host, POLLTS);
 		} else {
-			op_pollts = syscalls[DUALCALL_POLLTS].bs_rump;
+			op_pollts = GETSYSCALL(rump, POLLTS);
 			adjustpoll(fds, nfds, fd_host2rump);
 		}
 
@@ -873,7 +873,7 @@
 		}
 	}
 
-	op_kevent = GETSYSCALL(host, ACCEPT);
+	op_kevent = GETSYSCALL(host, KEVENT);
 	return op_kevent(kq, changelist, nchanges, eventlist, nevents, timeout);
 }
 



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

2011-02-08 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Feb  8 19:18:23 UTC 2011

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: db_machdep.h
src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_subr.c db_interface.c

Log Message:
- rename ddb_running_on_this_cpu to ddb_running_on_this_cpu_p
according to pedicate unction naming style convention


To generate a diff of this commit:
cvs rdiff -u -r1.22.62.2 -r1.22.62.3 src/sys/arch/mips/include/db_machdep.h
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/arch/mips/mips/cpu_subr.c
cvs rdiff -u -r1.64.16.19 -r1.64.16.20 src/sys/arch/mips/mips/db_interface.c

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

Modified files:

Index: src/sys/arch/mips/include/db_machdep.h
diff -u src/sys/arch/mips/include/db_machdep.h:1.22.62.2 src/sys/arch/mips/include/db_machdep.h:1.22.62.3
--- src/sys/arch/mips/include/db_machdep.h:1.22.62.2	Sat Feb  5 06:04:59 2011
+++ src/sys/arch/mips/include/db_machdep.h	Tue Feb  8 19:18:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.22.62.2 2011/02/05 06:04:59 cliff Exp $ */
+/* $NetBSD: db_machdep.h,v 1.22.62.3 2011/02/08 19:18:22 cliff Exp $ */
 
 /*
  * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@@ -113,7 +113,7 @@
 db_addr_t branch_taken(int inst, db_addr_t pc, db_regs_t *regs);
 db_addr_t next_instr_address(db_addr_t pc, bool bd);
 
-bool ddb_running_on_this_cpu(void);
+bool ddb_running_on_this_cpu_p(void);
 bool ddb_running_on_any_cpu(void);
 void db_resume_others(void);
 #ifdef MIPS_DDB_WATCH

Index: src/sys/arch/mips/mips/cpu_subr.c
diff -u src/sys/arch/mips/mips/cpu_subr.c:1.1.2.15 src/sys/arch/mips/mips/cpu_subr.c:1.1.2.16
--- src/sys/arch/mips/mips/cpu_subr.c:1.1.2.15	Tue Feb  8 06:01:47 2011
+++ src/sys/arch/mips/mips/cpu_subr.c	Tue Feb  8 19:18:22 2011
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 #include "opt_sa.h"
 
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.1.2.15 2011/02/08 06:01:47 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.1.2.16 2011/02/08 19:18:22 cliff Exp $");
 
 #include 
 #include 
@@ -739,7 +739,7 @@
 		CPUSET_ADD(cpus_resumed, index);
 
 #if defined(DDB)
-		if (ddb_running_on_this_cpu())
+		if (ddb_running_on_this_cpu_p())
 			cpu_Debugger();
 		if (ddb_running_on_any_cpu())
 			continue;

Index: src/sys/arch/mips/mips/db_interface.c
diff -u src/sys/arch/mips/mips/db_interface.c:1.64.16.19 src/sys/arch/mips/mips/db_interface.c:1.64.16.20
--- src/sys/arch/mips/mips/db_interface.c:1.64.16.19	Sat Feb  5 06:07:07 2011
+++ src/sys/arch/mips/mips/db_interface.c	Tue Feb  8 19:18:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.64.16.19 2011/02/05 06:07:07 cliff Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.64.16.20 2011/02/08 19:18:22 cliff Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.64.16.19 2011/02/05 06:07:07 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.64.16.20 2011/02/08 19:18:22 cliff Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_cputype.h"	/* which mips CPUs do we support? */
@@ -109,8 +109,6 @@
 void db_mtcr_cmd(db_expr_t, bool, db_expr_t, const char *);
 #endif
 
-bool ddb_running_on_this_cpu(void);
-
 static void	kdbpoke_4(vaddr_t addr, int newval);
 static void	kdbpoke_2(vaddr_t addr, short newval);
 static void	kdbpoke_1(vaddr_t addr, char newval);
@@ -1081,7 +1079,7 @@
 #ifdef MULTIPROCESSOR
 
 bool 
-ddb_running_on_this_cpu(void)
+ddb_running_on_this_cpu_p(void)
 {   
 	return ddb_cpu == cpu_index(curcpu());
 }



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

2011-02-08 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Feb  8 19:50:23 UTC 2011

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_cpu.c rmixl_cpuvar.h
rmixl_intr.c rmixl_intr.h

Log Message:
- remove sc_ih_clk, sc_ih_fmn, sc_ih_ipi from struct rmixl_cpu_softc;
they were unused just taking up space
- rmixl_intr_init_clk() and rmixl_intr_init_ipi() are now type void


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/sys/arch/mips/rmi/rmixl_cpu.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/rmi/rmixl_cpuvar.h
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/sys/arch/mips/rmi/rmixl_intr.c
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/mips/rmi/rmixl_intr.h

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

Modified files:

Index: src/sys/arch/mips/rmi/rmixl_cpu.c
diff -u src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.18 src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.19
--- src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.18	Tue Feb  8 06:03:01 2011
+++ src/sys/arch/mips/rmi/rmixl_cpu.c	Tue Feb  8 19:50:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_cpu.c,v 1.1.2.18 2011/02/08 06:03:01 cliff Exp $	*/
+/*	$NetBSD: rmixl_cpu.c,v 1.1.2.19 2011/02/08 19:50:22 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -38,7 +38,7 @@
 #include "locators.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rmixl_cpu.c,v 1.1.2.18 2011/02/08 06:03:01 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_cpu.c,v 1.1.2.19 2011/02/08 19:50:22 cliff Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_ddb.h"
@@ -258,9 +258,9 @@
 
 	rmixl_fmn_init();
 
-	sc->sc_ih_clk = rmixl_intr_init_clk();
+	rmixl_intr_init_clk();
 #ifdef MULTIPROCESSOR
-	sc->sc_ih_ipi = rmixl_intr_init_ipi();
+	rmixl_intr_init_ipi();
 #endif
 
 #ifdef NOTYET
@@ -269,7 +269,6 @@
 	if (ih == NULL)
 		panic("%s: rmixl_fmn_intr_establish failed",
 			__func__);
-	sc->sc_ih_fmn = ih;
 #endif
 
 }

Index: src/sys/arch/mips/rmi/rmixl_cpuvar.h
diff -u src/sys/arch/mips/rmi/rmixl_cpuvar.h:1.1.2.2 src/sys/arch/mips/rmi/rmixl_cpuvar.h:1.1.2.3
--- src/sys/arch/mips/rmi/rmixl_cpuvar.h:1.1.2.2	Tue Apr 13 18:15:16 2010
+++ src/sys/arch/mips/rmi/rmixl_cpuvar.h	Tue Feb  8 19:50:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_cpuvar.h,v 1.1.2.2 2010/04/13 18:15:16 cliff Exp $	*/
+/*	$NetBSD: rmixl_cpuvar.h,v 1.1.2.3 2011/02/08 19:50:22 cliff Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -40,9 +40,6 @@
 struct rmixl_cpu_softc {
 	device_t sc_dev;
 	struct cpu_info *sc_ci;
-	void *sc_ih_clk;
-	void *sc_ih_fmn;
-	void *sc_ih_ipi;
 	struct evcnt sc_vec_evcnts[64];
 };
 

Index: src/sys/arch/mips/rmi/rmixl_intr.c
diff -u src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.26 src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.27
--- src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.26	Tue Feb  8 06:04:20 2011
+++ src/sys/arch/mips/rmi/rmixl_intr.c	Tue Feb  8 19:50:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_intr.c,v 1.1.2.26 2011/02/08 06:04:20 cliff Exp $	*/
+/*	$NetBSD: rmixl_intr.c,v 1.1.2.27 2011/02/08 19:50:22 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.26 2011/02/08 06:04:20 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.27 2011/02/08 19:50:22 cliff Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_ddb.h"
@@ -446,7 +446,7 @@
  * even though cpu_intr() handles the interrupt
  * note the 'mpsafe' arg here is a placeholder only
  */
-void *
+void
 rmixl_intr_init_clk(void)
 {
 	int vec = ffs(MIPS_INT_MASK_5 >> 8) - 1;
@@ -459,14 +459,13 @@
 
 	mutex_exit(&rmixl_intr_lock);
 	
-	return ih;
 }
 
 #ifdef MULTIPROCESSOR
 /*
  * establish IPI interrupt and send function
  */
-void *
+void
 rmixl_intr_init_ipi(void)
 {
 	u_int ipi, vec;
@@ -487,7 +486,6 @@
 
 	mutex_exit(&rmixl_intr_lock);
 
-	return ih;
 }
 #endif 	/* MULTIPROCESSOR */
 

Index: src/sys/arch/mips/rmi/rmixl_intr.h
diff -u src/sys/arch/mips/rmi/rmixl_intr.h:1.1.2.6 src/sys/arch/mips/rmi/rmixl_intr.h:1.1.2.7
--- src/sys/arch/mips/rmi/rmixl_intr.h:1.1.2.6	Sat Feb  5 06:31:06 2011
+++ src/sys/arch/mips/rmi/rmixl_intr.h	Tue Feb  8 19:50:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_intr.h,v 1.1.2.6 2011/02/05 06:31:06 cliff Exp $	*/
+/*	$NetBSD: rmixl_intr.h,v 1.1.2.7 2011/02/08 19:50:22 cliff Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -102,9 +102,9 @@
 extern void  rmixl_vec_disestablish(void *);
 extern const char *rmixl_intr_string(int);
 extern void rmixl_intr_init_cpu(struct cpu_info *);
-extern void *rmixl_intr_init_clk(void);
+extern void rmixl_intr_init_clk(void);
 #ifdef MULTIPROCESSOR
-extern void *rmixl_intr_init_ipi(void);
+extern void rmixl_intr_init_ipi(void);
 #endif
 
 #endif	/* _MIPS_RMI_RMIXL_INTR_H_ */



CVS commit: src/distrib/sets/lists

2011-02-08 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Tue Feb  8 19:57:11 UTC 2011

Modified Files:
src/distrib/sets/lists/base: md.amd64 shl.mi
src/distrib/sets/lists/comp: md.amd64

Log Message:
Fix build after libdm import sorry for breaking build.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.574 -r1.575 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.96 -r1.97 src/distrib/sets/lists/comp/md.amd64

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/base/md.amd64
diff -u src/distrib/sets/lists/base/md.amd64:1.112 src/distrib/sets/lists/base/md.amd64:1.113
--- src/distrib/sets/lists/base/md.amd64:1.112	Sun Feb  6 00:44:08 2011
+++ src/distrib/sets/lists/base/md.amd64	Tue Feb  8 19:57:10 2011
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.112 2011/02/06 00:44:08 christos Exp $
+# $NetBSD: md.amd64,v 1.113 2011/02/08 19:57:10 haad Exp $
 ./dev/lms0	base-obsolete		obsolete
 ./dev/mms0	base-obsolete		obsolete
 ./libexec/ld.elf_so-i386			base-sys-shlib		compat,pic
@@ -80,6 +80,9 @@
 ./usr/lib/i386/libcurses.so.7.0			base-compat-shlib	compat,pic
 ./usr/lib/i386/libdes.so.8			base-compat-shlib	compat,pic
 ./usr/lib/i386/libdes.so.8.1			base-compat-shlib	compat,pic
+./usr/lib/i386/libdm.sobase-compat-shlib	compat,pic
+./usr/lib/i386/libdm.so.0			base-compat-shlib	compat,pic
+./usr/lib/i386/libdm.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/i386/libdns.so.5			base-compat-shlib	compat,pic
 ./usr/lib/i386/libdns.so.5.2			base-compat-shlib	compat,pic
 ./usr/lib/i386/libdns_sd.so.0			base-compat-shlib	compat,pic,mdns

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.574 src/distrib/sets/lists/base/shl.mi:1.575
--- src/distrib/sets/lists/base/shl.mi:1.574	Tue Feb  8 03:20:13 2011
+++ src/distrib/sets/lists/base/shl.mi	Tue Feb  8 19:57:10 2011
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.574 2011/02/08 03:20:13 haad Exp $
+# $NetBSD: shl.mi,v 1.575 2011/02/08 19:57:10 haad Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -25,9 +25,6 @@
 ./lib/libdevmapper.sobase-lvm-shlib		lvm,dynamicroot
 ./lib/libdevmapper.so.1base-lvm-shlib		lvm,dynamicroot
 ./lib/libdevmapper.so.1.0			base-lvm-shlib		lvm,dynamicroot
-./lib/libdm.so	base-sys-shlib		dynamicroot
-./lib/libdm.so.0base-sys-shlib		dynamicroot
-./lib/libdm.so.0.0base-sys-shlib		dynamicroot
 ./lib/libedit.sobase-sys-shlib		dynamicroot
 ./lib/libedit.so.3base-sys-shlib		dynamicroot
 ./lib/libedit.so.3.0base-sys-shlib		dynamicroot

Index: src/distrib/sets/lists/comp/md.amd64
diff -u src/distrib/sets/lists/comp/md.amd64:1.96 src/distrib/sets/lists/comp/md.amd64:1.97
--- src/distrib/sets/lists/comp/md.amd64:1.96	Sun Feb  6 00:44:09 2011
+++ src/distrib/sets/lists/comp/md.amd64	Tue Feb  8 19:57:11 2011
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.96 2011/02/06 00:44:09 christos Exp $
+# $NetBSD: md.amd64,v 1.97 2011/02/08 19:57:11 haad Exp $
 ./usr/include/amd64comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
 ./usr/include/amd64/aout_machdep.h		comp-c-include
@@ -444,6 +444,9 @@
 ./usr/lib/i386/libdes_g.a			comp-c-proflib		compat,debuglib
 ./usr/lib/i386/libdes_p.a			comp-c-proflib		compat,profile
 ./usr/lib/i386/libdes_pic.a			comp-c-piclib		compat,pic
+./usr/lib/i386/libdm.acomp-c-lib		compat
+./usr/lib/i386/libdm_p.a			comp-c-proflb		compat,profile
+./usr/lib/i386/libdm_pic.a			comp-c-piclib		compat,pic
 ./usr/lib/i386/libdns.acomp-c-lib		compat
 ./usr/lib/i386/libdns.so			comp-sys-shlib		compat,pic
 ./usr/lib/i386/libdns_g.a			comp-c-proflib		compat,debuglib
@@ -919,6 +922,7 @@
 ./usr/libdata/debug/usr/lib/i386/libcrypto.so.6.1.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libcurses.so.7.0.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdes.so.8.1.debug	comp-compat-shlib	compat,pic,debug
+./usr/libdata/debug/usr/lib/i386/libdm.so.0.0.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdns.so.5.2.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdns_sd.so.0.0.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdwarf.so.0.0.debug	comp-compat-shlib	compat,pic,debug



CVS commit: [bouyer-quota2] src/sys/ufs

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 20:00:54 UTC 2011

Modified Files:
src/sys/ufs/ffs [bouyer-quota2]: ffs_vfsops.c
src/sys/ufs/ufs [bouyer-quota2]: ufs_extern.h ufs_quota.c ufs_quota.h
ufs_quota1.c ufs_quota2.c

Log Message:
Minimal hacking to make 'options QUOTA' compile again.


To generate a diff of this commit:
cvs rdiff -u -r1.263.4.1 -r1.263.4.2 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.62.8.1 -r1.62.8.2 src/sys/ufs/ufs/ufs_extern.h
cvs rdiff -u -r1.68.4.8 -r1.68.4.9 src/sys/ufs/ufs/ufs_quota.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/ufs/ufs/ufs_quota.h
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/ufs/ufs/ufs_quota1.c
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/ufs/ufs/ufs_quota2.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/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.263.4.1 src/sys/ufs/ffs/ffs_vfsops.c:1.263.4.2
--- src/sys/ufs/ffs/ffs_vfsops.c:1.263.4.1	Thu Jan 20 14:25:02 2011
+++ src/sys/ufs/ffs/ffs_vfsops.c	Tue Feb  8 20:00:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.263.4.1 2011/01/20 14:25:02 bouyer Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.263.4.2 2011/02/08 20:00:53 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.263.4.1 2011/01/20 14:25:02 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.263.4.2 2011/02/08 20:00:53 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1474,23 +1474,12 @@
 		flags &= ~FORCECLOSE;
 	ump = VFSTOUFS(mp);
 #ifdef QUOTA
-	if (mp->mnt_flag & MNT_QUOTA) {
-		int i;
-		if ((error = vflush(mp, NULLVP, SKIPSYSTEM | flags)) != 0)
-			return (error);
-		for (i = 0; i < MAXQUOTAS; i++) {
-			if (ump->um_quotas[i] == NULLVP)
-continue;
-			quotaoff(l, mp, i);
-		}
-		/*
-		 * Here we fall through to vflush again to ensure
-		 * that we have gotten rid of all the system vnodes.
-		 */
-	}
+	if ((error = quota1_umount(mp, flags)) != 0)
+		return (error);
 #endif
 #ifdef QUOTA2
-	quota2_umount(mp);
+	if ((error = quota2_umount(mp, flags)) != 0)
+		return (error);
 #endif
 	if ((error = vflush(mp, 0, SKIPSYSTEM | flags)) != 0)
 		return (error);

Index: src/sys/ufs/ufs/ufs_extern.h
diff -u src/sys/ufs/ufs/ufs_extern.h:1.62.8.1 src/sys/ufs/ufs/ufs_extern.h:1.62.8.2
--- src/sys/ufs/ufs/ufs_extern.h:1.62.8.1	Thu Jan 20 14:25:03 2011
+++ src/sys/ufs/ufs/ufs_extern.h	Tue Feb  8 20:00:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_extern.h,v 1.62.8.1 2011/01/20 14:25:03 bouyer Exp $	*/
+/*	$NetBSD: ufs_extern.h,v 1.62.8.2 2011/02/08 20:00:53 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -144,8 +144,11 @@
 int	quota_handle_cmd(struct mount *, struct lwp *, prop_dictionary_t);
 int	qsync(struct mount *);
 
+/* ufs_quota1.c */
+int	quota1_umount(struct mount *, int);
+
 /* ufs_quota2.c */
-void	quota2_umount(struct mount *);
+int	quota2_umount(struct mount *, int);
 
 /* ufs_vfsops.c */
 void	ufs_init(void);

Index: src/sys/ufs/ufs/ufs_quota.c
diff -u src/sys/ufs/ufs/ufs_quota.c:1.68.4.8 src/sys/ufs/ufs/ufs_quota.c:1.68.4.9
--- src/sys/ufs/ufs/ufs_quota.c:1.68.4.8	Mon Feb  7 20:30:39 2011
+++ src/sys/ufs/ufs/ufs_quota.c	Tue Feb  8 20:00:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota.c,v 1.68.4.8 2011/02/07 20:30:39 bouyer Exp $	*/
+/*	$NetBSD: ufs_quota.c,v 1.68.4.9 2011/02/08 20:00:53 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.68.4.8 2011/02/07 20:30:39 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.68.4.9 2011/02/08 20:00:53 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -284,7 +284,8 @@
 		}
 #ifdef QUOTA
 		if (ump->um_flags & UFS_QUOTA)
-			error = quota1_handle_cmd_get(ump, type, id, replies)
+			error = quota1_handle_cmd_get(ump, type, id, defaultq,
+			replies);
 		else
 #endif
 #ifdef QUOTA2
@@ -352,7 +353,8 @@
 		}
 #ifdef QUOTA
 		if (ump->um_flags & UFS_QUOTA)
-			error = quota1_handle_cmd_get(ump, type, id, data);
+			error = quota1_handle_cmd_set(ump, type, id, defaultq,
+			data);
 		else
 #endif
 #ifdef QUOTA2

Index: src/sys/ufs/ufs/ufs_quota.h
diff -u src/sys/ufs/ufs/ufs_quota.h:1.1.2.5 src/sys/ufs/ufs/ufs_quota.h:1.1.2.6
--- src/sys/ufs/ufs/ufs_quota.h:1.1.2.5	Mon Feb  7 20:30:39 2011
+++ src/sys/ufs/ufs/ufs_quota.h	Tue Feb  8 20:00:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota.h,v 1.1.2.5 2011/02/07 20:30:39 bouyer Exp $	*/
+/*	$NetBSD: ufs_quota.h,v 1.1.2.6 2011/02/08 20:00:53 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -83,8 +83,8 @@
 #define	dq_ihardlimit	dq_un.dq1_dqb.dqb_ihardlimit
 #define	dq_isoftlimit	dq_un.dq1_dqb.dqb_isoftlimit
 #define	dq_curinodes	dq_un.dq1_dqb.dqb_curinodes
-#define	dq_btime	dq_un.dq_dqb.dqb_btime
-#define	dq_itime	dq_u

CVS commit: [bouyer-quota2] src/sys/modules/ffs

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 20:04:52 UTC 2011

Modified Files:
src/sys/modules/ffs [bouyer-quota2]: Makefile

Log Message:
Add ufs_quota?.c


To generate a diff of this commit:
cvs rdiff -u -r1.4.6.1 -r1.4.6.2 src/sys/modules/ffs/Makefile

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

Modified files:

Index: src/sys/modules/ffs/Makefile
diff -u src/sys/modules/ffs/Makefile:1.4.6.1 src/sys/modules/ffs/Makefile:1.4.6.2
--- src/sys/modules/ffs/Makefile:1.4.6.1	Tue Feb  8 19:29:42 2011
+++ src/sys/modules/ffs/Makefile	Tue Feb  8 20:04:52 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4.6.1 2011/02/08 19:29:42 bouyer Exp $
+#	$NetBSD: Makefile,v 1.4.6.2 2011/02/08 20:04:52 bouyer Exp $
 
 .include "../Makefile.inc"
 
@@ -9,7 +9,8 @@
 
 .PATH:	${S}/ufs/ufs
 SRCS=	ufs_bmap.c ufs_dirhash.c ufs_extattr.c ufs_ihash.c ufs_inode.c \
-	ufs_lookup.c ufs_quota.c ufs_vfsops.c ufs_vnops.c ufs_wapbl.c
+	ufs_lookup.c ufs_quota.c ufs_quota1.c ufs_quota2.c ufs_vfsops.c \
+	ufs_vnops.c ufs_wapbl.c
 
 .PATH:	${S}/ufs/ffs
 SRCS+=	ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_subr.c ffs_tables.c \



CVS commit: [bouyer-quota2] src/sys/ufs/ufs

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 20:09:56 UTC 2011

Modified Files:
src/sys/ufs/ufs [bouyer-quota2]: ufs_quota.h

Log Message:
Remove unused prototypes


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/ufs/ufs/ufs_quota.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/ufs/ufs/ufs_quota.h
diff -u src/sys/ufs/ufs/ufs_quota.h:1.1.2.6 src/sys/ufs/ufs/ufs_quota.h:1.1.2.7
--- src/sys/ufs/ufs/ufs_quota.h:1.1.2.6	Tue Feb  8 20:00:53 2011
+++ src/sys/ufs/ufs/ufs_quota.h	Tue Feb  8 20:09:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota.h,v 1.1.2.6 2011/02/08 20:00:53 bouyer Exp $	*/
+/*	$NetBSD: ufs_quota.h,v 1.1.2.7 2011/02/08 20:09:56 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -119,8 +119,6 @@
 
 int chkdq1(struct inode *, int64_t, kauth_cred_t, int);
 int chkiq1(struct inode *, int32_t, kauth_cred_t, int);
-int getquota1(struct mount *, u_long, int, struct dqblk *);
-int setquota1(struct mount *, u_long, int, struct dqblk *);
 int q1sync(struct mount *);
 int dq1get(struct vnode *, u_long, struct ufsmount *, int, struct dquot *);
 int dq1sync(struct vnode *, struct dquot *);



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

2011-02-08 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Feb  8 20:55:51 UTC 2011

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

Log Message:
Add missing prototype for x86_genfb_mtrr_init to fix build.

Hi Jared!


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x86/include/genfb_machdep.h

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

Modified files:

Index: src/sys/arch/x86/include/genfb_machdep.h
diff -u src/sys/arch/x86/include/genfb_machdep.h:1.1 src/sys/arch/x86/include/genfb_machdep.h:1.2
--- src/sys/arch/x86/include/genfb_machdep.h:1.1	Tue Feb 17 01:42:52 2009
+++ src/sys/arch/x86/include/genfb_machdep.h	Tue Feb  8 20:55:51 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_machdep.h,v 1.1 2009/02/17 01:42:52 jmcneill Exp $ */
+/* $NetBSD: genfb_machdep.h,v 1.2 2011/02/08 20:55:51 ahoka Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill 
@@ -30,5 +30,6 @@
 #define _X86_GENFB_MACHDEP_H
 
 int	x86_genfb_cnattach(void);
+void	x86_genfb_mtrr_init(uint64_t, uint32_t);
 
 #endif /* !_X86_GENFB_MACHDEP_H */



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

2011-02-08 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Feb  8 21:27:15 UTC 2011

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

Log Message:
- use mutex_obj_alloc() instead of declaring locks statically


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

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

Modified files:

Index: src/sys/arch/mips/rmi/rmixl_intr.c
diff -u src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.27 src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.28
--- src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.27	Tue Feb  8 19:50:22 2011
+++ src/sys/arch/mips/rmi/rmixl_intr.c	Tue Feb  8 21:27:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_intr.c,v 1.1.2.27 2011/02/08 19:50:22 cliff Exp $	*/
+/*	$NetBSD: rmixl_intr.c,v 1.1.2.28 2011/02/08 21:27:15 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.27 2011/02/08 19:50:22 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.28 2011/02/08 21:27:15 cliff Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_ddb.h"
@@ -95,7 +95,6 @@
 #include 
 #include 
 
-// #define IOINTR_DEBUG	1
 #ifdef IOINTR_DEBUG
 int iointr_debug = IOINTR_DEBUG;
 # define DPRINTF(x)	do { if (iointr_debug) printf x ; } while(0)
@@ -351,13 +350,14 @@
 
 /*
  * mask of CPUs attached
- * once they are attached, this var is read-only so mp safe
+ * while CPUs are attaching, we cast to volatile;
+ * once they are attached, it's read-only so mp safe
  */
 static uint32_t cpu_present_mask;
 
-kmutex_t rmixl_ipi_lock;	/* covers RMIXL_PIC_IPIBASE */
-kmutex_t rmixl_intr_lock;	/* covers rest of PIC, and rmixl_intrhand[] */
-rmixl_intrhand_t rmixl_intrhand[NINTRVECS];
+static kmutex_t *rmixl_ipi_lock;  /* covers RMIXL_PIC_IPIBASE */
+static kmutex_t *rmixl_intr_lock; /* covers rest of PIC, and rmixl_intrhand[] */
+static rmixl_intrhand_t rmixl_intrhand[NINTRVECS];
 
 #ifdef DIAGNOSTIC
 static int rmixl_pic_init_done;
@@ -411,10 +411,10 @@
 			__func__, rmixl_pic_init_done);
 #endif
 
-	mutex_init(&rmixl_ipi_lock, MUTEX_DEFAULT, IPL_HIGH);
-	mutex_init(&rmixl_intr_lock, MUTEX_DEFAULT, IPL_HIGH);
+	rmixl_ipi_lock  = mutex_obj_alloc(MUTEX_DEFAULT, IPL_HIGH);
+	rmixl_intr_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_HIGH);
 
-	mutex_enter(&rmixl_intr_lock);
+	mutex_enter(rmixl_intr_lock);
 
 	/*
 	 * initialize (zero) all IRT Entries in the PIC
@@ -436,7 +436,7 @@
 #ifdef DIAGNOSTIC
 	rmixl_pic_init_done = 1;
 #endif
-	mutex_exit(&rmixl_intr_lock);
+	mutex_exit(rmixl_intr_lock);
 
 }
 
@@ -451,13 +451,13 @@
 {
 	int vec = ffs(MIPS_INT_MASK_5 >> 8) - 1;
 
-	mutex_enter(&rmixl_intr_lock);
+	mutex_enter(rmixl_intr_lock);
 
 	void *ih = rmixl_vec_establish(vec, 0, IPL_SCHED, NULL, NULL, false);
 	if (ih == NULL)
 		panic("%s: establish vec %d failed", __func__, vec);
 
-	mutex_exit(&rmixl_intr_lock);
+	mutex_exit(rmixl_intr_lock);
 	
 }
 
@@ -471,7 +471,7 @@
 	u_int ipi, vec;
 	void *ih;
 
-	mutex_enter(&rmixl_intr_lock);
+	mutex_enter(rmixl_intr_lock);
 
 	for (ipi=0; ipi < NIPIS; ipi++) {
 		vec = RMIXL_INTRVEC_IPI + ipi;
@@ -484,7 +484,7 @@
 
 	mips_locoresw.lsw_send_ipi = rmixl_send_ipi;
 
-	mutex_exit(&rmixl_intr_lock);
+	mutex_exit(rmixl_intr_lock);
 
 }
 #endif 	/* MULTIPROCESSOR */
@@ -646,7 +646,7 @@
 static void
 rmixl_irt_disestablish(int irt)
 {
-	KASSERT(mutex_owned(&rmixl_intr_lock));
+	KASSERT(mutex_owned(rmixl_intr_lock));
 	DPRINTF(("%s: irt %d, irtc1 %#x\n", __func__, irt, 0));
 	rmixl_irt_init(irt);
 }
@@ -662,7 +662,7 @@
 	uint32_t irtc1;
 	uint32_t irtc0;
 
-	KASSERT(mutex_owned(&rmixl_intr_lock));
+	KASSERT(mutex_owned(rmixl_intr_lock));
 
 	if (irt >= NIRTS)
 		panic("%s: bad irt %d\n", __func__, irt);
@@ -724,7 +724,7 @@
 	uint64_t eimr_bit;
 	int s;
 
-	KASSERT(mutex_owned(&rmixl_intr_lock));
+	KASSERT(mutex_owned(rmixl_intr_lock));
 
 	DPRINTF(("%s: vec %d, cpumask %#x, ipl %d, func %p, arg %p\n"
 			__func__, vec, cpumask, ipl, func, arg));
@@ -804,7 +804,7 @@
 
 	DPRINTF(("%s: irt %d, vec %d, ipl %d\n", __func__, irt, vec, ipl));
 
-	mutex_enter(&rmixl_intr_lock);
+	mutex_enter(rmixl_intr_lock);
 
 	/*
 	 * establish vector
@@ -816,7 +816,7 @@
 	 */
 	rmixl_irt_establish(irt, vec, cpumask, trigger, polarity);
 
-	mutex_exit(&rmixl_intr_lock);
+	mutex_exit(rmixl_intr_lock);
 
 	return ih;
 }
@@ -827,7 +827,7 @@
 	rmixl_intrhand_t *ih = cookie;
 	uint64_t eimr_bit;
 
-	KASSERT(mutex_owned(&rmixl_intr_lock));
+	KASSERT(mutex_owned(rmixl_intr_lock));
 	KASSERT(ih->ih_vec < NINTRVECS);
 	KASSERT(ih == &rmixl_intrhand[ih->ih_vec]);
 
@@ -851,7 +851,7 @@
 	KASSERT(vec < NINTRVECS);
 	KASSERT(ih == &rmixl_intrhand[vec]);
 
-	mutex_enter(&rmixl_intr_lock);
+	mutex_enter(rmixl_intr_lock);
 
 	/*
 	 * disable/invalidate the IRT Entry if needed
@@ -864,7 +864,7 @@
 	 */
 	rmixl_vec_disestablish(cookie);
 
-	mutex_exit(&rmixl_

CVS commit: [bouyer-quota2] src/sys/ufs/ffs

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 21:29:46 UTC 2011

Modified Files:
src/sys/ufs/ffs [bouyer-quota2]: ffs_subr.c

Log Message:
for !_KERNEL case, always define FFS_EI.
Required for makefs, and maybe resize_ffs (it's not clear if
resize_ffs supports swapped byte order or not - swapped endian tests
are expected to fail but actually succeed :)


To generate a diff of this commit:
cvs rdiff -u -r1.45.28.2 -r1.45.28.3 src/sys/ufs/ffs/ffs_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/ufs/ffs/ffs_subr.c
diff -u src/sys/ufs/ffs/ffs_subr.c:1.45.28.2 src/sys/ufs/ffs/ffs_subr.c:1.45.28.3
--- src/sys/ufs/ffs/ffs_subr.c:1.45.28.2	Tue Feb  8 16:20:05 2011
+++ src/sys/ufs/ffs/ffs_subr.c	Tue Feb  8 21:29:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_subr.c,v 1.45.28.2 2011/02/08 16:20:05 bouyer Exp $	*/
+/*	$NetBSD: ffs_subr.c,v 1.45.28.3 2011/02/08 21:29:45 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -36,7 +36,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.45.28.2 2011/02/08 16:20:05 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.45.28.3 2011/02/08 21:29:45 bouyer Exp $");
 
 #include 
 
@@ -44,6 +44,9 @@
 extern const int inside[], around[];
 extern const u_char * const fragtbl[];
 
+#ifndef _KERNEL
+#define FFS_EI /* always include byteswapped filesystems support */
+#endif
 #include 
 #include 
 #include 



CVS commit: src/usr.sbin/btpand

2011-02-08 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Feb  8 21:43:45 UTC 2011

Modified Files:
src/usr.sbin/btpand: bnep.c bnep.h

Log Message:
check number of filters received against max possible


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/btpand/bnep.c
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/btpand/bnep.h

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

Modified files:

Index: src/usr.sbin/btpand/bnep.c
diff -u src/usr.sbin/btpand/bnep.c:1.9 src/usr.sbin/btpand/bnep.c:1.10
--- src/usr.sbin/btpand/bnep.c:1.9	Thu Jan 27 12:19:48 2011
+++ src/usr.sbin/btpand/bnep.c	Tue Feb  8 21:43:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bnep.c,v 1.9 2011/01/27 12:19:48 plunky Exp $	*/
+/*	$NetBSD: bnep.c,v 1.10 2011/02/08 21:43:45 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2008 Iain Hibbert
@@ -26,7 +26,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: bnep.c,v 1.9 2011/01/27 12:19:48 plunky Exp $");
+__RCSID("$NetBSD: bnep.c,v 1.10 2011/02/08 21:43:45 plunky Exp $");
 
 #include 
 #include 
@@ -429,6 +429,10 @@
 	}
 
 	nf = len / 4;
+	if (nf > BNEP_MAX_NET_TYPE_FILTERS) {
+		rsp = BNEP_FILTER_TOO_MANY_FILTERS;
+		goto done;
+	}
 	pf = malloc(nf * sizeof(pfilter_t));
 	if (pf == NULL) {
 		rsp = BNEP_FILTER_TOO_MANY_FILTERS;
@@ -511,6 +515,10 @@
 	}
 
 	nf = len / (ETHER_ADDR_LEN * 2);
+	if (nf > BNEP_MAX_MULTI_ADDR_FILTERS) {
+		rsp = BNEP_FILTER_TOO_MANY_FILTERS;
+		goto done;
+	}
 	mf = malloc(nf * sizeof(mfilter_t));
 	if (mf == NULL) {
 		rsp = BNEP_FILTER_TOO_MANY_FILTERS;

Index: src/usr.sbin/btpand/bnep.h
diff -u src/usr.sbin/btpand/bnep.h:1.1 src/usr.sbin/btpand/bnep.h:1.2
--- src/usr.sbin/btpand/bnep.h:1.1	Sun Aug 17 13:20:57 2008
+++ src/usr.sbin/btpand/bnep.h	Tue Feb  8 21:43:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bnep.h,v 1.1 2008/08/17 13:20:57 plunky Exp $	*/
+/*	$NetBSD: bnep.h,v 1.2 2011/02/08 21:43:45 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2008 Iain Hibbert
@@ -36,6 +36,9 @@
 #define	BNEP_TYPE(x)		((x) & 0x7f)
 #define BNEP_TYPE_EXT(x)	(((x) & BNEP_EXT) == BNEP_EXT)
 
+#define BNEP_MAX_NET_TYPE_FILTERS	421
+#define BNEP_MAX_MULTI_ADDR_FILTERS	120
+
 /* BNEP packet types */
 #define	BNEP_GENERAL_ETHERNET			0x00
 #define	BNEP_CONTROL0x01



CVS commit: [bouyer-quota2] src/sys/compat/freebsd

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 21:46:53 UTC 2011

Modified Files:
src/sys/compat/freebsd [bouyer-quota2]: syscalls.master

Log Message:
freebsd quotactl uses our COMPAT_50 syscall.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.64.6.1 src/sys/compat/freebsd/syscalls.master

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

Modified files:

Index: src/sys/compat/freebsd/syscalls.master
diff -u src/sys/compat/freebsd/syscalls.master:1.64 src/sys/compat/freebsd/syscalls.master:1.64.6.1
--- src/sys/compat/freebsd/syscalls.master:1.64	Tue Mar  2 21:07:21 2010
+++ src/sys/compat/freebsd/syscalls.master	Tue Feb  8 21:46:53 2011
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.64 2010/03/02 21:07:21 pooka Exp $
+	$NetBSD: syscalls.master,v 1.64.6.1 2011/02/08 21:46:53 bouyer Exp $
 
 ;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -278,8 +278,8 @@
 146	NOARGS		{ int|compat_43_sys||killpg(int pgid, int signum); } \
 			okillpg
 147	NOARGS		{ int|sys||setsid(void); }
-148	NOARGS		{ int|sys||quotactl(char *path, int cmd, int uid, \
-			void *arg); }
+148	NOARGS		{ int|compat_50_sys||quotactl(char *path, int cmd, \
+			int uid, void *arg); }
 149	NOARGS		{ int|compat_43_sys||quota(void); } oquota
 150	NOARGS		{ int|compat_43_sys||getsockname(int fdec, void *asa, \
 			int *alen); } ogetsockname



CVS commit: [bouyer-quota2] src/sys/compat/freebsd

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 21:47:25 UTC 2011

Modified Files:
src/sys/compat/freebsd [bouyer-quota2]: freebsd_syscall.h
freebsd_syscallargs.h freebsd_syscalls.c freebsd_sysent.c

Log Message:
Regen: quotactl compat


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.76.6.1 src/sys/compat/freebsd/freebsd_syscall.h \
src/sys/compat/freebsd/freebsd_syscalls.c
cvs rdiff -u -r1.79 -r1.79.6.1 src/sys/compat/freebsd/freebsd_syscallargs.h
cvs rdiff -u -r1.78 -r1.78.6.1 src/sys/compat/freebsd/freebsd_sysent.c

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

Modified files:

Index: src/sys/compat/freebsd/freebsd_syscall.h
diff -u src/sys/compat/freebsd/freebsd_syscall.h:1.76 src/sys/compat/freebsd/freebsd_syscall.h:1.76.6.1
--- src/sys/compat/freebsd/freebsd_syscall.h:1.76	Tue Mar  2 21:14:44 2010
+++ src/sys/compat/freebsd/freebsd_syscall.h	Tue Feb  8 21:47:25 2011
@@ -1,10 +1,10 @@
-/* $NetBSD: freebsd_syscall.h,v 1.76 2010/03/02 21:14:44 pooka Exp $ */
+/* $NetBSD: freebsd_syscall.h,v 1.76.6.1 2011/02/08 21:47:25 bouyer Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.64 2010/03/02 21:07:21 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.64.6.1 2011/02/08 21:46:53 bouyer Exp
  */
 
 #ifndef _FREEBSD_SYS_SYSCALL_H_
Index: src/sys/compat/freebsd/freebsd_syscalls.c
diff -u src/sys/compat/freebsd/freebsd_syscalls.c:1.76 src/sys/compat/freebsd/freebsd_syscalls.c:1.76.6.1
--- src/sys/compat/freebsd/freebsd_syscalls.c:1.76	Tue Mar  2 21:14:44 2010
+++ src/sys/compat/freebsd/freebsd_syscalls.c	Tue Feb  8 21:47:25 2011
@@ -1,14 +1,14 @@
-/* $NetBSD: freebsd_syscalls.c,v 1.76 2010/03/02 21:14:44 pooka Exp $ */
+/* $NetBSD: freebsd_syscalls.c,v 1.76.6.1 2011/02/08 21:47:25 bouyer Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.64 2010/03/02 21:07:21 pooka Exp
+ * created from	NetBSD: syscalls.master,v 1.64.6.1 2011/02/08 21:46:53 bouyer Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: freebsd_syscalls.c,v 1.76 2010/03/02 21:14:44 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: freebsd_syscalls.c,v 1.76.6.1 2011/02/08 21:47:25 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
@@ -535,4 +535,76 @@
 	/* 437 */	"#437 (unimplemented extattr_list_fd)",
 	/* 438 */	"#438 (unimplemented extattr_list_file)",
 	/* 439 */	"#439 (unimplemented extattr_list_link)",
+	/* 440 */	"# filler",
+	/* 441 */	"# filler",
+	/* 442 */	"# filler",
+	/* 443 */	"# filler",
+	/* 444 */	"# filler",
+	/* 445 */	"# filler",
+	/* 446 */	"# filler",
+	/* 447 */	"# filler",
+	/* 448 */	"# filler",
+	/* 449 */	"# filler",
+	/* 450 */	"# filler",
+	/* 451 */	"# filler",
+	/* 452 */	"# filler",
+	/* 453 */	"# filler",
+	/* 454 */	"# filler",
+	/* 455 */	"# filler",
+	/* 456 */	"# filler",
+	/* 457 */	"# filler",
+	/* 458 */	"# filler",
+	/* 459 */	"# filler",
+	/* 460 */	"# filler",
+	/* 461 */	"# filler",
+	/* 462 */	"# filler",
+	/* 463 */	"# filler",
+	/* 464 */	"# filler",
+	/* 465 */	"# filler",
+	/* 466 */	"# filler",
+	/* 467 */	"# filler",
+	/* 468 */	"# filler",
+	/* 469 */	"# filler",
+	/* 470 */	"# filler",
+	/* 471 */	"# filler",
+	/* 472 */	"# filler",
+	/* 473 */	"# filler",
+	/* 474 */	"# filler",
+	/* 475 */	"# filler",
+	/* 476 */	"# filler",
+	/* 477 */	"# filler",
+	/* 478 */	"# filler",
+	/* 479 */	"# filler",
+	/* 480 */	"# filler",
+	/* 481 */	"# filler",
+	/* 482 */	"# filler",
+	/* 483 */	"# filler",
+	/* 484 */	"# filler",
+	/* 485 */	"# filler",
+	/* 486 */	"# filler",
+	/* 487 */	"# filler",
+	/* 488 */	"# filler",
+	/* 489 */	"# filler",
+	/* 490 */	"# filler",
+	/* 491 */	"# filler",
+	/* 492 */	"# filler",
+	/* 493 */	"# filler",
+	/* 494 */	"# filler",
+	/* 495 */	"# filler",
+	/* 496 */	"# filler",
+	/* 497 */	"# filler",
+	/* 498 */	"# filler",
+	/* 499 */	"# filler",
+	/* 500 */	"# filler",
+	/* 501 */	"# filler",
+	/* 502 */	"# filler",
+	/* 503 */	"# filler",
+	/* 504 */	"# filler",
+	/* 505 */	"# filler",
+	/* 506 */	"# filler",
+	/* 507 */	"# filler",
+	/* 508 */	"# filler",
+	/* 509 */	"# filler",
+	/* 510 */	"# filler",
+	/* 511 */	"# filler",
 };

Index: src/sys/compat/freebsd/freebsd_syscallargs.h
diff -u src/sys/compat/freebsd/freebsd_syscallargs.h:1.79 src/sys/compat/freebsd/freebsd_syscallargs.h:1.79.6.1
--- src/sys/compat/freebsd/freebsd_syscallargs.h:1.79	Tue Mar  2 21:14:44 2010
+++ src/sys/compat/freebsd/freebsd_syscallargs.h	Tue Feb  8 21:47:25 2011
@@ -1,10 +1,10 @@
-/* $NetBSD: freebsd_syscallargs.h,v 1.79 2010/03/02 21:14:44 pooka Exp $ */
+/* $NetBSD: freebsd_syscallargs.h,v 1.79.6.1 2011/02/08 21:47:25 bouyer Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 

CVS commit: [matt-nb5-mips64] src/sys/kern

2011-02-08 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Feb  8 21:56:02 UTC 2011

Modified Files:
src/sys/kern [matt-nb5-mips64]: subr_autoconf.c

Log Message:
use mutex_obj_alloc() to allocate config_queues_lock and dc_funcs_lock
instead of declaring them statically.


To generate a diff of this commit:
cvs rdiff -u -r1.163.4.2.4.2 -r1.163.4.2.4.3 src/sys/kern/subr_autoconf.c

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

Modified files:

Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.163.4.2.4.2 src/sys/kern/subr_autoconf.c:1.163.4.2.4.3
--- src/sys/kern/subr_autoconf.c:1.163.4.2.4.2	Tue Feb  8 06:04:59 2011
+++ src/sys/kern/subr_autoconf.c	Tue Feb  8 21:56:01 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.163.4.2.4.2 2011/02/08 06:04:59 cliff Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.163.4.2.4.3 2011/02/08 21:56:01 cliff Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.163.4.2.4.2 2011/02/08 06:04:59 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.163.4.2.4.3 2011/02/08 21:56:01 cliff Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_ddb.h"
@@ -204,14 +204,14 @@
  * - interrupt_config_queue
  * is held for short durations, and is initialized to spin
  */
-static kmutex_t config_queues_lock;
+static kmutex_t *config_queues_lock;
 
 /*
  * dc_funcs_lock ensures the driver dc_func's are not called concurrently
  * many (most?) are not MP safe
  * is held for unknown durations, and is initialized to sleep
  */
-static kmutex_t dc_funcs_lock;
+static kmutex_t *dc_funcs_lock;
 
 struct deferred_config_head deferred_config_queue =
 	TAILQ_HEAD_INITIALIZER(deferred_config_queue);
@@ -376,9 +376,8 @@
 	mutex_init(&config_misc_lock, MUTEX_DEFAULT, IPL_NONE);
 	cv_init(&config_misc_cv, "cfgmisc");
 
-	mutex_init(&dc_funcs_lock, MUTEX_DEFAULT, IPL_SOFTNET);
-
-	mutex_init(&config_queues_lock, MUTEX_DEFAULT, IPL_VM);
+	dc_funcs_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_SOFTNET);
+	config_queues_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_VM);
 
 	/* allcfdrivers is statically initialized. */
 	for (i = 0; cfdriver_list_initial[i] != NULL; i++) {
@@ -416,18 +415,18 @@
 {
 	struct deferred_config *dc;
 
-	mutex_enter(&config_queues_lock);
+	mutex_enter(config_queues_lock);
 	while ((dc = TAILQ_FIRST(&interrupt_config_queue)) != NULL) {
 		TAILQ_REMOVE(&interrupt_config_queue, dc, dc_queue);
-		mutex_exit(&config_queues_lock);
-		mutex_enter(&dc_funcs_lock);
+		mutex_exit(config_queues_lock);
+		mutex_enter(dc_funcs_lock);
 		(*dc->dc_func)(dc->dc_dev);
-		mutex_exit(&dc_funcs_lock);
+		mutex_exit(dc_funcs_lock);
 		kmem_free(dc, sizeof(*dc));
 		config_pending_decr();
-		mutex_enter(&config_queues_lock);
+		mutex_enter(config_queues_lock);
 	}
-	mutex_exit(&config_queues_lock);
+	mutex_exit(config_queues_lock);
 
 	kthread_exit(0);
 }
@@ -1677,13 +1676,13 @@
 		panic("config_defer: can't defer config of a root device");
 
 #ifdef DIAGNOSTIC
-	mutex_enter(&config_queues_lock);
+	mutex_enter(config_queues_lock);
 	for (dc = TAILQ_FIRST(&deferred_config_queue); dc != NULL;
 	 dc = TAILQ_NEXT(dc, dc_queue)) {
 		if (dc->dc_dev == dev)
 			panic("config_defer: deferred twice");
 	}
-	mutex_exit(&config_queues_lock);
+	mutex_exit(config_queues_lock);
 #endif
 
 	dc = kmem_alloc(sizeof(*dc), kmflags);
@@ -1693,9 +1692,9 @@
 	dc->dc_dev = dev;
 	dc->dc_func = func;
 
-	mutex_enter(&config_queues_lock);
+	mutex_enter(config_queues_lock);
 	TAILQ_INSERT_TAIL(&deferred_config_queue, dc, dc_queue);
-	mutex_exit(&config_queues_lock);
+	mutex_exit(config_queues_lock);
 
 	config_pending_incr();
 }
@@ -1719,13 +1718,13 @@
 	}
 
 #ifdef DIAGNOSTIC
-	mutex_enter(&config_queues_lock);
+	mutex_enter(config_queues_lock);
 	for (dc = TAILQ_FIRST(&interrupt_config_queue); dc != NULL;
 	 dc = TAILQ_NEXT(dc, dc_queue)) {
 		if (dc->dc_dev == dev)
 			panic("config_interrupts: deferred twice");
 	}
-	mutex_exit(&config_queues_lock);
+	mutex_exit(config_queues_lock);
 #endif
 
 	dc = kmem_alloc(sizeof(*dc), kmflags);
@@ -1734,9 +1733,9 @@
 
 	dc->dc_dev = dev;
 	dc->dc_func = func;
-	mutex_enter(&config_queues_lock);
+	mutex_enter(config_queues_lock);
 	TAILQ_INSERT_TAIL(&interrupt_config_queue, dc, dc_queue);
-	mutex_exit(&config_queues_lock);
+	mutex_exit(config_queues_lock);
 	config_pending_incr();
 }
 
@@ -1749,21 +1748,21 @@
 {
 	struct deferred_config *dc, *ndc;
 
-	mutex_enter(&config_queues_lock);
+	mutex_enter(config_queues_lock);
 	for (dc = TAILQ_FIRST(queue); dc != NULL; dc = ndc) {
 		ndc = TAILQ_NEXT(dc, dc_queue);
 		if (parent == NULL || dc->dc_dev->dv_parent == parent) {
 			TAILQ_REMOVE(queue, dc, dc_queue);
-			mutex_exit(&config_queues_lock);
-			mutex_enter(&dc_funcs_lock);
+			mutex_exit(config_queues_lock);
+			mutex_enter(dc_funcs_lock);
 			(*dc->dc_func)(dc->dc_dev);
-		

CVS commit: src/usr.sbin/btpand

2011-02-08 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Feb  8 21:59:50 UTC 2011

Modified Files:
src/usr.sbin/btpand: client.c server.c

Log Message:
the default socket rcvbuf for L2CAP is only 4Kbytes which is only
2 and a bit ethernet packets. Check and increase SO_RCVBUF on startup
so that we have buffers for 10 complete packets, should solve a
reported problem with overruns at higher connection speeds (our L2CAP
does not have any flow control).

(the default can still be adjusted upwards using sysctl)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/btpand/client.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/btpand/server.c

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

Modified files:

Index: src/usr.sbin/btpand/client.c
diff -u src/usr.sbin/btpand/client.c:1.4 src/usr.sbin/btpand/client.c:1.5
--- src/usr.sbin/btpand/client.c:1.4	Tue May 12 21:50:38 2009
+++ src/usr.sbin/btpand/client.c	Tue Feb  8 21:59:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: client.c,v 1.4 2009/05/12 21:50:38 plunky Exp $	*/
+/*	$NetBSD: client.c,v 1.5 2011/02/08 21:59:50 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2008-2009 Iain Hibbert
@@ -26,7 +26,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: client.c,v 1.4 2009/05/12 21:50:38 plunky Exp $");
+__RCSID("$NetBSD: client.c,v 1.5 2011/02/08 21:59:50 plunky Exp $");
 
 #include 
 #include 
@@ -45,7 +45,7 @@
 	struct sockaddr_bt sa;
 	channel_t *chan;
 	socklen_t len;
-	int fd;
+	int fd, bufsize;
 	uint16_t mru, mtu;
 
 	if (bdaddr_any(&remote_bdaddr))
@@ -102,6 +102,19 @@
 		exit(EXIT_FAILURE);
 	}
 
+	len = sizeof(bufsize);
+	if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsize, &len) == -1) {
+		log_err("Could not read SO_RCVBUF");
+		exit(EXIT_FAILURE);
+	}
+	if (bufsize < 10 * mru) {
+		bufsize = 10 * mru;
+		if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsize,
+		sizeof(bufsize)) == -1)
+			log_info("Could not increase SO_RCVBUF (from %d)",
+			bufsize);
+	}
+
 	len = sizeof(mtu);
 	if (getsockopt(fd, BTPROTO_L2CAP, SO_L2CAP_OMTU, &mtu, &len) == -1) {
 		log_err("Could not get L2CAP OMTU: %m");

Index: src/usr.sbin/btpand/server.c
diff -u src/usr.sbin/btpand/server.c:1.6 src/usr.sbin/btpand/server.c:1.7
--- src/usr.sbin/btpand/server.c:1.6	Sun Oct 25 19:28:45 2009
+++ src/usr.sbin/btpand/server.c	Tue Feb  8 21:59:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.6 2009/10/25 19:28:45 plunky Exp $	*/
+/*	$NetBSD: server.c,v 1.7 2011/02/08 21:59:50 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2008-2009 Iain Hibbert
@@ -26,7 +26,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: server.c,v 1.6 2009/10/25 19:28:45 plunky Exp $");
+__RCSID("$NetBSD: server.c,v 1.7 2011/02/08 21:59:50 plunky Exp $");
 
 #include 
 
@@ -134,7 +134,7 @@
 	struct sockaddr_bt ra, la;
 	channel_t *chan;
 	socklen_t len;
-	int fd, n;
+	int fd, n, bufsize;
 	uint16_t mru, mtu;
 
 	assert(server_count < server_limit);
@@ -163,6 +163,20 @@
 		return;
 	}
 
+	len = sizeof(bufsize);
+	if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsize, &len) == -1) {
+		log_err("Could not read SO_RCVBUF");
+		close(fd);
+		return;
+	}
+	if (bufsize < 10 * mru) {
+		bufsize = 10 * mru;
+		if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsize,
+		sizeof(bufsize)) == -1)
+			log_info("Could not increase SO_RCVBUF (from %d)",
+			bufsize);
+	}
+
 	len = sizeof(mtu);
 	if (getsockopt(fd, BTPROTO_L2CAP, SO_L2CAP_OMTU, &mtu, &len) == -1) {
 		log_err("Could not get L2CAP OMTU: %m");



CVS commit: [bouyer-quota2] src/libexec/rpc.rquotad

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 22:14:22 UTC 2011

Modified Files:
src/libexec/rpc.rquotad [bouyer-quota2]: Makefile rquotad.c

Log Message:
Convert to new quotactl interface


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.64.1 src/libexec/rpc.rquotad/Makefile
cvs rdiff -u -r1.24 -r1.24.2.1 src/libexec/rpc.rquotad/rquotad.c

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

Modified files:

Index: src/libexec/rpc.rquotad/Makefile
diff -u src/libexec/rpc.rquotad/Makefile:1.6 src/libexec/rpc.rquotad/Makefile:1.6.64.1
--- src/libexec/rpc.rquotad/Makefile:1.6	Wed Oct  8 09:07:30 1997
+++ src/libexec/rpc.rquotad/Makefile	Tue Feb  8 22:14:22 2011
@@ -1,11 +1,19 @@
-#	$NetBSD: Makefile,v 1.6 1997/10/08 09:07:30 mrg Exp $
+#	$NetBSD: Makefile,v 1.6.64.1 2011/02/08 22:14:22 bouyer Exp $
 
+.include 
 PROG =	rpc.rquotad
 SRCS =	rquotad.c
 MAN  =	rpc.rquotad.8
 MLINKS = rpc.rquotad.8 rquotad.8
 
-DPADD=	${LIBRPCSVC}
-LDADD=	-lrpcsvc
+CPPFLAGS+=-I${NETBSDSRCDIR}/sys -I${NETBSDSRCDIR}/usr.bin/quota
+DPADD=	${LIBRPCSVC} ${LIBPROP}
+LDADD=	-lrpcsvc -lprop
+
+.PATH:  ${NETBSDSRCDIR}/usr.bin/quota
+SRCS+=	getvfsquota.c
+.PATH:  ${NETBSDSRCDIR}/sys/ufs/ufs
+SRCS+=	quota2_prop.c
+
 
 .include 

Index: src/libexec/rpc.rquotad/rquotad.c
diff -u src/libexec/rpc.rquotad/rquotad.c:1.24 src/libexec/rpc.rquotad/rquotad.c:1.24.2.1
--- src/libexec/rpc.rquotad/rquotad.c:1.24	Mon Mar 16 00:43:33 2009
+++ src/libexec/rpc.rquotad/rquotad.c	Tue Feb  8 22:14:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rquotad.c,v 1.24 2009/03/16 00:43:33 lukem Exp $	*/
+/*	$NetBSD: rquotad.c,v 1.24.2.1 2011/02/08 22:14:22 bouyer Exp $	*/
 
 /*
  * by Manuel Bouyer (bou...@ensta.fr). Public domain.
@@ -6,7 +6,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: rquotad.c,v 1.24 2009/03/16 00:43:33 lukem Exp $");
+__RCSID("$NetBSD: rquotad.c,v 1.24.2.1 2011/02/08 22:14:22 bouyer Exp $");
 #endif
 
 #include 
@@ -29,34 +29,19 @@
 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 #include 
 
+#include 
+
 void rquota_service(struct svc_req *request, SVCXPRT *transp);
 void ext_rquota_service(struct svc_req *request, SVCXPRT *transp);
 void sendquota(struct svc_req *request, int vers, SVCXPRT *transp);
-void initfs(void);
-int getfsquota(int type, long id, char *path, struct dqblk *dqblk);
-int hasquota(struct fstab *fs, char **uqfnamep, char **gqfnamep);
 void cleanup(int);
 int main(int, char *[]);
 
-/*
- * structure containing informations about ufs filesystems
- * initialised by initfs()
- */
-struct fs_stat {
-	struct fs_stat *fs_next;	/* next element */
-	char   *fs_file;		/* mount point of the filesystem */
-	char   *uqfpathname;		/* pathname of the user quota file */
-	char   *gqfpathname;		/* pathname of the group quota file */
-	dev_t   st_dev;			/* device of the filesystem */
-} fs_stat;
-struct fs_stat *fs_begin = NULL;
-
-const char *qfextension[] = INITQFNAMES;
 int from_inetd = 1;
 
 void 
@@ -124,7 +109,6 @@
 		}
 	}
 
-	initfs();		/* init the fs_stat list */
 	svc_run();
 	syslog(LOG_ERR, "svc_run returned");
 	exit(1);
@@ -179,7 +163,9 @@
 	struct getquota_args getq_args;
 	struct ext_getquota_args ext_getq_args;
 	struct getquota_rslt getq_rslt;
-	struct dqblk dqblk;
+	struct quota2_entry q2e;
+	int type;
+	int8_t version;
 	struct timeval timev;
 
 	memset((char *)&getq_args, 0, sizeof(getq_args));
@@ -203,11 +189,21 @@
 		}
 		break;
 	}
+	switch (ext_getq_args.gqa_type) {
+	case RQUOTA_USRQUOTA:
+		type = USRQUOTA;
+		break;
+	case RQUOTA_GRPQUOTA:
+		type = GRPQUOTA;
+		break;
+	default:
+		getq_rslt.status = Q_NOQUOTA;
+		goto out;
+	}
 	if (request->rq_cred.oa_flavor != AUTH_UNIX) {
 		/* bad auth */
 		getq_rslt.status = Q_EPERM;
-	} else if (!getfsquota(ext_getq_args.gqa_type, ext_getq_args.gqa_id,
-	ext_getq_args.gqa_pathp, &dqblk)) {
+	} else if (!getvfsquota(ext_getq_args.gqa_pathp, &q2e, &version, ext_getq_args.gqa_id, ext_getq_args.gqa_type, 0, 0)) {
 		/* failed, return noquota */
 		getq_rslt.status = Q_NOQUOTA;
 	} else {
@@ -216,22 +212,23 @@
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_active = TRUE;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize = DEV_BSIZE;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_bhardlimit =
-		dqblk.dqb_bhardlimit;
+		q2e.q2e_val[QL_BLOCK].q2v_hardlimit;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_bsoftlimit =
-		dqblk.dqb_bsoftlimit;
+		q2e.q2e_val[QL_BLOCK].q2v_softlimit;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_curblocks =
-		dqblk.dqb_curblocks;
+		q2e.q2e_val[QL_BLOCK].q2v_cur;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_fhardlimit =
-		dqblk.dqb_ihardlimit;
+		q2e.q2e_val[QL_FILE].q2v_hardlimit;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_fsoftlimit =
-		dqblk.dqb_isoftlimit;
+		q2e.q2e_val[QL_FILE].q2v_softlimit;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_curfiles =
-		dqblk.dqb_curinodes;
+		q2e.q2e_val[QL_FILE].q2v_softli

CVS commit: src/usr.bin/rpcinfo

2011-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  8 22:16:59 UTC 2011

Modified Files:
src/usr.bin/rpcinfo: Makefile rpcinfo.c

Log Message:
- WARNS ?= 4
- fix memory leaks
- fix error printing
- pass lint
- KNF
- constify
- ansify


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/rpcinfo/Makefile
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/rpcinfo/rpcinfo.c

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

Modified files:

Index: src/usr.bin/rpcinfo/Makefile
diff -u src/usr.bin/rpcinfo/Makefile:1.13 src/usr.bin/rpcinfo/Makefile:1.14
--- src/usr.bin/rpcinfo/Makefile:1.13	Tue Apr 14 18:15:25 2009
+++ src/usr.bin/rpcinfo/Makefile	Tue Feb  8 17:16:58 2011
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.13 2009/04/14 22:15:25 lukem Exp $
+#	$NetBSD: Makefile,v 1.14 2011/02/08 22:16:58 christos Exp $
 #	from: @(#)Makefile	5.2 (Berkeley) 5/11/90
 
-WARNS?=	2	# XXX -Wcast-qual issues
+WARNS ?= 4
 
 .include 
 

Index: src/usr.bin/rpcinfo/rpcinfo.c
diff -u src/usr.bin/rpcinfo/rpcinfo.c:1.29 src/usr.bin/rpcinfo/rpcinfo.c:1.30
--- src/usr.bin/rpcinfo/rpcinfo.c:1.29	Tue Nov 17 13:31:13 2009
+++ src/usr.bin/rpcinfo/rpcinfo.c	Tue Feb  8 17:16:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpcinfo.c,v 1.29 2009/11/17 18:31:13 drochner Exp $	*/
+/*	$NetBSD: rpcinfo.c,v 1.30 2011/02/08 22:16:58 christos Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -73,6 +73,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifdef PORTMAP		/* Support for version 2 portmapper */
 #include 
@@ -82,9 +83,14 @@
 #include 
 #endif
 
-#define	MIN_VERS	((u_long)0)
-#define	MAX_VERS	((u_long)4294967295UL)
-#define	UNKNOWN		"unknown"
+#define	MIN_VERS	((rpcvers_t)0)
+#define	MAX_VERS	((rpcvers_t)4294967295UL)
+#define PMAP_PROG	((rpcprog_t)PMAPPROG)
+#define PMAP_VERS	((rpcvers_t)PMAPVERS)
+#define RPCB_VERS	((rpcvers_t)RPCBVERS)
+#define RPCB_VERS4	((rpcvers_t)RPCB_VERS)
+#define UL(a)		((unsigned long)a)
+static char unknown[] = "unknown";
 
 /*
  * Functions to be performed.
@@ -113,7 +119,7 @@
 };
 
 struct rpcbdump_short {
-	u_long prog;
+	rpcprog_t prog;
 	struct verslist *vlist;
 	struct netidlist *nlist;
 	struct rpcbdump_short *next;
@@ -124,41 +130,40 @@
 
 #ifdef PORTMAP
 static void	ip_ping(u_short, const char *, int, char **);
-static CLIENT	*clnt_com_create(struct sockaddr_in *, u_long, u_long, int *,
- const char *);
+static CLIENT	*clnt_com_create(struct sockaddr_in *, rpcprog_t, rpcvers_t,
+int *, const char *);
 static void	pmapdump(int, char **);
 static void	get_inet_address(struct sockaddr_in *, const char *);
 #endif
 
 static bool_t	reply_proc(void *, struct netbuf *, struct netconfig *);
 static void	brdcst(int, char **);
-static void	addrping(char *, char *, int, char **);
-static void	progping(char *, int, char **);
-static CLIENT	*clnt_addr_create(char *, struct netconfig *, u_long, u_long);
-static CLIENT   *clnt_rpcbind_create(char *, int, struct netbuf **);
-static CLIENT   *getclnthandle(char *, struct netconfig *, u_long,
-			   struct netbuf **);
-static CLIENT	*local_rpcb(u_long, u_long);
-static int	pstatus(CLIENT *, u_long, u_long);
-static void	rpcbdump(int, char *, int, char **);
+static void	addrping(const char *, const char *, int, char **);
+static void	progping(const char *, int, char **);
+static CLIENT	*clnt_addr_create(const char *, const struct netconfig *,
+rpcprog_t, rpcvers_t);
+static CLIENT   *clnt_rpcbind_create(const char *, rpcvers_t, struct netbuf **);
+static CLIENT   *getclnthandle(const char *, const struct netconfig *,
+rpcvers_t, struct netbuf **);
+static CLIENT	*local_rpcb(rpcprog_t, rpcvers_t);
+static int	pstatus(CLIENT *, rpcprog_t, rpcvers_t);
+static void	rpcbdump(int, const char *, int, char **);
 static void	rpcbgetstat(int, char **);
-static void	rpcbaddrlist(char *, int, char **);
-static void	deletereg(char *, int, char **);
-static void	print_rmtcallstat(int, rpcb_stat *);
-static void	print_getaddrstat(int, rpcb_stat *);
-static void	usage(void);
-static u_long	getprognum(char *);
-static u_long	getvers(char *);
-static char	*spaces(int);
-static bool_t	add_version(struct rpcbdump_short *, u_long);
+static void	rpcbaddrlist(const char *, int, char **);
+static void	deletereg(const char *, int, char **);
+static void	print_rmtcallstat(int, const rpcb_stat *);
+static void	print_getaddrstat(int, const rpcb_stat *);
+static void	usage(void)__attribute__((__noreturn__));
+static rpcprog_t	getprognum(const char *);
+static rpcvers_t	getvers(const char *);
+static const char *spaces(size_t);
+static bool_t	add_version(struct rpcbdump_short *, rpcvers_t);
 static bool_t	add_netid(struct rpcbdump_short *, char *);
 
-int		main(int argc, char **argv);
-
 int
 main(int argc, char **argv)
 {
-	register int c;
+	int c;
 	int errflg;
 	int function;
 	char *netid = NULL;
@@ -255,10 +260,8 @@
 		}
 	}
 
-	if (errflg || ((function =

CVS commit: [bouyer-quota2] src/sbin/fsdb

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 22:29:58 UTC 2011

Modified Files:
src/sbin/fsdb [bouyer-quota2]: Makefile

Log Message:
Add quota2_subr.c to make it link again.


To generate a diff of this commit:
cvs rdiff -u -r1.27.2.1 -r1.27.2.2 src/sbin/fsdb/Makefile

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

Modified files:

Index: src/sbin/fsdb/Makefile
diff -u src/sbin/fsdb/Makefile:1.27.2.1 src/sbin/fsdb/Makefile:1.27.2.2
--- src/sbin/fsdb/Makefile:1.27.2.1	Thu Jan 20 14:24:54 2011
+++ src/sbin/fsdb/Makefile	Tue Feb  8 22:29:58 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.27.2.1 2011/01/20 14:24:54 bouyer Exp $
+#	$NetBSD: Makefile,v 1.27.2.2 2011/02/08 22:29:58 bouyer Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 WARNS?=	3	# XXX: sign-compare issues in ../fsck_ffs
@@ -19,6 +19,10 @@
 .PATH:	${FSCK} ${FSCK_FFS} ${NETBSDSRCDIR}/sys/ufs/ffs
 
 SRCS+=	vfs_wapbl.c wapbl.c
+
+.PATH:	${NETBSDSRCDIR}/sys/ufs/ufs
+SRCS+=	quota2_subr.c
+
 .PATH:	${NETBSDSRCDIR}/sys/kern
 CPPFLAGS+=-DWAPBL_DEBUG_PRINT=0
 



CVS commit: [bouyer-quota2] src/usr.sbin/edquota

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 22:34:18 UTC 2011

Modified Files:
src/usr.sbin/edquota [bouyer-quota2]: Makefile

Log Message:
Needs printquota.c to link.


To generate a diff of this commit:
cvs rdiff -u -r1.5.64.1 -r1.5.64.2 src/usr.sbin/edquota/Makefile

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

Modified files:

Index: src/usr.sbin/edquota/Makefile
diff -u src/usr.sbin/edquota/Makefile:1.5.64.1 src/usr.sbin/edquota/Makefile:1.5.64.2
--- src/usr.sbin/edquota/Makefile:1.5.64.1	Sun Jan 30 00:26:03 2011
+++ src/usr.sbin/edquota/Makefile	Tue Feb  8 22:34:18 2011
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
-#	$NetBSD: Makefile,v 1.5.64.1 2011/01/30 00:26:03 bouyer Exp $
+#	$NetBSD: Makefile,v 1.5.64.2 2011/02/08 22:34:18 bouyer Exp $
 
 .include 
 PROG=	edquota
@@ -11,7 +11,7 @@
 LDADD=	-lprop
 
 .PATH:	${NETBSDSRCDIR}/usr.bin/quota
-SRCS+=	getvfsquota.c
+SRCS+=	getvfsquota.c printquota.c
 .PATH:	${NETBSDSRCDIR}/sys/ufs/ufs 
 SRCS+=	quota2_prop.c quota1_subr.c
 



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

2011-02-08 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Feb  8 22:37:36 UTC 2011

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

Log Message:
- in rmixl_intr_init_clk, use MIPS_INT_MASK_SHIFT instead of 8
when calculating vector number for clock.


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

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

Modified files:

Index: src/sys/arch/mips/rmi/rmixl_intr.c
diff -u src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.28 src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.29
--- src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.28	Tue Feb  8 21:27:15 2011
+++ src/sys/arch/mips/rmi/rmixl_intr.c	Tue Feb  8 22:37:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_intr.c,v 1.1.2.28 2011/02/08 21:27:15 cliff Exp $	*/
+/*	$NetBSD: rmixl_intr.c,v 1.1.2.29 2011/02/08 22:37:36 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.28 2011/02/08 21:27:15 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.29 2011/02/08 22:37:36 cliff Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_ddb.h"
@@ -449,7 +449,7 @@
 void
 rmixl_intr_init_clk(void)
 {
-	int vec = ffs(MIPS_INT_MASK_5 >> 8) - 1;
+	int vec = ffs(MIPS_INT_MASK_5 >> MIPS_INT_MASK_SHIFT) - 1;
 
 	mutex_enter(rmixl_intr_lock);
 



CVS commit: [bouyer-quota2] src/usr.bin/ktruss

2011-02-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb  8 22:39:23 UTC 2011

Modified Files:
src/usr.bin/ktruss [bouyer-quota2]: dump.c

Log Message:
Update for quotactl rename


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.36.2.1 src/usr.bin/ktruss/dump.c

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

Modified files:

Index: src/usr.bin/ktruss/dump.c
diff -u src/usr.bin/ktruss/dump.c:1.36 src/usr.bin/ktruss/dump.c:1.36.2.1
--- src/usr.bin/ktruss/dump.c:1.36	Fri Jul 24 11:34:03 2009
+++ src/usr.bin/ktruss/dump.c	Tue Feb  8 22:39:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dump.c,v 1.36 2009/07/24 11:34:03 njoly Exp $	*/
+/*	$NetBSD: dump.c,v 1.36.2.1 2011/02/08 22:39:23 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)kdump.c	8.4 (Berkeley) 4/28/95";
 #endif
-__RCSID("$NetBSD: dump.c,v 1.36 2009/07/24 11:34:03 njoly Exp $");
+__RCSID("$NetBSD: dump.c,v 1.36.2.1 2011/02/08 22:39:23 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -525,7 +525,8 @@
 	case SYS_mkdir:
 	case SYS_rmdir:
 	case SYS___utimes50:
-	case SYS_quotactl:
+	case SYS_compat_50_quotactl:
+	case SYS___quotactl50:
 	case SYS_statvfs1:
 	case SYS_compat_30_getfh:
 	case SYS_pathconf:



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

2011-02-08 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Feb  8 22:42:32 UTC 2011

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

Log Message:
- cpu index variables (ddb_cpu, cpu_me) are now type u_int
- can now cpu_number() instead of cpu_index(curcpu())
since they are the same.


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

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

Modified files:

Index: src/sys/arch/mips/mips/db_interface.c
diff -u src/sys/arch/mips/mips/db_interface.c:1.64.16.20 src/sys/arch/mips/mips/db_interface.c:1.64.16.21
--- src/sys/arch/mips/mips/db_interface.c:1.64.16.20	Tue Feb  8 19:18:22 2011
+++ src/sys/arch/mips/mips/db_interface.c	Tue Feb  8 22:42:32 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.64.16.20 2011/02/08 19:18:22 cliff Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.64.16.21 2011/02/08 22:42:32 cliff Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.64.16.20 2011/02/08 19:18:22 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.64.16.21 2011/02/08 22:42:32 cliff Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_cputype.h"	/* which mips CPUs do we support? */
@@ -67,8 +67,8 @@
 #include 	/* for db_continue_cmd() proto */
 #endif
 
-#define NOCPU   -1
-int ddb_cpu = NOCPU;
+#define NOCPU   ~0
+u_int ddb_cpu = NOCPU;
 
 int		db_active = 0;
 db_regs_t	ddb_regs;
@@ -211,8 +211,9 @@
 
 #ifdef MULTIPROCESSOR
 	bool first_in_ddb = false;
-	int cpu_me = cpu_index(curcpu());
-	int old_ddb_cpu = atomic_cas_32(&ddb_cpu, NOCPU, cpu_me);
+	u_int cpu_me = cpu_number();
+	u_int old_ddb_cpu =
+		atomic_cas_uint(&ddb_cpu, NOCPU, cpu_me);
 	if (old_ddb_cpu == NOCPU) {
 		first_in_ddb = true;
 		cpu_pause_others();
@@ -1081,7 +1082,7 @@
 bool 
 ddb_running_on_this_cpu_p(void)
 {   
-	return ddb_cpu == cpu_index(curcpu());
+	return ddb_cpu == cpu_number();
 }
 
 bool 
@@ -1093,9 +1094,9 @@
 void
 db_resume_others(void)
 {
-	int cpu_me = cpu_index(curcpu());
+	u_int cpu_me = cpu_number();
 
-	if (atomic_cas_32(&ddb_cpu, cpu_me, NOCPU) == cpu_me)
+	if (atomic_cas_uint(&ddb_cpu, cpu_me, NOCPU) == cpu_me)
 		cpu_resume_others();
 }
 



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

2011-02-08 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Feb  8 23:01:28 UTC 2011

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

Log Message:
- make compile without MULTIPROCESSOR


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/sys/arch/mips/rmi/rmixl_cpu.c
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/arch/mips/rmi/rmixl_cpucore.c

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

Modified files:

Index: src/sys/arch/mips/rmi/rmixl_cpu.c
diff -u src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.19 src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.20
--- src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.19	Tue Feb  8 19:50:22 2011
+++ src/sys/arch/mips/rmi/rmixl_cpu.c	Tue Feb  8 23:01:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_cpu.c,v 1.1.2.19 2011/02/08 19:50:22 cliff Exp $	*/
+/*	$NetBSD: rmixl_cpu.c,v 1.1.2.20 2011/02/08 23:01:28 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -38,7 +38,7 @@
 #include "locators.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rmixl_cpu.c,v 1.1.2.19 2011/02/08 19:50:22 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_cpu.c,v 1.1.2.20 2011/02/08 23:01:28 cliff Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_ddb.h"
@@ -168,7 +168,6 @@
 cpu_rmixl_attach(device_t parent, device_t self, void *aux)
 {
 	struct rmixl_cpu_softc * const sc = device_private(self);
-	struct cpucore_attach_args *ca = aux;
 	struct cpu_info *ci = NULL;
 	static bool once = false;
 	extern void rmixl_spl_init_cpu(void);
@@ -190,6 +189,7 @@
 		struct cpucore_softc * const ccsc = device_private(parent);
 		rmixlfw_psb_type_t psb_type = rmixl_configuration.rc_psb_type;
 		cpuid_t cpuid;
+		struct cpucore_attach_args *ca = aux;
 
 		KASSERT(ca->ca_core < 8);
 		KASSERT(ca->ca_thread < 4);

Index: src/sys/arch/mips/rmi/rmixl_cpucore.c
diff -u src/sys/arch/mips/rmi/rmixl_cpucore.c:1.1.2.9 src/sys/arch/mips/rmi/rmixl_cpucore.c:1.1.2.10
--- src/sys/arch/mips/rmi/rmixl_cpucore.c:1.1.2.9	Tue Feb  8 06:03:36 2011
+++ src/sys/arch/mips/rmi/rmixl_cpucore.c	Tue Feb  8 23:01:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_cpucore.c,v 1.1.2.9 2011/02/08 06:03:36 cliff Exp $	*/
+/*	$NetBSD: rmixl_cpucore.c,v 1.1.2.10 2011/02/08 23:01:28 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -38,7 +38,7 @@
 #include "locators.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rmixl_cpucore.c,v 1.1.2.9 2011/02/08 06:03:36 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_cpucore.c,v 1.1.2.10 2011/02/08 23:01:28 cliff Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -91,9 +91,10 @@
 
 	sc->sc_dev = self;
 	sc->sc_core = na->na_core;
-	sc->sc_hatched = false;
 
 #ifdef MULTIPROCESSOR
+	sc->sc_hatched = false;
+
 	/*
 	 * Create the TLB structure needed - one per core and core0 uses the
 	 * default one for the system.



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

2011-02-08 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Feb  8 23:05:00 UTC 2011

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: cpu.h

Log Message:
- fix cpu_number() define for non- MULTIPROCESSOR case


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

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

Modified files:

Index: src/sys/arch/mips/include/cpu.h
diff -u src/sys/arch/mips/include/cpu.h:1.90.16.34 src/sys/arch/mips/include/cpu.h:1.90.16.35
--- src/sys/arch/mips/include/cpu.h:1.90.16.34	Tue Feb  8 06:01:08 2011
+++ src/sys/arch/mips/include/cpu.h	Tue Feb  8 23:04:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.90.16.34 2011/02/08 06:01:08 cliff Exp $	*/
+/*	$NetBSD: cpu.h,v 1.90.16.35 2011/02/08 23:04:59 cliff Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -202,7 +202,7 @@
 #define	cpu_number()		(curcpu()->ci_index)
 #define	CPU_IS_PRIMARY(ci)	((ci)->ci_flags & CPUF_PRIMARY)
 #else
-#define	cpu_number()		(0L)
+#define	cpu_number()		0
 #endif
 
 /* XXX simonb



CVS commit: src/sys/dev/wscons

2011-02-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb  8 23:06:25 UTC 2011

Modified Files:
src/sys/dev/wscons: wsdisplay_vcons.c wsdisplay_vconsvar.h

Log Message:
VCONS_DRAW_INTR changes:
- use softint instead of workqueue for drawing
- track scr_dirty with atomic_ops


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/wscons/wsdisplay_vcons.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/wscons/wsdisplay_vconsvar.h

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

Modified files:

Index: src/sys/dev/wscons/wsdisplay_vcons.c
diff -u src/sys/dev/wscons/wsdisplay_vcons.c:1.21 src/sys/dev/wscons/wsdisplay_vcons.c:1.22
--- src/sys/dev/wscons/wsdisplay_vcons.c:1.21	Tue Feb  8 13:40:35 2011
+++ src/sys/dev/wscons/wsdisplay_vcons.c	Tue Feb  8 23:06:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsdisplay_vcons.c,v 1.21 2011/02/08 13:40:35 jmcneill Exp $ */
+/*	$NetBSD: wsdisplay_vcons.c,v 1.22 2011/02/08 23:06:25 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.21 2011/02/08 13:40:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.22 2011/02/08 23:06:25 jmcneill Exp $");
 
 #include 
 #include 
@@ -123,7 +123,7 @@
 #endif
 #ifdef VCONS_DRAW_INTR
 static void vcons_intr(void *);
-static void vcons_intr_work(struct work *, void *);
+static void vcons_softintr(void *);
 static void vcons_intr_enable(device_t);
 #endif
 
@@ -173,8 +173,8 @@
 	&vd->drawing_thread, "vcons_draw");
 #endif
 #ifdef VCONS_DRAW_INTR
-	workqueue_create(&vd->intr_wq, "vcons_draw",
-	vcons_intr_work, vd, PRI_KTHREAD, IPL_TTY, WQ_MPSAFE);
+	vd->intr_softint = softint_establish(SOFTINT_SERIAL,
+	vcons_softintr, vd);
 	callout_init(&vd->intr, 0);
 	callout_setfunc(&vd->intr, vcons_intr, vd);
 
@@ -582,7 +582,7 @@
 #endif
 
 #ifdef VCONS_DRAW_INTR
-	scr->scr_dirty++;
+	atomic_inc_uint(&scr->scr_dirty);
 #endif
 }
 
@@ -659,7 +659,7 @@
 #endif
 
 #ifdef VCONS_DRAW_INTR
-	scr->scr_dirty++;
+	atomic_inc_uint(&scr->scr_dirty);
 #endif
 }
 
@@ -727,7 +727,7 @@
 	len * sizeof(uint16_t));
 
 #ifdef VCONS_DRAW_INTR
-	scr->scr_dirty++;
+	atomic_inc_uint(&scr->scr_dirty);
 #endif
 }
 
@@ -806,7 +806,7 @@
 	}
 
 #ifdef VCONS_DRAW_INTR
-	scr->scr_dirty++;
+	atomic_inc_uint(&scr->scr_dirty);
 #endif
 }
 
@@ -863,7 +863,7 @@
 #endif
 
 #ifdef VCONS_DRAW_INTR
-	scr->scr_dirty++;
+	atomic_inc_uint(&scr->scr_dirty);
 #endif
 }
 
@@ -906,7 +906,7 @@
 		if (scr->scr_ri.ri_crow != row || scr->scr_ri.ri_ccol != col) {
 			scr->scr_ri.ri_crow = row;
 			scr->scr_ri.ri_ccol = col;
-			scr->scr_dirty++;
+			atomic_inc_uint(&scr->scr_dirty);
 		}
 		vcons_unlock(scr);
 		return;
@@ -1416,20 +1416,23 @@
 {
 	struct vcons_data *vd = cookie;
 
-	workqueue_enqueue(vd->intr_wq, &vd->wk, NULL);
+	softint_schedule(vd->intr_softint);
 }
 
 static void
-vcons_intr_work(struct work *wk, void *cookie)
+vcons_softintr(void *cookie)
 {
 	struct vcons_data *vd = cookie;
 	struct vcons_screen *scr = vd->active;
+	unsigned int dirty;
 
 	if (scr) {
-		if (!SCREEN_IS_BUSY(scr) && scr->scr_dirty > 0) {
-			if ((scr->scr_flags & VCONS_NO_REDRAW) == 0)
-vcons_redraw_screen(scr);
-			scr->scr_dirty = 0;
+		if (!SCREEN_IS_BUSY(scr)) {
+			dirty = atomic_swap_uint(&scr->scr_dirty, 0);
+			if (dirty > 0) {
+if ((scr->scr_flags & VCONS_NO_REDRAW) == 0)
+	vcons_redraw_screen(scr);
+			}
 		}
 	}
 

Index: src/sys/dev/wscons/wsdisplay_vconsvar.h
diff -u src/sys/dev/wscons/wsdisplay_vconsvar.h:1.15 src/sys/dev/wscons/wsdisplay_vconsvar.h:1.16
--- src/sys/dev/wscons/wsdisplay_vconsvar.h:1.15	Tue Feb  8 13:40:35 2011
+++ src/sys/dev/wscons/wsdisplay_vconsvar.h	Tue Feb  8 23:06:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsdisplay_vconsvar.h,v 1.15 2011/02/08 13:40:35 jmcneill Exp $ */
+/*	$NetBSD: wsdisplay_vconsvar.h,v 1.16 2011/02/08 23:06:25 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -32,8 +32,6 @@
 #include "opt_wsdisplay_compat.h"
 #include "opt_vcons.h"
 
-#include 
-
 struct vcons_data;
 
 struct vcons_screen {
@@ -76,7 +74,7 @@
 	int scr_current_offset;
 #endif
 #ifdef VCONS_DRAW_INTR
-	int scr_dirty;
+	unsigned int scr_dirty;
 #endif
 };
 
@@ -139,8 +137,7 @@
 #endif
 #ifdef VCONS_DRAW_INTR
 	callout_t intr;
-	struct workqueue *intr_wq;
-	struct work wk;
+	void *intr_softint;
 	int use_intr;		/* use intr drawing when non-zero */
 #endif
 };



CVS commit: src/sys/dev/splash

2011-02-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb  8 23:28:25 UTC 2011

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

Log Message:
%zu for size_t, not %zd


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/splash/splash.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/splash/splash.c
diff -u src/sys/dev/splash/splash.c:1.10 src/sys/dev/splash/splash.c:1.11
--- src/sys/dev/splash/splash.c:1.10	Mon Feb  7 02:57:49 2011
+++ src/sys/dev/splash/splash.c	Tue Feb  8 23:28:24 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: splash.c,v 1.10 2011/02/07 02:57:49 jmcneill Exp $ */
+/* $NetBSD: splash.c,v 1.11 2011/02/08 23:28:24 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2006 Jared D. McNeill 
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: splash.c,v 1.10 2011/02/07 02:57:49 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: splash.c,v 1.11 2011/02/08 23:28:24 jmcneill Exp $");
 
 #include "opt_splash.h"
 
@@ -151,7 +151,7 @@
 		return EBUSY;
 	}
 
-	aprint_verbose("%s: splash image @ %p, %zd bytes\n",
+	aprint_verbose("%s: splash image @ %p, %zu bytes\n",
 	__func__, imgdata, imgdatalen);
 	splash_image.data = imgdata;
 	splash_image.datalen = imgdatalen;



CVS commit: src/external/bsd/iscsi/dist/src/lib

2011-02-08 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Feb  9 00:59:24 UTC 2011

Modified Files:
src/external/bsd/iscsi/dist/src/lib: initiator.c

Log Message:
Make sure we include  if we have it.  From Rumko.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/iscsi/dist/src/lib/initiator.c

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

Modified files:

Index: src/external/bsd/iscsi/dist/src/lib/initiator.c
diff -u src/external/bsd/iscsi/dist/src/lib/initiator.c:1.2 src/external/bsd/iscsi/dist/src/lib/initiator.c:1.3
--- src/external/bsd/iscsi/dist/src/lib/initiator.c:1.2	Tue Jun 30 02:44:52 2009
+++ src/external/bsd/iscsi/dist/src/lib/initiator.c	Wed Feb  9 00:59:23 2011
@@ -58,6 +58,10 @@
 #include 
 #endif
   
+#ifdef HAVE_INTTYPES_H
+#include 
+#endif
+  
 #ifdef HAVE_SIGNAL_H
 #include 
 #endif



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

2011-02-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Feb  9 02:30:09 UTC 2011

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

Log Message:
PRIx64 instead of llx for uint64_t format


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

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

Modified files:

Index: src/sys/arch/x86/x86/genfb_machdep.c
diff -u src/sys/arch/x86/x86/genfb_machdep.c:1.5 src/sys/arch/x86/x86/genfb_machdep.c:1.6
--- src/sys/arch/x86/x86/genfb_machdep.c:1.5	Tue Feb  8 10:52:56 2011
+++ src/sys/arch/x86/x86/genfb_machdep.c	Wed Feb  9 02:30:09 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_machdep.c,v 1.5 2011/02/08 10:52:56 jmcneill Exp $ */
+/* $NetBSD: genfb_machdep.c,v 1.6 2011/02/09 02:30:09 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill 
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.5 2011/02/08 10:52:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.6 2011/02/09 02:30:09 jmcneill Exp $");
 
 #include "opt_mtrr.h"
 
@@ -92,7 +92,7 @@
 	mtrr.flags = MTRR_VALID;
 	mtrr.owner = 0;
 
-	aprint_debug("%s: 0x%llx-0x%llx\n", __func__,
+	aprint_debug("%s: 0x%" PRIx64 "-0x%" PRIx64 "\n", __func__,
 	mtrr.base, mtrr.base + mtrr.len - 1);
 
 	n = 1;



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

2011-02-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Feb  9 04:37:54 UTC 2011

Modified Files:
src/sys/arch/i386/stand/boot: version
src/sys/arch/i386/stand/lib: biosvbe.S vbe.c vbe.h

Log Message:
Add VESA VBE/DDC EDID support for determining the monitor's preferred
video mode. "vesa on" will now select the preferred mode @ 8bpp if it can
be determined and is supported by the display adapter, otherwise it will
use 640x480 @ 8bpp.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/stand/boot/version
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/stand/lib/biosvbe.S
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/i386/stand/lib/vbe.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/lib/vbe.h

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

Modified files:

Index: src/sys/arch/i386/stand/boot/version
diff -u src/sys/arch/i386/stand/boot/version:1.14 src/sys/arch/i386/stand/boot/version:1.15
--- src/sys/arch/i386/stand/boot/version:1.14	Sun Feb  6 23:16:05 2011
+++ src/sys/arch/i386/stand/boot/version	Wed Feb  9 04:37:54 2011
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.14 2011/02/06 23:16:05 jmcneill Exp $
+$NetBSD: version,v 1.15 2011/02/09 04:37:54 jmcneill Exp $
 
 NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.  The format of this
 file is important - make sure the entries are appended on end, last item
@@ -46,3 +46,4 @@
 5.6:	GUID Partition Table support.
 5.7:	Recognize 64-bit LBA from bootxx.
 5.8:	Support for splash images.
+5.9:	VESA VBE/DDC EDID support.

Index: src/sys/arch/i386/stand/lib/biosvbe.S
diff -u src/sys/arch/i386/stand/lib/biosvbe.S:1.1 src/sys/arch/i386/stand/lib/biosvbe.S:1.2
--- src/sys/arch/i386/stand/lib/biosvbe.S:1.1	Mon Feb 16 22:39:30 2009
+++ src/sys/arch/i386/stand/lib/biosvbe.S	Wed Feb  9 04:37:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: biosvbe.S,v 1.1 2009/02/16 22:39:30 jmcneill Exp $ */
+/* $NetBSD: biosvbe.S,v 1.2 2011/02/09 04:37:54 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill 
@@ -254,3 +254,101 @@
 	popl	%ebx
 	popl	%ebp
 	ret
+
+/*
+ * Function 15h BL=00h - Report VBE/DDC Capabilities
+ *
+ * int biosvbe_ddc_caps(void)
+ * return: VBE/DDC capabilities
+ */
+ENTRY(biosvbe_ddc_caps)
+	pushl	%ebp
+	movl	%esp,%ebp
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	push	%esi
+	push	%edi
+
+	call	_C_LABEL(prot_to_real)
+	.code16
+
+	movw	$0x4f15, %ax	/* display identification extensions */
+	mov	$0x00, %bx	/* report DDC capabilities */
+
+	movl	$0x, %esi	/* ES:DI == 0:0 */
+	movl	$0x, %edi
+	mov	$0x00, %cx	/* controller unit number (00h = primary) */
+	int	$0x10
+
+	calll	_C_LABEL(real_to_prot)
+	.code32
+
+	movl	%eax,%ecx
+	movl	$0x,%eax
+	andl	$0x,%ecx
+	cmpl	$0x004f,%ecx
+	jne	1f
+	andl	$0x,%ebx
+	movl	%ebx,%eax
+1:
+
+	pop	%edi
+	pop	%esi
+	popl	%edx
+	popl	%ecx
+	popl	%ebx
+	popl	%ebp
+	ret
+
+/*
+ * Function 15h BL=01h - Read EDID
+ *
+ * int biosvbe_ddc_read_edid(int blockno, void *buf)
+ * return: VBE call status
+ */
+ENTRY(biosvbe_ddc_read_edid)
+	pushl	%ebp
+	movl	%esp,%ebp
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	push	%esi
+	push	%edi
+
+	movl	8(%ebp), %edx	/* EDID block number */
+	movl	12(%ebp), %edi	/* EDID block address */
+
+	call	_C_LABEL(prot_to_real)
+	.code16
+
+	push	%es
+
+	push	%di
+	shrl	$4, %edi
+	mov	%ds, %ax
+	add	%di, %ax
+	mov	%ax, %es
+	pop	%di
+	and	$0xf, %di	/* EDID block address now in es:di */
+
+	movw	$0x4f15, %ax	/* display identification extensions */
+	mov	$0x01, %bx	/* read EDID */
+	mov	$0x00, %cx	/* controller unit number (00h = primary) */
+	int	$0x10
+
+	pop	%es
+
+	calll	_C_LABEL(real_to_prot)
+	.code32
+
+	andl	$0x,%eax
+
+	pop	%edi
+	pop	%esi
+	popl	%edx
+	popl	%ecx
+	popl	%ebx
+	popl	%ebp
+	ret
+

Index: src/sys/arch/i386/stand/lib/vbe.c
diff -u src/sys/arch/i386/stand/lib/vbe.c:1.6 src/sys/arch/i386/stand/lib/vbe.c:1.7
--- src/sys/arch/i386/stand/lib/vbe.c:1.6	Fri Jun 25 15:35:08 2010
+++ src/sys/arch/i386/stand/lib/vbe.c	Wed Feb  9 04:37:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: vbe.c,v 1.6 2010/06/25 15:35:08 tsutsui Exp $ */
+/* $NetBSD: vbe.c,v 1.7 2011/02/09 04:37:54 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill 
@@ -37,6 +37,8 @@
 #include "vbe.h"
 
 extern const uint8_t rasops_cmap[];
+static uint8_t *vbe_edid = NULL;
+static int vbe_edid_valid = 0;
 
 static struct _vbestate {
 	int		available;
@@ -185,7 +187,7 @@
 }
 
 static int
-vbe_parse_mode_str(char *str, int *x, int *y, int *bpp)
+vbe_parse_mode_str(char *str, int *x, int *y, int *depth)
 {
 	char *p;
 
@@ -202,11 +204,11 @@
 		return 0;
 	p = strchr(p, 'x');
 	if (!p)
-		*bpp = 8;
+		*depth = 8;
 	else {
 		++p;
-		*bpp = strtoul(p, NULL, 0);
-		if (*bpp == 0)
+		*depth = strtoul(p, NULL, 0);
+		if (*depth == 0)
 			return 0;
 	}
 
@@ -214,18 +216,14 @@
 }
 
 static int
-vbe_find_mode(char *str)
+vbe_find_mode_xyd(int x, int y, int depth)
 {
 	struct vbeinfoblock vbe;
 	struct modeinfoblock mi;
 	uint32_t farptr;
 	u

CVS commit: src/sbin/gpt

2011-02-08 Thread Eric Schnoebelen
Module Name:src
Committed By:   schnoebe
Date:   Wed Feb  9 05:11:15 UTC 2011

Modified Files:
src/sbin/gpt: gpt.8

Log Message:
List all the aliases supported for GPT partition types.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/gpt/gpt.8

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

Modified files:

Index: src/sbin/gpt/gpt.8
diff -u src/sbin/gpt/gpt.8:1.5 src/sbin/gpt/gpt.8:1.6
--- src/sbin/gpt/gpt.8:1.5	Wed Mar 11 18:02:00 2009
+++ src/sbin/gpt/gpt.8	Wed Feb  9 05:11:15 2011
@@ -1,4 +1,4 @@
-.\" $NetBSD: gpt.8,v 1.5 2009/03/11 18:02:00 joerg Exp $
+.\" $NetBSD: gpt.8,v 1.6 2011/02/09 05:11:15 schnoebe Exp $
 .\"
 .\" Copyright (c) 2002 Marcel Moolenaar
 .\" All rights reserved.
@@ -126,6 +126,8 @@
 .Nm
 accepts
 .Cm efi , swap , ufs , hfs , linux ,
+.Cm raid , lfs , ccd , cgd , bios ,
+.Cm ffs ,
 and
 .Cm windows
 as aliases for the most commonly used partition types.



CVS commit: src/usr.bin/rpcinfo

2011-02-08 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  9 06:26:48 UTC 2011

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

Log Message:
Fix broken build (hi Christos!)


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/rpcinfo/rpcinfo.c

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

Modified files:

Index: src/usr.bin/rpcinfo/rpcinfo.c
diff -u src/usr.bin/rpcinfo/rpcinfo.c:1.30 src/usr.bin/rpcinfo/rpcinfo.c:1.31
--- src/usr.bin/rpcinfo/rpcinfo.c:1.30	Tue Feb  8 22:16:58 2011
+++ src/usr.bin/rpcinfo/rpcinfo.c	Wed Feb  9 06:26:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpcinfo.c,v 1.30 2011/02/08 22:16:58 christos Exp $	*/
+/*	$NetBSD: rpcinfo.c,v 1.31 2011/02/09 06:26:48 dholland Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -114,7 +114,7 @@
 };
 
 struct verslist {
-	int vers;
+	rpcvers_t vers;
 	struct verslist *next;
 };
 
@@ -843,7 +843,7 @@
 			(void)printf("%10lu  ", (unsigned long)rs->prog);
 			for (vl = rs->vlist; vl; vl = vl->next) {
 (void)snprintf(q, sizeof(buf) - (q - buf),
-"%d", vl->vers);
+"%lu", (unsigned long)vl->vers);
 q = q + strlen(q);
 if (vl->next) {
 	(void)snprintf(q,
@@ -1531,12 +1531,14 @@
 {
 	char *strptr;
 	rpcvers_t vers;
+	unsigned long ulvers;
 
-	vers = strtoul(arg, &strptr, 0);
+	ulvers = strtoul(arg, &strptr, 0);
 	if (strptr == arg || *strptr != '\0' ||
-	(vers == ULONG_MAX && errno == ERANGE))
+	(ulvers == ULONG_MAX && errno == ERANGE))
 		errx(1, "Illegal version number `%s'", arg);
-	return (rpcvers_t)vers;
+	vers = (rpcvers_t)ulvers;
+	return vers;
 }
 
 /*