From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 11:15:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B74F1106566C; Sun, 28 Feb 2010 11:15:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 49F0A8FC0A; Sun, 28 Feb 2010 11:15:10 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o1SBF9NM058363 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 28 Feb 2010 13:15:09 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o1SBF9m5085583; Sun, 28 Feb 2010 13:15:09 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o1SBF82x085582; Sun, 28 Feb 2010 13:15:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 28 Feb 2010 13:15:08 +0200 From: Kostik Belousov To: Jilles Tjoelker Message-ID: <20100228111508.GN2489@deviant.kiev.zoral.com.ua> References: <201002271532.o1RFWnCp099462@svn.freebsd.org> <20100227220854.GB77656@stack.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BjavXC7V3ilNTWHC" Content-Disposition: inline In-Reply-To: <20100227220854.GB77656@stack.nl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204413 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 11:15:11 -0000 --BjavXC7V3ilNTWHC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 27, 2010 at 11:08:54PM +0100, Jilles Tjoelker wrote: > On Sat, Feb 27, 2010 at 03:32:49PM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Sat Feb 27 15:32:49 2010 > > New Revision: 204413 > > URL: http://svn.freebsd.org/changeset/base/204413 >=20 > > Log: > > For kinfo_proc in kp->ki_siglist, return the set of the signals pendi= ng > > in the process queue when gathering information for the process, and = set > > of signals pending for the thread, when gathering information for the > > thread. Previously, the sysctl returned a union of the process and so= me > > arbitrary thread pending set for the process, and union of the process > > and the thread pending set for the thread. >=20 > Although the new way provides maximum information and the old way was > definitely broken for processes, I think the new way may not be what I > expect. In particular, 'ps O pending' and 'ps HO pending' now give > (usually) disjunct answers, even for single-threaded processes. I > suppose these different answers can be useful for kernel debugging, but > it should be documented. Not only for the kernel debugging. Being able to see a pending signal in the process queue means that signal delivery for the process is stopped. Change provides a capability to start analyze such situation without resorting to the kernel debugger. More, I do not consider the change to be significant enough from the interface stability point of view, thus planning to merge it to 8. Where do you suggest to document the behaviour ? ps(1) ? >=20 > Most interesting stuff will be in the process queue so the change will > not be very noticeable. Signals directed at threads are usually traps > (which do not stay pending very long), pthread_kill() or > SIGEV_THREAD_ID. SIGPIPE and SIGSYS (not from kill/sigqueue) may be > expected to be thread-directed but they are process-directed. Traps do not stay in the queue at all, they are delivered immediately, unless administrator ajdusted kern.forcesigexit. In the later case, I think that the process will be eventually terminated with the stack overflow. >=20 > In 7.x, process-directed signals are often delivered directly to a > thread queue, but this usually only happens for signals that will be > delivered right away. Or rather, this happen for signal that can be queued but not blocked by choosen thread at the moment of delivery. And kernel tried to to select a thread that has the signal not blocked. >=20 > Somewhat related, ki_sigmask could be the logical AND of all threads' > td_sigmask when gathering information for the process, instead of the > td_sigmask of the most recently created thread; fill_kinfo_aggregate() > could handle this. ki_sigmask arguably has no meaning in the process context. Do you propose this to simplify handling of a single-threaded process ? --BjavXC7V3ilNTWHC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuKUDwACgkQC3+MBN1Mb4gdhwCgnnPxXM5nBrFH1FunPk0uIvI6 5uAAoPPNqAj3HJ7gr6BjKF9albywq+kI =iHuM -----END PGP SIGNATURE----- --BjavXC7V3ilNTWHC-- From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 13:31:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2FAD1065672; Sun, 28 Feb 2010 13:31:29 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B31C88FC18; Sun, 28 Feb 2010 13:31:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SDVTn8091176; Sun, 28 Feb 2010 13:31:29 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SDVTvd091174; Sun, 28 Feb 2010 13:31:29 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201002281331.o1SDVTvd091174@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 28 Feb 2010 13:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204447 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 13:31:29 -0000 Author: jh Date: Sun Feb 28 13:31:29 2010 New Revision: 204447 URL: http://svn.freebsd.org/changeset/base/204447 Log: In _gettemp(), check that the length of the path doesn't exceed MAXPATHLEN. Otherwise the path name (or part of it) may not fit to carrybuf causing a buffer overflow. PR: bin/140228 Suggested by: jilles Modified: head/lib/libc/stdio/mktemp.c Modified: head/lib/libc/stdio/mktemp.c ============================================================================== --- head/lib/libc/stdio/mktemp.c Sun Feb 28 11:27:03 2010 (r204446) +++ head/lib/libc/stdio/mktemp.c Sun Feb 28 13:31:29 2010 (r204447) @@ -116,6 +116,10 @@ _gettemp(path, doopen, domkdir, slen) for (trv = path; *trv != '\0'; ++trv) ; + if (trv - path >= MAXPATHLEN) { + errno = ENAMETOOLONG; + return (0); + } trv -= slen; suffp = trv; --trv; From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:08:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 457CC106564A; Sun, 28 Feb 2010 14:08:13 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 001718FC1C; Sun, 28 Feb 2010 14:08:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SE8C5v099329; Sun, 28 Feb 2010 14:08:12 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SE8CGt099327; Sun, 28 Feb 2010 14:08:12 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281408.o1SE8CGt099327@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204449 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:08:13 -0000 Author: antoine Date: Sun Feb 28 14:08:12 2010 New Revision: 204449 URL: http://svn.freebsd.org/changeset/base/204449 Log: Add files to remove when MK_WIRELESS=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:04:20 2010 (r204448) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:08:12 2010 (r204449) @@ -2042,3 +2042,32 @@ OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/tc #.if ${MK_USB} == no # to be filled in #.endif + +.if ${MK_WIRELESS} == no +OLD_FILES+=etc/regdomain.xml +OLD_FILES+=usr/sbin/ancontrol +OLD_FILES+=usr/sbin/hostapd +OLD_FILES+=usr/sbin/hostapd_cli +OLD_FILES+=usr/sbin/ndis_events +OLD_FILES+=usr/sbin/wlandebug +OLD_FILES+=usr/sbin/wlconfig +OLD_FILES+=usr/sbin/wpa_cli +OLD_FILES+=usr/sbin/wpa_passphrase +OLD_FILES+=usr/sbin/wpa_supplicant +OLD_FILES+=usr/share/examples/etc/regdomain.xml +OLD_FILES+=usr/share/examples/etc/wpa_supplicant.conf +OLD_FILES+=usr/share/examples/hostapd/hostapd.conf +OLD_FILES+=usr/share/examples/hostapd/hostapd.eap_user +OLD_FILES+=usr/share/examples/hostapd/hostapd.wpa_psk +OLD_FILES+=usr/share/man/man5/hostapd.conf.5.gz +OLD_FILES+=usr/share/man/man5/wpa_supplicant.conf.5.gz +OLD_FILES+=usr/share/man/man8/ancontrol.8.gz +OLD_FILES+=usr/share/man/man8/hostapd.8.gz +OLD_FILES+=usr/share/man/man8/hostapd_cli.8.gz +OLD_FILES+=usr/share/man/man8/i386/wlconfig.8.gz +OLD_FILES+=usr/share/man/man8/ndis_events.8.gz +OLD_FILES+=usr/share/man/man8/wlandebug.8.gz +OLD_FILES+=usr/share/man/man8/wpa_cli.8.gz +OLD_FILES+=usr/share/man/man8/wpa_passphrase.8.gz +OLD_FILES+=usr/share/man/man8/wpa_supplicant.8.gz +.endif From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:12:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E910A106564A; Sun, 28 Feb 2010 14:12:05 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D94628FC19; Sun, 28 Feb 2010 14:12:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SEC5U0000340; Sun, 28 Feb 2010 14:12:05 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SEC5WW000338; Sun, 28 Feb 2010 14:12:05 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281412.o1SEC5WW000338@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204450 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:12:06 -0000 Author: antoine Date: Sun Feb 28 14:12:05 2010 New Revision: 204450 URL: http://svn.freebsd.org/changeset/base/204450 Log: Update files to remove when MK_LPR=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:08:12 2010 (r204449) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:12:05 2010 (r204450) @@ -1510,6 +1510,8 @@ OLD_FILES+=usr/share/man/man8/verify_krb #.endif .if ${MK_LPR} == no +OLD_FILES+=etc/hosts.lpd +OLD_FILES+=etc/printcap OLD_FILES+=usr/bin/lp OLD_FILES+=usr/bin/lpq OLD_FILES+=usr/bin/lpr @@ -1524,6 +1526,8 @@ OLD_FILES+=usr/sbin/lpd OLD_FILES+=usr/sbin/lptest OLD_FILES+=usr/sbin/pac OLD_FILES+=usr/share/doc/smm/07.lpd/paper.ascii.gz +OLD_FILES+=usr/share/examples/etc/hosts.lpd +OLD_FILES+=usr/share/examples/etc/printcap OLD_FILES+=usr/share/man/man1/lp.1.gz OLD_FILES+=usr/share/man/man1/lpq.1.gz OLD_FILES+=usr/share/man/man1/lpr.1.gz From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:13:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E103106564A; Sun, 28 Feb 2010 14:13:33 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E4C28FC2F; Sun, 28 Feb 2010 14:13:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SEDXbZ000702; Sun, 28 Feb 2010 14:13:33 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SEDXWS000700; Sun, 28 Feb 2010 14:13:33 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281413.o1SEDXWS000700@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204451 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:13:33 -0000 Author: antoine Date: Sun Feb 28 14:13:33 2010 New Revision: 204451 URL: http://svn.freebsd.org/changeset/base/204451 Log: Update files to remove when MK_NCP=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:12:05 2010 (r204450) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:13:33 2010 (r204451) @@ -1599,12 +1599,12 @@ OLD_FILES+=usr/include/netncp/nwerror.h #OLD_DIRS+=usr/include/netncp OLD_FILES+=usr/lib/libncp.a OLD_FILES+=usr/lib/libncp.so -OLD_LIBS+=usr/lib/libncp.so.3 +OLD_LIBS+=usr/lib/libncp.so.4 OLD_FILES+=usr/lib/libncp_p.a .if ${TARGET_ARCH} == "amd64" OLD_FILES+=usr/lib32/libncp.a OLD_FILES+=usr/lib32/libncp.so -OLD_LIBS+=usr/lib32/libncp.so.3 +OLD_LIBS+=usr/lib32/libncp.so.4 OLD_FILES+=usr/lib32/libncp_p.a .endif OLD_FILES+=usr/sbin/mount_nwfs From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:21:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E713106566C; Sun, 28 Feb 2010 14:21:15 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E60D8FC0A; Sun, 28 Feb 2010 14:21:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SELFac002426; Sun, 28 Feb 2010 14:21:15 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SELFmN002424; Sun, 28 Feb 2010 14:21:15 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281421.o1SELFmN002424@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204452 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:21:15 -0000 Author: antoine Date: Sun Feb 28 14:21:15 2010 New Revision: 204452 URL: http://svn.freebsd.org/changeset/base/204452 Log: Add files to remove when MK_NDIS=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:13:33 2010 (r204451) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:21:15 2010 (r204452) @@ -1614,6 +1614,14 @@ OLD_FILES+=usr/share/man/man1/ncplogout. OLD_FILES+=usr/share/man/man8/mount_nwfs.8.gz .endif +.if ${MK_NDIS} == no +OLD_FILES+=usr/sbin/ndiscvt +OLD_FILES+=usr/sbin/ndisgen +OLD_FILES+=usr/share/man/man8/ndiscvt.8.gz +OLD_FILES+=usr/share/man/man8/ndisgen.8.gz +OLD_FILES+=usr/share/misc/windrv_stub.c +.endif + .if ${MK_NETCAT} == no OLD_FILES+=usr/bin/nc OLD_FILES+=usr/share/man/man1/nc.1.gz From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:23:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48767106566B; Sun, 28 Feb 2010 14:23:39 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 387F08FC13; Sun, 28 Feb 2010 14:23:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SENdcR002996; Sun, 28 Feb 2010 14:23:39 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SENdI9002994; Sun, 28 Feb 2010 14:23:39 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281423.o1SENdI9002994@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204453 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:23:39 -0000 Author: antoine Date: Sun Feb 28 14:23:38 2010 New Revision: 204453 URL: http://svn.freebsd.org/changeset/base/204453 Log: Add files to remove when MK_TELNET=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:21:15 2010 (r204452) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:23:38 2010 (r204453) @@ -2047,6 +2047,13 @@ OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/tc OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/tcsh.cat .endif +.if ${MK_TELNET} == no +OLD_FILES+=usr/bin/telnet +OLD_FILES+=usr/libexec/telnetd +OLD_FILES+=usr/share/man/man1/telnet.1.gz +OLD_FILES+=usr/share/man/man8/telnetd.8.gz +.endif + #.if ${MK_TOOLCHAIN} == no # to be filled in #.endif From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:24:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B056B1065674; Sun, 28 Feb 2010 14:24:38 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A04F58FC1A; Sun, 28 Feb 2010 14:24:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SEOcQl003256; Sun, 28 Feb 2010 14:24:38 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SEOcO4003254; Sun, 28 Feb 2010 14:24:38 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281424.o1SEOcO4003254@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204454 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:24:38 -0000 Author: antoine Date: Sun Feb 28 14:24:38 2010 New Revision: 204454 URL: http://svn.freebsd.org/changeset/base/204454 Log: Add files to remove when MK_ROUTED=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:23:38 2010 (r204453) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:24:38 2010 (r204454) @@ -1786,6 +1786,13 @@ OLD_FILES+=usr/share/man/man8/rshd.8.gz # to be filled in or replaced with a special target #.endif +.if ${MK_ROUTED} == no +OLD_FILES+=sbin/routed +OLD_FILES+=sbin/rtquery +OLD_FILES+=usr/share/man/man8/routed.8.gz +OLD_FILES+=usr/share/man/man8/rtquery.8.gz +.endif + .if ${MK_SENDMAIL} == no OLD_FILES+=bin/rmail OLD_FILES+=usr/bin/vacation From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:26:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D64106566B; Sun, 28 Feb 2010 14:26:28 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 451308FC19; Sun, 28 Feb 2010 14:26:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SEQSwA003680; Sun, 28 Feb 2010 14:26:28 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SEQSIL003678; Sun, 28 Feb 2010 14:26:28 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281426.o1SEQSIL003678@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204455 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:26:28 -0000 Author: antoine Date: Sun Feb 28 14:26:28 2010 New Revision: 204455 URL: http://svn.freebsd.org/changeset/base/204455 Log: Add files to remove when MK_RCS=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:24:38 2010 (r204454) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:26:28 2010 (r204455) @@ -1778,9 +1778,30 @@ OLD_FILES+=usr/share/man/man8/rlogind.8. OLD_FILES+=usr/share/man/man8/rshd.8.gz .endif -#.if ${MK_RCS} == no -# to be filled in -#.endif +.if ${MK_RCS} == no +OLD_FILES+=usr/bin/ci +OLD_FILES+=usr/bin/co +OLD_FILES+=usr/bin/ident +OLD_FILES+=usr/bin/merge +OLD_FILES+=usr/bin/rcs +OLD_FILES+=usr/bin/rcsclean +OLD_FILES+=usr/bin/rcsdiff +OLD_FILES+=usr/bin/rcsfreeze +OLD_FILES+=usr/bin/rcsmerge +OLD_FILES+=usr/bin/rlog +OLD_FILES+=usr/share/man/man1/ci.1.gz +OLD_FILES+=usr/share/man/man1/co.1.gz +OLD_FILES+=usr/share/man/man1/ident.1.gz +OLD_FILES+=usr/share/man/man1/merge.1.gz +OLD_FILES+=usr/share/man/man1/rcs.1.gz +OLD_FILES+=usr/share/man/man1/rcsclean.1.gz +OLD_FILES+=usr/share/man/man1/rcsdiff.1.gz +OLD_FILES+=usr/share/man/man1/rcsfreeze.1.gz +OLD_FILES+=usr/share/man/man1/rcsintro.1.gz +OLD_FILES+=usr/share/man/man1/rcsmerge.1.gz +OLD_FILES+=usr/share/man/man1/rlog.1.gz +OLD_FILES+=usr/share/man/man5/rcsfile.5.gz +.endif #.if ${MK_RESCUE} == no # to be filled in or replaced with a special target From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:29:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76C02106566C; Sun, 28 Feb 2010 14:29:22 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66F628FC13; Sun, 28 Feb 2010 14:29:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SETM5N004332; Sun, 28 Feb 2010 14:29:22 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SETM7Y004330; Sun, 28 Feb 2010 14:29:22 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281429.o1SETM7Y004330@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204456 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:29:22 -0000 Author: antoine Date: Sun Feb 28 14:29:22 2010 New Revision: 204456 URL: http://svn.freebsd.org/changeset/base/204456 Log: Update files to remove when MK_RCMDS=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:26:28 2010 (r204455) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:29:22 2010 (r204456) @@ -1766,16 +1766,24 @@ OLD_FILES+=usr/lib/libz_p.a .if ${MK_RCMDS} == no OLD_FILES+=bin/rcp +OLD_FILES+=etc/periodic/daily/140.clean-rwho +OLD_FILES+=etc/periodic/daily/430.status-rwho OLD_FILES+=rescue/rcp OLD_FILES+=usr/bin/rlogin OLD_FILES+=usr/bin/rsh +OLD_FILES+=usr/bin/ruptime +OLD_FILES+=usr/bin/rwho OLD_FILES+=usr/libexec/rlogind OLD_FILES+=usr/libexec/rshd +OLD_FILES+=usr/sbin/rwhod OLD_FILES+=usr/share/man/man1/rcp.1.gz OLD_FILES+=usr/share/man/man1/rlogin.1.gz OLD_FILES+=usr/share/man/man1/rsh.1.gz +OLD_FILES+=usr/share/man/man1/ruptime.1.gz +OLD_FILES+=usr/share/man/man1/rwho.1.gz OLD_FILES+=usr/share/man/man8/rlogind.8.gz OLD_FILES+=usr/share/man/man8/rshd.8.gz +OLD_FILES+=usr/share/man/man8/rwhod.8.gz .endif .if ${MK_RCS} == no From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:32:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6406A106566B; Sun, 28 Feb 2010 14:32:29 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53C4F8FC20; Sun, 28 Feb 2010 14:32:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SEWTx6005052; Sun, 28 Feb 2010 14:32:29 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SEWTKt005050; Sun, 28 Feb 2010 14:32:29 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281432.o1SEWTKt005050@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204457 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:32:29 -0000 Author: antoine Date: Sun Feb 28 14:32:29 2010 New Revision: 204457 URL: http://svn.freebsd.org/changeset/base/204457 Log: Add files to remove when MK_NTP=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:29:22 2010 (r204456) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:32:29 2010 (r204457) @@ -1635,6 +1635,93 @@ OLD_FILES+=usr/share/man/man1/nc.1.gz # to be filled in #.endif +.if ${MK_NTP} == no +OLD_FILES+=etc/ntp.conf +OLD_FILES+=etc/periodic/daily/480.status-ntpd +OLD_FILES+=usr/bin/ntpq +OLD_FILES+=usr/sbin/ntp-keygen +OLD_FILES+=usr/sbin/ntpd +OLD_FILES+=usr/sbin/ntpdate +OLD_FILES+=usr/sbin/ntpdc +OLD_FILES+=usr/sbin/ntptime +OLD_FILES+=usr/sbin/sntp +OLD_FILES+=usr/share/doc/ntp/accopt.html +OLD_FILES+=usr/share/doc/ntp/assoc.html +OLD_FILES+=usr/share/doc/ntp/audio.html +OLD_FILES+=usr/share/doc/ntp/authopt.html +OLD_FILES+=usr/share/doc/ntp/build.html +OLD_FILES+=usr/share/doc/ntp/clockopt.html +OLD_FILES+=usr/share/doc/ntp/config.html +OLD_FILES+=usr/share/doc/ntp/confopt.html +OLD_FILES+=usr/share/doc/ntp/copyright.html +OLD_FILES+=usr/share/doc/ntp/debug.html +OLD_FILES+=usr/share/doc/ntp/driver1.html +OLD_FILES+=usr/share/doc/ntp/driver10.html +OLD_FILES+=usr/share/doc/ntp/driver11.html +OLD_FILES+=usr/share/doc/ntp/driver12.html +OLD_FILES+=usr/share/doc/ntp/driver16.html +OLD_FILES+=usr/share/doc/ntp/driver18.html +OLD_FILES+=usr/share/doc/ntp/driver19.html +OLD_FILES+=usr/share/doc/ntp/driver2.html +OLD_FILES+=usr/share/doc/ntp/driver20.html +OLD_FILES+=usr/share/doc/ntp/driver22.html +OLD_FILES+=usr/share/doc/ntp/driver26.html +OLD_FILES+=usr/share/doc/ntp/driver27.html +OLD_FILES+=usr/share/doc/ntp/driver28.html +OLD_FILES+=usr/share/doc/ntp/driver29.html +OLD_FILES+=usr/share/doc/ntp/driver3.html +OLD_FILES+=usr/share/doc/ntp/driver30.html +OLD_FILES+=usr/share/doc/ntp/driver32.html +OLD_FILES+=usr/share/doc/ntp/driver33.html +OLD_FILES+=usr/share/doc/ntp/driver34.html +OLD_FILES+=usr/share/doc/ntp/driver35.html +OLD_FILES+=usr/share/doc/ntp/driver36.html +OLD_FILES+=usr/share/doc/ntp/driver37.html +OLD_FILES+=usr/share/doc/ntp/driver4.html +OLD_FILES+=usr/share/doc/ntp/driver5.html +OLD_FILES+=usr/share/doc/ntp/driver6.html +OLD_FILES+=usr/share/doc/ntp/driver7.html +OLD_FILES+=usr/share/doc/ntp/driver8.html +OLD_FILES+=usr/share/doc/ntp/driver9.html +OLD_FILES+=usr/share/doc/ntp/extern.html +OLD_FILES+=usr/share/doc/ntp/hints.html +OLD_FILES+=usr/share/doc/ntp/howto.html +OLD_FILES+=usr/share/doc/ntp/index.html +OLD_FILES+=usr/share/doc/ntp/kern.html +OLD_FILES+=usr/share/doc/ntp/ldisc.html +OLD_FILES+=usr/share/doc/ntp/measure.html +OLD_FILES+=usr/share/doc/ntp/miscopt.html +OLD_FILES+=usr/share/doc/ntp/monopt.html +OLD_FILES+=usr/share/doc/ntp/mx4200data.html +OLD_FILES+=usr/share/doc/ntp/notes.html +OLD_FILES+=usr/share/doc/ntp/ntpd.html +OLD_FILES+=usr/share/doc/ntp/ntpdate.html +OLD_FILES+=usr/share/doc/ntp/ntpdc.html +OLD_FILES+=usr/share/doc/ntp/ntpq.html +OLD_FILES+=usr/share/doc/ntp/ntptime.html +OLD_FILES+=usr/share/doc/ntp/ntptrace.html +OLD_FILES+=usr/share/doc/ntp/parsedata.html +OLD_FILES+=usr/share/doc/ntp/parsenew.html +OLD_FILES+=usr/share/doc/ntp/patches.html +OLD_FILES+=usr/share/doc/ntp/porting.html +OLD_FILES+=usr/share/doc/ntp/pps.html +OLD_FILES+=usr/share/doc/ntp/prefer.html +OLD_FILES+=usr/share/doc/ntp/quick.html +OLD_FILES+=usr/share/doc/ntp/rdebug.html +OLD_FILES+=usr/share/doc/ntp/refclock.html +OLD_FILES+=usr/share/doc/ntp/release.html +OLD_FILES+=usr/share/doc/ntp/tickadj.html +OLD_FILES+=usr/share/examples/etc/ntp.conf +OLD_FILES+=usr/share/man/man5/ntp.conf.5.gz +OLD_FILES+=usr/share/man/man5/ntp.keys.5.gz +OLD_FILES+=usr/share/man/man8/ntp-keygen.8.gz +OLD_FILES+=usr/share/man/man8/ntpd.8.gz +OLD_FILES+=usr/share/man/man8/ntpdate.8.gz +OLD_FILES+=usr/share/man/man8/ntpdc.8.gz +OLD_FILES+=usr/share/man/man8/ntpq.8.gz +OLD_FILES+=usr/share/man/man8/ntptime.8.gz +.endif + #.if ${MK_OBJC} == no # to be filled in #.endif From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:37:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 387281065673; Sun, 28 Feb 2010 14:37:40 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26F5F8FC28; Sun, 28 Feb 2010 14:37:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SEbeRb006199; Sun, 28 Feb 2010 14:37:40 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SEbeuH006197; Sun, 28 Feb 2010 14:37:40 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281437.o1SEbeuH006197@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:37:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204458 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:37:40 -0000 Author: antoine Date: Sun Feb 28 14:37:39 2010 New Revision: 204458 URL: http://svn.freebsd.org/changeset/base/204458 Log: Add files to remove when MK_PF=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:32:29 2010 (r204457) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:37:39 2010 (r204458) @@ -1734,9 +1734,34 @@ OLD_FILES+=usr/share/man/man8/ntptime.8. # to be filled in #.endif -#.if ${MK_PCVT} == no -# to be filled in -#.endif +.if ${MK_PF} == no +OLD_FILES+=etc/periodic/security/520.pfdenied +OLD_FILES+=etc/pf.os +OLD_FILES+=sbin/pfctl +OLD_FILES+=sbin/pflogd +OLD_FILES+=usr/libexec/tftp-proxy +OLD_FILES+=usr/sbin/ftp-proxy +OLD_FILES+=usr/share/examples/etc/pf.os +OLD_FILES+=usr/share/examples/pf/ackpri +OLD_FILES+=usr/share/examples/pf/faq-example1 +OLD_FILES+=usr/share/examples/pf/faq-example2 +OLD_FILES+=usr/share/examples/pf/faq-example3 +OLD_FILES+=usr/share/examples/pf/pf.conf +OLD_FILES+=usr/share/examples/pf/queue1 +OLD_FILES+=usr/share/examples/pf/queue2 +OLD_FILES+=usr/share/examples/pf/queue3 +OLD_FILES+=usr/share/examples/pf/queue4 +OLD_FILES+=usr/share/examples/pf/spamd +OLD_FILES+=usr/share/man/man4/pf.4.gz +OLD_FILES+=usr/share/man/man4/pflog.4.gz +OLD_FILES+=usr/share/man/man4/pfsync.4.gz +OLD_FILES+=usr/share/man/man5/pf.conf.5.gz +OLD_FILES+=usr/share/man/man5/pf.os.5.gz +OLD_FILES+=usr/share/man/man8/ftp-proxy.8.gz +OLD_FILES+=usr/share/man/man8/pfctl.8.gz +OLD_FILES+=usr/share/man/man8/pflogd.8.gz +OLD_FILES+=usr/share/man/man8/tftp-proxy.8.gz +.endif .if ${MK_PROFILE} == no OLD_FILES+=usr/lib/libalias_cuseeme_p.a From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:39:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D924D106568B; Sun, 28 Feb 2010 14:39:39 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C96D08FC2B; Sun, 28 Feb 2010 14:39:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SEddno006654; Sun, 28 Feb 2010 14:39:39 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SEddWM006652; Sun, 28 Feb 2010 14:39:39 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281439.o1SEddWM006652@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204459 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:39:40 -0000 Author: antoine Date: Sun Feb 28 14:39:39 2010 New Revision: 204459 URL: http://svn.freebsd.org/changeset/base/204459 Log: Add files to remove when MK_PKGTOOLS=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:37:39 2010 (r204458) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:39:39 2010 (r204459) @@ -1763,6 +1763,22 @@ OLD_FILES+=usr/share/man/man8/pflogd.8.g OLD_FILES+=usr/share/man/man8/tftp-proxy.8.gz .endif +.if ${MK_PKGTOOLS} == no +OLD_FILES+=etc/periodic/weekly/400.status-pkg +OLD_FILES+=usr/sbin/pkg_add +OLD_FILES+=usr/sbin/pkg_create +OLD_FILES+=usr/sbin/pkg_delete +OLD_FILES+=usr/sbin/pkg_info +OLD_FILES+=usr/sbin/pkg_updating +OLD_FILES+=usr/sbin/pkg_version +OLD_FILES+=usr/share/man/man1/pkg_add.1.gz +OLD_FILES+=usr/share/man/man1/pkg_create.1.gz +OLD_FILES+=usr/share/man/man1/pkg_delete.1.gz +OLD_FILES+=usr/share/man/man1/pkg_info.1.gz +OLD_FILES+=usr/share/man/man1/pkg_updating.1.gz +OLD_FILES+=usr/share/man/man1/pkg_version.1.gz +.endif + .if ${MK_PROFILE} == no OLD_FILES+=usr/lib/libalias_cuseeme_p.a OLD_FILES+=usr/lib/libalias_dummy_p.a From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:41:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7F65106566B; Sun, 28 Feb 2010 14:41:28 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D850F8FC08; Sun, 28 Feb 2010 14:41:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SEfSaA007144; Sun, 28 Feb 2010 14:41:28 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SEfS2u007142; Sun, 28 Feb 2010 14:41:28 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281441.o1SEfS2u007142@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204460 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:41:29 -0000 Author: antoine Date: Sun Feb 28 14:41:28 2010 New Revision: 204460 URL: http://svn.freebsd.org/changeset/base/204460 Log: Add files to remove when MK_PORTSNAP=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:39:39 2010 (r204459) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:41:28 2010 (r204460) @@ -1779,6 +1779,15 @@ OLD_FILES+=usr/share/man/man1/pkg_updati OLD_FILES+=usr/share/man/man1/pkg_version.1.gz .endif +.if ${MK_PORTSNAP} == no +OLD_FILES+=etc/portsnap.conf +OLD_FILES+=usr/libexec/make_index +OLD_FILES+=usr/libexec/phttpget +OLD_FILES+=usr/sbin/portsnap +OLD_FILES+=usr/share/examples/etc/portsnap.conf +OLD_FILES+=usr/share/man/man8/portsnap.8.gz +.endif + .if ${MK_PROFILE} == no OLD_FILES+=usr/lib/libalias_cuseeme_p.a OLD_FILES+=usr/lib/libalias_dummy_p.a From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 14:43:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC0D8106564A; Sun, 28 Feb 2010 14:43:55 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC4B88FC1F; Sun, 28 Feb 2010 14:43:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SEhtba007733; Sun, 28 Feb 2010 14:43:55 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SEhtTj007731; Sun, 28 Feb 2010 14:43:55 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002281443.o1SEhtTj007731@svn.freebsd.org> From: Antoine Brodin Date: Sun, 28 Feb 2010 14:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204461 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 14:43:55 -0000 Author: antoine Date: Sun Feb 28 14:43:55 2010 New Revision: 204461 URL: http://svn.freebsd.org/changeset/base/204461 Log: Add files to remove when MK_PPP=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:41:28 2010 (r204460) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 14:43:55 2010 (r204461) @@ -1788,6 +1788,14 @@ OLD_FILES+=usr/share/examples/etc/portsn OLD_FILES+=usr/share/man/man8/portsnap.8.gz .endif +.if ${MK_PPP} == no +OLD_FILES+=etc/ppp/ppp.conf +OLD_FILES+=usr/sbin/ppp +OLD_FILES+=usr/sbin/pppctl +OLD_FILES+=usr/share/man/man8/ppp.8.gz +OLD_FILES+=usr/share/man/man8/pppctl.8.gz +.endif + .if ${MK_PROFILE} == no OLD_FILES+=usr/lib/libalias_cuseeme_p.a OLD_FILES+=usr/lib/libalias_dummy_p.a From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 16:11:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F78B1065673; Sun, 28 Feb 2010 16:11:14 +0000 (UTC) (envelope-from ticso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E95FE8FC2C; Sun, 28 Feb 2010 16:11:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SGBDGB026849; Sun, 28 Feb 2010 16:11:13 GMT (envelope-from ticso@svn.freebsd.org) Received: (from ticso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SGBDPv026847; Sun, 28 Feb 2010 16:11:13 GMT (envelope-from ticso@svn.freebsd.org) Message-Id: <201002281611.o1SGBDPv026847@svn.freebsd.org> From: Bernd Walter Date: Sun, 28 Feb 2010 16:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204462 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 16:11:14 -0000 Author: ticso Date: Sun Feb 28 16:11:13 2010 New Revision: 204462 URL: http://svn.freebsd.org/changeset/base/204462 Log: Fix multicast hashes. Atmel uses a simple xor hash instead of the typical crc based one. Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Sun Feb 28 14:43:55 2010 (r204461) +++ head/sys/arm/at91/if_ate.c Sun Feb 28 16:11:13 2010 (r204462) @@ -380,6 +380,20 @@ ate_load_rx_buf(void *arg, bus_dma_segme bus_dmamap_sync(sc->rxtag, sc->rx_map[i], BUS_DMASYNC_PREREAD); } +static uint32_t +ate_mac_hash(const uint8_t *buf) +{ + uint32_t index = 0; + uint8_t bit; + uint8_t bitshift; + for (int i = 0; i < 48; i++) { + bit = i / 6; + bitshift = i - bit * 6; + index ^= ((buf[i >> 3] >> (i & 7)) & 1) << bitshift; + } + return (index); +} + /* * Compute the multicast filter for this device using the standard * algorithm. I wonder why this isn't in ether somewhere as a lot @@ -414,8 +428,9 @@ ate_setmcast(struct ate_softc *sc) TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; - index = ether_crc32_be(LLADDR((struct sockaddr_dl *) - ifma->ifma_addr), ETHER_ADDR_LEN) >> 26; + index = 0; + index = ate_mac_hash(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr)); af[index >> 3] |= 1 << (index & 7); } if_maddr_runlock(ifp); From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 16:14:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B58F106566B; Sun, 28 Feb 2010 16:14:34 +0000 (UTC) (envelope-from ticso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C0788FC12; Sun, 28 Feb 2010 16:14:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SGEYAx027600; Sun, 28 Feb 2010 16:14:34 GMT (envelope-from ticso@svn.freebsd.org) Received: (from ticso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SGEYnX027598; Sun, 28 Feb 2010 16:14:34 GMT (envelope-from ticso@svn.freebsd.org) Message-Id: <201002281614.o1SGEYnX027598@svn.freebsd.org> From: Bernd Walter Date: Sun, 28 Feb 2010 16:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204463 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 16:14:34 -0000 Author: ticso Date: Sun Feb 28 16:14:34 2010 New Revision: 204463 URL: http://svn.freebsd.org/changeset/base/204463 Log: remove debug leftover Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Sun Feb 28 16:11:13 2010 (r204462) +++ head/sys/arm/at91/if_ate.c Sun Feb 28 16:14:34 2010 (r204463) @@ -428,7 +428,6 @@ ate_setmcast(struct ate_softc *sc) TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; - index = 0; index = ate_mac_hash(LLADDR((struct sockaddr_dl *) ifma->ifma_addr)); af[index >> 3] |= 1 << (index & 7); From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 16:25:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BAEC106566B; Sun, 28 Feb 2010 16:25:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 808308FC1C; Sun, 28 Feb 2010 16:25:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SGPnmQ030130; Sun, 28 Feb 2010 16:25:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SGPnh1030127; Sun, 28 Feb 2010 16:25:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281625.o1SGPnh1030127@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 16:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204464 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 16:25:49 -0000 Author: kib Date: Sun Feb 28 16:25:49 2010 New Revision: 204464 URL: http://svn.freebsd.org/changeset/base/204464 Log: In both if_tun and if_tap: Do not do additional dev_ref() on the newly created interface in the if_clone create method [1]. This reference is not needed and never removed, causing struct cdevpriv leakage. Remove the setting of SI_CHEAPCLONE flag as well, since it is unused. For dev_clone handlers, create cdevs with the call make_dev_credf(MAKEDEV_REF) instead of calling make_dev() and then dev_ref(), to avoid a race. Call drain_dev_clone_events() at the module unload time after dev_clone handler is deinstalled. Submitted by: Mikolaj Golub [1] MFC after: 1 week Modified: head/sys/net/if_tap.c head/sys/net/if_tun.c Modified: head/sys/net/if_tap.c ============================================================================== --- head/sys/net/if_tap.c Sun Feb 28 16:14:34 2010 (r204463) +++ head/sys/net/if_tap.c Sun Feb 28 16:25:49 2010 (r204464) @@ -192,10 +192,6 @@ tap_clone_create(struct if_clone *ifc, i if (i) { dev = make_dev(&tap_cdevsw, unit | extra, UID_ROOT, GID_WHEEL, 0600, "%s%d", ifc->ifc_name, unit); - if (dev != NULL) { - dev_ref(dev); - dev->si_flags |= SI_CHEAPCLONE; - } } tapcreate(dev); @@ -300,6 +296,7 @@ tapmodevent(module_t mod, int type, void EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); if_clone_detach(&tap_cloner); if_clone_detach(&vmnet_cloner); + drain_dev_clone_events(); mtx_lock(&tapmtx); while ((tp = SLIST_FIRST(&taphead)) != NULL) { @@ -381,12 +378,8 @@ tapclone(void *arg, struct ucred *cred, name = devname; } - *dev = make_dev(&tap_cdevsw, unit | extra, - UID_ROOT, GID_WHEEL, 0600, "%s", name); - if (*dev != NULL) { - dev_ref(*dev); - (*dev)->si_flags |= SI_CHEAPCLONE; - } + *dev = make_dev_credf(MAKEDEV_REF, &tap_cdevsw, unit | extra, + cred, UID_ROOT, GID_WHEEL, 0600, "%s", name); } if_clone_create(name, namelen, NULL); Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Sun Feb 28 16:14:34 2010 (r204463) +++ head/sys/net/if_tun.c Sun Feb 28 16:25:49 2010 (r204464) @@ -188,10 +188,6 @@ tun_clone_create(struct if_clone *ifc, i /* No preexisting struct cdev *, create one */ dev = make_dev(&tun_cdevsw, unit, UID_UUCP, GID_DIALER, 0600, "%s%d", ifc->ifc_name, unit); - if (dev != NULL) { - dev_ref(dev); - dev->si_flags |= SI_CHEAPCLONE; - } } tuncreate(ifc->ifc_name, dev); @@ -237,12 +233,8 @@ tunclone(void *arg, struct ucred *cred, name = devname; } /* No preexisting struct cdev *, create one */ - *dev = make_dev(&tun_cdevsw, u, + *dev = make_dev_credf(MAKEDEV_REF, &tun_cdevsw, u, cred, UID_UUCP, GID_DIALER, 0600, "%s", name); - if (*dev != NULL) { - dev_ref(*dev); - (*dev)->si_flags |= SI_CHEAPCLONE; - } } if_clone_create(name, namelen, NULL); @@ -303,6 +295,7 @@ tunmodevent(module_t mod, int type, void case MOD_UNLOAD: if_clone_detach(&tun_cloner); EVENTHANDLER_DEREGISTER(dev_clone, tag); + drain_dev_clone_events(); mtx_lock(&tunmtx); while ((tp = TAILQ_FIRST(&tunhead)) != NULL) { From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:06:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D50D0106564A; Sun, 28 Feb 2010 17:06:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAE758FC1A; Sun, 28 Feb 2010 17:06:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SH6g3I039117; Sun, 28 Feb 2010 17:06:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SH6gGe039115; Sun, 28 Feb 2010 17:06:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281706.o1SH6gGe039115@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204465 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:06:42 -0000 Author: kib Date: Sun Feb 28 17:06:42 2010 New Revision: 204465 URL: http://svn.freebsd.org/changeset/base/204465 Log: Remove unused global statistic about fat cache usage. Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_fat.c Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 28 16:25:49 2010 (r204464) +++ head/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 28 17:06:42 2010 (r204465) @@ -60,19 +60,6 @@ #include #include -/* - * Fat cache stats. - */ -static int fc_fileextends; /* # of file extends */ -static int fc_lfcempty; /* # of time last file cluster cache entry - * was empty */ -static int fc_bmapcalls; /* # of times pcbmap was called */ - -#define LMMAX 20 -static int fc_lmdistance[LMMAX];/* counters for how far off the last - * cluster mapped entry was. */ -static int fc_largedistance; /* off by more than LMMAX */ - static int chainalloc(struct msdosfsmount *pmp, u_long start, u_long count, u_long fillwith, u_long *retcluster, u_long *got); @@ -152,8 +139,6 @@ pcbmap(dep, findcn, bnp, cnp, sp) struct msdosfsmount *pmp = dep->de_pmp; u_long bsize; - fc_bmapcalls++; - /* * If they don't give us someplace to return a value then don't * bother doing anything. @@ -203,10 +188,6 @@ pcbmap(dep, findcn, bnp, cnp, sp) */ i = 0; fc_lookup(dep, findcn, &i, &cn); - if ((bn = findcn - i) >= LMMAX) - fc_largedistance++; - else - fc_lmdistance[bn]++; /* * Handle all other files or directories the normal way. @@ -992,10 +973,8 @@ extendfile(dep, count, bpp, ncp, flags) * If the "file's last cluster" cache entry is empty, and the file * is not empty, then fill the cache entry by calling pcbmap(). */ - fc_fileextends++; if (dep->de_fc[FC_LASTFC].fc_frcn == FCE_EMPTY && dep->de_StartCluster != 0) { - fc_lfcempty++; error = pcbmap(dep, 0xffff, 0, &cn, 0); /* we expect it to return E2BIG */ if (error != E2BIG) From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:07:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADF83106564A; Sun, 28 Feb 2010 17:07:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 841748FC12; Sun, 28 Feb 2010 17:07:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SH7nSL039385; Sun, 28 Feb 2010 17:07:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SH7n6b039382; Sun, 28 Feb 2010 17:07:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281707.o1SH7n6b039382@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:07:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204466 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:07:49 -0000 Author: kib Date: Sun Feb 28 17:07:49 2010 New Revision: 204466 URL: http://svn.freebsd.org/changeset/base/204466 Log: Assert that the msdosfs vnode is (e)locked in several places. The plan is to use vnode lock to protect denode and fat cache, and having separate lock for block use map. Change the check and return on impossible condition into KASSERT(). Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/msdosfs/msdosfs_fat.c Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Sun Feb 28 17:06:42 2010 (r204465) +++ head/sys/fs/msdosfs/msdosfs_denode.c Sun Feb 28 17:07:49 2010 (r204466) @@ -167,9 +167,8 @@ deget(pmp, dirclust, diroffset, depp) ldep->de_dirclust = dirclust; ldep->de_diroffset = diroffset; ldep->de_inode = inode; - fc_purge(ldep, 0); /* init the fat cache for this denode */ - lockmgr(nvp->v_vnlock, LK_EXCLUSIVE, NULL); + fc_purge(ldep, 0); /* init the fat cache for this denode */ error = insmntque(nvp, mntp); if (error != 0) { free(ldep, M_MSDOSFSNODE); Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 28 17:06:42 2010 (r204465) +++ head/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 28 17:07:49 2010 (r204466) @@ -139,12 +139,9 @@ pcbmap(dep, findcn, bnp, cnp, sp) struct msdosfsmount *pmp = dep->de_pmp; u_long bsize; - /* - * If they don't give us someplace to return a value then don't - * bother doing anything. - */ - if (bnp == NULL && cnp == NULL && sp == NULL) - return (0); + KASSERT(bnp != NULL || cnp != NULL || sp != NULL, + ("pcbmap: extra call")); + ASSERT_VOP_ELOCKED(DETOV(dep), "pcbmap"); cn = dep->de_StartCluster; /* @@ -270,6 +267,8 @@ fc_lookup(dep, findcn, frcnp, fsrcnp) u_long cn; struct fatcache *closest = 0; + ASSERT_VOP_LOCKED(DETOV(dep), "fc_lookup"); + for (i = 0; i < FC_SIZE; i++) { cn = dep->de_fc[i].fc_frcn; if (cn != FCE_EMPTY && cn <= findcn) { @@ -295,6 +294,8 @@ fc_purge(dep, frcn) int i; struct fatcache *fcp; + ASSERT_VOP_ELOCKED(DETOV(dep), "fc_purge"); + fcp = dep->de_fc; for (i = 0; i < FC_SIZE; i++, fcp++) { if (fcp->fc_frcn >= frcn) From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:09:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCD67106566C; Sun, 28 Feb 2010 17:09:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD5B88FC1B; Sun, 28 Feb 2010 17:09:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SH99bA039712; Sun, 28 Feb 2010 17:09:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SH99aB039710; Sun, 28 Feb 2010 17:09:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281709.o1SH99aB039710@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204467 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:09:09 -0000 Author: kib Date: Sun Feb 28 17:09:09 2010 New Revision: 204467 URL: http://svn.freebsd.org/changeset/base/204467 Log: Remove seemingly unneeded unlock/relock of the dvp in msdosfs_rmdir, causing LOR. Reported and tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_vnops.c Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Sun Feb 28 17:07:49 2010 (r204466) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Sun Feb 28 17:09:09 2010 (r204467) @@ -1468,14 +1468,12 @@ msdosfs_rmdir(ap) * the name cache. */ cache_purge(dvp); - VOP_UNLOCK(dvp, 0); /* * Truncate the directory that is being deleted. */ error = detrunc(ip, (u_long)0, IO_SYNC, cnp->cn_cred, td); cache_purge(vp); - vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); out: return (error); } From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:10:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C58BB106566B; Sun, 28 Feb 2010 17:10:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5F588FC1A; Sun, 28 Feb 2010 17:10:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SHAf9e040086; Sun, 28 Feb 2010 17:10:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SHAfou040084; Sun, 28 Feb 2010 17:10:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281710.o1SHAfou040084@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204468 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:10:41 -0000 Author: kib Date: Sun Feb 28 17:10:41 2010 New Revision: 204468 URL: http://svn.freebsd.org/changeset/base/204468 Log: In msdosfs_inactive(), reclaim the vnodes both for SLOT_DELETED and SLOT_EMPTY deName[0] values. Besides conforming to FAT specification, it also clears the issue where vfs_hash_insert found the vnode in hash, and newly allocated vnode is vput()ed. There, deName[0] == 0, and vnode is not reclaimed, indefinitely kept on mountlist. Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_denode.c Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Sun Feb 28 17:09:09 2010 (r204467) +++ head/sys/fs/msdosfs/msdosfs_denode.c Sun Feb 28 17:10:41 2010 (r204468) @@ -593,7 +593,7 @@ msdosfs_inactive(ap) /* * Ignore denodes related to stale file handles. */ - if (dep->de_Name[0] == SLOT_DELETED) + if (dep->de_Name[0] == SLOT_DELETED || dep->de_Name[0] == SLOT_EMPTY) goto out; /* @@ -621,7 +621,7 @@ out: printf("msdosfs_inactive(): v_usecount %d, de_Name[0] %x\n", vrefcnt(vp), dep->de_Name[0]); #endif - if (dep->de_Name[0] == SLOT_DELETED) + if (dep->de_Name[0] == SLOT_DELETED || dep->de_Name[0] == SLOT_EMPTY) vrecycle(vp, td); return (error); } From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:11:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1674D1065672; Sun, 28 Feb 2010 17:11:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 070BC8FC1E; Sun, 28 Feb 2010 17:11:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SHBVQd040364; Sun, 28 Feb 2010 17:11:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SHBVXA040362; Sun, 28 Feb 2010 17:11:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281711.o1SHBVXA040362@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204469 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:11:32 -0000 Author: kib Date: Sun Feb 28 17:11:31 2010 New Revision: 204469 URL: http://svn.freebsd.org/changeset/base/204469 Log: In msdosfs deget(), properly handle the case when the vnode is found in hash. Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_denode.c Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Sun Feb 28 17:10:41 2010 (r204468) +++ head/sys/fs/msdosfs/msdosfs_denode.c Sun Feb 28 17:11:31 2010 (r204469) @@ -182,9 +182,8 @@ deget(pmp, dirclust, diroffset, depp) return (error); } if (xvp != NULL) { - /* XXX: Not sure this is right */ - nvp = xvp; - ldep->de_vnode = nvp; + *depp = xvp->v_data; + return (0); } ldep->de_pmp = pmp; From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:13:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A297110656A6; Sun, 28 Feb 2010 17:13:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78AC38FC1B; Sun, 28 Feb 2010 17:13:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SHD7ET040741; Sun, 28 Feb 2010 17:13:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SHD74Q040738; Sun, 28 Feb 2010 17:13:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281713.o1SHD74Q040738@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204470 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:13:07 -0000 Author: kib Date: Sun Feb 28 17:13:07 2010 New Revision: 204470 URL: http://svn.freebsd.org/changeset/base/204470 Log: Add per-mountpoint lockmgr lock for msdosfs. It is intended to be used as fat bitmap lock and to replace global mutex protecting fileno rbtree. Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/fs/msdosfs/msdosfsmount.h Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Feb 28 17:11:31 2010 (r204469) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Feb 28 17:13:07 2010 (r204470) @@ -75,6 +75,8 @@ #include #include +static const char msdosfs_lock_msg[] = "fatlk"; + /* Mount options that we support. */ static const char *msdosfs_opts[] = { "async", "noatime", "noclusterr", "noclusterw", @@ -466,6 +468,8 @@ mountmsdosfs(struct vnode *devvp, struct pmp->pm_cp = cp; pmp->pm_bo = bo; + lockinit(&pmp->pm_fatlock, 0, msdosfs_lock_msg, 0, 0); + /* * Initialize ownerships and permissions, since nothing else will * initialize them iff we are mounting root. @@ -762,6 +766,7 @@ error_exit: g_topology_unlock(); PICKUP_GIANT(); } + lockdestroy(&pmp->pm_fatlock); if (pmp) { if (pmp->pm_inusemap) free(pmp->pm_inusemap, M_MSDOSFSFAT); @@ -837,6 +842,7 @@ msdosfs_unmount(struct mount *mp, int mn free(pmp->pm_inusemap, M_MSDOSFSFAT); if (pmp->pm_flags & MSDOSFS_LARGEFS) msdosfs_fileno_free(mp); + lockdestroy(&pmp->pm_fatlock); free(pmp, M_MSDOSFSMNT); mp->mnt_data = NULL; MNT_ILOCK(mp); Modified: head/sys/fs/msdosfs/msdosfsmount.h ============================================================================== --- head/sys/fs/msdosfs/msdosfsmount.h Sun Feb 28 17:11:31 2010 (r204469) +++ head/sys/fs/msdosfs/msdosfsmount.h Sun Feb 28 17:13:07 2010 (r204470) @@ -53,6 +53,9 @@ #ifdef _KERNEL +#include +#include +#include #include #ifdef MALLOC_DECLARE @@ -106,7 +109,9 @@ struct msdosfsmount { void *pm_u2d; /* Unicode->DOS iconv handle */ void *pm_d2u; /* DOS->Local iconv handle */ u_int32_t pm_nfileno; /* next 32-bit fileno */ - RB_HEAD(msdosfs_filenotree, msdosfs_fileno) pm_filenos; /* 64<->32-bit fileno mapping */ + RB_HEAD(msdosfs_filenotree, msdosfs_fileno) + pm_filenos; /* 64<->32-bit fileno mapping */ + struct lock pm_fatlock; /* lockmgr protecting allocations and rb tree */ }; /* @@ -215,6 +220,13 @@ void msdosfs_fileno_init(struct mount *) void msdosfs_fileno_free(struct mount *); uint32_t msdosfs_fileno_map(struct mount *, uint64_t); +#define MSDOSFS_LOCK_MP(pmp) \ + lockmgr(&(pmp)->pm_fatlock, LK_EXCLUSIVE, NULL) +#define MSDOSFS_UNLOCK_MP(pmp) \ + lockmgr(&(pmp)->pm_fatlock, LK_RELEASE, NULL) +#define MSDOSFS_ASSERT_MP_LOCKED(pmp) \ + lockmgr_assert(&(pmp)->pm_fatlock, KA_XLOCKED) + #endif /* _KERNEL */ /* From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:13:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCC5F106564A; Sun, 28 Feb 2010 17:13:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCB518FC17; Sun, 28 Feb 2010 17:13:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SHDxT5040973; Sun, 28 Feb 2010 17:13:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SHDxVJ040970; Sun, 28 Feb 2010 17:13:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281713.o1SHDxVJ040970@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204471 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:14:00 -0000 Author: kib Date: Sun Feb 28 17:13:59 2010 New Revision: 204471 URL: http://svn.freebsd.org/changeset/base/204471 Log: Use pm_fatlock to protect fat bitmap. Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_fat.c head/sys/fs/msdosfs/msdosfs_vfsops.c Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 28 17:13:07 2010 (r204470) +++ head/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 28 17:13:59 2010 (r204471) @@ -77,6 +77,9 @@ static __inline void usemap_alloc(struct msdosfsmount *pmp, u_long cn); static __inline void usemap_free(struct msdosfsmount *pmp, u_long cn); +static int clusteralloc1(struct msdosfsmount *pmp, u_long start, + u_long count, u_long fillwith, u_long *retcluster, + u_long *got); static void fatblock(pmp, ofs, bnp, sizep, bop) @@ -409,6 +412,7 @@ usemap_alloc(pmp, cn) u_long cn; { + MSDOSFS_ASSERT_MP_LOCKED(pmp); pmp->pm_inusemap[cn / N_INUSEBITS] |= 1 << (cn % N_INUSEBITS); pmp->pm_freeclustercount--; } @@ -419,6 +423,7 @@ usemap_free(pmp, cn) u_long cn; { + MSDOSFS_ASSERT_MP_LOCKED(pmp); pmp->pm_freeclustercount++; pmp->pm_inusemap[cn / N_INUSEBITS] &= ~(1 << (cn % N_INUSEBITS)); } @@ -432,17 +437,17 @@ clusterfree(pmp, cluster, oldcnp) int error; u_long oldcn; - usemap_free(pmp, cluster); error = fatentry(FAT_GET_AND_SET, pmp, cluster, &oldcn, MSDOSFSFREE); - if (error) { - usemap_alloc(pmp, cluster); + if (error) return (error); - } /* * If the cluster was successfully marked free, then update * the count of free clusters, and turn off the "allocated" * bit in the "in use" cluster bit map. */ + MSDOSFS_LOCK_MP(pmp); + usemap_free(pmp, cluster); + MSDOSFS_UNLOCK_MP(pmp); if (oldcnp) *oldcnp = oldcn; return (0); @@ -660,6 +665,8 @@ chainlength(pmp, start, count) u_int map; u_long len; + MSDOSFS_ASSERT_MP_LOCKED(pmp); + max_idx = pmp->pm_maxcluster / N_INUSEBITS; idx = start / N_INUSEBITS; start %= N_INUSEBITS; @@ -708,6 +715,8 @@ chainalloc(pmp, start, count, fillwith, int error; u_long cl, n; + MSDOSFS_ASSERT_MP_LOCKED(pmp); + for (cl = start, n = count; n-- > 0;) usemap_alloc(pmp, cl++); @@ -740,19 +749,28 @@ chainalloc(pmp, start, count, fillwith, * got - how many clusters were actually allocated. */ int -clusteralloc(pmp, start, count, fillwith, retcluster, got) - struct msdosfsmount *pmp; - u_long start; - u_long count; - u_long fillwith; - u_long *retcluster; - u_long *got; +clusteralloc(struct msdosfsmount *pmp, u_long start, u_long count, + u_long fillwith, u_long *retcluster, u_long *got) +{ + int error; + + MSDOSFS_LOCK_MP(pmp); + error = clusteralloc1(pmp, start, count, fillwith, retcluster, got); + MSDOSFS_UNLOCK_MP(pmp); + return (error); +} + +static int +clusteralloc1(struct msdosfsmount *pmp, u_long start, u_long count, + u_long fillwith, u_long *retcluster, u_long *got) { u_long idx; u_long len, newst, foundl, cn, l; u_long foundcn = 0; /* XXX: foundcn could be used unititialized */ u_int map; + MSDOSFS_ASSERT_MP_LOCKED(pmp); + #ifdef MSDOSFS_DEBUG printf("clusteralloc(): find %lu clusters\n", count); #endif @@ -828,6 +846,7 @@ freeclusterchain(pmp, cluster) u_long bn, bo, bsize, byteoffset; u_long readcn, lbn = -1; + MSDOSFS_LOCK_MP(pmp); while (cluster >= CLUST_FIRST && cluster <= pmp->pm_maxcluster) { byteoffset = FATOFS(pmp, cluster); fatblock(pmp, byteoffset, &bn, &bsize, &bo); @@ -837,6 +856,7 @@ freeclusterchain(pmp, cluster) error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp); if (error) { brelse(bp); + MSDOSFS_UNLOCK_MP(pmp); return (error); } lbn = bn; @@ -872,6 +892,7 @@ freeclusterchain(pmp, cluster) } if (bp) updatefats(pmp, bp, bn); + MSDOSFS_UNLOCK_MP(pmp); return (0); } @@ -888,6 +909,8 @@ fillinusemap(pmp) int error; u_long bn, bo, bsize, byteoffset; + MSDOSFS_ASSERT_MP_LOCKED(pmp); + /* * Mark all clusters in use, we mark the free ones in the fat scan * loop further down. Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Feb 28 17:13:07 2010 (r204470) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Feb 28 17:13:59 2010 (r204471) @@ -720,7 +720,10 @@ mountmsdosfs(struct vnode *devvp, struct /* * Have the inuse map filled in. */ - if ((error = fillinusemap(pmp)) != 0) + MSDOSFS_LOCK_MP(pmp); + error = fillinusemap(pmp); + MSDOSFS_UNLOCK_MP(pmp); + if (error != 0) goto error_exit; /* From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:15:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C21691065675; Sun, 28 Feb 2010 17:15:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B26578FC16; Sun, 28 Feb 2010 17:15:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SHFjAv041410; Sun, 28 Feb 2010 17:15:45 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SHFj4h041408; Sun, 28 Feb 2010 17:15:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281715.o1SHFj4h041408@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204472 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:15:45 -0000 Author: kib Date: Sun Feb 28 17:15:45 2010 New Revision: 204472 URL: http://svn.freebsd.org/changeset/base/204472 Log: Add assertions for FAT bitmap state. Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_fat.c Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 28 17:13:59 2010 (r204471) +++ head/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 28 17:15:45 2010 (r204472) @@ -413,7 +413,12 @@ usemap_alloc(pmp, cn) { MSDOSFS_ASSERT_MP_LOCKED(pmp); + + KASSERT((pmp->pm_inusemap[cn / N_INUSEBITS] & (1 << (cn % N_INUSEBITS))) + == 0, ("Allocating used sector %ld %ld %x", cn, cn % N_INUSEBITS, + (unsigned)pmp->pm_inusemap[cn / N_INUSEBITS])); pmp->pm_inusemap[cn / N_INUSEBITS] |= 1 << (cn % N_INUSEBITS); + KASSERT(pmp->pm_freeclustercount > 0, ("usemap_alloc: too little")); pmp->pm_freeclustercount--; } @@ -425,6 +430,9 @@ usemap_free(pmp, cn) MSDOSFS_ASSERT_MP_LOCKED(pmp); pmp->pm_freeclustercount++; + KASSERT((pmp->pm_inusemap[cn / N_INUSEBITS] & (1 << (cn % N_INUSEBITS))) + != 0, ("Freeing unused sector %ld %ld %x", cn, cn % N_INUSEBITS, + (unsigned)pmp->pm_inusemap[cn / N_INUSEBITS])); pmp->pm_inusemap[cn / N_INUSEBITS] &= ~(1 << (cn % N_INUSEBITS)); } From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:16:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0573E1065670; Sun, 28 Feb 2010 17:16:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF65C8FC25; Sun, 28 Feb 2010 17:16:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SHGh27041644; Sun, 28 Feb 2010 17:16:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SHGhiU041642; Sun, 28 Feb 2010 17:16:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281716.o1SHGhiU041642@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204473 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:16:44 -0000 Author: kib Date: Sun Feb 28 17:16:43 2010 New Revision: 204473 URL: http://svn.freebsd.org/changeset/base/204473 Log: Use pm_fatlock to protect per-filesystem rb tree used to allocate fileno on the large FAT volumes. Previously, a single global mutex was used. Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_fileno.c Modified: head/sys/fs/msdosfs/msdosfs_fileno.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fileno.c Sun Feb 28 17:15:45 2010 (r204472) +++ head/sys/fs/msdosfs/msdosfs_fileno.c Sun Feb 28 17:16:43 2010 (r204473) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -59,9 +58,6 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_MSDOSFSFILENO, "msdosfs_fileno", "MSDOSFS fileno mapping node"); -static struct mtx fileno_mtx; -MTX_SYSINIT(fileno, &fileno_mtx, "MSDOSFS fileno", MTX_DEF); - RB_PROTOTYPE(msdosfs_filenotree, msdosfs_fileno, mf_tree, msdosfs_fileno_compare) @@ -117,30 +113,30 @@ msdosfs_fileno_map(mp, fileno) } if (fileno < FILENO_FIRST_DYN) return ((uint32_t)fileno); - mtx_lock(&fileno_mtx); + MSDOSFS_LOCK_MP(pmp); key.mf_fileno64 = fileno; mf = RB_FIND(msdosfs_filenotree, &pmp->pm_filenos, &key); if (mf != NULL) { mapped = mf->mf_fileno32; - mtx_unlock(&fileno_mtx); + MSDOSFS_UNLOCK_MP(pmp); return (mapped); } if (pmp->pm_nfileno < FILENO_FIRST_DYN) panic("msdosfs_fileno_map: wraparound"); - mtx_unlock(&fileno_mtx); + MSDOSFS_UNLOCK_MP(pmp); mf = malloc(sizeof(*mf), M_MSDOSFSFILENO, M_WAITOK); - mtx_lock(&fileno_mtx); + MSDOSFS_LOCK_MP(pmp); tmf = RB_FIND(msdosfs_filenotree, &pmp->pm_filenos, &key); if (tmf != NULL) { mapped = tmf->mf_fileno32; - mtx_unlock(&fileno_mtx); + MSDOSFS_UNLOCK_MP(pmp); free(mf, M_MSDOSFSFILENO); return (mapped); } mf->mf_fileno64 = fileno; mapped = mf->mf_fileno32 = pmp->pm_nfileno++; RB_INSERT(msdosfs_filenotree, &pmp->pm_filenos, mf); - mtx_unlock(&fileno_mtx); + MSDOSFS_UNLOCK_MP(pmp); return (mapped); } From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:17:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D4481065674; Sun, 28 Feb 2010 17:17:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CFB08FC29; Sun, 28 Feb 2010 17:17:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SHHTpm041849; Sun, 28 Feb 2010 17:17:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SHHTmY041847; Sun, 28 Feb 2010 17:17:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281717.o1SHHTmY041847@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204474 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:17:29 -0000 Author: kib Date: Sun Feb 28 17:17:29 2010 New Revision: 204474 URL: http://svn.freebsd.org/changeset/base/204474 Log: Fix the race between dotdot lookup and forced unmount, by using msdosfs-specific variant of vn_vget_ino(), msdosfs_deget_dotdot(). As was done for UFS, relookup the dotdot denode after the call to msdosfs_deget_dotdot(), because vnode lock is dropped and directory might be moved. Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_lookup.c Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Sun Feb 28 17:16:43 2010 (r204473) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Sun Feb 28 17:17:29 2010 (r204474) @@ -61,6 +61,18 @@ #include #include +static int msdosfs_lookup_(struct vnode *vdp, struct vnode **vpp, + struct componentname *cnp, u_int64_t *inum); +static int msdosfs_deget_dotdot(struct vnode *vp, u_long cluster, int blkoff, + struct vnode **rvp); + +int +msdosfs_lookup(struct vop_cachedlookup_args *ap) +{ + + return (msdosfs_lookup_(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); +} + /* * When we search a directory the blocks containing directory entries are * read and examined. The directory entries contain information that would @@ -76,18 +88,11 @@ * out to disk. This way disk blocks containing directory entries and in * memory denode's will be in synch. */ -int -msdosfs_lookup(ap) - struct vop_cachedlookup_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - } */ *ap; +static int +msdosfs_lookup_(struct vnode *vdp, struct vnode **vpp, + struct componentname *cnp, u_int64_t *dd_inum) { struct mbnambuf nb; - struct vnode *vdp = ap->a_dvp; - struct vnode **vpp = ap->a_vpp; - struct componentname *cnp = ap->a_cnp; daddr_t bn; int error; int slotcount; @@ -109,6 +114,7 @@ msdosfs_lookup(ap) int flags = cnp->cn_flags; int nameiop = cnp->cn_nameiop; int unlen; + u_int64_t inode1; int wincnt = 1; int chksum = -1, chksum_ok; @@ -119,12 +125,14 @@ msdosfs_lookup(ap) #endif dp = VTODE(vdp); pmp = dp->de_pmp; - *vpp = NULL; + if (vpp != NULL) + *vpp = NULL; #ifdef MSDOSFS_DEBUG printf("msdosfs_lookup(): vdp %p, dp %p, Attr %02x\n", vdp, dp, dp->de_Attributes); #endif + restart: /* * If they are going after the . or .. entry in the root directory, * they won't find it. DOS filesystems don't have them in the root @@ -436,6 +444,11 @@ foundroot: if (FAT32(pmp) && scn == MSDOSFSROOT) scn = pmp->pm_rootdirblk; + if (dd_inum != NULL) { + *dd_inum = (uint64_t)pmp->pm_bpcluster * scn + blkoff; + return (0); + } + /* * If deleting, and at end of pathname, return * parameters which can be used to remove file. @@ -508,23 +521,25 @@ foundroot: * inodes from the root, moving down the directory tree. Thus * when following backward pointers ".." we must unlock the * parent directory before getting the requested directory. - * There is a potential race condition here if both the current - * and parent directories are removed before the VFS_VGET for the - * inode associated with ".." returns. We hope that this occurs - * infrequently since we cannot avoid this race condition without - * implementing a sophisticated deadlock detection algorithm. - * Note also that this simple deadlock detection scheme will not - * work if the filesystem has any hard links other than ".." - * that point backwards in the directory structure. */ pdp = vdp; if (flags & ISDOTDOT) { - VOP_UNLOCK(pdp, 0); - error = deget(pmp, cluster, blkoff, &tdp); - vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY); + error = msdosfs_deget_dotdot(pdp, cluster, blkoff, vpp); if (error) return (error); - *vpp = DETOV(tdp); + /* + * Recheck that ".." still points to the inode we + * looked up before pdp lock was dropped. + */ + error = msdosfs_lookup_(pdp, NULL, cnp, &inode1); + if (error) { + vput(*vpp); + return (error); + } + if (VTODE(*vpp)->de_inode != inode1) { + vput(*vpp); + goto restart; + } } else if (dp->de_StartCluster == scn && isadir) { VREF(vdp); /* we want ourself, ie "." */ *vpp = vdp; @@ -542,6 +557,49 @@ foundroot: return (0); } +static int +msdosfs_deget_dotdot(struct vnode *vp, u_long cluster, int blkoff, + struct vnode **rvp) +{ + struct mount *mp; + struct msdosfsmount *pmp; + struct denode *rdp; + int ltype, error; + + mp = vp->v_mount; + pmp = VFSTOMSDOSFS(mp); + ltype = VOP_ISLOCKED(vp); + KASSERT(ltype == LK_EXCLUSIVE || ltype == LK_SHARED, + ("msdosfs_deget_dotdot: vp not locked")); + + error = vfs_busy(mp, MBF_NOWAIT); + if (error != 0) { + vfs_ref(mp); + VOP_UNLOCK(vp, 0); + error = vfs_busy(mp, 0); + vn_lock(vp, ltype | LK_RETRY); + vfs_rel(mp); + if (error != 0) + return (ENOENT); + if (vp->v_iflag & VI_DOOMED) { + vfs_unbusy(mp); + return (ENOENT); + } + } + VOP_UNLOCK(vp, 0); + error = deget(pmp, cluster, blkoff, &rdp); + vfs_unbusy(mp); + if (error == 0) + *rvp = DETOV(rdp); + vn_lock(vp, ltype | LK_RETRY); + if (vp->v_iflag & VI_DOOMED) { + if (error == 0) + vput(*rvp); + error = ENOENT; + } + return (error); +} + /* * dep - directory entry to copy into the directory * ddep - directory to add to From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 17:19:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6019106566B; Sun, 28 Feb 2010 17:19:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C68768FC2A; Sun, 28 Feb 2010 17:19:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SHJM9d042304; Sun, 28 Feb 2010 17:19:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SHJM6u042302; Sun, 28 Feb 2010 17:19:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002281719.o1SHJM6u042302@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Feb 2010 17:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204475 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:19:22 -0000 Author: kib Date: Sun Feb 28 17:19:22 2010 New Revision: 204475 URL: http://svn.freebsd.org/changeset/base/204475 Log: Mark msdosfs as mpsafe. Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Feb 28 17:17:29 2010 (r204474) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Feb 28 17:19:22 2010 (r204475) @@ -752,6 +752,7 @@ mountmsdosfs(struct vnode *devvp, struct mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; + mp->mnt_kern_flag |= MNTK_MPSAFE; MNT_IUNLOCK(mp); if (pmp->pm_flags & MSDOSFS_LARGEFS) From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 18:00:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5A921065672; Sun, 28 Feb 2010 18:00:20 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f191.google.com (mail-iw0-f191.google.com [209.85.223.191]) by mx1.freebsd.org (Postfix) with ESMTP id 7F3748FC19; Sun, 28 Feb 2010 18:00:20 +0000 (UTC) Received: by iwn29 with SMTP id 29so1032094iwn.27 for ; Sun, 28 Feb 2010 10:00:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=R8aTXVe5DYvvn+KEc9x59dm42tCKG4husQgxbIatDW8=; b=aDxYxh+W6zK8FaqHb0DkSdyFNYjbleSeFVQToOluhgzseurHDaki8mdApRZ7DqiPB4 rliCSIlj8CjtN4RwG+uuEUExrzMKyTDqjFcgC8+wanGzyL+gGNijkKdT3JdpOXXkjfiG uIpXrsSAoLRoeUmXwJ1S83Msb9Z+v9EHC+y6k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=sup/8lApLumxShqVIqkV7TNMeRA+y779zYhKtHwAlE1xcpPhUQl/iq5XmEw+DFR+lQ Rfr+hcrrQJH0hV5x7i7G9FVhQbktkXsrPBj3vMwAiJ8LHNs3fuitimhNnFP0tekAq6gP g9xLrvRvqPVLCwQ+e+F+I4CRSPKG0iPXv7juM= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.150.2 with SMTP id w2mr115236ibv.90.1267380010691; Sun, 28 Feb 2010 10:00:10 -0800 (PST) In-Reply-To: <201002281713.o1SHD74Q040738@svn.freebsd.org> References: <201002281713.o1SHD74Q040738@svn.freebsd.org> Date: Sun, 28 Feb 2010 19:00:10 +0100 X-Google-Sender-Auth: 0afa604f6f95341d Message-ID: <3bbf2fe11002281000i5a6ebb35seadd6cb8f506d65e@mail.gmail.com> From: Attilio Rao To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204470 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 18:00:21 -0000 2010/2/28 Konstantin Belousov : > Author: kib > Date: Sun Feb 28 17:13:07 2010 > New Revision: 204470 > URL: http://svn.freebsd.org/changeset/base/204470 > > Log: > =C2=A0Add per-mountpoint lockmgr lock for msdosfs. It is intended to be u= sed > =C2=A0as fat bitmap lock and to replace global mutex protecting fileno rb= tree. Looking at this patch, it seems you can safely use a sx lock here and I would prefer that as we don't want to encourage more lockmgr to get in. If you are concerned about writer starvation in any way here, probabilly the right solution is to implement it in sx and remove lockmgr also from the export code. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 18:06:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08B22106566C; Sun, 28 Feb 2010 18:06:55 +0000 (UTC) (envelope-from ticso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC4098FC1E; Sun, 28 Feb 2010 18:06:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SI6sqY052706; Sun, 28 Feb 2010 18:06:54 GMT (envelope-from ticso@svn.freebsd.org) Received: (from ticso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SI6sGl052704; Sun, 28 Feb 2010 18:06:54 GMT (envelope-from ticso@svn.freebsd.org) Message-Id: <201002281806.o1SI6sGl052704@svn.freebsd.org> From: Bernd Walter Date: Sun, 28 Feb 2010 18:06:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204476 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 18:06:55 -0000 Author: ticso Date: Sun Feb 28 18:06:54 2010 New Revision: 204476 URL: http://svn.freebsd.org/changeset/base/204476 Log: simplify hash calculation Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Sun Feb 28 17:19:22 2010 (r204475) +++ head/sys/arm/at91/if_ate.c Sun Feb 28 18:06:54 2010 (r204476) @@ -384,12 +384,8 @@ static uint32_t ate_mac_hash(const uint8_t *buf) { uint32_t index = 0; - uint8_t bit; - uint8_t bitshift; for (int i = 0; i < 48; i++) { - bit = i / 6; - bitshift = i - bit * 6; - index ^= ((buf[i >> 3] >> (i & 7)) & 1) << bitshift; + index ^= ((buf[i >> 3] >> (i & 7)) & 1) << (i % 6); } return (index); } From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 18:07:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ABC5106566C; Sun, 28 Feb 2010 18:07:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 939928FC08; Sun, 28 Feb 2010 18:07:30 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o1SI7SKK089297 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 28 Feb 2010 20:07:28 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o1SI7SIR023906; Sun, 28 Feb 2010 20:07:28 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o1SI7SVB023905; Sun, 28 Feb 2010 20:07:28 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 28 Feb 2010 20:07:28 +0200 From: Kostik Belousov To: Attilio Rao Message-ID: <20100228180728.GP2489@deviant.kiev.zoral.com.ua> References: <201002281713.o1SHD74Q040738@svn.freebsd.org> <3bbf2fe11002281000i5a6ebb35seadd6cb8f506d65e@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IihjUyvzd0n5Ehsu" Content-Disposition: inline In-Reply-To: <3bbf2fe11002281000i5a6ebb35seadd6cb8f506d65e@mail.gmail.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204470 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 18:07:31 -0000 --IihjUyvzd0n5Ehsu Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 28, 2010 at 07:00:10PM +0100, Attilio Rao wrote: > 2010/2/28 Konstantin Belousov : > > Author: kib > > Date: Sun Feb 28 17:13:07 2010 > > New Revision: 204470 > > URL: http://svn.freebsd.org/changeset/base/204470 > > > > Log: > > =9AAdd per-mountpoint lockmgr lock for msdosfs. It is intended to be us= ed > > =9Aas fat bitmap lock and to replace global mutex protecting fileno rbt= ree. >=20 > Looking at this patch, it seems you can safely use a sx lock here and > I would prefer that as we don't want to encourage more lockmgr to get > in. > If you are concerned about writer starvation in any way here, > probabilly the right solution is to implement it in sx and remove > lockmgr also from the export code. There is no write starvation in the msdosfs case, because all locks are acquired exclusively (this is not true for the export list locking, and write starvation is real issue there). I used lockmgr mostly because it is fs code. --IihjUyvzd0n5Ehsu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuKsOAACgkQC3+MBN1Mb4g3TgCfXM3msusBi8gxeTtHkvBVoIIh hTEAnA16WubWpC+4p7q8LbtHVp8D5SFj =Pl/2 -----END PGP SIGNATURE----- --IihjUyvzd0n5Ehsu-- From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 19:04:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D56E106564A; Sun, 28 Feb 2010 19:04:38 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (lefty.soaustin.net [66.135.55.46]) by mx1.freebsd.org (Postfix) with ESMTP id ED2FF8FC14; Sun, 28 Feb 2010 19:04:37 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id 47CB88C065; Sun, 28 Feb 2010 13:04:37 -0600 (CST) Date: Sun, 28 Feb 2010 13:04:37 -0600 From: Mark Linimon To: Konstantin Belousov Message-ID: <20100228190437.GA31516@lonesome.com> References: <201002281719.o1SHJM6u042302@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002281719.o1SHJM6u042302@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204475 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 19:04:38 -0000 On Sun, Feb 28, 2010 at 05:19:22PM +0000, Konstantin Belousov wrote: > Mark msdosfs as mpsafe. wow, excellent work. mcl From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 19:50:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B62A106564A; Sun, 28 Feb 2010 19:50:58 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail16.syd.optusnet.com.au (mail16.syd.optusnet.com.au [211.29.132.197]) by mx1.freebsd.org (Postfix) with ESMTP id 783108FC18; Sun, 28 Feb 2010 19:50:57 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-253-149.belrs3.nsw.optusnet.com.au [122.106.253.149]) by mail16.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o1SJon6H031851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Mar 2010 06:50:50 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o1SJohUA068479; Mon, 1 Mar 2010 06:50:43 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o1SJog5I068478; Mon, 1 Mar 2010 06:50:42 +1100 (EST) (envelope-from peter) Date: Mon, 1 Mar 2010 06:50:42 +1100 From: Peter Jeremy To: Attilio Rao Message-ID: <20100228195041.GA68446@server.vk2pj.dyndns.org> References: <3bbf2fe11002251548y773c661gd4946f371bcbbd6f@mail.gmail.com> <3bbf2fe11002251732t35179d9ar3c3f39aafe75d5c2@mail.gmail.com> <20100225.185653.364718154403387259.imp@bsdimp.com> <20100226104936.GD2489@deviant.kiev.zoral.com.ua> <20100226132854.GA25722@sandvine.com> <3bbf2fe11002260557y484cf13bq76f7507c07ed3ebc@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <3bbf2fe11002260557y484cf13bq76f7507c07ed3ebc@mail.gmail.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: src-committers@freebsd.org, delphij@gmail.com, svn-src-all@freebsd.org, Kostik Belousov , svn-src-head@freebsd.org, Ed Maste , "M. Warner Losh" Subject: Re: svn commit: r204309 - in head/sys: amd64/amd64 amd64/isa conf i386/bios i386/cpufreq i386/i386 i386/isa i386/xen isa modules/bios/smbios modules/bios/vpd modules/cpufreq pc98/pc98 x86 x86/bios x86/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 19:50:58 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Feb-26 14:57:36 +0100, Attilio Rao wrote: >For the future, however, probabilly we would need to do something like >pc98 already does wrt i386 (i386/include/ pc98/include/ amd64/include/ >just have files wrappers to the generic one under x86/include/ when >necessary). Not that something like this is also critical for getting i386/amd64 cross compilation to work - one of the blocking issues is that the correct machine/ includes are not available in cross-compilatio mode. --=20 Peter Jeremy --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkuKyREACgkQ/opHv/APuIcUNQCdFkuR0cSY9YqkrOXNXfxx6LpQ u88An1wHDZ/DDtgzBZnXbzqFmqXmz9Nx =w4jL -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 20:31:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DE1F106566C; Sun, 28 Feb 2010 20:31:37 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 7F4478FC1C; Sun, 28 Feb 2010 20:31:36 +0000 (UTC) Received: by ewy26 with SMTP id 26so955471ewy.3 for ; Sun, 28 Feb 2010 12:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=+DDJc7mEe/1R9VE5AulwsarOGHtwK+Ahn3Cx8wOdq8M=; b=j/l2Q+B+3Y+HrB5i4ug5LhtxqkAHtg8OP8m8+zccACO1J3H54tQKlpCbfZvoCsc9f/ jvL7E/neXyP/SoUpZv77Z1kwXcE31yvtpBsKVTgqiP6PT93pR9SXO6aME9TpNQsBGb+x VFSDryKQOsPmas8mQegDGSLX4OInMGOOSh5xY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=sEQ60i/Qv0WzAhRf+ObzbLVNenymgVhsVIsizIZ9ohFiXOeQmX2+XYpYt0Ep4VPwJm zzkg08+mKtuFCqYVwXFY3eEVw7HSdbfIxklsIdIBcE/n6e+33/RPJq1ynQ9jAfqvjbdm 6GiQin/85D8aSBEov+Awcli7C9gZKtAlmryvQ= Received: by 10.213.2.75 with SMTP id 11mr2455194ebi.14.1267387548952; Sun, 28 Feb 2010 12:05:48 -0800 (PST) Received: from ?10.0.1.13? (c80-216-186-179.bredband.comhem.se [80.216.186.179]) by mx.google.com with ESMTPS id 7sm8181889eyg.40.2010.02.28.12.05.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Feb 2010 12:05:48 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Pawel Worach In-Reply-To: <201002281441.o1SEfS2u007142@svn.freebsd.org> Date: Sun, 28 Feb 2010 21:05:46 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <0CE7B9BD-38C9-4244-83BD-F625D673F6FD@gmail.com> References: <201002281441.o1SEfS2u007142@svn.freebsd.org> To: Antoine Brodin X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204460 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 20:31:37 -0000 It looks like phttpget is used by freebsd-update too. 0>pwo@one ~$ grep -ic phttpget /usr/sbin/freebsd-update 7 --=20 Pawel On Feb 28, 2010, at 15:41, Antoine Brodin wrote: > Author: antoine > Date: Sun Feb 28 14:41:28 2010 > New Revision: 204460 > URL: http://svn.freebsd.org/changeset/base/204460 >=20 > Log: > Add files to remove when MK_PORTSNAP=3Dno. >=20 > Modified: > head/tools/build/mk/OptionalObsoleteFiles.inc >=20 > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 = 14:39:39 2010 (r204459) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Feb 28 = 14:41:28 2010 (r204460) > @@ -1779,6 +1779,15 @@ OLD_FILES+=3Dusr/share/man/man1/pkg_updati > OLD_FILES+=3Dusr/share/man/man1/pkg_version.1.gz > .endif >=20 > +.if ${MK_PORTSNAP} =3D=3D no > +OLD_FILES+=3Detc/portsnap.conf > +OLD_FILES+=3Dusr/libexec/make_index > +OLD_FILES+=3Dusr/libexec/phttpget > +OLD_FILES+=3Dusr/sbin/portsnap > +OLD_FILES+=3Dusr/share/examples/etc/portsnap.conf > +OLD_FILES+=3Dusr/share/man/man8/portsnap.8.gz > +.endif > + > .if ${MK_PROFILE} =3D=3D no > OLD_FILES+=3Dusr/lib/libalias_cuseeme_p.a > OLD_FILES+=3Dusr/lib/libalias_dummy_p.a > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 21:57:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA7FF1065670; Sun, 28 Feb 2010 21:57:35 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8DA18FC08; Sun, 28 Feb 2010 21:57:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SLvZfL004436; Sun, 28 Feb 2010 21:57:35 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SLvZkK004435; Sun, 28 Feb 2010 21:57:35 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201002282157.o1SLvZkK004435@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 28 Feb 2010 21:57:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204488 - in head: contrib/dtc contrib/dtc/tests sys/contrib/libfdt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 21:57:35 -0000 Author: raj Date: Sun Feb 28 21:57:35 2010 New Revision: 204488 URL: http://svn.freebsd.org/changeset/base/204488 Log: Merge DTC-d75b33af. This is a split merge because of non-uniform licensing of the DTC package contents and the way these components will be used in the FreeBSD environment. The original DTC package is composed of the following two major pieces: 1. sys/contrib/libfdt (BSD [dual] license) 2. contrib/dtc (GPLv2) The libfdt component is going to be shared in all aspects of the environment: - /boot/loader - kernel - dtc (the device tree compiler proper, userspace tool) Added: head/contrib/dtc/ - copied from r204434, vendor/dtc/dist/ head/sys/contrib/libfdt/ - copied from r204434, vendor/dtc/dist/libfdt/ Deleted: head/contrib/dtc/Makefile.dtc head/contrib/dtc/tests/ head/sys/contrib/libfdt/Makefile.libfdt head/sys/contrib/libfdt/TODO head/sys/contrib/libfdt/version.lds From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 21:59:30 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4352C106564A; Sun, 28 Feb 2010 21:59:30 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id F1C9C8FC13; Sun, 28 Feb 2010 21:59:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1SLqkgY036886; Sun, 28 Feb 2010 14:52:46 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 28 Feb 2010 14:53:00 -0700 (MST) Message-Id: <20100228.145300.29649867912530.imp@bsdimp.com> To: peterjeremy@acm.org From: "M. Warner Losh" In-Reply-To: <20100228195041.GA68446@server.vk2pj.dyndns.org> References: <20100226132854.GA25722@sandvine.com> <3bbf2fe11002260557y484cf13bq76f7507c07ed3ebc@mail.gmail.com> <20100228195041.GA68446@server.vk2pj.dyndns.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, delphij@gmail.com, svn-src-all@FreeBSD.org, attilio@FreeBSD.org, kostikbel@gmail.com, svn-src-head@FreeBSD.org, emaste@FreeBSD.org Subject: Re: svn commit: r204309 - in head/sys: amd64/amd64 amd64/isa conf i386/bios i386/cpufreq i386/i386 i386/isa i386/xen isa modules/bios/smbios modules/bios/vpd modules/cpufreq pc98/pc98 x86 x86/bios x86/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 21:59:30 -0000 In message: <20100228195041.GA68446@server.vk2pj.dyndns.org> Peter Jeremy writes: : On 2010-Feb-26 14:57:36 +0100, Attilio Rao wrote: : >For the future, however, probabilly we would need to do something like : >pc98 already does wrt i386 (i386/include/ pc98/include/ amd64/include/ : >just have files wrappers to the generic one under x86/include/ when : >necessary). : : Not that something like this is also critical for getting i386/amd64 : cross compilation to work - one of the blocking issues is that the : correct machine/ includes are not available in cross-compilatio mode. Huh? I cross build all the time, and the machine/ includes are always right, with or without this patch. Maybe you could explain what you mean here... The issue is that old code has #include or whatever in it, and we need to have an i386/isa.h that's just #include Warner From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 22:06:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F868106566C; Sun, 28 Feb 2010 22:06:07 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EC358FC0C; Sun, 28 Feb 2010 22:06:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SM67QO006370; Sun, 28 Feb 2010 22:06:07 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SM67Zm006367; Sun, 28 Feb 2010 22:06:07 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201002282206.o1SM67Zm006367@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 28 Feb 2010 22:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204489 - head/contrib/dtc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 22:06:07 -0000 Author: raj Date: Sun Feb 28 22:06:07 2010 New Revision: 204489 URL: http://svn.freebsd.org/changeset/base/204489 Log: Let dtc build with FreeBSD yacc/lex. Sponsored by: The FreeBSD Foundation Modified: head/contrib/dtc/dtc-lexer.l head/contrib/dtc/dtc-parser.y Modified: head/contrib/dtc/dtc-lexer.l ============================================================================== --- head/contrib/dtc/dtc-lexer.l Sun Feb 28 21:57:35 2010 (r204488) +++ head/contrib/dtc/dtc-lexer.l Sun Feb 28 22:06:07 2010 (r204489) @@ -38,6 +38,8 @@ LINECOMMENT "//".*\n #include "srcpos.h" #include "dtc-parser.tab.h" +YYLTYPE yylloc; + #define YY_USER_ACTION \ { \ yylloc.file = srcpos_file; \ Modified: head/contrib/dtc/dtc-parser.y ============================================================================== --- head/contrib/dtc/dtc-parser.y Sun Feb 28 21:57:35 2010 (r204488) +++ head/contrib/dtc/dtc-parser.y Sun Feb 28 22:06:07 2010 (r204489) @@ -18,7 +18,6 @@ * USA */ -%locations %{ #include @@ -26,6 +25,8 @@ #include "dtc.h" #include "srcpos.h" +YYLTYPE yylloc; + extern int yylex(void); extern void yyerror(char const *s); From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 22:09:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17C1F106564A; Sun, 28 Feb 2010 22:09:10 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E08F38FC1A; Sun, 28 Feb 2010 22:09:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SM99YC007059; Sun, 28 Feb 2010 22:09:09 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SM996u007058; Sun, 28 Feb 2010 22:09:09 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201002282209.o1SM996u007058@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 28 Feb 2010 22:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204490 - head/gnu/usr.bin/dtc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 22:09:10 -0000 Author: raj Date: Sun Feb 28 22:09:09 2010 New Revision: 204490 URL: http://svn.freebsd.org/changeset/base/204490 Log: Provide BSD-style Makefile for the device tree compiler (dtc). Note it is not connected to the build hierarchy yet. Sponsored by: The FreeBSD Foundation Added: head/gnu/usr.bin/dtc/ head/gnu/usr.bin/dtc/Makefile (contents, props changed) Added: head/gnu/usr.bin/dtc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/dtc/Makefile Sun Feb 28 22:09:09 2010 (r204490) @@ -0,0 +1,51 @@ +# $FreeBSD$ + +.include + +DTCDIR= ${.CURDIR}/../../../contrib/dtc +LIBFDTDIR= ${.CURDIR}/../../../sys/contrib/libfdt +.PATH: ${DTCDIR} ${LIBFDTDIR} ${DTCDIR}/tests + +PROG= dtc + +SRCS= dtc.c checks.c fstree.c livetree.c treesource.c data.c \ + flattree.c srcpos.c util.c \ + fdt.c fdt_ro.c fdt_rw.c fdt_strerror.c \ + fdt_sw.c fdt_wip.c $(DTCDIR)/version_gen.h + +CFLAGS = -Wall -g -Os -fPIC -Wpointer-arith -Wcast-qual +CFLAGS+= -I. -I${.CURDIR} -I${DTCDIR} -I${LIBFDTDIR} + +VERSIONMAJ!= awk '/^VERSION =/ { print $$3 }' $(DTCDIR)/Makefile +VERSIONMIN!= awk '/^PATCHLEVEL =/ { print $$3 }' $(DTCDIR)/Makefile +VERSIONSUB!= awk '/^SUBLEVEL =/ { print $$3 }' $(DTCDIR)/Makefile +VERSIONEXTRA!= $(DTCDIR)/scripts/setlocalversion + +DTCVERSION:= ${VERSIONMAJ}.${VERSIONMIN}.${VERSIONSUB}${VERSIONEXTRA} +DTCVERSIONFILE:= $(DTCDIR)/version_gen.h + +MAN= + +BISON= yacc +LEX= lex + +OBJS+= dtc-parser.tab.o dtc-lexer.lex.o + +CLEANFILES+= dtc-parser.tab.o dtc-lexer.lex.o dtc-parser.tab.c \ + dtc-parser.tab.h dtc-lexer.lex.c ${DTCVERSIONFILE} + +$(DTCVERSIONFILE): + @echo '#define DTC_VERSION "DTC ${DTCVERSION}"' > ${DTCVERSIONFILE} + +dtc-parser.tab.o: dtc-parser.tab.c dtc-parser.tab.h +dtc-lexer.lex.o: dtc-lexer.lex.c dtc-parser.tab.h + +dtc-parser.tab.c: dtc-parser.y + $(BISON) -o$@ -d $(DTCDIR)/dtc-parser.y + +dtc-parser.tab.h: dtc-parser.tab.c + +dtc-lexer.lex.c: dtc-lexer.l + $(LEX) -o$@ $(DTCDIR)/dtc-lexer.l + +.include From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 22:57:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91D9A106566B; Sun, 28 Feb 2010 22:57:13 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EDEA8FC16; Sun, 28 Feb 2010 22:57:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1SMvDoO017957; Sun, 28 Feb 2010 22:57:13 GMT (envelope-from jasone@svn.freebsd.org) Received: (from jasone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1SMvDRe017954; Sun, 28 Feb 2010 22:57:13 GMT (envelope-from jasone@svn.freebsd.org) Message-Id: <201002282257.o1SMvDRe017954@svn.freebsd.org> From: Jason Evans Date: Sun, 28 Feb 2010 22:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204493 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 22:57:13 -0000 Author: jasone Date: Sun Feb 28 22:57:13 2010 New Revision: 204493 URL: http://svn.freebsd.org/changeset/base/204493 Log: Rewrite red-black trees to do lazy balance fixup. This improves insert/remove speed by ~30%. Modified: head/lib/libc/stdlib/malloc.c head/lib/libc/stdlib/rb.h Modified: head/lib/libc/stdlib/malloc.c ============================================================================== --- head/lib/libc/stdlib/malloc.c Sun Feb 28 22:33:53 2010 (r204492) +++ head/lib/libc/stdlib/malloc.c Sun Feb 28 22:57:13 2010 (r204493) @@ -194,6 +194,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" +#define RB_COMPACT #include "rb.h" #if (defined(MALLOC_TCACHE) && defined(MALLOC_STATS)) #include "qr.h" @@ -1746,7 +1747,7 @@ extent_szad_comp(extent_node_t *a, exten } /* Wrap red-black tree macros in functions. */ -rb_wrap(__unused static, extent_tree_szad_, extent_tree_t, extent_node_t, +rb_gen(__unused static, extent_tree_szad_, extent_tree_t, extent_node_t, link_szad, extent_szad_comp) #endif @@ -1760,7 +1761,7 @@ extent_ad_comp(extent_node_t *a, extent_ } /* Wrap red-black tree macros in functions. */ -rb_wrap(__unused static, extent_tree_ad_, extent_tree_t, extent_node_t, link_ad, +rb_gen(__unused static, extent_tree_ad_, extent_tree_t, extent_node_t, link_ad, extent_ad_comp) /* @@ -2346,7 +2347,7 @@ arena_chunk_comp(arena_chunk_t *a, arena } /* Wrap red-black tree macros in functions. */ -rb_wrap(__unused static, arena_chunk_tree_dirty_, arena_chunk_tree_t, +rb_gen(__unused static, arena_chunk_tree_dirty_, arena_chunk_tree_t, arena_chunk_t, link_dirty, arena_chunk_comp) static inline int @@ -2362,7 +2363,7 @@ arena_run_comp(arena_chunk_map_t *a, are } /* Wrap red-black tree macros in functions. */ -rb_wrap(__unused static, arena_run_tree_, arena_run_tree_t, arena_chunk_map_t, +rb_gen(__unused static, arena_run_tree_, arena_run_tree_t, arena_chunk_map_t, link, arena_run_comp) static inline int @@ -2394,7 +2395,7 @@ arena_avail_comp(arena_chunk_map_t *a, a } /* Wrap red-black tree macros in functions. */ -rb_wrap(__unused static, arena_avail_tree_, arena_avail_tree_t, +rb_gen(__unused static, arena_avail_tree_, arena_avail_tree_t, arena_chunk_map_t, link, arena_avail_comp) static inline void @@ -2824,6 +2825,18 @@ arena_run_alloc(arena_t *arena, size_t s return (run); } +#ifdef MALLOC_DEBUG +static arena_chunk_t * +chunks_dirty_iter_cb(arena_chunk_tree_t *tree, arena_chunk_t *chunk, void *arg) +{ + size_t *ndirty = (size_t *)arg; + + assert(chunk->dirtied); + *ndirty += chunk->ndirty; + return (NULL); +} +#endif + static void arena_purge(arena_t *arena) { @@ -2832,11 +2845,8 @@ arena_purge(arena_t *arena) #ifdef MALLOC_DEBUG size_t ndirty = 0; - rb_foreach_begin(arena_chunk_t, link_dirty, &arena->chunks_dirty, - chunk) { - assert(chunk->dirtied); - ndirty += chunk->ndirty; - } rb_foreach_end(arena_chunk_t, link_dirty, &arena->chunks_dirty, chunk) + arena_chunk_tree_dirty_iter(&arena->chunks_dirty, NULL, + chunks_dirty_iter_cb, (void *)&ndirty); assert(ndirty == arena->ndirty); #endif assert((arena->nactive >> opt_lg_dirty_mult) < arena->ndirty); Modified: head/lib/libc/stdlib/rb.h ============================================================================== --- head/lib/libc/stdlib/rb.h Sun Feb 28 22:33:53 2010 (r204492) +++ head/lib/libc/stdlib/rb.h Sun Feb 28 22:57:13 2010 (r204493) @@ -1,6 +1,7 @@ -/****************************************************************************** +/*- + ******************************************************************************* * - * Copyright (C) 2008 Jason Evans . + * Copyright (C) 2008-2010 Jason Evans . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,40 +30,23 @@ * ****************************************************************************** * - * cpp macro implementation of left-leaning red-black trees. + * cpp macro implementation of left-leaning 2-3 red-black trees. Parent + * pointers are not used, and color bits are stored in the least significant + * bit of right-child pointers (if RB_COMPACT is defined), thus making node + * linkage as compact as is possible for red-black trees. * * Usage: * - * (Optional, see assert(3).) - * #define NDEBUG - * - * (Required.) + * #include + * #include + * #define NDEBUG // (Optional, see assert(3).) * #include + * #define RB_COMPACT // (Optional, embed color bits in right-child pointers.) * #include * ... * - * All operations are done non-recursively. Parent pointers are not used, and - * color bits are stored in the least significant bit of right-child pointers, - * thus making node linkage as compact as is possible for red-black trees. - * - * Some macros use a comparison function pointer, which is expected to have the - * following prototype: - * - * int (a_cmp *)(a_type *a_node, a_type *a_other); - * ^^^^^^ - * or a_key - * - * Interpretation of comparision function return values: - * - * -1 : a_node < a_other - * 0 : a_node == a_other - * 1 : a_node > a_other - * - * In all cases, the a_node or a_key macro argument is the first argument to the - * comparison function, which makes it possible to write comparison functions - * that treat the first argument specially. - * - ******************************************************************************/ + ******************************************************************************* + */ #ifndef RB_H_ #define RB_H_ @@ -70,12 +54,21 @@ #include __FBSDID("$FreeBSD$"); +#ifdef RB_COMPACT /* Node structure. */ #define rb_node(a_type) \ struct { \ a_type *rbn_left; \ a_type *rbn_right_red; \ } +#else +#define rb_node(a_type) \ +struct { \ + a_type *rbn_left; \ + a_type *rbn_right; \ + bool rbn_red; \ +} +#endif /* Root structure. */ #define rb_tree(a_type) \ @@ -85,863 +78,925 @@ struct { \ } /* Left accessors. */ -#define rbp_left_get(a_type, a_field, a_node) \ +#define rbtn_left_get(a_type, a_field, a_node) \ ((a_node)->a_field.rbn_left) -#define rbp_left_set(a_type, a_field, a_node, a_left) do { \ +#define rbtn_left_set(a_type, a_field, a_node, a_left) do { \ (a_node)->a_field.rbn_left = a_left; \ } while (0) +#ifdef RB_COMPACT /* Right accessors. */ -#define rbp_right_get(a_type, a_field, a_node) \ +#define rbtn_right_get(a_type, a_field, a_node) \ ((a_type *) (((intptr_t) (a_node)->a_field.rbn_right_red) \ & ((ssize_t)-2))) -#define rbp_right_set(a_type, a_field, a_node, a_right) do { \ +#define rbtn_right_set(a_type, a_field, a_node, a_right) do { \ (a_node)->a_field.rbn_right_red = (a_type *) (((uintptr_t) a_right) \ | (((uintptr_t) (a_node)->a_field.rbn_right_red) & ((size_t)1))); \ } while (0) /* Color accessors. */ -#define rbp_red_get(a_type, a_field, a_node) \ +#define rbtn_red_get(a_type, a_field, a_node) \ ((bool) (((uintptr_t) (a_node)->a_field.rbn_right_red) \ & ((size_t)1))) -#define rbp_color_set(a_type, a_field, a_node, a_red) do { \ +#define rbtn_color_set(a_type, a_field, a_node, a_red) do { \ (a_node)->a_field.rbn_right_red = (a_type *) ((((intptr_t) \ (a_node)->a_field.rbn_right_red) & ((ssize_t)-2)) \ | ((ssize_t)a_red)); \ } while (0) -#define rbp_red_set(a_type, a_field, a_node) do { \ +#define rbtn_red_set(a_type, a_field, a_node) do { \ (a_node)->a_field.rbn_right_red = (a_type *) (((uintptr_t) \ (a_node)->a_field.rbn_right_red) | ((size_t)1)); \ } while (0) -#define rbp_black_set(a_type, a_field, a_node) do { \ +#define rbtn_black_set(a_type, a_field, a_node) do { \ (a_node)->a_field.rbn_right_red = (a_type *) (((intptr_t) \ (a_node)->a_field.rbn_right_red) & ((ssize_t)-2)); \ } while (0) +#else +/* Right accessors. */ +#define rbtn_right_get(a_type, a_field, a_node) \ + ((a_node)->a_field.rbn_right) +#define rbtn_right_set(a_type, a_field, a_node, a_right) do { \ + (a_node)->a_field.rbn_right = a_right; \ +} while (0) + +/* Color accessors. */ +#define rbtn_red_get(a_type, a_field, a_node) \ + ((a_node)->a_field.rbn_red) +#define rbtn_color_set(a_type, a_field, a_node, a_red) do { \ + (a_node)->a_field.rbn_red = (a_red); \ +} while (0) +#define rbtn_red_set(a_type, a_field, a_node) do { \ + (a_node)->a_field.rbn_red = true; \ +} while (0) +#define rbtn_black_set(a_type, a_field, a_node) do { \ + (a_node)->a_field.rbn_red = false; \ +} while (0) +#endif /* Node initializer. */ -#define rbp_node_new(a_type, a_field, a_tree, a_node) do { \ - rbp_left_set(a_type, a_field, (a_node), &(a_tree)->rbt_nil); \ - rbp_right_set(a_type, a_field, (a_node), &(a_tree)->rbt_nil); \ - rbp_red_set(a_type, a_field, (a_node)); \ +#define rbt_node_new(a_type, a_field, a_rbt, a_node) do { \ + rbtn_left_set(a_type, a_field, (a_node), &(a_rbt)->rbt_nil); \ + rbtn_right_set(a_type, a_field, (a_node), &(a_rbt)->rbt_nil); \ + rbtn_red_set(a_type, a_field, (a_node)); \ } while (0) /* Tree initializer. */ -#define rb_new(a_type, a_field, a_tree) do { \ - (a_tree)->rbt_root = &(a_tree)->rbt_nil; \ - rbp_node_new(a_type, a_field, a_tree, &(a_tree)->rbt_nil); \ - rbp_black_set(a_type, a_field, &(a_tree)->rbt_nil); \ +#define rb_new(a_type, a_field, a_rbt) do { \ + (a_rbt)->rbt_root = &(a_rbt)->rbt_nil; \ + rbt_node_new(a_type, a_field, a_rbt, &(a_rbt)->rbt_nil); \ + rbtn_black_set(a_type, a_field, &(a_rbt)->rbt_nil); \ } while (0) -/* Tree operations. */ -#define rbp_black_height(a_type, a_field, a_tree, r_height) do { \ - a_type *rbp_bh_t; \ - for (rbp_bh_t = (a_tree)->rbt_root, (r_height) = 0; \ - rbp_bh_t != &(a_tree)->rbt_nil; \ - rbp_bh_t = rbp_left_get(a_type, a_field, rbp_bh_t)) { \ - if (rbp_red_get(a_type, a_field, rbp_bh_t) == false) { \ - (r_height)++; \ +/* Internal utility macros. */ +#define rbtn_first(a_type, a_field, a_rbt, a_root, r_node) do { \ + (r_node) = (a_root); \ + if ((r_node) != &(a_rbt)->rbt_nil) { \ + for (; \ + rbtn_left_get(a_type, a_field, (r_node)) != &(a_rbt)->rbt_nil;\ + (r_node) = rbtn_left_get(a_type, a_field, (r_node))) { \ } \ } \ } while (0) -#define rbp_first(a_type, a_field, a_tree, a_root, r_node) do { \ - for ((r_node) = (a_root); \ - rbp_left_get(a_type, a_field, (r_node)) != &(a_tree)->rbt_nil; \ - (r_node) = rbp_left_get(a_type, a_field, (r_node))) { \ +#define rbtn_last(a_type, a_field, a_rbt, a_root, r_node) do { \ + (r_node) = (a_root); \ + if ((r_node) != &(a_rbt)->rbt_nil) { \ + for (; rbtn_right_get(a_type, a_field, (r_node)) != \ + &(a_rbt)->rbt_nil; (r_node) = rbtn_right_get(a_type, a_field, \ + (r_node))) { \ + } \ } \ } while (0) -#define rbp_last(a_type, a_field, a_tree, a_root, r_node) do { \ - for ((r_node) = (a_root); \ - rbp_right_get(a_type, a_field, (r_node)) != &(a_tree)->rbt_nil; \ - (r_node) = rbp_right_get(a_type, a_field, (r_node))) { \ - } \ +#define rbtn_rotate_left(a_type, a_field, a_node, r_node) do { \ + (r_node) = rbtn_right_get(a_type, a_field, (a_node)); \ + rbtn_right_set(a_type, a_field, (a_node), \ + rbtn_left_get(a_type, a_field, (r_node))); \ + rbtn_left_set(a_type, a_field, (r_node), (a_node)); \ +} while (0) + +#define rbtn_rotate_right(a_type, a_field, a_node, r_node) do { \ + (r_node) = rbtn_left_get(a_type, a_field, (a_node)); \ + rbtn_left_set(a_type, a_field, (a_node), \ + rbtn_right_get(a_type, a_field, (r_node))); \ + rbtn_right_set(a_type, a_field, (r_node), (a_node)); \ } while (0) -#define rbp_next(a_type, a_field, a_cmp, a_tree, a_node, r_node) do { \ - if (rbp_right_get(a_type, a_field, (a_node)) \ - != &(a_tree)->rbt_nil) { \ - rbp_first(a_type, a_field, a_tree, rbp_right_get(a_type, \ - a_field, (a_node)), (r_node)); \ +/* + * The rb_proto() macro generates function prototypes that correspond to the + * functions generated by an equivalently parameterized call to rb_gen(). + */ + +#define rb_proto(a_attr, a_prefix, a_rbt_type, a_type) \ +a_attr void \ +a_prefix##new(a_rbt_type *rbtree); \ +a_attr a_type * \ +a_prefix##first(a_rbt_type *rbtree); \ +a_attr a_type * \ +a_prefix##last(a_rbt_type *rbtree); \ +a_attr a_type * \ +a_prefix##next(a_rbt_type *rbtree, a_type *node); \ +a_attr a_type * \ +a_prefix##prev(a_rbt_type *rbtree, a_type *node); \ +a_attr a_type * \ +a_prefix##search(a_rbt_type *rbtree, a_type *key); \ +a_attr a_type * \ +a_prefix##nsearch(a_rbt_type *rbtree, a_type *key); \ +a_attr a_type * \ +a_prefix##psearch(a_rbt_type *rbtree, a_type *key); \ +a_attr void \ +a_prefix##insert(a_rbt_type *rbtree, a_type *node); \ +a_attr void \ +a_prefix##remove(a_rbt_type *rbtree, a_type *node); \ +a_attr a_type * \ +a_prefix##iter(a_rbt_type *rbtree, a_type *start, a_type *(*cb)( \ + a_rbt_type *, a_type *, void *), void *arg); \ +a_attr a_type * \ +a_prefix##reverse_iter(a_rbt_type *rbtree, a_type *start, \ + a_type *(*cb)(a_rbt_type *, a_type *, void *), void *arg); + +/* + * The rb_gen() macro generates a type-specific red-black tree implementation, + * based on the above cpp macros. + * + * Arguments: + * + * a_attr : Function attribute for generated functions (ex: static). + * a_prefix : Prefix for generated functions (ex: extree_). + * a_rb_type : Type for red-black tree data structure (ex: extree_t). + * a_type : Type for red-black tree node data structure (ex: + * extree_node_t). + * a_field : Name of red-black tree node linkage (ex: extree_link). + * a_cmp : Node comparison function name, with the following prototype: + * int (a_cmp *)(a_type *a_node, a_type *a_other); + * ^^^^^^ + * or a_key + * Interpretation of comparision function return values: + * -1 : a_node < a_other + * 0 : a_node == a_other + * 1 : a_node > a_other + * In all cases, the a_node or a_key macro argument is the first + * argument to the comparison function, which makes it possible + * to write comparison functions that treat the first argument + * specially. + * + * Assuming the following setup: + * + * typedef struct ex_node_s ex_node_t; + * struct ex_node_s { + * rb_node(ex_node_t) ex_link; + * }; + * typedef rb(ex_node_t) ex_t; + * rb_gen(static, ex_, ex_t, ex_node_t, ex_link, ex_cmp, 1297, 1301) + * + * The following API is generated: + * + * static void + * ex_new(ex_t *extree); + * Description: Initialize a red-black tree structure. + * Args: + * extree: Pointer to an uninitialized red-black tree object. + * + * static ex_node_t * + * ex_first(ex_t *extree); + * static ex_node_t * + * ex_last(ex_t *extree); + * Description: Get the first/last node in extree. + * Args: + * extree: Pointer to an initialized red-black tree object. + * Ret: First/last node in extree, or NULL if extree is empty. + * + * static ex_node_t * + * ex_next(ex_t *extree, ex_node_t *node); + * static ex_node_t * + * ex_prev(ex_t *extree, ex_node_t *node); + * Description: Get node's successor/predecessor. + * Args: + * extree: Pointer to an initialized red-black tree object. + * node : A node in extree. + * Ret: node's successor/predecessor in extree, or NULL if node is + * last/first. + * + * static ex_node_t * + * ex_search(ex_t *extree, ex_node_t *key); + * Description: Search for node that matches key. + * Args: + * extree: Pointer to an initialized red-black tree object. + * key : Search key. + * Ret: Node in extree that matches key, or NULL if no match. + * + * static ex_node_t * + * ex_nsearch(ex_t *extree, ex_node_t *key); + * static ex_node_t * + * ex_psearch(ex_t *extree, ex_node_t *key); + * Description: Search for node that matches key. If no match is found, + * return what would be key's successor/predecessor, were + * key in extree. + * Args: + * extree: Pointer to an initialized red-black tree object. + * key : Search key. + * Ret: Node in extree that matches key, or if no match, hypothetical + * node's successor/predecessor (NULL if no successor/predecessor). + * + * static void + * ex_insert(ex_t *extree, ex_node_t *node); + * Description: Insert node into extree. + * Args: + * extree: Pointer to an initialized red-black tree object. + * node : Node to be inserted into extree. + * + * static void + * ex_remove(ex_t *extree, ex_node_t *node); + * Description: Remove node from extree. + * Args: + * extree: Pointer to an initialized red-black tree object. + * node : Node in extree to be removed. + * + * static ex_node_t * + * ex_iter(ex_t *extree, ex_node_t *start, ex_node_t *(*cb)(ex_t *, + * ex_node_t *, void *), void *arg); + * static ex_node_t * + * ex_reverse_iter(ex_t *extree, ex_node_t *start, ex_node *(*cb)(ex_t *, + * ex_node_t *, void *), void *arg); + * Description: Iterate forward/backward over extree, starting at node. + * If extree is modified, iteration must be immediately + * terminated by the callback function that causes the + * modification. + * Args: + * extree: Pointer to an initialized red-black tree object. + * start : Node at which to start iteration, or NULL to start at + * first/last node. + * cb : Callback function, which is called for each node during + * iteration. Under normal circumstances the callback function + * should return NULL, which causes iteration to continue. If a + * callback function returns non-NULL, iteration is immediately + * terminated and the non-NULL return value is returned by the + * iterator. This is useful for re-starting iteration after + * modifying extree. + * arg : Opaque pointer passed to cb(). + * Ret: NULL if iteration completed, or the non-NULL callback return value + * that caused termination of the iteration. + */ +#define rb_gen(a_attr, a_prefix, a_rbt_type, a_type, a_field, a_cmp) \ +a_attr void \ +a_prefix##new(a_rbt_type *rbtree) { \ + rb_new(a_type, a_field, rbtree); \ +} \ +a_attr a_type * \ +a_prefix##first(a_rbt_type *rbtree) { \ + a_type *ret; \ + rbtn_first(a_type, a_field, rbtree, rbtree->rbt_root, ret); \ + if (ret == &rbtree->rbt_nil) { \ + ret = NULL; \ + } \ + return (ret); \ +} \ +a_attr a_type * \ +a_prefix##last(a_rbt_type *rbtree) { \ + a_type *ret; \ + rbtn_last(a_type, a_field, rbtree, rbtree->rbt_root, ret); \ + if (ret == &rbtree->rbt_nil) { \ + ret = NULL; \ + } \ + return (ret); \ +} \ +a_attr a_type * \ +a_prefix##next(a_rbt_type *rbtree, a_type *node) { \ + a_type *ret; \ + if (rbtn_right_get(a_type, a_field, node) != &rbtree->rbt_nil) { \ + rbtn_first(a_type, a_field, rbtree, rbtn_right_get(a_type, \ + a_field, node), ret); \ } else { \ - a_type *rbp_n_t = (a_tree)->rbt_root; \ - assert(rbp_n_t != &(a_tree)->rbt_nil); \ - (r_node) = &(a_tree)->rbt_nil; \ + a_type *tnode = rbtree->rbt_root; \ + assert(tnode != &rbtree->rbt_nil); \ + ret = &rbtree->rbt_nil; \ while (true) { \ - int rbp_n_cmp = (a_cmp)((a_node), rbp_n_t); \ - if (rbp_n_cmp < 0) { \ - (r_node) = rbp_n_t; \ - rbp_n_t = rbp_left_get(a_type, a_field, rbp_n_t); \ - } else if (rbp_n_cmp > 0) { \ - rbp_n_t = rbp_right_get(a_type, a_field, rbp_n_t); \ + int cmp = (a_cmp)(node, tnode); \ + if (cmp < 0) { \ + ret = tnode; \ + tnode = rbtn_left_get(a_type, a_field, tnode); \ + } else if (cmp > 0) { \ + tnode = rbtn_right_get(a_type, a_field, tnode); \ } else { \ break; \ } \ - assert(rbp_n_t != &(a_tree)->rbt_nil); \ + assert(tnode != &rbtree->rbt_nil); \ } \ } \ -} while (0) - -#define rbp_prev(a_type, a_field, a_cmp, a_tree, a_node, r_node) do { \ - if (rbp_left_get(a_type, a_field, (a_node)) != &(a_tree)->rbt_nil) {\ - rbp_last(a_type, a_field, a_tree, rbp_left_get(a_type, \ - a_field, (a_node)), (r_node)); \ + if (ret == &rbtree->rbt_nil) { \ + ret = (NULL); \ + } \ + return (ret); \ +} \ +a_attr a_type * \ +a_prefix##prev(a_rbt_type *rbtree, a_type *node) { \ + a_type *ret; \ + if (rbtn_left_get(a_type, a_field, node) != &rbtree->rbt_nil) { \ + rbtn_last(a_type, a_field, rbtree, rbtn_left_get(a_type, \ + a_field, node), ret); \ } else { \ - a_type *rbp_p_t = (a_tree)->rbt_root; \ - assert(rbp_p_t != &(a_tree)->rbt_nil); \ - (r_node) = &(a_tree)->rbt_nil; \ + a_type *tnode = rbtree->rbt_root; \ + assert(tnode != &rbtree->rbt_nil); \ + ret = &rbtree->rbt_nil; \ while (true) { \ - int rbp_p_cmp = (a_cmp)((a_node), rbp_p_t); \ - if (rbp_p_cmp < 0) { \ - rbp_p_t = rbp_left_get(a_type, a_field, rbp_p_t); \ - } else if (rbp_p_cmp > 0) { \ - (r_node) = rbp_p_t; \ - rbp_p_t = rbp_right_get(a_type, a_field, rbp_p_t); \ + int cmp = (a_cmp)(node, tnode); \ + if (cmp < 0) { \ + tnode = rbtn_left_get(a_type, a_field, tnode); \ + } else if (cmp > 0) { \ + ret = tnode; \ + tnode = rbtn_right_get(a_type, a_field, tnode); \ } else { \ break; \ } \ - assert(rbp_p_t != &(a_tree)->rbt_nil); \ + assert(tnode != &rbtree->rbt_nil); \ } \ } \ -} while (0) - -#define rb_first(a_type, a_field, a_tree, r_node) do { \ - rbp_first(a_type, a_field, a_tree, (a_tree)->rbt_root, (r_node)); \ - if ((r_node) == &(a_tree)->rbt_nil) { \ - (r_node) = NULL; \ + if (ret == &rbtree->rbt_nil) { \ + ret = (NULL); \ } \ -} while (0) - -#define rb_last(a_type, a_field, a_tree, r_node) do { \ - rbp_last(a_type, a_field, a_tree, (a_tree)->rbt_root, r_node); \ - if ((r_node) == &(a_tree)->rbt_nil) { \ - (r_node) = NULL; \ - } \ -} while (0) - -#define rb_next(a_type, a_field, a_cmp, a_tree, a_node, r_node) do { \ - rbp_next(a_type, a_field, a_cmp, a_tree, (a_node), (r_node)); \ - if ((r_node) == &(a_tree)->rbt_nil) { \ - (r_node) = NULL; \ - } \ -} while (0) - -#define rb_prev(a_type, a_field, a_cmp, a_tree, a_node, r_node) do { \ - rbp_prev(a_type, a_field, a_cmp, a_tree, (a_node), (r_node)); \ - if ((r_node) == &(a_tree)->rbt_nil) { \ - (r_node) = NULL; \ - } \ -} while (0) - -#define rb_search(a_type, a_field, a_cmp, a_tree, a_key, r_node) do { \ - int rbp_se_cmp; \ - (r_node) = (a_tree)->rbt_root; \ - while ((r_node) != &(a_tree)->rbt_nil \ - && (rbp_se_cmp = (a_cmp)((a_key), (r_node))) != 0) { \ - if (rbp_se_cmp < 0) { \ - (r_node) = rbp_left_get(a_type, a_field, (r_node)); \ + return (ret); \ +} \ +a_attr a_type * \ +a_prefix##search(a_rbt_type *rbtree, a_type *key) { \ + a_type *ret; \ + int cmp; \ + ret = rbtree->rbt_root; \ + while (ret != &rbtree->rbt_nil \ + && (cmp = (a_cmp)(key, ret)) != 0) { \ + if (cmp < 0) { \ + ret = rbtn_left_get(a_type, a_field, ret); \ } else { \ - (r_node) = rbp_right_get(a_type, a_field, (r_node)); \ + ret = rbtn_right_get(a_type, a_field, ret); \ } \ } \ - if ((r_node) == &(a_tree)->rbt_nil) { \ - (r_node) = NULL; \ + if (ret == &rbtree->rbt_nil) { \ + ret = (NULL); \ } \ -} while (0) - -/* - * Find a match if it exists. Otherwise, find the next greater node, if one - * exists. - */ -#define rb_nsearch(a_type, a_field, a_cmp, a_tree, a_key, r_node) do { \ - a_type *rbp_ns_t = (a_tree)->rbt_root; \ - (r_node) = NULL; \ - while (rbp_ns_t != &(a_tree)->rbt_nil) { \ - int rbp_ns_cmp = (a_cmp)((a_key), rbp_ns_t); \ - if (rbp_ns_cmp < 0) { \ - (r_node) = rbp_ns_t; \ - rbp_ns_t = rbp_left_get(a_type, a_field, rbp_ns_t); \ - } else if (rbp_ns_cmp > 0) { \ - rbp_ns_t = rbp_right_get(a_type, a_field, rbp_ns_t); \ + return (ret); \ +} \ +a_attr a_type * \ +a_prefix##nsearch(a_rbt_type *rbtree, a_type *key) { \ + a_type *ret; \ + a_type *tnode = rbtree->rbt_root; \ + ret = &rbtree->rbt_nil; \ + while (tnode != &rbtree->rbt_nil) { \ + int cmp = (a_cmp)(key, tnode); \ + if (cmp < 0) { \ + ret = tnode; \ + tnode = rbtn_left_get(a_type, a_field, tnode); \ + } else if (cmp > 0) { \ + tnode = rbtn_right_get(a_type, a_field, tnode); \ } else { \ - (r_node) = rbp_ns_t; \ + ret = tnode; \ break; \ } \ } \ -} while (0) - -/* - * Find a match if it exists. Otherwise, find the previous lesser node, if one - * exists. - */ -#define rb_psearch(a_type, a_field, a_cmp, a_tree, a_key, r_node) do { \ - a_type *rbp_ps_t = (a_tree)->rbt_root; \ - (r_node) = NULL; \ - while (rbp_ps_t != &(a_tree)->rbt_nil) { \ - int rbp_ps_cmp = (a_cmp)((a_key), rbp_ps_t); \ - if (rbp_ps_cmp < 0) { \ - rbp_ps_t = rbp_left_get(a_type, a_field, rbp_ps_t); \ - } else if (rbp_ps_cmp > 0) { \ - (r_node) = rbp_ps_t; \ - rbp_ps_t = rbp_right_get(a_type, a_field, rbp_ps_t); \ + if (ret == &rbtree->rbt_nil) { \ + ret = (NULL); \ + } \ + return (ret); \ +} \ +a_attr a_type * \ +a_prefix##psearch(a_rbt_type *rbtree, a_type *key) { \ + a_type *ret; \ + a_type *tnode = rbtree->rbt_root; \ + ret = &rbtree->rbt_nil; \ + while (tnode != &rbtree->rbt_nil) { \ + int cmp = (a_cmp)(key, tnode); \ + if (cmp < 0) { \ + tnode = rbtn_left_get(a_type, a_field, tnode); \ + } else if (cmp > 0) { \ + ret = tnode; \ + tnode = rbtn_right_get(a_type, a_field, tnode); \ } else { \ - (r_node) = rbp_ps_t; \ + ret = tnode; \ break; \ } \ } \ -} while (0) - -#define rbp_rotate_left(a_type, a_field, a_node, r_node) do { \ - (r_node) = rbp_right_get(a_type, a_field, (a_node)); \ - rbp_right_set(a_type, a_field, (a_node), \ - rbp_left_get(a_type, a_field, (r_node))); \ - rbp_left_set(a_type, a_field, (r_node), (a_node)); \ -} while (0) - -#define rbp_rotate_right(a_type, a_field, a_node, r_node) do { \ - (r_node) = rbp_left_get(a_type, a_field, (a_node)); \ - rbp_left_set(a_type, a_field, (a_node), \ - rbp_right_get(a_type, a_field, (r_node))); \ - rbp_right_set(a_type, a_field, (r_node), (a_node)); \ -} while (0) - -#define rbp_lean_left(a_type, a_field, a_node, r_node) do { \ - bool rbp_ll_red; \ - rbp_rotate_left(a_type, a_field, (a_node), (r_node)); \ - rbp_ll_red = rbp_red_get(a_type, a_field, (a_node)); \ - rbp_color_set(a_type, a_field, (r_node), rbp_ll_red); \ - rbp_red_set(a_type, a_field, (a_node)); \ -} while (0) - -#define rbp_lean_right(a_type, a_field, a_node, r_node) do { \ - bool rbp_lr_red; \ - rbp_rotate_right(a_type, a_field, (a_node), (r_node)); \ - rbp_lr_red = rbp_red_get(a_type, a_field, (a_node)); \ - rbp_color_set(a_type, a_field, (r_node), rbp_lr_red); \ - rbp_red_set(a_type, a_field, (a_node)); \ -} while (0) - -#define rbp_move_red_left(a_type, a_field, a_node, r_node) do { \ - a_type *rbp_mrl_t, *rbp_mrl_u; \ - rbp_mrl_t = rbp_left_get(a_type, a_field, (a_node)); \ - rbp_red_set(a_type, a_field, rbp_mrl_t); \ - rbp_mrl_t = rbp_right_get(a_type, a_field, (a_node)); \ - rbp_mrl_u = rbp_left_get(a_type, a_field, rbp_mrl_t); \ - if (rbp_red_get(a_type, a_field, rbp_mrl_u)) { \ - rbp_rotate_right(a_type, a_field, rbp_mrl_t, rbp_mrl_u); \ - rbp_right_set(a_type, a_field, (a_node), rbp_mrl_u); \ - rbp_rotate_left(a_type, a_field, (a_node), (r_node)); \ - rbp_mrl_t = rbp_right_get(a_type, a_field, (a_node)); \ - if (rbp_red_get(a_type, a_field, rbp_mrl_t)) { \ - rbp_black_set(a_type, a_field, rbp_mrl_t); \ - rbp_red_set(a_type, a_field, (a_node)); \ - rbp_rotate_left(a_type, a_field, (a_node), rbp_mrl_t); \ - rbp_left_set(a_type, a_field, (r_node), rbp_mrl_t); \ - } else { \ - rbp_black_set(a_type, a_field, (a_node)); \ - } \ - } else { \ - rbp_red_set(a_type, a_field, (a_node)); \ - rbp_rotate_left(a_type, a_field, (a_node), (r_node)); \ + if (ret == &rbtree->rbt_nil) { \ + ret = (NULL); \ } \ -} while (0) - -#define rbp_move_red_right(a_type, a_field, a_node, r_node) do { \ - a_type *rbp_mrr_t; \ - rbp_mrr_t = rbp_left_get(a_type, a_field, (a_node)); \ - if (rbp_red_get(a_type, a_field, rbp_mrr_t)) { \ - a_type *rbp_mrr_u, *rbp_mrr_v; \ - rbp_mrr_u = rbp_right_get(a_type, a_field, rbp_mrr_t); \ - rbp_mrr_v = rbp_left_get(a_type, a_field, rbp_mrr_u); \ - if (rbp_red_get(a_type, a_field, rbp_mrr_v)) { \ - rbp_color_set(a_type, a_field, rbp_mrr_u, \ - rbp_red_get(a_type, a_field, (a_node))); \ - rbp_black_set(a_type, a_field, rbp_mrr_v); \ - rbp_rotate_left(a_type, a_field, rbp_mrr_t, rbp_mrr_u); \ - rbp_left_set(a_type, a_field, (a_node), rbp_mrr_u); \ - rbp_rotate_right(a_type, a_field, (a_node), (r_node)); \ - rbp_rotate_left(a_type, a_field, (a_node), rbp_mrr_t); \ - rbp_right_set(a_type, a_field, (r_node), rbp_mrr_t); \ - } else { \ - rbp_color_set(a_type, a_field, rbp_mrr_t, \ - rbp_red_get(a_type, a_field, (a_node))); \ - rbp_red_set(a_type, a_field, rbp_mrr_u); \ - rbp_rotate_right(a_type, a_field, (a_node), (r_node)); \ - rbp_rotate_left(a_type, a_field, (a_node), rbp_mrr_t); \ - rbp_right_set(a_type, a_field, (r_node), rbp_mrr_t); \ - } \ - rbp_red_set(a_type, a_field, (a_node)); \ - } else { \ - rbp_red_set(a_type, a_field, rbp_mrr_t); \ - rbp_mrr_t = rbp_left_get(a_type, a_field, rbp_mrr_t); \ - if (rbp_red_get(a_type, a_field, rbp_mrr_t)) { \ - rbp_black_set(a_type, a_field, rbp_mrr_t); \ - rbp_rotate_right(a_type, a_field, (a_node), (r_node)); \ - rbp_rotate_left(a_type, a_field, (a_node), rbp_mrr_t); \ - rbp_right_set(a_type, a_field, (r_node), rbp_mrr_t); \ + return (ret); \ +} \ +a_attr void \ +a_prefix##insert(a_rbt_type *rbtree, a_type *node) { \ + struct { \ + a_type *node; \ + int cmp; \ + } path[sizeof(void *) << 4], *pathp; \ + rbt_node_new(a_type, a_field, rbtree, node); \ + /* Wind. */ \ + path->node = rbtree->rbt_root; \ + for (pathp = path; pathp->node != &rbtree->rbt_nil; pathp++) { \ + int cmp = pathp->cmp = a_cmp(node, pathp->node); \ + assert(cmp != 0); \ + if (cmp < 0) { \ + pathp[1].node = rbtn_left_get(a_type, a_field, \ + pathp->node); \ } else { \ - rbp_rotate_left(a_type, a_field, (a_node), (r_node)); \ + pathp[1].node = rbtn_right_get(a_type, a_field, \ + pathp->node); \ } \ } \ -} while (0) - -#define rb_insert(a_type, a_field, a_cmp, a_tree, a_node) do { \ - a_type rbp_i_s; \ - a_type *rbp_i_g, *rbp_i_p, *rbp_i_c, *rbp_i_t, *rbp_i_u; \ - int rbp_i_cmp = 0; \ - rbp_i_g = &(a_tree)->rbt_nil; \ - rbp_left_set(a_type, a_field, &rbp_i_s, (a_tree)->rbt_root); \ - rbp_right_set(a_type, a_field, &rbp_i_s, &(a_tree)->rbt_nil); \ - rbp_black_set(a_type, a_field, &rbp_i_s); \ - rbp_i_p = &rbp_i_s; \ - rbp_i_c = (a_tree)->rbt_root; \ - /* Iteratively search down the tree for the insertion point, */\ - /* splitting 4-nodes as they are encountered. At the end of each */\ - /* iteration, rbp_i_g->rbp_i_p->rbp_i_c is a 3-level path down */\ - /* the tree, assuming a sufficiently deep tree. */\ - while (rbp_i_c != &(a_tree)->rbt_nil) { \ - rbp_i_t = rbp_left_get(a_type, a_field, rbp_i_c); \ - rbp_i_u = rbp_left_get(a_type, a_field, rbp_i_t); \ - if (rbp_red_get(a_type, a_field, rbp_i_t) \ - && rbp_red_get(a_type, a_field, rbp_i_u)) { \ - /* rbp_i_c is the top of a logical 4-node, so split it. */\ - /* This iteration does not move down the tree, due to the */\ - /* disruptiveness of node splitting. */\ - /* */\ - /* Rotate right. */\ - rbp_rotate_right(a_type, a_field, rbp_i_c, rbp_i_t); \ - /* Pass red links up one level. */\ - rbp_i_u = rbp_left_get(a_type, a_field, rbp_i_t); \ - rbp_black_set(a_type, a_field, rbp_i_u); \ - if (rbp_left_get(a_type, a_field, rbp_i_p) == rbp_i_c) { \ - rbp_left_set(a_type, a_field, rbp_i_p, rbp_i_t); \ - rbp_i_c = rbp_i_t; \ + pathp->node = node; \ + /* Unwind. */ \ + for (pathp--; (uintptr_t)pathp >= (uintptr_t)path; pathp--) { \ + a_type *cnode = pathp->node; \ + if (pathp->cmp < 0) { \ + a_type *left = pathp[1].node; \ + rbtn_left_set(a_type, a_field, cnode, left); \ + if (rbtn_red_get(a_type, a_field, left)) { \ + a_type *leftleft = rbtn_left_get(a_type, a_field, left);\ + if (rbtn_red_get(a_type, a_field, leftleft)) { \ + /* Fix up 4-node. */ \ + a_type *tnode; \ + rbtn_black_set(a_type, a_field, leftleft); \ + rbtn_rotate_right(a_type, a_field, cnode, tnode); \ + cnode = tnode; \ + } \ } else { \ - /* rbp_i_c was the right child of rbp_i_p, so rotate */\ - /* left in order to maintain the left-leaning */\ - /* invariant. */\ - assert(rbp_right_get(a_type, a_field, rbp_i_p) \ - == rbp_i_c); \ - rbp_right_set(a_type, a_field, rbp_i_p, rbp_i_t); \ - rbp_lean_left(a_type, a_field, rbp_i_p, rbp_i_u); \ - if (rbp_left_get(a_type, a_field, rbp_i_g) == rbp_i_p) {\ - rbp_left_set(a_type, a_field, rbp_i_g, rbp_i_u); \ - } else { \ - assert(rbp_right_get(a_type, a_field, rbp_i_g) \ - == rbp_i_p); \ - rbp_right_set(a_type, a_field, rbp_i_g, rbp_i_u); \ - } \ - rbp_i_p = rbp_i_u; \ - rbp_i_cmp = (a_cmp)((a_node), rbp_i_p); \ - if (rbp_i_cmp < 0) { \ - rbp_i_c = rbp_left_get(a_type, a_field, rbp_i_p); \ + return; \ + } \ + } else { \ + a_type *right = pathp[1].node; \ + rbtn_right_set(a_type, a_field, cnode, right); \ + if (rbtn_red_get(a_type, a_field, right)) { \ + a_type *left = rbtn_left_get(a_type, a_field, cnode); \ + if (rbtn_red_get(a_type, a_field, left)) { \ + /* Split 4-node. */ \ + rbtn_black_set(a_type, a_field, left); \ + rbtn_black_set(a_type, a_field, right); \ + rbtn_red_set(a_type, a_field, cnode); \ } else { \ - assert(rbp_i_cmp > 0); \ - rbp_i_c = rbp_right_get(a_type, a_field, rbp_i_p); \ + /* Lean left. */ \ + a_type *tnode; \ + bool tred = rbtn_red_get(a_type, a_field, cnode); \ + rbtn_rotate_left(a_type, a_field, cnode, tnode); \ + rbtn_color_set(a_type, a_field, tnode, tred); \ + rbtn_red_set(a_type, a_field, cnode); \ + cnode = tnode; \ } \ - continue; \ + } else { \ + return; \ } \ } \ - rbp_i_g = rbp_i_p; \ - rbp_i_p = rbp_i_c; \ - rbp_i_cmp = (a_cmp)((a_node), rbp_i_c); \ - if (rbp_i_cmp < 0) { \ - rbp_i_c = rbp_left_get(a_type, a_field, rbp_i_c); \ - } else { \ - assert(rbp_i_cmp > 0); \ - rbp_i_c = rbp_right_get(a_type, a_field, rbp_i_c); \ - } \ + pathp->node = cnode; \ } \ - /* rbp_i_p now refers to the node under which to insert. */\ - rbp_node_new(a_type, a_field, a_tree, (a_node)); \ - if (rbp_i_cmp > 0) { \ - rbp_right_set(a_type, a_field, rbp_i_p, (a_node)); \ - rbp_lean_left(a_type, a_field, rbp_i_p, rbp_i_t); \ - if (rbp_left_get(a_type, a_field, rbp_i_g) == rbp_i_p) { \ - rbp_left_set(a_type, a_field, rbp_i_g, rbp_i_t); \ - } else if (rbp_right_get(a_type, a_field, rbp_i_g) == rbp_i_p) {\ - rbp_right_set(a_type, a_field, rbp_i_g, rbp_i_t); \ + /* Set root, and make it black. */ \ + rbtree->rbt_root = path->node; \ + rbtn_black_set(a_type, a_field, rbtree->rbt_root); \ +} \ +a_attr void \ +a_prefix##remove(a_rbt_type *rbtree, a_type *node) { \ + struct { \ + a_type *node; \ + int cmp; \ + } *pathp, *nodep, path[sizeof(void *) << 4]; \ + /* Wind. */ \ + nodep = NULL; /* Silence compiler warning. */ \ + path->node = rbtree->rbt_root; \ + for (pathp = path; pathp->node != &rbtree->rbt_nil; pathp++) { \ + int cmp = pathp->cmp = a_cmp(node, pathp->node); \ + if (cmp < 0) { \ + pathp[1].node = rbtn_left_get(a_type, a_field, \ + pathp->node); \ + } else { \ + pathp[1].node = rbtn_right_get(a_type, a_field, \ + pathp->node); \ + if (cmp == 0) { \ + /* Find node's successor, in preparation for swap. */ \ + pathp->cmp = 1; \ + nodep = pathp; \ + for (pathp++; pathp->node != &rbtree->rbt_nil; \ + pathp++) { \ + pathp->cmp = -1; \ + pathp[1].node = rbtn_left_get(a_type, a_field, \ + pathp->node); \ + } \ + break; \ + } \ } \ - } else { \ - rbp_left_set(a_type, a_field, rbp_i_p, (a_node)); \ } \ - /* Update the root and make sure that it is black. */\ - (a_tree)->rbt_root = rbp_left_get(a_type, a_field, &rbp_i_s); \ - rbp_black_set(a_type, a_field, (a_tree)->rbt_root); \ -} while (0) - -#define rb_remove(a_type, a_field, a_cmp, a_tree, a_node) do { \ - a_type rbp_r_s; \ - a_type *rbp_r_p, *rbp_r_c, *rbp_r_xp, *rbp_r_t, *rbp_r_u; \ - int rbp_r_cmp; \ - rbp_left_set(a_type, a_field, &rbp_r_s, (a_tree)->rbt_root); \ - rbp_right_set(a_type, a_field, &rbp_r_s, &(a_tree)->rbt_nil); \ - rbp_black_set(a_type, a_field, &rbp_r_s); \ - rbp_r_p = &rbp_r_s; \ - rbp_r_c = (a_tree)->rbt_root; \ - rbp_r_xp = &(a_tree)->rbt_nil; \ - /* Iterate down the tree, but always transform 2-nodes to 3- or */\ - /* 4-nodes in order to maintain the invariant that the current */\ - /* node is not a 2-node. This allows simple deletion once a leaf */\ - /* is reached. Handle the root specially though, since there may */\ - /* be no way to convert it from a 2-node to a 3-node. */\ - rbp_r_cmp = (a_cmp)((a_node), rbp_r_c); \ - if (rbp_r_cmp < 0) { \ - rbp_r_t = rbp_left_get(a_type, a_field, rbp_r_c); \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 22:59:44 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 716E11065672; Sun, 28 Feb 2010 22:59:44 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id 3CE828FC17; Sun, 28 Feb 2010 22:59:44 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0KYK00H00QJJCR00@smtpauth1.wiscmail.wisc.edu>; Sun, 28 Feb 2010 16:59:43 -0600 (CST) Received: from comporellon.tachypleus.net (adsl-76-233-146-74.dsl.mdsnwi.sbcglobal.net [76.233.146.74]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0KYK001L8QJH2J50@smtpauth1.wiscmail.wisc.edu>; Sun, 28 Feb 2010 16:59:42 -0600 (CST) Date: Sun, 28 Feb 2010 16:59:40 -0600 From: Nathan Whitehorn In-reply-to: <20100228.145300.29649867912530.imp@bsdimp.com> To: "M. Warner Losh" Message-id: <4B8AF55C.6040103@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.233.146.74 X-Spam-PmxInfo: Server=avs-11, Version=5.5.5.374460, Antispam-Engine: 2.7.1.369594, Antispam-Data: 2010.2.28.224820, SenderIP=76.233.146.74 References: <20100226132854.GA25722@sandvine.com> <3bbf2fe11002260557y484cf13bq76f7507c07ed3ebc@mail.gmail.com> <20100228195041.GA68446@server.vk2pj.dyndns.org> <20100228.145300.29649867912530.imp@bsdimp.com> User-Agent: Thunderbird 2.0.0.23 (X11/20100206) Cc: src-committers@FreeBSD.org, delphij@gmail.com, peterjeremy@acm.org, svn-src-all@FreeBSD.org, attilio@FreeBSD.org, kostikbel@gmail.com, svn-src-head@FreeBSD.org, emaste@FreeBSD.org Subject: Re: svn commit: r204309 - in head/sys: amd64/amd64 amd64/isa conf i386/bios i386/cpufreq i386/i386 i386/isa i386/xen isa modules/bios/smbios modules/bios/vpd modules/cpufreq pc98/pc98 x86 x86/bios x86/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 22:59:44 -0000 M. Warner Losh wrote: > In message: <20100228195041.GA68446@server.vk2pj.dyndns.org> > Peter Jeremy writes: > : On 2010-Feb-26 14:57:36 +0100, Attilio Rao wrote: > : >For the future, however, probabilly we would need to do something like > : >pc98 already does wrt i386 (i386/include/ pc98/include/ amd64/include/ > : >just have files wrappers to the generic one under x86/include/ when > : >necessary). > : > : Not that something like this is also critical for getting i386/amd64 > : cross compilation to work - one of the blocking issues is that the > : correct machine/ includes are not available in cross-compilatio mode. > > Huh? > > I cross build all the time, and the machine/ includes are always > right, with or without this patch. Maybe you could explain what you > mean here... > > The issue is that old code has > > #include > > or whatever in it, and we need to have an i386/isa.h that's just > #include > > Warner > I'm guessing what was meant is that one benefit of a merged tree (like we will have with powerpc) is that you can do cc -m32 on a 64-bit host to get a 32-bit binary, which is less than trivial now. -Nathan From owner-svn-src-head@FreeBSD.ORG Sun Feb 28 23:11:17 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C845E106566B; Sun, 28 Feb 2010 23:11:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 650738FC1C; Sun, 28 Feb 2010 23:11:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1SN7Inu037461; Sun, 28 Feb 2010 16:07:18 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 28 Feb 2010 16:07:32 -0700 (MST) Message-Id: <20100228.160732.597029496557504767.imp@bsdimp.com> To: nwhitehorn@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <4B8AF55C.6040103@freebsd.org> References: <20100228195041.GA68446@server.vk2pj.dyndns.org> <20100228.145300.29649867912530.imp@bsdimp.com> <4B8AF55C.6040103@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, delphij@gmail.com, peterjeremy@acm.org, svn-src-all@FreeBSD.org, attilio@FreeBSD.org, kostikbel@gmail.com, svn-src-head@FreeBSD.org, emaste@FreeBSD.org Subject: Re: svn commit: r204309 - in head/sys: amd64/amd64 amd64/isa conf i386/bios i386/cpufreq i386/i386 i386/isa i386/xen isa modules/bios/smbios modules/bios/vpd modules/cpufreq pc98/pc98 x86 x86/bios x86/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 23:11:18 -0000 In message: <4B8AF55C.6040103@freebsd.org> Nathan Whitehorn writes: : M. Warner Losh wrote: : > In message: <20100228195041.GA68446@server.vk2pj.dyndns.org> : > Peter Jeremy writes: : > : On 2010-Feb-26 14:57:36 +0100, Attilio Rao : > wrote: : > : >For the future, however, probabilly we would need to do something : > like : > : >pc98 already does wrt i386 (i386/include/ pc98/include/ : > amd64/include/ : > : >just have files wrappers to the generic one under x86/include/ when : > : >necessary). : > : : Not that something like this is also critical for getting : > i386/amd64 : > : cross compilation to work - one of the blocking issues is that the : > : correct machine/ includes are not available in cross-compilatio : > mode. : > : > Huh? : > : > I cross build all the time, and the machine/ includes are always : > right, with or without this patch. Maybe you could explain what you : > mean here... : > : > The issue is that old code has : > : > #include : > : > or whatever in it, and we need to have an i386/isa.h that's just : > #include : > : > Warner : > : I'm guessing what was meant is that one benefit of a merged tree (like : we will have with powerpc) is that you can do cc -m32 on a 64-bit host : to get a 32-bit binary, which is less than trivial now. True enough. But we don't have anywhere close to a merged tree on x86, and won't for the foreseeable future. I don't really want to see an include32, when all the cross building tools exist in the tree already (see XDEV in Makefile.inc1)... If you are cross building, you really need a full cross building environment. The -m32 hacks we have now are, as you describe, insufficient to the task... Warner From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 00:27:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5C4A106566B; Mon, 1 Mar 2010 00:27:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 922668FC0C; Mon, 1 Mar 2010 00:27:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o210RtEN037823; Mon, 1 Mar 2010 00:27:55 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o210Rto8037816; Mon, 1 Mar 2010 00:27:55 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003010027.o210Rto8037816@svn.freebsd.org> From: Robert Watson Date: Mon, 1 Mar 2010 00:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204494 - head/lib/libkvm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 00:27:55 -0000 Author: rwatson Date: Mon Mar 1 00:27:55 2010 New Revision: 204494 URL: http://svn.freebsd.org/changeset/base/204494 Log: A first cut at teaching libkvm how to deal with dynamic per-CPU storage (DPCPU): A new API, kvm_dpcpu_setcpu(3), selects the active CPU for the purposes of DPCPU. Calls to kvm_nlist(3) will automatically translate DPCPU symbols and return a pointer to the current CPU's version of the data. Consumers needing to read the same symbol on several CPUs will invoke a series of setcpu/nlist calls, one per CPU of interest. This addition makes it possible for tools like netstat(1) to query the values of DPCPU variables during crashdump analysis, and is based on similar code handling virtualized global variables. MFC after: 1 week Sponsored by: Juniper Networks, Inc. Modified: head/lib/libkvm/Makefile head/lib/libkvm/kvm.c head/lib/libkvm/kvm.h head/lib/libkvm/kvm_getpcpu.3 head/lib/libkvm/kvm_pcpu.c head/lib/libkvm/kvm_private.h Modified: head/lib/libkvm/Makefile ============================================================================== --- head/lib/libkvm/Makefile Sun Feb 28 22:57:13 2010 (r204493) +++ head/lib/libkvm/Makefile Mon Mar 1 00:27:55 2010 (r204494) @@ -23,6 +23,7 @@ MAN= kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_read.3 MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3 +MLINKS+=kvm_getpcpu.3 kvm_dpcpu_setcpu.3 MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3 MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_openfiles.3 MLINKS+=kvm_read.3 kvm_write.3 Modified: head/lib/libkvm/kvm.c ============================================================================== --- head/lib/libkvm/kvm.c Sun Feb 28 22:57:13 2010 (r204493) +++ head/lib/libkvm/kvm.c Mon Mar 1 00:27:55 2010 (r204494) @@ -416,6 +416,8 @@ _kvm_nlist(kvm_t *kd, struct nlist *nl, struct kld_sym_lookup lookup; int error; char *prefix = "", symname[1024]; /* XXX-BZ symbol name length limit? */ + int tried_vnet, tried_dpcpu; + /* * If we can't use the kld symbol lookup, revert to the * slow library call. @@ -429,6 +431,10 @@ _kvm_nlist(kvm_t *kd, struct nlist *nl, error = kvm_fdnlist_prefix(kd, nl, error, VNET_SYMPREFIX, _kvm_vnet_validaddr); + if (error > 0 && _kvm_dpcpu_initialized(kd, initialize)) + error = kvm_fdnlist_prefix(kd, nl, error, + "pcpu_entry_", _kvm_dpcpu_validaddr); + return (error); } @@ -437,6 +443,8 @@ _kvm_nlist(kvm_t *kd, struct nlist *nl, * and look it up with a kldsym(2) syscall. */ nvalid = 0; + tried_vnet = 0; + tried_dpcpu = 0; again: for (p = nl; p->n_name && p->n_name[0]; ++p) { if (p->n_type != N_UNDF) @@ -464,6 +472,10 @@ again: !strcmp(prefix, VNET_SYMPREFIX)) p->n_value = _kvm_vnet_validaddr(kd, lookup.symvalue); + else if (_kvm_dpcpu_initialized(kd, initialize) && + !strcmp(prefix, "pcpu_entry_")) + p->n_value = + _kvm_dpcpu_validaddr(kd, lookup.symvalue); else p->n_value = lookup.symvalue; ++nvalid; @@ -473,14 +485,19 @@ again: /* * Check the number of entries that weren't found. If they exist, - * try again with a prefix for virtualized symbol names. + * try again with a prefix for virtualized or DPCPU symbol names. */ error = ((p - nl) - nvalid); - if (error && _kvm_vnet_initialized(kd, initialize) && - strcmp(prefix, VNET_SYMPREFIX)) { + if (error && _kvm_vnet_initialized(kd, initialize) && !tried_vnet) { + tried_vnet = 1; prefix = VNET_SYMPREFIX; goto again; } + if (error && _kvm_dpcpu_initialized(kd, initialize) && !tried_dpcpu) { + tried_dpcpu = 1; + prefix = "pcpu_entry_"; + goto again; + } /* * Return the number of entries that weren't found. If they exist, Modified: head/lib/libkvm/kvm.h ============================================================================== --- head/lib/libkvm/kvm.h Sun Feb 28 22:57:13 2010 (r204493) +++ head/lib/libkvm/kvm.h Mon Mar 1 00:27:55 2010 (r204494) @@ -69,6 +69,7 @@ struct kvm_swap { __BEGIN_DECLS int kvm_close(kvm_t *); +int kvm_dpcpu_setcpu(kvm_t *, u_int); char **kvm_getargv(kvm_t *, const struct kinfo_proc *, int); int kvm_getcptime(kvm_t *, long *); char **kvm_getenvv(kvm_t *, const struct kinfo_proc *, int); Modified: head/lib/libkvm/kvm_getpcpu.3 ============================================================================== --- head/lib/libkvm/kvm_getpcpu.3 Sun Feb 28 22:57:13 2010 (r204493) +++ head/lib/libkvm/kvm_getpcpu.3 Mon Mar 1 00:27:55 2010 (r204494) @@ -28,10 +28,11 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2008 +.Dd February 28, 2010 .Dt KVM_GETPCPU 3 .Os .Sh NAME +.Nm kvm_dpcpu_setcpu .Nm kvm_getmaxcpu , .Nm kvm_getpcpu .Nd access per-CPU data @@ -43,20 +44,30 @@ .In sys/sysctl.h .In kvm.h .Ft int +.Fn kvm_dpcpu_setcpu "kvm_t *kd" "u_int cpu" +.Ft int .Fn kvm_getmaxcpu "kvm_t *kd" .Ft void * .Fn kvm_getpcpu "kvm_t *kd" "int cpu" .Sh DESCRIPTION The -.Fn kvm_getmaxcpu +.Fn kvm_dpcpu_setcpu , +.Fn kvm_getmaxcpu , and .Fn kvm_getpcpu functions are used to access the per-CPU data of active processors in the kernel indicated by .Fa kd . +Per-CPU storage comes in two flavours: data stored directly in a +.Vt "struct pcpu" +associated with each CPU, and dynamic per-CPU storage (DPCPU), in which a +single kernel symbol refers to different data depending on what CPU it is +accessed from. +.Pp The .Fn kvm_getmaxcpu function returns the maximum number of CPUs supported by the kernel. +.Pp The .Fn kvm_getpcpu function returns a buffer holding the per-CPU data for a single CPU. @@ -71,8 +82,22 @@ If is not active, then .Dv NULL is returned instead. +.Pp +Symbols for dynamic per-CPU data are accessed via +.Xr kvm_nlist 3 +as with other symbols. +.Nm libkvm +maintains a notion of the "current CPU", set by +.Xr kvm_dpcpu_setcpu , +which defaults to 0. +Once another CPU is selected, +.Xr kvm_nlist 3 +will return pointers to that data on the appropriate CPU. .Sh CACHING -These functions cache the nlist values for various kernel variables which are +.Fn kvm_getmaxcpu +and +.Vn kvm_getpcpu +cache the nlist values for various kernel variables which are reused in successive calls. You may call either function with .Fa kd @@ -93,7 +118,11 @@ function returns a pointer to an allocat If an error occurs, it returns -1 instead. .Pp -If either function encounters an error, +On success, the +.Fn kvm_dpcpu_setcpu +call returns 0; if an error occurs, it returns -1 instead. +.Pp +If any function encounters an error, then an error message may be retrieved via .Xr kvm_geterr 3. .Sh SEE ALSO Modified: head/lib/libkvm/kvm_pcpu.c ============================================================================== --- head/lib/libkvm/kvm_pcpu.c Sun Feb 28 22:57:13 2010 (r204493) +++ head/lib/libkvm/kvm_pcpu.c Mon Mar 1 00:27:55 2010 (r204494) @@ -1,8 +1,15 @@ /*- + * Copyright (c) 2010 Juniper Networks, Inc. + * Copyright (c) 2009 Robert N. M. Watson + * Copyright (c) 2009 Bjoern A. Zeeb * Copyright (c) 2008 Yahoo!, Inc. * All rights reserved. + * * Written by: John Baldwin * + * This software was developed by Robert N. M. Watson under contract + * to Juniper Networks, Inc. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -49,6 +56,10 @@ static struct nlist kvm_pcpu_nl[] = { /* * Kernel per-CPU data state. We cache this stuff on the first * access. + * + * XXXRW: Possibly, this (and kvmpcpu_nl) should be per-kvm_t, in case the + * consumer has multiple handles in flight to differently configured + * kernels/crashdumps. */ static void **pcpu_data; static int maxcpu; @@ -150,3 +161,132 @@ kvm_getmaxcpu(kvm_t *kd) return (-1); return (maxcpu); } + +static int +_kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu, int report_error) +{ + + if (!kd->dpcpu_initialized) { + if (report_error) + _kvm_err(kd, kd->program, "%s: not initialized", + __func__); + return (-1); + } + if (cpu >= kd->dpcpu_maxcpus) { + if (report_error) + _kvm_err(kd, kd->program, "%s: CPU %u too big", + __func__, cpu); + return (-1); + } + if (kd->dpcpu_off[cpu] == 0) { + if (report_error) + _kvm_err(kd, kd->program, "%s: CPU %u not found", + __func__, cpu); + return (-1); + } + kd->dpcpu_curcpu = cpu; + kd->dpcpu_curoff = kd->dpcpu_off[cpu]; + return (0); +} + +/* + * Set up libkvm to handle dynamic per-CPU memory. + */ +static int +_kvm_dpcpu_init(kvm_t *kd) +{ + struct nlist nl[] = { +#define NLIST_START_SET_PCPU 0 + { "___start_set_pcpu" }, +#define NLIST_STOP_SET_PCPU 1 + { "___stop_set_pcpu" }, +#define NLIST_DPCPU_OFF 2 + { "_dpcpu_off" }, +#define NLIST_MP_MAXCPUS 3 + { "_mp_maxcpus" }, + { NULL }, + }; + uintptr_t *dpcpu_off_buf; + size_t len; + u_int dpcpu_maxcpus; + + /* + * Locate and cache locations of important symbols using the internal + * version of _kvm_nlist, turning off initialization to avoid + * recursion in case of unresolveable symbols. + */ + if (_kvm_nlist(kd, nl, 0) != 0) + return (-1); + if (kvm_read(kd, nl[NLIST_MP_MAXCPUS].n_value, &dpcpu_maxcpus, + sizeof(dpcpu_maxcpus)) != sizeof(dpcpu_maxcpus)) + return (-1); + len = dpcpu_maxcpus * sizeof(*dpcpu_off_buf); + dpcpu_off_buf = malloc(len); + if (dpcpu_off_buf == NULL) + return (-1); + if (kvm_read(kd, nl[NLIST_DPCPU_OFF].n_value, dpcpu_off_buf, len) != + len) { + free(dpcpu_off_buf); + return (-1); + } + kd->dpcpu_start = nl[NLIST_START_SET_PCPU].n_value; + kd->dpcpu_stop = nl[NLIST_STOP_SET_PCPU].n_value; + kd->dpcpu_maxcpus = dpcpu_maxcpus; + kd->dpcpu_off = dpcpu_off_buf; + kd->dpcpu_initialized = 1; + (void)_kvm_dpcpu_setcpu(kd, 0, 0); + return (0); +} + +/* + * Check whether the dpcpu module has been initialized sucessfully or not, + * initialize it if permitted. + */ +int +_kvm_dpcpu_initialized(kvm_t *kd, int intialize) +{ + + if (kd->dpcpu_initialized || !intialize) + return (kd->dpcpu_initialized); + + (void)_kvm_dpcpu_init(kd); + + return (kd->dpcpu_initialized); +} + +/* + * Check whether the value is within the dpcpu symbol range and only if so + * adjust the offset relative to the current offset. + */ +uintptr_t +_kvm_dpcpu_validaddr(kvm_t *kd, uintptr_t value) +{ + + if (value == 0) + return (value); + + if (!kd->dpcpu_initialized) + return (value); + + if (value < kd->dpcpu_start || value >= kd->dpcpu_stop) + return (value); + + return (kd->dpcpu_curoff + value); +} + +int +kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu) +{ + int ret; + + if (!kd->dpcpu_initialized) { + ret = _kvm_dpcpu_init(kd); + if (ret != 0) { + _kvm_err(kd, kd->program, "%s: init failed", + __func__); + return (ret); + } + } + + return (_kvm_dpcpu_setcpu(kd, cpu, 1)); +} Modified: head/lib/libkvm/kvm_private.h ============================================================================== --- head/lib/libkvm/kvm_private.h Sun Feb 28 22:57:13 2010 (r204493) +++ head/lib/libkvm/kvm_private.h Mon Mar 1 00:27:55 2010 (r204494) @@ -68,6 +68,19 @@ struct __kvm { uintptr_t vnet_stop; /* stop of kernel's vnet region */ uintptr_t vnet_current; /* vnet we're working with */ uintptr_t vnet_base; /* vnet base of current vnet */ + + /* + * Dynamic per-CPU kernel memory. We translate symbols, on-demand, + * to the data associated with dpcpu_curcpu, set with + * kvm_dpcpu_setcpu(). + */ + int dpcpu_initialized; /* dpcpu fields set up */ + uintptr_t dpcpu_start; /* start of kernel's dpcpu region */ + uintptr_t dpcpu_stop; /* stop of kernel's dpcpu region */ + u_int dpcpu_maxcpus; /* size of base array */ + uintptr_t *dpcpu_off; /* base array, indexed by CPU ID */ + u_int dpcpu_curcpu; /* CPU we're currently working with */ + uintptr_t dpcpu_curoff; /* dpcpu base of current CPU */ }; /* @@ -88,6 +101,8 @@ int _kvm_uvatop(kvm_t *, const struct p int _kvm_vnet_selectpid(kvm_t *, pid_t); int _kvm_vnet_initialized(kvm_t *, int); uintptr_t _kvm_vnet_validaddr(kvm_t *, uintptr_t); +int _kvm_dpcpu_initialized(kvm_t *, int); +uintptr_t _kvm_dpcpu_validaddr(kvm_t *, uintptr_t); #if defined(__amd64__) || defined(__i386__) || defined(__arm__) void _kvm_minidump_freevtop(kvm_t *); From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 00:42:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F293106566B; Mon, 1 Mar 2010 00:42:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F09D28FC0C; Mon, 1 Mar 2010 00:42:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o210gbSa041164; Mon, 1 Mar 2010 00:42:37 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o210gbGl041161; Mon, 1 Mar 2010 00:42:37 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003010042.o210gbGl041161@svn.freebsd.org> From: Robert Watson Date: Mon, 1 Mar 2010 00:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204497 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 00:42:38 -0000 Author: rwatson Date: Mon Mar 1 00:42:36 2010 New Revision: 204497 URL: http://svn.freebsd.org/changeset/base/204497 Log: Changes to support crashdump analysis of netisr: - Rename the netisr protocol registration array, 'np' to 'netisr_proto', in order to reduce the chances of symbol name collisions. It remains statically defined, but it will be looked up by netstat(1). - Move certain internal structure definitions from netisr.c to netisr_internal.h so that netstat(1) can find them. They remain private, and should not be used for any other purpose (for example, they should not be used by kernel modules, which must instead use the public interfaces in netisr.h). - Store a kernel-compiled version of NETISR_MAXPROT in the global variable netisr_maxprot, and export via a sysctl, so that it is available for use by netstat(1). This is especially important for crashdump interpretation, where the size of the workstream structure is determined by the maximum number of protocols compiled into the kernel. MFC after: 1 week Sponsored by: Juniper Networks Added: head/sys/net/netisr_internal.h (contents, props changed) Modified: head/sys/net/netisr.c Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Mon Mar 1 00:38:20 2010 (r204496) +++ head/sys/net/netisr.c Mon Mar 1 00:42:36 2010 (r204497) @@ -87,9 +87,11 @@ __FBSDID("$FreeBSD$"); #include #endif +#define _WANT_NETISR_INTERNAL /* Enable definitions from netisr_internal.h */ #include #include #include +#include #include /*- @@ -99,7 +101,7 @@ __FBSDID("$FreeBSD$"); * * The following data structures and fields are protected by this lock: * - * - The np array, including all fields of struct netisr_proto. + * - The netisr_proto array, including all fields of struct netisr_proto. * - The nws array, including all fields of struct netisr_worker. * - The nws_array array. * @@ -194,79 +196,23 @@ SYSCTL_INT(_net_isr, OID_AUTO, defaultql "Default netisr per-protocol, per-CPU queue limit if not set by protocol"); /* - * Each protocol is described by a struct netisr_proto, which holds all - * global per-protocol information. This data structure is set up by - * netisr_register(), and derived from the public struct netisr_handler. + * Store and export the compile-time constant NETISR_MAXPROT limit on the + * number of protocols that can register with netisr at a time. This is + * required for crashdump analysis, as it sizes netisr_proto[]. */ -struct netisr_proto { - const char *np_name; /* Character string protocol name. */ - netisr_handler_t *np_handler; /* Protocol handler. */ - netisr_m2flow_t *np_m2flow; /* Query flow for untagged packet. */ - netisr_m2cpuid_t *np_m2cpuid; /* Query CPU to process packet on. */ - netisr_drainedcpu_t *np_drainedcpu; /* Callback when drained a queue. */ - u_int np_qlimit; /* Maximum per-CPU queue depth. */ - u_int np_policy; /* Work placement policy. */ -}; - -#define NETISR_MAXPROT 16 /* Compile-time limit. */ +static u_int netisr_maxprot = NETISR_MAXPROT; +SYSCTL_INT(_net_isr, OID_AUTO, maxprot, CTLFLAG_RD, + &netisr_maxprot, 0, + "Compile-time limit on the number of protocols supported by netisr."); /* - * The np array describes all registered protocols, indexed by protocol - * number. + * The netisr_proto array describes all registered protocols, indexed by + * protocol number. See netisr_internal.h for more details. */ -static struct netisr_proto np[NETISR_MAXPROT]; +static struct netisr_proto netisr_proto[NETISR_MAXPROT]; /* - * Protocol-specific work for each workstream is described by struct - * netisr_work. Each work descriptor consists of an mbuf queue and - * statistics. - */ -struct netisr_work { - /* - * Packet queue, linked by m_nextpkt. - */ - struct mbuf *nw_head; - struct mbuf *nw_tail; - u_int nw_len; - u_int nw_qlimit; - u_int nw_watermark; - - /* - * Statistics -- written unlocked, but mostly from curcpu. - */ - u_int64_t nw_dispatched; /* Number of direct dispatches. */ - u_int64_t nw_hybrid_dispatched; /* "" hybrid dispatches. */ - u_int64_t nw_qdrops; /* "" drops. */ - u_int64_t nw_queued; /* "" enqueues. */ - u_int64_t nw_handled; /* "" handled in worker. */ -}; - -/* - * Workstreams hold a queue of ordered work across each protocol, and are - * described by netisr_workstream. Each workstream is associated with a - * worker thread, which in turn is pinned to a CPU. Work associated with a - * workstream can be processd in other threads during direct dispatch; - * concurrent processing is prevented by the NWS_RUNNING flag, which - * indicates that a thread is already processing the work queue. It is - * important to prevent a directly dispatched packet from "skipping ahead" of - * work already in the workstream queue. - */ -struct netisr_workstream { - struct intr_event *nws_intr_event; /* Handler for stream. */ - void *nws_swi_cookie; /* swi(9) cookie for stream. */ - struct mtx nws_mtx; /* Synchronize work. */ - u_int nws_cpu; /* CPU pinning. */ - u_int nws_flags; /* Wakeup flags. */ - u_int nws_pendingbits; /* Scheduled protocols. */ - - /* - * Each protocol has per-workstream data. - */ - struct netisr_work nws_work[NETISR_MAXPROT]; -} __aligned(CACHE_LINE_SIZE); - -/* - * Per-CPU workstream data. + * Per-CPU workstream data. See netisr_internal.h for more details. */ DPCPU_DEFINE(struct netisr_workstream, nws); @@ -286,13 +232,6 @@ SYSCTL_INT(_net_isr, OID_AUTO, numthread &nws_count, 0, "Number of extant netisr threads."); /* - * Per-workstream flags. - */ -#define NWS_RUNNING 0x00000001 /* Currently running in a thread. */ -#define NWS_DISPATCHING 0x00000002 /* Currently being direct-dispatched. */ -#define NWS_SCHEDULED 0x00000004 /* Signal issued. */ - -/* * Synchronization for each workstream: a mutex protects all mutable fields * in each stream, including per-protocol state (mbuf queues). The SWI is * woken up if asynchronous dispatch is required. @@ -380,32 +319,32 @@ netisr_register(const struct netisr_hand * Test that no existing registration exists for this protocol. */ NETISR_WLOCK(); - KASSERT(np[proto].np_name == NULL, + KASSERT(netisr_proto[proto].np_name == NULL, ("%s(%u, %s): name present", __func__, proto, name)); - KASSERT(np[proto].np_handler == NULL, + KASSERT(netisr_proto[proto].np_handler == NULL, ("%s(%u, %s): handler present", __func__, proto, name)); - np[proto].np_name = name; - np[proto].np_handler = nhp->nh_handler; - np[proto].np_m2flow = nhp->nh_m2flow; - np[proto].np_m2cpuid = nhp->nh_m2cpuid; - np[proto].np_drainedcpu = nhp->nh_drainedcpu; + netisr_proto[proto].np_name = name; + netisr_proto[proto].np_handler = nhp->nh_handler; + netisr_proto[proto].np_m2flow = nhp->nh_m2flow; + netisr_proto[proto].np_m2cpuid = nhp->nh_m2cpuid; + netisr_proto[proto].np_drainedcpu = nhp->nh_drainedcpu; if (nhp->nh_qlimit == 0) - np[proto].np_qlimit = netisr_defaultqlimit; + netisr_proto[proto].np_qlimit = netisr_defaultqlimit; else if (nhp->nh_qlimit > netisr_maxqlimit) { printf("%s: %s requested queue limit %u capped to " "net.isr.maxqlimit %u\n", __func__, name, nhp->nh_qlimit, netisr_maxqlimit); - np[proto].np_qlimit = netisr_maxqlimit; + netisr_proto[proto].np_qlimit = netisr_maxqlimit; } else - np[proto].np_qlimit = nhp->nh_qlimit; - np[proto].np_policy = nhp->nh_policy; + netisr_proto[proto].np_qlimit = nhp->nh_qlimit; + netisr_proto[proto].np_policy = nhp->nh_policy; for (i = 0; i <= mp_maxid; i++) { if (CPU_ABSENT(i)) continue; npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto]; bzero(npwp, sizeof(*npwp)); - npwp->nw_qlimit = np[proto].np_qlimit; + npwp->nw_qlimit = netisr_proto[proto].np_qlimit; } NETISR_WUNLOCK(); } @@ -430,7 +369,7 @@ netisr_clearqdrops(const struct netisr_h ("%s(%u): protocol too big for %s", __func__, proto, name)); NETISR_WLOCK(); - KASSERT(np[proto].np_handler != NULL, + KASSERT(netisr_proto[proto].np_handler != NULL, ("%s(%u): protocol not registered for %s", __func__, proto, name)); @@ -465,7 +404,7 @@ netisr_getqdrops(const struct netisr_han ("%s(%u): protocol too big for %s", __func__, proto, name)); NETISR_RLOCK(&tracker); - KASSERT(np[proto].np_handler != NULL, + KASSERT(netisr_proto[proto].np_handler != NULL, ("%s(%u): protocol not registered for %s", __func__, proto, name)); @@ -498,10 +437,10 @@ netisr_getqlimit(const struct netisr_han ("%s(%u): protocol too big for %s", __func__, proto, name)); NETISR_RLOCK(&tracker); - KASSERT(np[proto].np_handler != NULL, + KASSERT(netisr_proto[proto].np_handler != NULL, ("%s(%u): protocol not registered for %s", __func__, proto, name)); - *qlimitp = np[proto].np_qlimit; + *qlimitp = netisr_proto[proto].np_qlimit; NETISR_RUNLOCK(&tracker); } @@ -530,11 +469,11 @@ netisr_setqlimit(const struct netisr_han ("%s(%u): protocol too big for %s", __func__, proto, name)); NETISR_WLOCK(); - KASSERT(np[proto].np_handler != NULL, + KASSERT(netisr_proto[proto].np_handler != NULL, ("%s(%u): protocol not registered for %s", __func__, proto, name)); - np[proto].np_qlimit = qlimit; + netisr_proto[proto].np_qlimit = qlimit; for (i = 0; i <= mp_maxid; i++) { if (CPU_ABSENT(i)) continue; @@ -591,16 +530,16 @@ netisr_unregister(const struct netisr_ha ("%s(%u): protocol too big for %s", __func__, proto, name)); NETISR_WLOCK(); - KASSERT(np[proto].np_handler != NULL, + KASSERT(netisr_proto[proto].np_handler != NULL, ("%s(%u): protocol not registered for %s", __func__, proto, name)); - np[proto].np_name = NULL; - np[proto].np_handler = NULL; - np[proto].np_m2flow = NULL; - np[proto].np_m2cpuid = NULL; - np[proto].np_qlimit = 0; - np[proto].np_policy = 0; + netisr_proto[proto].np_name = NULL; + netisr_proto[proto].np_handler = NULL; + netisr_proto[proto].np_m2flow = NULL; + netisr_proto[proto].np_m2cpuid = NULL; + netisr_proto[proto].np_qlimit = 0; + netisr_proto[proto].np_policy = 0; for (i = 0; i <= mp_maxid; i++) { if (CPU_ABSENT(i)) continue; @@ -720,13 +659,13 @@ netisr_process_workstream_proto(struct n local_npw.nw_len--; VNET_ASSERT(m->m_pkthdr.rcvif != NULL); CURVNET_SET(m->m_pkthdr.rcvif->if_vnet); - np[proto].np_handler(m); + netisr_proto[proto].np_handler(m); CURVNET_RESTORE(); } KASSERT(local_npw.nw_len == 0, ("%s(%u): len %u", __func__, proto, local_npw.nw_len)); - if (np[proto].np_drainedcpu) - np[proto].np_drainedcpu(nwsp->nws_cpu); + if (netisr_proto[proto].np_drainedcpu) + netisr_proto[proto].np_drainedcpu(nwsp->nws_cpu); NWS_LOCK(nwsp); npwp->nw_handled += handled; return (handled); @@ -862,10 +801,10 @@ netisr_queue_src(u_int proto, uintptr_t #ifdef NETISR_LOCKING NETISR_RLOCK(&tracker); #endif - KASSERT(np[proto].np_handler != NULL, + KASSERT(netisr_proto[proto].np_handler != NULL, ("%s: invalid proto %u", __func__, proto)); - m = netisr_select_cpuid(&np[proto], source, m, &cpuid); + m = netisr_select_cpuid(&netisr_proto[proto], source, m, &cpuid); if (m != NULL) { KASSERT(!CPU_ABSENT(cpuid), ("%s: CPU %u absent", __func__, cpuid)); @@ -911,7 +850,7 @@ netisr_dispatch_src(u_int proto, uintptr #ifdef NETISR_LOCKING NETISR_RLOCK(&tracker); #endif - KASSERT(np[proto].np_handler != NULL, + KASSERT(netisr_proto[proto].np_handler != NULL, ("%s: invalid proto %u", __func__, proto)); /* @@ -926,7 +865,7 @@ netisr_dispatch_src(u_int proto, uintptr npwp = &nwsp->nws_work[proto]; npwp->nw_dispatched++; npwp->nw_handled++; - np[proto].np_handler(m); + netisr_proto[proto].np_handler(m); error = 0; goto out_unlock; } @@ -936,7 +875,7 @@ netisr_dispatch_src(u_int proto, uintptr * dispatch if we're on the right CPU and the netisr worker isn't * already running. */ - m = netisr_select_cpuid(&np[proto], source, m, &cpuid); + m = netisr_select_cpuid(&netisr_proto[proto], source, m, &cpuid); if (m == NULL) { error = ENOBUFS; goto out_unlock; @@ -973,7 +912,7 @@ netisr_dispatch_src(u_int proto, uintptr */ nwsp->nws_flags |= NWS_DISPATCHING; NWS_UNLOCK(nwsp); - np[proto].np_handler(m); + netisr_proto[proto].np_handler(m); NWS_LOCK(nwsp); nwsp->nws_flags &= ~NWS_DISPATCHING; npwp->nw_handled++; @@ -1149,7 +1088,7 @@ sysctl_netisr_proto(SYSCTL_HANDLER_ARGS) counter = 0; NETISR_RLOCK(&tracker); for (proto = 0; proto < NETISR_MAXPROT; proto++) { - npp = &np[proto]; + npp = &netisr_proto[proto]; if (npp->np_name == NULL) continue; snpp = &snp_array[counter]; @@ -1261,7 +1200,7 @@ sysctl_netisr_work(SYSCTL_HANDLER_ARGS) continue; NWS_LOCK(nwsp); for (proto = 0; proto < NETISR_MAXPROT; proto++) { - npp = &np[proto]; + npp = &netisr_proto[proto]; if (npp->np_name == NULL) continue; nwp = &nwsp->nws_work[proto]; @@ -1312,7 +1251,7 @@ DB_SHOW_COMMAND(netisr, db_show_netisr) continue; first = 1; for (proto = 0; proto < NETISR_MAXPROT; proto++) { - if (np[proto].np_handler == NULL) + if (netisr_proto[proto].np_handler == NULL) continue; nwp = &nwsp->nws_work[proto]; if (first) { @@ -1322,7 +1261,7 @@ DB_SHOW_COMMAND(netisr, db_show_netisr) db_printf("%3s ", ""); db_printf( "%6s %5d %5d %5d %8ju %8ju %8ju %8ju\n", - np[proto].np_name, nwp->nw_len, + netisr_proto[proto].np_name, nwp->nw_len, nwp->nw_watermark, nwp->nw_qlimit, nwp->nw_dispatched, nwp->nw_hybrid_dispatched, nwp->nw_qdrops, nwp->nw_queued); Added: head/sys/net/netisr_internal.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/net/netisr_internal.h Mon Mar 1 00:42:36 2010 (r204497) @@ -0,0 +1,127 @@ +/*- + * Copyright (c) 2007-2009 Robert N. M. Watson + * Copyright (c) 2010 Juniper Networks, Inc. + * All rights reserved. + * + * This software was developed by Robert N. M. Watson under contract + * to Juniper Networks, Inc. + * + * 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 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 AUTHOR 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. + * + * $FreeBSD$ + */ + +#ifndef _NET_NETISR_INTERNAL_H_ +#define _NET_NETISR_INTERNAL_H_ + +#ifndef _WANT_NETISR_INTERNAL +#error "no user-serviceable parts inside" +#endif + +/* + * These definitions are private to the netisr implementation, but provided + * here for use by post-mortem crashdump analysis tools. They should not be + * used in any other context as they can and will change. Public definitions + * may be found in netisr.h. + */ + +#ifndef _KERNEL +typedef void *netisr_handler_t; +typedef void *netisr_m2flow_t; +typedef void *netisr_m2cpuid_t; +typedef void *netisr_drainedcpu_t; +#endif + +/* + * Each protocol is described by a struct netisr_proto, which holds all + * global per-protocol information. This data structure is set up by + * netisr_register(), and derived from the public struct netisr_handler. + */ +struct netisr_proto { + const char *np_name; /* Character string protocol name. */ + netisr_handler_t *np_handler; /* Protocol handler. */ + netisr_m2flow_t *np_m2flow; /* Query flow for untagged packet. */ + netisr_m2cpuid_t *np_m2cpuid; /* Query CPU to process packet on. */ + netisr_drainedcpu_t *np_drainedcpu; /* Callback when drained a queue. */ + u_int np_qlimit; /* Maximum per-CPU queue depth. */ + u_int np_policy; /* Work placement policy. */ +}; + +#define NETISR_MAXPROT 16 /* Compile-time limit. */ + +/* + * Protocol-specific work for each workstream is described by struct + * netisr_work. Each work descriptor consists of an mbuf queue and + * statistics. + */ +struct netisr_work { + /* + * Packet queue, linked by m_nextpkt. + */ + struct mbuf *nw_head; + struct mbuf *nw_tail; + u_int nw_len; + u_int nw_qlimit; + u_int nw_watermark; + + /* + * Statistics -- written unlocked, but mostly from curcpu. + */ + u_int64_t nw_dispatched; /* Number of direct dispatches. */ + u_int64_t nw_hybrid_dispatched; /* "" hybrid dispatches. */ + u_int64_t nw_qdrops; /* "" drops. */ + u_int64_t nw_queued; /* "" enqueues. */ + u_int64_t nw_handled; /* "" handled in worker. */ +}; + +/* + * Workstreams hold a queue of ordered work across each protocol, and are + * described by netisr_workstream. Each workstream is associated with a + * worker thread, which in turn is pinned to a CPU. Work associated with a + * workstream can be processd in other threads during direct dispatch; + * concurrent processing is prevented by the NWS_RUNNING flag, which + * indicates that a thread is already processing the work queue. It is + * important to prevent a directly dispatched packet from "skipping ahead" of + * work already in the workstream queue. + */ +struct netisr_workstream { + struct intr_event *nws_intr_event; /* Handler for stream. */ + void *nws_swi_cookie; /* swi(9) cookie for stream. */ + struct mtx nws_mtx; /* Synchronize work. */ + u_int nws_cpu; /* CPU pinning. */ + u_int nws_flags; /* Wakeup flags. */ + u_int nws_pendingbits; /* Scheduled protocols. */ + + /* + * Each protocol has per-workstream data. + */ + struct netisr_work nws_work[NETISR_MAXPROT]; +} __aligned(CACHE_LINE_SIZE); + +/* + * Per-workstream flags. + */ +#define NWS_RUNNING 0x00000001 /* Currently running in a thread. */ +#define NWS_DISPATCHING 0x00000002 /* Currently being direct-dispatched. */ +#define NWS_SCHEDULED 0x00000004 /* Signal issued. */ + +#endif /* !_NET_NETISR_INTERNAL_H_ */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 00:43:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C9311065673; Mon, 1 Mar 2010 00:43:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BEEC8FC15; Mon, 1 Mar 2010 00:43:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o210h51L041303; Mon, 1 Mar 2010 00:43:05 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o210h5QH041301; Mon, 1 Mar 2010 00:43:05 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003010043.o210h5QH041301@svn.freebsd.org> From: Robert Watson Date: Mon, 1 Mar 2010 00:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204498 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 00:43:06 -0000 Author: rwatson Date: Mon Mar 1 00:43:05 2010 New Revision: 204498 URL: http://svn.freebsd.org/changeset/base/204498 Log: Whitespace tweak. MFC after: 3 days Modified: head/sys/net/netisr.h Modified: head/sys/net/netisr.h ============================================================================== --- head/sys/net/netisr.h Mon Mar 1 00:42:36 2010 (r204497) +++ head/sys/net/netisr.h Mon Mar 1 00:43:05 2010 (r204498) @@ -167,7 +167,7 @@ struct sysctl_netisr_work { * can rebalance work. */ struct mbuf; -typedef void netisr_handler_t (struct mbuf *m); +typedef void netisr_handler_t(struct mbuf *m); typedef struct mbuf *netisr_m2cpuid_t(struct mbuf *m, uintptr_t source, u_int *cpuid); typedef struct mbuf *netisr_m2flow_t(struct mbuf *m, uintptr_t source); From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 00:46:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01AB3106566B; Mon, 1 Mar 2010 00:46:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3A078FC14; Mon, 1 Mar 2010 00:46:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o210kjnE042195; Mon, 1 Mar 2010 00:46:45 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o210kjJ1042191; Mon, 1 Mar 2010 00:46:45 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003010046.o210kjJ1042191@svn.freebsd.org> From: Robert Watson Date: Mon, 1 Mar 2010 00:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204499 - head/usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 00:46:46 -0000 Author: rwatson Date: Mon Mar 1 00:46:45 2010 New Revision: 204499 URL: http://svn.freebsd.org/changeset/base/204499 Log: Teach netstat -Q to work with -N and -M by adding libkvm versions of data query routines. This code is necessarily more fragile in the presence of kernel changes than querying the kernel via sysctl (the default), but useful when investigating crashes or live kernel state via firewire. MFC after: 1 week Sponsored by: Juniper Networks Modified: head/usr.bin/netstat/main.c head/usr.bin/netstat/netisr.c head/usr.bin/netstat/netstat.h Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Mon Mar 1 00:43:05 2010 (r204498) +++ head/usr.bin/netstat/main.c Mon Mar 1 00:46:45 2010 (r204499) @@ -530,9 +530,11 @@ main(int argc, char *argv[]) exit(0); } if (Qflag) { - if (!live) - usage(); - netisr_stats(); + if (!live) { + if (kread(0, NULL, 0) == 0) + netisr_stats(kvmd); + } else + netisr_stats(NULL); exit(0); } #if 0 Modified: head/usr.bin/netstat/netisr.c ============================================================================== --- head/usr.bin/netstat/netisr.c Mon Mar 1 00:43:05 2010 (r204498) +++ head/usr.bin/netstat/netisr.c Mon Mar 1 00:46:45 2010 (r204499) @@ -31,15 +31,22 @@ __FBSDID("$FreeBSD$"); -#include +#include #include +#include +#include + +#define _WANT_NETISR_INTERNAL #include +#include #include +#include #include #include #include +#include #include "netstat.h" @@ -65,6 +72,90 @@ static u_int workstream_array_len; static struct sysctl_netisr_work *work_array; static u_int work_array_len; +static u_int *nws_array; + +static u_int maxprot; + +static void +netisr_load_kvm_uint(kvm_t *kd, char *name, u_int *p) +{ + struct nlist nl[] = { + { .n_name = name }, + { .n_name = NULL }, + }; + int ret; + + ret = kvm_nlist(kd, nl); + if (ret < 0) + errx(-1, "%s: kvm_nlist(%s): %s", __func__, name, + kvm_geterr(kd)); + if (ret != 0) + errx(-1, "%s: kvm_nlist(%s): unresolved symbol", __func__, + name); + if (kvm_read(kd, nl[0].n_value, p, sizeof(*p)) != sizeof(*p)) + errx(-1, "%s: kvm_read(%s): %s", __func__, name, + kvm_geterr(kd)); +} + +/* + * Load a nul-terminated string from KVM up to 'limit', guarantee that the + * string in local memory is nul-terminated. + */ +static void +netisr_load_kvm_string(kvm_t *kd, uintptr_t addr, char *dest, u_int limit) +{ + u_int i; + + for (i = 0; i < limit; i++) { + if (kvm_read(kd, addr + i, &dest[i], sizeof(dest[i])) != + sizeof(dest[i])) + err(-1, "%s: kvm_read: %s", __func__, + kvm_geterr(kd)); + if (dest[i] == '\0') + break; + } + dest[limit - 1] = '\0'; +} + +static const char * +netisr_proto2name(u_int proto) +{ + u_int i; + + for (i = 0; i < proto_array_len; i++) { + if (proto_array[i].snp_proto == proto) + return (proto_array[i].snp_name); + } + return ("unknown"); +} + +static int +netisr_protoispresent(u_int proto) +{ + u_int i; + + for (i = 0; i < proto_array_len; i++) { + if (proto_array[i].snp_proto == proto) + return (1); + } + return (0); +} + +static void +netisr_load_kvm_config(kvm_t *kd) +{ + + netisr_load_kvm_uint(kd, "_netisr_bindthreads", &bindthreads); + netisr_load_kvm_uint(kd, "_netisr_maxthreads", &maxthreads); + netisr_load_kvm_uint(kd, "_nws_count", &numthreads); + + netisr_load_kvm_uint(kd, "_netisr_defaultqlimit", &defaultqlimit); + netisr_load_kvm_uint(kd, "_netisr_maxqlimit", &maxqlimit); + + netisr_load_kvm_uint(kd, "_netisr_direct", &direct); + netisr_load_kvm_uint(kd, "_netisr_direct_force", &direct_force); +} + static void netisr_load_sysctl_uint(const char *name, u_int *p) { @@ -78,7 +169,7 @@ netisr_load_sysctl_uint(const char *name } static void -netisr_load_config(void) +netisr_load_sysctl_config(void) { netisr_load_sysctl_uint("net.isr.bindthreads", &bindthreads); @@ -93,7 +184,80 @@ netisr_load_config(void) } static void -netisr_load_proto(void) +netisr_load_kvm_proto(kvm_t *kd) +{ + struct nlist nl[] = { +#define NLIST_NETISR_PROTO 0 + { .n_name = "_netisr_proto" }, + { .n_name = NULL }, + }; + struct netisr_proto *np_array, *npp; + u_int i, protocount; + struct sysctl_netisr_proto *snpp; + size_t len; + int ret; + + /* + * Kernel compile-time and user compile-time definitions of + * NETISR_MAXPROT must match, as we use that to size work arrays. + */ + netisr_load_kvm_uint(kd, "_netisr_maxprot", &maxprot); + if (maxprot != NETISR_MAXPROT) + errx(-1, "%s: NETISR_MAXPROT mismatch", __func__); + len = maxprot * sizeof(*np_array); + np_array = malloc(len); + if (np_array == NULL) + err(-1, "%s: malloc", __func__); + ret = kvm_nlist(kd, nl); + if (ret < 0) + errx(-1, "%s: kvm_nlist(_netisr_proto): %s", __func__, + kvm_geterr(kd)); + if (ret != 0) + errx(-1, "%s: kvm_nlist(_netisr_proto): unresolved symbol", + __func__); + if (kvm_read(kd, nl[NLIST_NETISR_PROTO].n_value, np_array, len) != + (ssize_t)len) + errx(-1, "%s: kvm_read(_netisr_proto): %s", __func__, + kvm_geterr(kd)); + + /* + * Size and allocate memory to hold only live protocols. + */ + protocount = 0; + for (i = 0; i < maxprot; i++) { + if (np_array[i].np_name == NULL) + continue; + protocount++; + } + proto_array = calloc(protocount, sizeof(*proto_array)); + if (proto_array == NULL) + err(-1, "malloc"); + protocount = 0; + for (i = 0; i < maxprot; i++) { + npp = &np_array[i]; + if (npp->np_name == NULL) + continue; + snpp = &proto_array[protocount]; + snpp->snp_version = sizeof(*snpp); + netisr_load_kvm_string(kd, (uintptr_t)npp->np_name, + snpp->snp_name, sizeof(snpp->snp_name)); + snpp->snp_proto = i; + snpp->snp_qlimit = npp->np_qlimit; + snpp->snp_policy = npp->np_policy; + if (npp->np_m2flow != NULL) + snpp->snp_flags |= NETISR_SNP_FLAGS_M2FLOW; + if (npp->np_m2cpuid != NULL) + snpp->snp_flags |= NETISR_SNP_FLAGS_M2CPUID; + if (npp->np_drainedcpu != NULL) + snpp->snp_flags |= NETISR_SNP_FLAGS_DRAINEDCPU; + protocount++; + } + proto_array_len = protocount; + free(np_array); +} + +static void +netisr_load_sysctl_proto(void) { size_t len; @@ -116,7 +280,96 @@ netisr_load_proto(void) } static void -netisr_load_workstream(void) +netisr_load_kvm_workstream(kvm_t *kd) +{ + struct nlist nl[] = { +#define NLIST_NWS_ARRAY 0 + { .n_name = "_nws_array" }, + { .n_name = NULL }, + }; + struct netisr_workstream nws; + struct sysctl_netisr_workstream *snwsp; + struct sysctl_netisr_work *snwp; + struct netisr_work *nwp; + struct nlist nl_nws[2]; + u_int counter, cpuid, proto, wsid; + size_t len; + int ret; + + len = numthreads * sizeof(*nws_array); + nws_array = malloc(len); + if (nws_array == NULL) + err(-1, "malloc"); + ret = kvm_nlist(kd, nl); + if (ret < 0) + errx(-1, "%s: kvm_nlist: %s", __func__, kvm_geterr(kd)); + if (ret != 0) + errx(-1, "%s: kvm_nlist: unresolved symbol", __func__); + if (kvm_read(kd, nl[NLIST_NWS_ARRAY].n_value, nws_array, len) != + (ssize_t)len) + errx(-1, "%s: kvm_read(_nws_array): %s", __func__, + kvm_geterr(kd)); + workstream_array = calloc(numthreads, sizeof(*workstream_array)); + if (workstream_array == NULL) + err(-1, "calloc"); + workstream_array_len = numthreads; + work_array = calloc(numthreads * proto_array_len, sizeof(*work_array)); + if (work_array == NULL) + err(-1, "calloc"); + counter = 0; + for (wsid = 0; wsid < numthreads; wsid++) { + cpuid = nws_array[wsid]; + if (kvm_dpcpu_setcpu(kd, cpuid) < 0) + errx(-1, "%s: kvm_dpcpu_setcpu(%u): %s", __func__, + cpuid, kvm_geterr(kd)); + bzero(nl_nws, sizeof(nl_nws)); + nl_nws[0].n_name = "_nws"; + ret = kvm_nlist(kd, nl_nws); + if (ret < 0) + errx(-1, "%s: kvm_nlist looking up nws on CPU %u: %s", + __func__, cpuid, kvm_geterr(kd)); + if (ret != 0) + errx(-1, "%s: kvm_nlist(nws): unresolved symbol on " + "CPU %u", __func__, cpuid); + if (kvm_read(kd, nl_nws[0].n_value, &nws, sizeof(nws)) != + sizeof(nws)) + errx(-1, "%s: kvm_read(nw): %s", __func__, + kvm_geterr(kd)); + snwsp = &workstream_array[wsid]; + snwsp->snws_version = sizeof(*snwsp); + snwsp->snws_wsid = cpuid; + snwsp->snws_cpu = cpuid; + if (nws.nws_intr_event != NULL) + snwsp->snws_flags |= NETISR_SNWS_FLAGS_INTR; + + /* + * Extract the CPU's per-protocol work information. + */ + printf("counting to maxprot: %u\n", maxprot); + for (proto = 0; proto < maxprot; proto++) { + if (!netisr_protoispresent(proto)) + continue; + nwp = &nws.nws_work[proto]; + snwp = &work_array[counter]; + snwp->snw_version = sizeof(*snwp); + snwp->snw_wsid = cpuid; + snwp->snw_proto = proto; + snwp->snw_len = nwp->nw_len; + snwp->snw_watermark = nwp->nw_watermark; + snwp->snw_dispatched = nwp->nw_dispatched; + snwp->snw_hybrid_dispatched = + nwp->nw_hybrid_dispatched; + snwp->snw_qdrops = nwp->nw_qdrops; + snwp->snw_queued = nwp->nw_queued; + snwp->snw_handled = nwp->nw_handled; + counter++; + } + } + work_array_len = counter; +} + +static void +netisr_load_sysctl_workstream(void) { size_t len; @@ -140,7 +393,7 @@ netisr_load_workstream(void) } static void -netisr_load_work(void) +netisr_load_sysctl_work(void) { size_t len; @@ -179,18 +432,6 @@ netisr_print_proto(struct sysctl_netisr_ (snpp->snp_flags & NETISR_SNP_FLAGS_M2FLOW) ? "F" : "-"); } -static const char * -netisr_proto2name(u_int proto) -{ - u_int i; - - for (i = 0; i < proto_array_len; i++) { - if (proto_array[i].snp_proto == proto) - return (proto_array[i].snp_name); - } - return ("unknown"); -} - static void netisr_print_workstream(struct sysctl_netisr_workstream *snwsp) { @@ -223,16 +464,25 @@ netisr_print_workstream(struct sysctl_ne } void -netisr_stats(void) +netisr_stats(void *kvmd) { struct sysctl_netisr_workstream *snwsp; struct sysctl_netisr_proto *snpp; + kvm_t *kd = kvmd; u_int i; - netisr_load_config(); - netisr_load_proto(); - netisr_load_workstream(); - netisr_load_work(); + if (live) { + netisr_load_sysctl_config(); + netisr_load_sysctl_proto(); + netisr_load_sysctl_workstream(); + netisr_load_sysctl_work(); + } else { + if (kd == NULL) + errx(-1, "netisr_stats: !live but !kd"); + netisr_load_kvm_config(kd); + netisr_load_kvm_proto(kd); + netisr_load_kvm_workstream(kd); /* Also does work. */ + } printf("Configuration:\n"); printf("%-25s %12s %12s\n", "Setting", "Value", "Maximum"); Modified: head/usr.bin/netstat/netstat.h ============================================================================== --- head/usr.bin/netstat/netstat.h Mon Mar 1 00:43:05 2010 (r204498) +++ head/usr.bin/netstat/netstat.h Mon Mar 1 00:46:45 2010 (r204499) @@ -115,7 +115,7 @@ void pfkey_stats(u_long, const char *, i void mbpr(void *, u_long); -void netisr_stats(void); +void netisr_stats(void *); void hostpr(u_long, u_long); void impstats(u_long, u_long); From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 07:32:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B9711065670; Mon, 1 Mar 2010 07:32:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AC148FC13; Mon, 1 Mar 2010 07:32:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o217Wp14031982; Mon, 1 Mar 2010 07:32:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o217Wof5031951; Mon, 1 Mar 2010 07:32:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003010732.o217Wof5031951@svn.freebsd.org> From: Alexander Motin Date: Mon, 1 Mar 2010 07:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204509 - in head/sys/dev/ata: . chipsets X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 07:32:51 -0000 Author: mav Date: Mon Mar 1 07:32:49 2010 New Revision: 204509 URL: http://svn.freebsd.org/changeset/base/204509 Log: - Add ALI M5228 PATA ID. - Add missed DMA initialization for ALI SATA chips. Modified: head/sys/dev/ata/ata-pci.h head/sys/dev/ata/chipsets/ata-acerlabs.c Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Mon Mar 1 07:27:24 2010 (r204508) +++ head/sys/dev/ata/ata-pci.h Mon Mar 1 07:32:49 2010 (r204509) @@ -84,6 +84,7 @@ struct ata_pci_controller { #define ATA_ACER_LABS_ID 0x10b9 #define ATA_ALI_1533 0x153310b9 +#define ATA_ALI_5228 0x522810b9 #define ATA_ALI_5229 0x522910b9 #define ATA_ALI_5281 0x528110b9 #define ATA_ALI_5287 0x528710b9 Modified: head/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-acerlabs.c Mon Mar 1 07:27:24 2010 (r204508) +++ head/sys/dev/ata/chipsets/ata-acerlabs.c Mon Mar 1 07:32:49 2010 (r204509) @@ -79,6 +79,7 @@ ata_ali_probe(device_t dev) { ATA_ALI_5288, 0x00, 4, ALI_SATA, ATA_SA300, "M5288" }, { ATA_ALI_5287, 0x00, 4, ALI_SATA, ATA_SA150, "M5287" }, { ATA_ALI_5281, 0x00, 2, ALI_SATA, ATA_SA150, "M5281" }, + { ATA_ALI_5228, 0xc5, 0, ALI_NEW, ATA_UDMA6, "M5228" }, { ATA_ALI_5229, 0xc5, 0, ALI_NEW, ATA_UDMA6, "M5229" }, { ATA_ALI_5229, 0xc4, 0, ALI_NEW, ATA_UDMA5, "M5229" }, { ATA_ALI_5229, 0xc2, 0, ALI_NEW, ATA_UDMA4, "M5229" }, @@ -208,7 +209,7 @@ ata_ali_sata_ch_attach(device_t dev) io = res->bars[0]; ctlio = res->bars[1]; } - + ata_pci_dmainit(dev); for (i = ATA_DATA; i <= ATA_COMMAND; i ++) { ch->r_io[i].res = io; ch->r_io[i].offset = i + (unit10 ? 8 : 0); From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 09:18:05 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FF151065674; Mon, 1 Mar 2010 09:18:05 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail16.syd.optusnet.com.au (mail16.syd.optusnet.com.au [211.29.132.197]) by mx1.freebsd.org (Postfix) with ESMTP id 85E9F8FC17; Mon, 1 Mar 2010 09:18:04 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-253-149.belrs3.nsw.optusnet.com.au [122.106.253.149]) by mail16.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o219HvND025180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Mar 2010 20:17:59 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o219HvAX073614; Mon, 1 Mar 2010 20:17:57 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o219Huge073613; Mon, 1 Mar 2010 20:17:56 +1100 (EST) (envelope-from peter) Date: Mon, 1 Mar 2010 20:17:56 +1100 From: Peter Jeremy To: "M. Warner Losh" Message-ID: <20100301091756.GA73361@server.vk2pj.dyndns.org> References: <20100228195041.GA68446@server.vk2pj.dyndns.org> <20100228.145300.29649867912530.imp@bsdimp.com> <4B8AF55C.6040103@freebsd.org> <20100228.160732.597029496557504767.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <20100228.160732.597029496557504767.imp@bsdimp.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: src-committers@FreeBSD.org, delphij@gmail.com, svn-src-all@FreeBSD.org, attilio@FreeBSD.org, kostikbel@gmail.com, nwhitehorn@FreeBSD.org, svn-src-head@FreeBSD.org, emaste@FreeBSD.org Subject: Re: svn commit: r204309 - in head/sys: amd64/amd64 amd64/isa conf i386/bios i386/cpufreq i386/i386 i386/isa i386/xen isa modules/bios/smbios modules/bios/vpd modules/cpufreq pc98/pc98 x86 x86/bios x86/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 09:18:05 -0000 --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Feb-28 16:07:32 -0700, "M. Warner Losh" wrote: >In message: <4B8AF55C.6040103@freebsd.org> > Nathan Whitehorn writes: >: M. Warner Losh wrote: >: > In message: <20100228195041.GA68446@server.vk2pj.dyndns.org> >: > Peter Jeremy writes: >: > : On 2010-Feb-26 14:57:36 +0100, Attilio Rao >: > wrote: >: > : >For the future, however, probabilly we would need to do something >: > like >: > : >pc98 already does wrt i386 (i386/include/ pc98/include/ >: > amd64/include/ >: > : >just have files wrappers to the generic one under x86/include/ when >: > : >necessary). >: > : : Not that something like this is also critical for getting >: > i386/amd64 >: > : cross compilation to work - one of the blocking issues is that the >: > : correct machine/ includes are not available in cross-compilatio >: > mode. >: > >: > Huh? >: > >: > I cross build all the time, and the machine/ includes are always >: > right, with or without this patch. Maybe you could explain what you >: > mean here... >: > =20 >: I'm guessing what was meant is that one benefit of a merged tree (like >: we will have with powerpc) is that you can do cc -m32 on a 64-bit host >: to get a 32-bit binary, which is less than trivial now. Yep. >True enough. But we don't have anywhere close to a merged tree on >x86, and won't for the foreseeable future. I don't really want to see >an include32, when all the cross building tools exist in the tree >already (see XDEV in Makefile.inc1)... I agree that we don't want an include32 - all that we need is the machine-dependent directory (i386, amd64, ...). > If you are cross building, you >really need a full cross building environment. The -m32 hacks we have >now are, as you describe, insufficient to the task... For building i386 executables in an amd64 world, we already have almost everything needed - the toolchain is present, the libraries are present, most of the headers are present. The only parts of the environment that aren't installed in default are the machine-dependent headers (and some glue to include the appropriate architecture). I'm not saying that installing the i386 headers will magically make '-m32' work but it's a necessary prerequisite. --=20 Peter Jeremy --wac7ysb48OaltWcw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkuLhkQACgkQ/opHv/APuIeKVACgp5gYt2lXnDDZsYfLdcUqOfnp 3tgAoI76+E4IKTrKCebECNk8q/D/pbY6 =UUdQ -----END PGP SIGNATURE----- --wac7ysb48OaltWcw-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 09:46:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B021B106564A; Mon, 1 Mar 2010 09:46:27 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EAC88FC1D; Mon, 1 Mar 2010 09:46:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o219kRqi061328; Mon, 1 Mar 2010 09:46:27 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o219kRRc061326; Mon, 1 Mar 2010 09:46:27 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003010946.o219kRRc061326@svn.freebsd.org> From: Robert Watson Date: Mon, 1 Mar 2010 09:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204511 - head/lib/libkvm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 09:46:27 -0000 Author: rwatson Date: Mon Mar 1 09:46:27 2010 New Revision: 204511 URL: http://svn.freebsd.org/changeset/base/204511 Log: Not all programs including kvm.h include the necessary headers to use u_int, so prefer unsigned int. MFC after: 6 days Pointed out by: bz, kib, Mr Tinderbox Modified: head/lib/libkvm/kvm.h Modified: head/lib/libkvm/kvm.h ============================================================================== --- head/lib/libkvm/kvm.h Mon Mar 1 09:39:14 2010 (r204510) +++ head/lib/libkvm/kvm.h Mon Mar 1 09:46:27 2010 (r204511) @@ -69,7 +69,7 @@ struct kvm_swap { __BEGIN_DECLS int kvm_close(kvm_t *); -int kvm_dpcpu_setcpu(kvm_t *, u_int); +int kvm_dpcpu_setcpu(kvm_t *, unsigned int); char **kvm_getargv(kvm_t *, const struct kinfo_proc *, int); int kvm_getcptime(kvm_t *, long *); char **kvm_getenvv(kvm_t *, const struct kinfo_proc *, int); From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 12:11:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1281A1065677; Mon, 1 Mar 2010 12:11:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01BC28FC0C; Mon, 1 Mar 2010 12:11:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21CBbxE094294; Mon, 1 Mar 2010 12:11:37 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21CBbva094292; Mon, 1 Mar 2010 12:11:37 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003011211.o21CBbva094292@svn.freebsd.org> From: Robert Watson Date: Mon, 1 Mar 2010 12:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204515 - head/usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 12:11:38 -0000 Author: rwatson Date: Mon Mar 1 12:11:37 2010 New Revision: 204515 URL: http://svn.freebsd.org/changeset/base/204515 Log: Prefer vocabulary of 'Current' and 'Limit' to 'Value' and 'Maximum' in netstat -Q. MFC after: 6 days Sponsored by: Juniper Networks Modified: head/usr.bin/netstat/netisr.c Modified: head/usr.bin/netstat/netisr.c ============================================================================== --- head/usr.bin/netstat/netisr.c Mon Mar 1 11:33:09 2010 (r204514) +++ head/usr.bin/netstat/netisr.c Mon Mar 1 12:11:37 2010 (r204515) @@ -485,7 +485,7 @@ netisr_stats(void *kvmd) } printf("Configuration:\n"); - printf("%-25s %12s %12s\n", "Setting", "Value", "Maximum"); + printf("%-25s %12s %12s\n", "Setting", "Current", "Limit"); printf("%-25s %12u %12u\n", "Thread count", numthreads, maxthreads); printf("%-25s %12u %12u\n", "Default queue limit", defaultqlimit, maxqlimit); From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 09:21:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84AD1106566B; Mon, 1 Mar 2010 09:21:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 0AF8D8FC18; Mon, 1 Mar 2010 09:21:53 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o219LiJr052380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Mar 2010 11:21:44 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o219Li8t039972; Mon, 1 Mar 2010 11:21:44 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o219Li4T039971; Mon, 1 Mar 2010 11:21:44 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 1 Mar 2010 11:21:44 +0200 From: Kostik Belousov To: "M. Warner Losh" Message-ID: <20100301092144.GS2489@deviant.kiev.zoral.com.ua> References: <20100228195041.GA68446@server.vk2pj.dyndns.org> <20100228.145300.29649867912530.imp@bsdimp.com> <4B8AF55C.6040103@freebsd.org> <20100228.160732.597029496557504767.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="psiTe9LjpVyD9953" Content-Disposition: inline In-Reply-To: <20100228.160732.597029496557504767.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Mailman-Approved-At: Mon, 01 Mar 2010 12:31:56 +0000 Cc: src-committers@freebsd.org, delphij@gmail.com, peterjeremy@acm.org, svn-src-all@freebsd.org, attilio@freebsd.org, kostikbel@gmail.com, nwhitehorn@freebsd.org, svn-src-head@freebsd.org, emaste@freebsd.org Subject: Re: svn commit: r204309 - in head/sys: amd64/amd64 amd64/isa conf i386/bios i386/cpufreq i386/i386 i386/isa i386/xen isa modules/bios/smbios modules/bios/vpd modules/cpufreq pc98/pc98 x86 x86/bios x86/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 09:21:54 -0000 --psiTe9LjpVyD9953 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 28, 2010 at 04:07:32PM -0700, M. Warner Losh wrote: > In message: <4B8AF55C.6040103@freebsd.org> > Nathan Whitehorn writes: > : M. Warner Losh wrote: > : > In message: <20100228195041.GA68446@server.vk2pj.dyndns.org> > : > Peter Jeremy writes: > : > : On 2010-Feb-26 14:57:36 +0100, Attilio Rao > : > wrote: > : > : >For the future, however, probabilly we would need to do something > : > like > : > : >pc98 already does wrt i386 (i386/include/ pc98/include/ > : > amd64/include/ > : > : >just have files wrappers to the generic one under x86/include/ when > : > : >necessary). > : > : : Not that something like this is also critical for getting > : > i386/amd64 > : > : cross compilation to work - one of the blocking issues is that the > : > : correct machine/ includes are not available in cross-compilatio > : > mode. > : > > : > Huh? > : > > : > I cross build all the time, and the machine/ includes are always > : > right, with or without this patch. Maybe you could explain what you > : > mean here... > : > > : > The issue is that old code has > : > > : > #include > : > > : > or whatever in it, and we need to have an i386/isa.h that's just > : > #include > : > > : > Warner > : > =20 > : I'm guessing what was meant is that one benefit of a merged tree (like > : we will have with powerpc) is that you can do cc -m32 on a 64-bit host > : to get a 32-bit binary, which is less than trivial now. >=20 > True enough. But we don't have anywhere close to a merged tree on > x86, and won't for the foreseeable future. I don't really want to see > an include32, when all the cross building tools exist in the tree > already (see XDEV in Makefile.inc1)... If you are cross building, you > really need a full cross building environment. The -m32 hacks we have > now are, as you describe, insufficient to the task... -m32 is not a hack, it is a standard feature on Linux and Solaris, allowing to build both 32 and 64 bit binaries in the host environment, not going to cross-compilation or chroot. It is very much missing on the FreeBSD. Merged x86 tree is ortoghonal to this feature. --psiTe9LjpVyD9953 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuLhygACgkQC3+MBN1Mb4j81wCg7RfTnSkuX6kYq5EGFbaDed1+ GE0AoOdaNjVN/NFiSoT71yy6pgGOXA0E =E0qC -----END PGP SIGNATURE----- --psiTe9LjpVyD9953-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 13:56:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA4321065680; Mon, 1 Mar 2010 13:56:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA2978FC18; Mon, 1 Mar 2010 13:56:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21DuF2c017477; Mon, 1 Mar 2010 13:56:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21DuFVE017474; Mon, 1 Mar 2010 13:56:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003011356.o21DuFVE017474@svn.freebsd.org> From: John Baldwin Date: Mon, 1 Mar 2010 13:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204518 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 13:56:15 -0000 Author: jhb Date: Mon Mar 1 13:56:15 2010 New Revision: 204518 URL: http://svn.freebsd.org/changeset/base/204518 Log: Print the contents of the miscellaneous (MISC) register to the console if it is valid along with the other register values when a machine check is encountered. MFC after: 1 week Modified: head/sys/amd64/amd64/mca.c head/sys/i386/i386/mca.c Modified: head/sys/amd64/amd64/mca.c ============================================================================== --- head/sys/amd64/amd64/mca.c Mon Mar 1 13:55:28 2010 (r204517) +++ head/sys/amd64/amd64/mca.c Mon Mar 1 13:56:15 2010 (r204518) @@ -288,6 +288,8 @@ mca_log(const struct mca_record *rec) printf("\n"); if (rec->mr_status & MC_STATUS_ADDRV) printf("MCA: Address 0x%llx\n", (long long)rec->mr_addr); + if (rec->mr_status & MC_STATUS_MISCV) + printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc); } static int __nonnull(2) Modified: head/sys/i386/i386/mca.c ============================================================================== --- head/sys/i386/i386/mca.c Mon Mar 1 13:55:28 2010 (r204517) +++ head/sys/i386/i386/mca.c Mon Mar 1 13:56:15 2010 (r204518) @@ -288,6 +288,8 @@ mca_log(const struct mca_record *rec) printf("\n"); if (rec->mr_status & MC_STATUS_ADDRV) printf("MCA: Address 0x%llx\n", (long long)rec->mr_addr); + if (rec->mr_status & MC_STATUS_MISCV) + printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc); } static int __nonnull(2) From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 14:27:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 078171065677; Mon, 1 Mar 2010 14:27:17 +0000 (UTC) (envelope-from bruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1AD88FC14; Mon, 1 Mar 2010 14:27:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21ERGdX024390; Mon, 1 Mar 2010 14:27:16 GMT (envelope-from bruno@svn.freebsd.org) Received: (from bruno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21ERGkq024388; Mon, 1 Mar 2010 14:27:16 GMT (envelope-from bruno@svn.freebsd.org) Message-Id: <201003011427.o21ERGkq024388@svn.freebsd.org> From: Bruno Ducrot Date: Mon, 1 Mar 2010 14:27:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204519 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 14:27:17 -0000 Author: bruno Date: Mon Mar 1 14:27:16 2010 New Revision: 204519 URL: http://svn.freebsd.org/changeset/base/204519 Log: Deliver siginfo when signal is generated by thr_kill(2) (SI_USER with properly filled si_uid and si_pid). Reported by: Joel Bertrand PR: 141956 Reviewed by: kib MFC after: 2 weeks Modified: head/sys/kern/kern_thr.c Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Mon Mar 1 13:56:15 2010 (r204518) +++ head/sys/kern/kern_thr.c Mon Mar 1 14:27:16 2010 (r204519) @@ -303,12 +303,18 @@ int thr_kill(struct thread *td, struct thr_kill_args *uap) /* long id, int sig */ { + ksiginfo_t ksi; struct thread *ttd; struct proc *p; int error; p = td->td_proc; error = 0; + ksiginfo_init(&ksi); + ksi.ksi_signo = uap->sig; + ksi.ksi_code = SI_USER; + ksi.ksi_pid = p->p_pid; + ksi.ksi_uid = td->td_ucred->cr_ruid; PROC_LOCK(p); if (uap->id == -1) { if (uap->sig != 0 && !_SIG_VALID(uap->sig)) { @@ -320,7 +326,7 @@ thr_kill(struct thread *td, struct thr_k error = 0; if (uap->sig == 0) break; - tdsignal(p, ttd, uap->sig, NULL); + tdsignal(p, ttd, uap->sig, &ksi); } } } @@ -336,7 +342,7 @@ thr_kill(struct thread *td, struct thr_k else if (!_SIG_VALID(uap->sig)) error = EINVAL; else - tdsignal(p, ttd, uap->sig, NULL); + tdsignal(p, ttd, uap->sig, &ksi); } PROC_UNLOCK(p); return (error); @@ -346,6 +352,7 @@ int thr_kill2(struct thread *td, struct thr_kill2_args *uap) /* pid_t pid, long id, int sig */ { + ksiginfo_t ksi; struct thread *ttd; struct proc *p; int error; @@ -362,6 +369,11 @@ thr_kill2(struct thread *td, struct thr_ error = p_cansignal(td, p, uap->sig); if (error == 0) { + ksiginfo_init(&ksi); + ksi.ksi_signo = uap->sig; + ksi.ksi_code = SI_USER; + ksi.ksi_pid = td->td_proc->p_pid; + ksi.ksi_uid = td->td_ucred->cr_ruid; if (uap->id == -1) { if (uap->sig != 0 && !_SIG_VALID(uap->sig)) { error = EINVAL; @@ -372,7 +384,8 @@ thr_kill2(struct thread *td, struct thr_ error = 0; if (uap->sig == 0) break; - tdsignal(p, ttd, uap->sig, NULL); + tdsignal(p, ttd, uap->sig, + &ksi); } } } @@ -388,7 +401,7 @@ thr_kill2(struct thread *td, struct thr_ else if (!_SIG_VALID(uap->sig)) error = EINVAL; else - tdsignal(p, ttd, uap->sig, NULL); + tdsignal(p, ttd, uap->sig, &ksi); } } PROC_UNLOCK(p); From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 15:37:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A7931065672; Mon, 1 Mar 2010 15:37:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E9F838FC1B; Mon, 1 Mar 2010 15:37:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o21FX2ZC047576; Mon, 1 Mar 2010 08:33:02 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 01 Mar 2010 08:33:18 -0700 (MST) Message-Id: <20100301.083318.1014377171341854280.imp@bsdimp.com> To: kostikbel@gmail.com From: "M. Warner Losh" In-Reply-To: <20100301092144.GS2489@deviant.kiev.zoral.com.ua> References: <4B8AF55C.6040103@freebsd.org> <20100228.160732.597029496557504767.imp@bsdimp.com> <20100301092144.GS2489@deviant.kiev.zoral.com.ua> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, delphij@gmail.com, peterjeremy@acm.org, svn-src-all@freebsd.org, attilio@freebsd.org, nwhitehorn@freebsd.org, svn-src-head@freebsd.org, emaste@freebsd.org Subject: Re: svn commit: r204309 - in head/sys: amd64/amd64 amd64/isa conf i386/bios i386/cpufreq i386/i386 i386/isa i386/xen isa modules/bios/smbios modules/bios/vpd modules/cpufreq pc98/pc98 x86 x86/bios x86/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 15:37:26 -0000 In message: <20100301092144.GS2489@deviant.kiev.zoral.com.ua> Kostik Belousov writes: : On Sun, Feb 28, 2010 at 04:07:32PM -0700, M. Warner Losh wrote: : > In message: <4B8AF55C.6040103@freebsd.org> : > Nathan Whitehorn writes: : > : M. Warner Losh wrote: : > : > In message: <20100228195041.GA68446@server.vk2pj.dyndns.org> : > : > Peter Jeremy writes: : > : > : On 2010-Feb-26 14:57:36 +0100, Attilio Rao : > : > wrote: : > : > : >For the future, however, probabilly we would need to do something : > : > like : > : > : >pc98 already does wrt i386 (i386/include/ pc98/include/ : > : > amd64/include/ : > : > : >just have files wrappers to the generic one under x86/include/ when : > : > : >necessary). : > : > : : Not that something like this is also critical for getting : > : > i386/amd64 : > : > : cross compilation to work - one of the blocking issues is that the : > : > : correct machine/ includes are not available in cross-compilatio : > : > mode. : > : > : > : > Huh? : > : > : > : > I cross build all the time, and the machine/ includes are always : > : > right, with or without this patch. Maybe you could explain what you : > : > mean here... : > : > : > : > The issue is that old code has : > : > : > : > #include : > : > : > : > or whatever in it, and we need to have an i386/isa.h that's just : > : > #include : > : > : > : > Warner : > : > : > : I'm guessing what was meant is that one benefit of a merged tree (like : > : we will have with powerpc) is that you can do cc -m32 on a 64-bit host : > : to get a 32-bit binary, which is less than trivial now. : > : > True enough. But we don't have anywhere close to a merged tree on : > x86, and won't for the foreseeable future. I don't really want to see : > an include32, when all the cross building tools exist in the tree : > already (see XDEV in Makefile.inc1)... If you are cross building, you : > really need a full cross building environment. The -m32 hacks we have : > now are, as you describe, insufficient to the task... : : -m32 is not a hack, it is a standard feature on Linux and Solaris, : allowing to build both 32 and 64 bit binaries in the host environment, : not going to cross-compilation or chroot. It is very much missing on : the FreeBSD. : : Merged x86 tree is ortoghonal to this feature. I guess what I'm saying is that -m32, as it is implemented today, is a hack. Mostly because it is missing all the pieces it needs to make it work. Warner From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 15:37:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96E931065670; Mon, 1 Mar 2010 15:37:32 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 48AD28FC0C; Mon, 1 Mar 2010 15:37:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o21FW0YX047559; Mon, 1 Mar 2010 08:32:00 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 01 Mar 2010 08:32:16 -0700 (MST) Message-Id: <20100301.083216.1031433154865964320.imp@bsdimp.com> To: peterjeremy@acm.org From: "M. Warner Losh" In-Reply-To: <20100301091756.GA73361@server.vk2pj.dyndns.org> References: <4B8AF55C.6040103@freebsd.org> <20100228.160732.597029496557504767.imp@bsdimp.com> <20100301091756.GA73361@server.vk2pj.dyndns.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, delphij@gmail.com, svn-src-all@freebsd.org, attilio@freebsd.org, kostikbel@gmail.com, nwhitehorn@freebsd.org, svn-src-head@freebsd.org, emaste@freebsd.org Subject: Re: svn commit: r204309 - in head/sys: amd64/amd64 amd64/isa conf i386/bios i386/cpufreq i386/i386 i386/isa i386/xen isa modules/bios/smbios modules/bios/vpd modules/cpufreq pc98/pc98 x86 x86/bios x86/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 15:37:32 -0000 In message: <20100301091756.GA73361@server.vk2pj.dyndns.org> Peter Jeremy writes: : On 2010-Feb-28 16:07:32 -0700, "M. Warner Losh" wrote: : >In message: <4B8AF55C.6040103@freebsd.org> : > Nathan Whitehorn writes: : >: M. Warner Losh wrote: : >: > In message: <20100228195041.GA68446@server.vk2pj.dyndns.org> : >: > Peter Jeremy writes: : >: > : On 2010-Feb-26 14:57:36 +0100, Attilio Rao : >: > wrote: : >: > : >For the future, however, probabilly we would need to do something : >: > like : >: > : >pc98 already does wrt i386 (i386/include/ pc98/include/ : >: > amd64/include/ : >: > : >just have files wrappers to the generic one under x86/include/ when : >: > : >necessary). : >: > : : Not that something like this is also critical for getting : >: > i386/amd64 : >: > : cross compilation to work - one of the blocking issues is that the : >: > : correct machine/ includes are not available in cross-compilatio : >: > mode. : >: > : >: > Huh? : >: > : >: > I cross build all the time, and the machine/ includes are always : >: > right, with or without this patch. Maybe you could explain what you : >: > mean here... : >: > : >: I'm guessing what was meant is that one benefit of a merged tree (like : >: we will have with powerpc) is that you can do cc -m32 on a 64-bit host : >: to get a 32-bit binary, which is less than trivial now. : : Yep. : : >True enough. But we don't have anywhere close to a merged tree on : >x86, and won't for the foreseeable future. I don't really want to see : >an include32, when all the cross building tools exist in the tree : >already (see XDEV in Makefile.inc1)... : : I agree that we don't want an include32 - all that we need is the : machine-dependent directory (i386, amd64, ...). No. We need a merged tree to make it actually work, otherwise machine/foo.h won't work right. simply having both i386/foo.h and amd64/foo.h is not sufficient. : > If you are cross building, you : >really need a full cross building environment. The -m32 hacks we have : >now are, as you describe, insufficient to the task... : : For building i386 executables in an amd64 world, we already have : almost everything needed - the toolchain is present, the libraries are : present, most of the headers are present. The only parts of the : environment that aren't installed in default are the machine-dependent : headers (and some glue to include the appropriate architecture). : : I'm not saying that installing the i386 headers will magically make : '-m32' work but it's a necessary prerequisite. We need merged support for both out of one tree, and we're nowhere near that. The toolchain also is only mostly present, last time I looked there were small bits and pieces missing here and there. Also, -m32 is a bit of a hack, since it isn't as useful as you'd like once you start to compile ports. Too many of them don't like it when you pass in a cc that has args with it, or they don't religiously use $CC, which means you get some 64-bit and some 32-bit goo. We have the same problem with MIPS... Warner From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 16:05:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FF93106566B; Mon, 1 Mar 2010 16:05:12 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id BFEF98FC14; Mon, 1 Mar 2010 16:05:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o21FqwJc047804; Mon, 1 Mar 2010 08:52:58 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 01 Mar 2010 08:53:14 -0700 (MST) Message-Id: <20100301.085314.131509470607393926.imp@bsdimp.com> To: kostikbel@gmail.com From: "M. Warner Losh" In-Reply-To: <20100301092144.GS2489@deviant.kiev.zoral.com.ua> References: <4B8AF55C.6040103@freebsd.org> <20100228.160732.597029496557504767.imp@bsdimp.com> <20100301092144.GS2489@deviant.kiev.zoral.com.ua> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, delphij@gmail.com, peterjeremy@acm.org, svn-src-all@freebsd.org, attilio@freebsd.org, nwhitehorn@freebsd.org, svn-src-head@freebsd.org, emaste@freebsd.org Subject: Re: svn commit: r204309 - in head/sys: amd64/amd64 amd64/isa conf i386/bios i386/cpufreq i386/i386 i386/isa i386/xen isa modules/bios/smbios modules/bios/vpd modules/cpufreq pc98/pc98 x86 x86/bios x86/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 16:05:12 -0000 In message: <20100301092144.GS2489@deviant.kiev.zoral.com.ua> Kostik Belousov writes: : -m32 is not a hack, it is a standard feature on Linux and Solaris, : allowing to build both 32 and 64 bit binaries in the host environment, : not going to cross-compilation or chroot. It is very much missing on : the FreeBSD. Having thought about it, I can see how we can make it work, so I withdraw my 'hack' statement. You're right. On Solaris and Linux, how well does autoconf cope with using CC="cc -m32"? I've had issues with similar constructs on MIPS to select diffrent word sizes or ABIs. : Merged x86 tree is ortoghonal to this feature. Yes, that's a much better way of saying what I was trying to say. Warner From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 16:52:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C849106566B; Mon, 1 Mar 2010 16:52:12 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BF8D8FC20; Mon, 1 Mar 2010 16:52:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21GqCn2056533; Mon, 1 Mar 2010 16:52:12 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21GqCKa056529; Mon, 1 Mar 2010 16:52:12 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003011652.o21GqCKa056529@svn.freebsd.org> From: Joel Dahl Date: Mon, 1 Mar 2010 16:52:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204520 - in head/sys/dev: cm ofw stge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 16:52:12 -0000 Author: joel (doc committer) Date: Mon Mar 1 16:52:11 2010 New Revision: 204520 URL: http://svn.freebsd.org/changeset/base/204520 Log: The NetBSD Foundation has granted permission to remove clause 3 and 4 from their software. Obtained from: NetBSD Modified: head/sys/dev/cm/if_cm_isa.c head/sys/dev/cm/smc90cx6.c head/sys/dev/cm/smc90cx6reg.h head/sys/dev/cm/smc90cx6var.h head/sys/dev/ofw/ofw_pci.h head/sys/dev/stge/if_stge.c head/sys/dev/stge/if_stgereg.h Modified: head/sys/dev/cm/if_cm_isa.c ============================================================================== --- head/sys/dev/cm/if_cm_isa.c Mon Mar 1 14:27:16 2010 (r204519) +++ head/sys/dev/cm/if_cm_isa.c Mon Mar 1 16:52:11 2010 (r204520) @@ -18,13 +18,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/cm/smc90cx6.c ============================================================================== --- head/sys/dev/cm/smc90cx6.c Mon Mar 1 14:27:16 2010 (r204519) +++ head/sys/dev/cm/smc90cx6.c Mon Mar 1 16:52:11 2010 (r204520) @@ -18,13 +18,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/cm/smc90cx6reg.h ============================================================================== --- head/sys/dev/cm/smc90cx6reg.h Mon Mar 1 14:27:16 2010 (r204519) +++ head/sys/dev/cm/smc90cx6reg.h Mon Mar 1 16:52:11 2010 (r204520) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/cm/smc90cx6var.h ============================================================================== --- head/sys/dev/cm/smc90cx6var.h Mon Mar 1 14:27:16 2010 (r204519) +++ head/sys/dev/cm/smc90cx6var.h Mon Mar 1 16:52:11 2010 (r204520) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/ofw/ofw_pci.h ============================================================================== --- head/sys/dev/ofw/ofw_pci.h Mon Mar 1 14:27:16 2010 (r204519) +++ head/sys/dev/ofw/ofw_pci.h Mon Mar 1 16:52:11 2010 (r204520) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/stge/if_stge.c ============================================================================== --- head/sys/dev/stge/if_stge.c Mon Mar 1 14:27:16 2010 (r204519) +++ head/sys/dev/stge/if_stge.c Mon Mar 1 16:52:11 2010 (r204520) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/stge/if_stgereg.h ============================================================================== --- head/sys/dev/stge/if_stgereg.h Mon Mar 1 14:27:16 2010 (r204519) +++ head/sys/dev/stge/if_stgereg.h Mon Mar 1 16:52:11 2010 (r204520) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 17:04:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E14E1065670; Mon, 1 Mar 2010 17:04:19 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DD0C8FC1C; Mon, 1 Mar 2010 17:04:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21H4JH1059375; Mon, 1 Mar 2010 17:04:19 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21H4Jvk059368; Mon, 1 Mar 2010 17:04:19 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003011704.o21H4Jvk059368@svn.freebsd.org> From: Rui Paulo Date: Mon, 1 Mar 2010 17:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204521 - in head/sys/dev/ath/ath_hal: . ar5212 ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 17:04:19 -0000 Author: rpaulo Date: Mon Mar 1 17:04:19 2010 New Revision: 204521 URL: http://svn.freebsd.org/changeset/base/204521 Log: Properly setup the TX FIFO threshold for AR5416 based chipsets, including the AR9285. This seems to fix some users's problems. Submitted by: Jorge Boncompte [DTI2] Modified: head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Mon Mar 1 16:52:11 2010 (r204520) +++ head/sys/dev/ath/ath_hal/ah_internal.h Mon Mar 1 17:04:19 2010 (r204521) @@ -281,6 +281,8 @@ struct ath_hal_private { uint16_t ah_maxPowerLevel; /* calculated max tx power */ u_int ah_tpScale; /* tx power scale factor */ uint32_t ah_11nCompat; /* 11n compat controls */ + uint8_t ah_txtrig_level; /* current Tx trigger level */ + uint8_t ah_max_txtrig_level; /* max tx trigger level */ /* * State for regulatory domain handling. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Mon Mar 1 16:52:11 2010 (r204520) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Mon Mar 1 17:04:19 2010 (r204521) @@ -149,6 +149,9 @@ static const struct ath_hal_private ar52 .ah_getInterrupts = ar5212GetInterrupts, .ah_setInterrupts = ar5212SetInterrupts }, + .ah_txtrig_level = INIT_TX_FIFO_THRESHOLD, + .ah_max_txtrig_level = MAX_TX_FIFO_THRESHOLD, + .ah_getChannelEdges = ar5212GetChannelEdges, .ah_getWirelessModes = ar5212GetWirelessModes, .ah_eepromRead = ar5212EepromRead, Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Mon Mar 1 16:52:11 2010 (r204520) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Mon Mar 1 17:04:19 2010 (r204521) @@ -48,16 +48,20 @@ ar5212UpdateTxTrigLevel(struct ath_hal * uint32_t txcfg, curLevel, newLevel; HAL_INT omask; + if (AH_PRIVATE(ah)->ah_txtrig_level >= + AH_PRIVATE(ah)->ah_max_txtrig_level) + return AH_FALSE; + /* * Disable interrupts while futzing with the fifo level. */ - omask = ar5212SetInterrupts(ah, ahp->ah_maskReg &~ HAL_INT_GLOBAL); + omask = ah->ah_setInterrupts(ah, ahp->ah_maskReg &~ HAL_INT_GLOBAL); txcfg = OS_REG_READ(ah, AR_TXCFG); curLevel = MS(txcfg, AR_FTRIG); newLevel = curLevel; if (bIncTrigLevel) { /* increase the trigger level */ - if (curLevel < MAX_TX_FIFO_THRESHOLD) + if (curLevel < AH_PRIVATE(ah)->ah_max_txtrig_level) newLevel++; } else if (curLevel > MIN_TX_FIFO_THRESHOLD) newLevel--; @@ -66,8 +70,10 @@ ar5212UpdateTxTrigLevel(struct ath_hal * OS_REG_WRITE(ah, AR_TXCFG, (txcfg &~ AR_FTRIG) | SM(newLevel, AR_FTRIG)); + AH_PRIVATE(ah)->ah_txtrig_level = newLevel; + /* re-enable chip interrupts */ - ar5212SetInterrupts(ah, omask); + ah->ah_setInterrupts(ah, omask); return (newLevel != curLevel); } Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Mon Mar 1 16:52:11 2010 (r204520) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Mon Mar 1 17:04:19 2010 (r204521) @@ -454,7 +454,10 @@ ar5416InitDMA(struct ath_hal *ah) OS_REG_WRITE(ah, AR_RXCFG, (OS_REG_READ(ah, AR_RXCFG) & ~AR_RXCFG_DMASZ_MASK) | AR_RXCFG_DMASZ_128B); - /* XXX restore TX trigger level */ + /* restore TX trigger level */ + OS_REG_WRITE(ah, AR_TXCFG, + (OS_REG_READ(ah, AR_TXCFG) &~ AR_FTRIG) | + SM(AH_PRIVATE(ah)->ah_txtrig_level, AR_FTRIG)); /* * Setup receive FIFO threshold to hold off TX activities Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Mon Mar 1 16:52:11 2010 (r204520) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Mon Mar 1 17:04:19 2010 (r204521) @@ -568,7 +568,8 @@ ar5416ProcTxDesc(struct ath_hal *ah, /* handle tx trigger level changes internally */ if ((ts->ts_status & HAL_TXERR_FIFO) || - (ts->ts_flags & (HAL_TX_DATA_UNDERRUN | HAL_TX_DELIM_UNDERRUN))) + (ts->ts_flags & HAL_TX_DATA_UNDERRUN) || + (ts->ts_flags & HAL_TX_DELIM_UNDERRUN)) ar5212UpdateTxTrigLevel(ah, AH_TRUE); return HAL_OK; Modified: head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Mon Mar 1 16:52:11 2010 (r204520) +++ head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Mon Mar 1 17:04:19 2010 (r204521) @@ -121,6 +121,8 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s AH5416(ah)->ah_writeIni = ar9285WriteIni; AH5416(ah)->ah_rx_chainmask = AR9285_DEFAULT_RXCHAINMASK; AH5416(ah)->ah_tx_chainmask = AR9285_DEFAULT_TXCHAINMASK; + + AH_PRIVATE(ah)->ah_max_txtrig_level = MAX_TX_FIFO_THRESHOLD >> 1; if (!ar5416SetResetReg(ah, HAL_RESET_POWER_ON)) { /* reset chip */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 17:05:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 142D81065677; Mon, 1 Mar 2010 17:05:47 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 047FB8FC2A; Mon, 1 Mar 2010 17:05:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21H5kHq059753; Mon, 1 Mar 2010 17:05:46 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21H5kPo059748; Mon, 1 Mar 2010 17:05:46 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003011705.o21H5kPo059748@svn.freebsd.org> From: Joel Dahl Date: Mon, 1 Mar 2010 17:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204522 - in head/sys: net netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 17:05:47 -0000 Author: joel (doc committer) Date: Mon Mar 1 17:05:46 2010 New Revision: 204522 URL: http://svn.freebsd.org/changeset/base/204522 Log: The NetBSD Foundation has granted permission to remove clause 3 and 4 from their software. Obtained from: NetBSD Modified: head/sys/net/if_gre.c head/sys/net/if_gre.h head/sys/netinet/ip_gre.c head/sys/netinet/ip_gre.h Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Mon Mar 1 17:04:19 2010 (r204521) +++ head/sys/net/if_gre.c Mon Mar 1 17:05:46 2010 (r204522) @@ -18,13 +18,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/net/if_gre.h ============================================================================== --- head/sys/net/if_gre.h Mon Mar 1 17:04:19 2010 (r204521) +++ head/sys/net/if_gre.h Mon Mar 1 17:05:46 2010 (r204522) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/netinet/ip_gre.c ============================================================================== --- head/sys/netinet/ip_gre.c Mon Mar 1 17:04:19 2010 (r204521) +++ head/sys/netinet/ip_gre.c Mon Mar 1 17:05:46 2010 (r204522) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/netinet/ip_gre.h ============================================================================== --- head/sys/netinet/ip_gre.h Mon Mar 1 17:04:19 2010 (r204521) +++ head/sys/netinet/ip_gre.h Mon Mar 1 17:05:46 2010 (r204522) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 17:17:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 035261065676; Mon, 1 Mar 2010 17:17:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 522CD8FC14; Mon, 1 Mar 2010 17:17:06 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o21HGuRp090908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Mar 2010 19:16:56 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o21HGuDa059955; Mon, 1 Mar 2010 19:16:56 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o21HGuFf059954; Mon, 1 Mar 2010 19:16:56 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 1 Mar 2010 19:16:56 +0200 From: Kostik Belousov To: "M. Warner Losh" Message-ID: <20100301171656.GW2489@deviant.kiev.zoral.com.ua> References: <4B8AF55C.6040103@freebsd.org> <20100228.160732.597029496557504767.imp@bsdimp.com> <20100301092144.GS2489@deviant.kiev.zoral.com.ua> <20100301.085314.131509470607393926.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O7hm+SMpb/lu0d4d" Content-Disposition: inline In-Reply-To: <20100301.085314.131509470607393926.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204309 - in head/sys: amd64/amd64 amd64/isa conf i386/bios i386/cpufreq i386/i386 i386/isa i386/xen isa modules/bios/smbios modules/bios/vpd modules/cpufreq pc98/pc98 x86 x86/bios x86/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 17:17:08 -0000 --O7hm+SMpb/lu0d4d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Stripped Cc: list] On Mon, Mar 01, 2010 at 08:53:14AM -0700, M. Warner Losh wrote: > In message: <20100301092144.GS2489@deviant.kiev.zoral.com.ua> > Kostik Belousov writes: > : -m32 is not a hack, it is a standard feature on Linux and Solaris, > : allowing to build both 32 and 64 bit binaries in the host environment, > : not going to cross-compilation or chroot. It is very much missing on > : the FreeBSD. >=20 > Having thought about it, I can see how we can make it work, so I > withdraw my 'hack' statement. You're right. >=20 > On Solaris and Linux, how well does autoconf cope with using CC=3D"cc > -m32"? I've had issues with similar constructs on MIPS to select > diffrent word sizes or ABIs. On Solaris, -m32 is a default for the SunPRO compilers. Both -m32 and -m64 worked quite good for me. They are very careful to provide both 32 and 64 bit versions of all libraries with the system, and system includes a lot of things, like X/Gnome etc. I never did used -m32 on Linux (knocking on the wood). >=20 > : Merged x86 tree is ortoghonal to this feature. >=20 > Yes, that's a much better way of saying what I was trying to say. >=20 > Warner --O7hm+SMpb/lu0d4d Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuL9ocACgkQC3+MBN1Mb4glJACfUbsb8Isz0Ykcr9nbKmRV1/pU U8YAoLiVoWvj0oNBlfj9EvevLby8cFEE =/ywn -----END PGP SIGNATURE----- --O7hm+SMpb/lu0d4d-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 17:20:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83474106564A; Mon, 1 Mar 2010 17:20:04 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 597B08FC16; Mon, 1 Mar 2010 17:20:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21HK4Sa063127; Mon, 1 Mar 2010 17:20:04 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21HK4Bl063124; Mon, 1 Mar 2010 17:20:04 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003011720.o21HK4Bl063124@svn.freebsd.org> From: Joel Dahl Date: Mon, 1 Mar 2010 17:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204523 - head/sys/compat/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 17:20:04 -0000 Author: joel (doc committer) Date: Mon Mar 1 17:20:04 2010 New Revision: 204523 URL: http://svn.freebsd.org/changeset/base/204523 Log: The NetBSD Foundation has granted permission to remove clause 3 and 4 from their software. Obtained from: NetBSD Modified: head/sys/compat/linux/linux_getcwd.c head/sys/compat/linux/linux_time.c Modified: head/sys/compat/linux/linux_getcwd.c ============================================================================== --- head/sys/compat/linux/linux_getcwd.c Mon Mar 1 17:05:46 2010 (r204522) +++ head/sys/compat/linux/linux_getcwd.c Mon Mar 1 17:20:04 2010 (r204523) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/compat/linux/linux_time.c ============================================================================== --- head/sys/compat/linux/linux_time.c Mon Mar 1 17:05:46 2010 (r204522) +++ head/sys/compat/linux/linux_time.c Mon Mar 1 17:20:04 2010 (r204523) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 18:47:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA01E106566B; Mon, 1 Mar 2010 18:47:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9BBA48FC45; Mon, 1 Mar 2010 18:47:04 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 4D2F146B66; Mon, 1 Mar 2010 13:47:04 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 761FE8A024; Mon, 1 Mar 2010 13:47:03 -0500 (EST) From: John Baldwin To: Konstantin Belousov Date: Mon, 1 Mar 2010 10:30:51 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201002281719.o1SHJM6u042302@svn.freebsd.org> In-Reply-To: <201002281719.o1SHJM6u042302@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003011030.51154.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 01 Mar 2010 13:47:03 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06 autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204475 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 18:47:04 -0000 On Sunday 28 February 2010 12:19:22 pm Konstantin Belousov wrote: > Author: kib > Date: Sun Feb 28 17:19:22 2010 > New Revision: 204475 > URL: http://svn.freebsd.org/changeset/base/204475 > > Log: > Mark msdosfs as mpsafe. Are you planning on implementing support for LOOKUP_SHARED and EXTENDED_SHARED as well? -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 20:41:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F46C106566B; Mon, 1 Mar 2010 20:41:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E6208FC16; Mon, 1 Mar 2010 20:41:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21KfR6R011593; Mon, 1 Mar 2010 20:41:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21KfRUF011591; Mon, 1 Mar 2010 20:41:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003012041.o21KfRUF011591@svn.freebsd.org> From: Xin LI Date: Mon, 1 Mar 2010 20:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204533 - head/sys/dev/uart X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 20:41:27 -0000 Author: delphij Date: Mon Mar 1 20:41:27 2010 New Revision: 204533 URL: http://svn.freebsd.org/changeset/base/204533 Log: Add PCI ID for MCS9901. Submitted by: gcooper PR: kern/144397 MFC after: 1 month Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Mon Mar 1 19:43:26 2010 (r204532) +++ head/sys/dev/uart/uart_bus_pci.c Mon Mar 1 20:41:27 2010 (r204533) @@ -113,6 +113,8 @@ static struct pci_id pci_ns8250_ids[] = { 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, +{ 0x9710, 0x9901, 0xa000, 0x1000, + "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 22:12:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D39F4106566B; Mon, 1 Mar 2010 22:12:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 42E758FC18; Mon, 1 Mar 2010 22:12:26 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o21MCErH014485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Mar 2010 00:12:14 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o21MCEQ5061928; Tue, 2 Mar 2010 00:12:14 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o21MCDOw061927; Tue, 2 Mar 2010 00:12:13 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 2 Mar 2010 00:12:13 +0200 From: Kostik Belousov To: John Baldwin Message-ID: <20100301221213.GY2489@deviant.kiev.zoral.com.ua> References: <201002281719.o1SHJM6u042302@svn.freebsd.org> <201003011030.51154.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XUd+PsnCfaVdInSg" Content-Disposition: inline In-Reply-To: <201003011030.51154.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204475 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 22:12:27 -0000 --XUd+PsnCfaVdInSg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 01, 2010 at 10:30:51AM -0500, John Baldwin wrote: > On Sunday 28 February 2010 12:19:22 pm Konstantin Belousov wrote: > > Author: kib > > Date: Sun Feb 28 17:19:22 2010 > > New Revision: 204475 > > URL: http://svn.freebsd.org/changeset/base/204475 > >=20 > > Log: > > Mark msdosfs as mpsafe. >=20 > Are you planning on implementing support for LOOKUP_SHARED and > EXTENDED_SHARED as well? Do you think it makes sense to do this for msdosfs ? Please note that current msdosfs code exclusively uses exclusive locks on the vnodes. One obvious issue with *_SHARED is the fat cache in the denode. --XUd+PsnCfaVdInSg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuMO70ACgkQC3+MBN1Mb4haXwCfSKGcsCBuHjhoP+l1bJn+GKDQ xZwAn3OqFqa5jmj14KkfR52T05vjDZpS =gdyV -----END PGP SIGNATURE----- --XUd+PsnCfaVdInSg-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 22:43:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53E7E106564A; Mon, 1 Mar 2010 22:43:23 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42B0C8FC13; Mon, 1 Mar 2010 22:43:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21MhNdm038649; Mon, 1 Mar 2010 22:43:23 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21MhNsE038647; Mon, 1 Mar 2010 22:43:23 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003012243.o21MhNsE038647@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 1 Mar 2010 22:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204539 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 22:43:23 -0000 Author: yongari Date: Mon Mar 1 22:43:22 2010 New Revision: 204539 URL: http://svn.freebsd.org/changeset/base/204539 Log: Properly sync status LEs after processing. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon Mar 1 21:30:44 2010 (r204538) +++ head/sys/dev/msk/if_msk.c Mon Mar 1 22:43:22 2010 (r204539) @@ -3376,7 +3376,6 @@ msk_handle_events(struct msk_softc *sc) /* Sync status LEs. */ bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - /* XXX Sync Rx LEs here. */ rxput[MSK_PORT_A] = rxput[MSK_PORT_B] = 0; @@ -3386,13 +3385,6 @@ msk_handle_events(struct msk_softc *sc) control = le32toh(sd->msk_control); if ((control & HW_OWNER) == 0) break; - /* - * Marvell's FreeBSD driver updates status LE after clearing - * HW_OWNER. However we don't have a way to sync single LE - * with bus_dma(9) API. bus_dma(9) provides a way to sync - * an entire DMA map. So don't sync LE until we have a better - * way to sync LEs. - */ control &= ~HW_OWNER; sd->msk_control = htole32(control); status = le32toh(sd->msk_status); @@ -3453,7 +3445,8 @@ msk_handle_events(struct msk_softc *sc) } sc->msk_stat_cons = cons; - /* XXX We should sync status LEs here. See above notes. */ + bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (rxput[MSK_PORT_A] > 0) msk_rxput(sc->msk_if[MSK_PORT_A]); From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 22:44:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D89851065673; Mon, 1 Mar 2010 22:44:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A83E98FC19; Mon, 1 Mar 2010 22:44:52 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 4701446B45; Mon, 1 Mar 2010 17:44:52 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id AE50E8A01F; Mon, 1 Mar 2010 17:44:51 -0500 (EST) From: John Baldwin To: Kostik Belousov Date: Mon, 1 Mar 2010 17:22:27 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201002281719.o1SHJM6u042302@svn.freebsd.org> <201003011030.51154.jhb@freebsd.org> <20100301221213.GY2489@deviant.kiev.zoral.com.ua> In-Reply-To: <20100301221213.GY2489@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003011722.27155.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 01 Mar 2010 17:44:51 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204475 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 22:44:52 -0000 On Monday 01 March 2010 5:12:13 pm Kostik Belousov wrote: > On Mon, Mar 01, 2010 at 10:30:51AM -0500, John Baldwin wrote: > > On Sunday 28 February 2010 12:19:22 pm Konstantin Belousov wrote: > > > Author: kib > > > Date: Sun Feb 28 17:19:22 2010 > > > New Revision: 204475 > > > URL: http://svn.freebsd.org/changeset/base/204475 > > > > > > Log: > > > Mark msdosfs as mpsafe. > > > > Are you planning on implementing support for LOOKUP_SHARED and > > EXTENDED_SHARED as well? > > Do you think it makes sense to do this for msdosfs ? > Please note that current msdosfs code exclusively uses exclusive locks > on the vnodes. > > One obvious issue with *_SHARED is the fat cache in the denode. Oh, hmm. I guess we would need to first allow it to use shared locks generically (VN_LOCK_ASHARE() for VOP_READ() and the like). I do think we should try to make our filesystems concurrent when it is not too terribly difficult. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 22:55:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55A84106564A; Mon, 1 Mar 2010 22:55:36 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29FBD8FC21; Mon, 1 Mar 2010 22:55:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21MtaV6041484; Mon, 1 Mar 2010 22:55:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21Mta4q041482; Mon, 1 Mar 2010 22:55:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003012255.o21Mta4q041482@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 1 Mar 2010 22:55:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204540 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 22:55:36 -0000 Author: yongari Date: Mon Mar 1 22:55:35 2010 New Revision: 204540 URL: http://svn.freebsd.org/changeset/base/204540 Log: Make sure to enable flow-control only if established link is full-duplex. Previously msk(4) used to allow flow-control on 1000baseT half-duplex media. Also GMAC pause is enabled if link partner is capable of handling it. While I'm here use IFM_OPTIONS instead of using IFM_GMASK to check optional flags of link. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon Mar 1 22:43:22 2010 (r204539) +++ head/sys/dev/msk/if_msk.c Mon Mar 1 22:55:35 2010 (r204540) @@ -532,28 +532,25 @@ msk_miibus_statchg(device_t dev) break; } - if (((mii->mii_media_active & IFM_GMASK) & IFM_FDX) != 0) - gmac |= GM_GPCR_DUP_FULL; /* Disable Rx flow control. */ - if (((mii->mii_media_active & IFM_GMASK) & IFM_FLAG0) == 0) + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG0) == 0) gmac |= GM_GPCR_FC_RX_DIS; /* Disable Tx flow control. */ - if (((mii->mii_media_active & IFM_GMASK) & IFM_FLAG1) == 0) + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG1) == 0) gmac |= GM_GPCR_FC_TX_DIS; + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) + gmac |= GM_GPCR_DUP_FULL; + else + gmac |= GM_GPCR_FC_RX_DIS | GM_GPCR_FC_TX_DIS; gmac |= GM_GPCR_RX_ENA | GM_GPCR_TX_ENA; GMAC_WRITE_2(sc, sc_if->msk_port, GM_GP_CTRL, gmac); /* Read again to ensure writing. */ GMAC_READ_2(sc, sc_if->msk_port, GM_GP_CTRL); - - gmac = GMC_PAUSE_ON; - if (((mii->mii_media_active & IFM_GMASK) & - (IFM_FLAG0 | IFM_FLAG1)) == 0) - gmac = GMC_PAUSE_OFF; - /* Diable pause for 10/100 Mbps in half-duplex mode. */ - if ((((mii->mii_media_active & IFM_GMASK) & IFM_FDX) == 0) && - (IFM_SUBTYPE(mii->mii_media_active) == IFM_100_TX || - IFM_SUBTYPE(mii->mii_media_active) == IFM_10_T)) - gmac = GMC_PAUSE_OFF; + gmac = GMC_PAUSE_OFF; + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG0) != 0) + gmac = GMC_PAUSE_ON; + } CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), gmac); /* Enable PHY interrupt for FIFO underrun/overflow. */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 23:39:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 586F4106566C; Mon, 1 Mar 2010 23:39:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37F048FC18; Mon, 1 Mar 2010 23:39:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21Ndh2l051693; Mon, 1 Mar 2010 23:39:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21NdhFM051691; Mon, 1 Mar 2010 23:39:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003012339.o21NdhFM051691@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 1 Mar 2010 23:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204541 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 23:39:44 -0000 Author: yongari Date: Mon Mar 1 23:39:43 2010 New Revision: 204541 URL: http://svn.freebsd.org/changeset/base/204541 Log: Implement rudimentary interrupt moderation with programmable countdown timer register. The timer resolution may vary among controllers but the value would be represented by core clock cycles. msk(4) will automatically computes number of required clock cycles from given micro-seconds unit. The default interrupt holdoff timer value is 100us which will ensure less than 10k interrupts under load. The timer value can be changed with dev.mskc.0.int_holdoff sysctl node. Note, the interrupt moderation is shared resource on dual-port controllers so you can't use separate interrupt moderation value for each port. This means we can't stop interrupt moderation in driver stop routine. Also have msk_tick() reclaim transmitted Tx buffers as safety belt. With this change there is no need to check missing Tx completion interrupt in watchdog handler, so remove it. Modified: head/sys/dev/msk/if_msk.c head/sys/dev/msk/if_mskreg.h Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon Mar 1 22:55:35 2010 (r204540) +++ head/sys/dev/msk/if_msk.c Mon Mar 1 23:39:43 2010 (r204541) @@ -1659,6 +1659,14 @@ mskc_attach(device_t dev) } } + sc->msk_int_holdoff = MSK_INT_HOLDOFF_DEFAULT; + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "int_holdoff", CTLFLAG_RW, &sc->msk_int_holdoff, 0, + "Maximum number of time to delay interrupts"); + resource_int_value(device_get_name(dev), device_get_unit(dev), + "int_holdoff", &sc->msk_int_holdoff); + /* Soft reset. */ CSR_WRITE_2(sc, B0_CTST, CS_RST_SET); CSR_WRITE_2(sc, B0_CTST, CS_RST_CLR); @@ -2801,8 +2809,6 @@ static void msk_watchdog(struct msk_if_softc *sc_if) { struct ifnet *ifp; - uint32_t ridx; - int idx; MSK_IF_LOCK_ASSERT(sc_if); @@ -2819,24 +2825,6 @@ msk_watchdog(struct msk_if_softc *sc_if) return; } - /* - * Reclaim first as there is a possibility of losing Tx completion - * interrupts. - */ - ridx = sc_if->msk_port == MSK_PORT_A ? STAT_TXA1_RIDX : STAT_TXA2_RIDX; - idx = CSR_READ_2(sc_if->msk_softc, ridx); - if (sc_if->msk_cdata.msk_tx_cons != idx) { - msk_txeof(sc_if, idx); - if (sc_if->msk_cdata.msk_tx_cnt == 0) { - if_printf(ifp, "watchdog timeout (missed Tx interrupts) " - "-- recovering\n"); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue(taskqueue_fast, - &sc_if->msk_tx_task); - return; - } - } - if_printf(ifp, "watchdog timeout\n"); ifp->if_oerrors++; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; @@ -3166,6 +3154,7 @@ msk_tick(void *xsc_if) mii_tick(mii); if ((sc_if->msk_flags & MSK_FLAG_LINK) == 0) msk_miibus_statchg(sc_if->msk_if_dev); + msk_handle_events(sc_if->msk_softc); msk_watchdog(sc_if); callout_reset(&sc_if->msk_tick_ch, hz, msk_tick, sc_if); } @@ -3904,6 +3893,17 @@ msk_init_locked(struct msk_if_softc *sc_ sc->msk_intrmask |= Y2_IS_PORT_B; sc->msk_intrhwemask |= Y2_HWE_L2_MASK; } + /* Configure IRQ moderation mask. */ + CSR_WRITE_4(sc, B2_IRQM_MSK, sc->msk_intrmask); + if (sc->msk_int_holdoff > 0) { + /* Configure initial IRQ moderation timer value. */ + CSR_WRITE_4(sc, B2_IRQM_INI, + MSK_USECS(sc, sc->msk_int_holdoff)); + CSR_WRITE_4(sc, B2_IRQM_VAL, + MSK_USECS(sc, sc->msk_int_holdoff)); + /* Start IRQ moderation. */ + CSR_WRITE_1(sc, B2_IRQM_CTRL, TIM_START); + } CSR_WRITE_4(sc, B0_HWE_IMSK, sc->msk_intrhwemask); CSR_READ_4(sc, B0_HWE_IMSK); CSR_WRITE_4(sc, B0_IMSK, sc->msk_intrmask); Modified: head/sys/dev/msk/if_mskreg.h ============================================================================== --- head/sys/dev/msk/if_mskreg.h Mon Mar 1 22:55:35 2010 (r204540) +++ head/sys/dev/msk/if_mskreg.h Mon Mar 1 23:39:43 2010 (r204541) @@ -2406,6 +2406,8 @@ struct msk_ring_data { #define MSK_PROC_MIN 30 #define MSK_PROC_MAX (MSK_RX_RING_CNT - 1) +#define MSK_INT_HOLDOFF_DEFAULT 100 + #define MSK_TX_TIMEOUT 5 #define MSK_PUT_WM 10 @@ -2496,6 +2498,7 @@ struct msk_softc { bus_dmamap_t msk_stat_map; struct msk_stat_desc *msk_stat_ring; bus_addr_t msk_stat_ring_paddr; + int msk_int_holdoff; int msk_process_limit; int msk_stat_cons; struct taskqueue *msk_tq; From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 23:51:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 919D5106566C; Mon, 1 Mar 2010 23:51:14 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 808B88FC0C; Mon, 1 Mar 2010 23:51:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21NpEXx054862; Mon, 1 Mar 2010 23:51:14 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21NpEKJ054861; Mon, 1 Mar 2010 23:51:14 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201003012351.o21NpEKJ054861@svn.freebsd.org> From: Weongyo Jeong Date: Mon, 1 Mar 2010 23:51:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204542 - head/sys/dev/bwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 23:51:14 -0000 Author: weongyo Date: Mon Mar 1 23:51:13 2010 New Revision: 204542 URL: http://svn.freebsd.org/changeset/base/204542 Log: calculates the integer square root if a positive integer X is larger than 256 instead of using sqrt_table. Reported by: Joe Marcus Clarke Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Mon Mar 1 23:39:43 2010 (r204541) +++ head/sys/dev/bwn/if_bwn.c Mon Mar 1 23:51:13 2010 (r204542) @@ -12846,7 +12846,6 @@ bwn_phy_lp_clear_deaf(struct bwn_mac *ma static unsigned int bwn_sqrt(struct bwn_mac *mac, unsigned int x) { - struct bwn_softc *sc = mac->mac_sc; /* Table holding (10 * sqrt(x)) for x between 1 and 256. */ static uint8_t sqrt_table[256] = { 10, 14, 17, 20, 22, 24, 26, 28, @@ -12886,9 +12885,11 @@ bwn_sqrt(struct bwn_mac *mac, unsigned i if (x == 0) return (0); if (x >= 256) { - device_printf(sc->sc_dev, - "out of bounds of the square-root table (%d)\n", x); - return (16); + unsigned int tmp; + + for (tmp = 0; x >= (2 * tmp) + 1; x -= (2 * tmp++) + 1) + /* do nothing */ ; + return (tmp); } return (sqrt_table[x - 1] / 10); } From owner-svn-src-head@FreeBSD.ORG Mon Mar 1 23:56:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B9B5106564A; Mon, 1 Mar 2010 23:56:51 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0788FC33; Mon, 1 Mar 2010 23:56:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o21Nupmx056224; Mon, 1 Mar 2010 23:56:51 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o21Nupui056222; Mon, 1 Mar 2010 23:56:51 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003012356.o21Nupui056222@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 1 Mar 2010 23:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204543 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 23:56:51 -0000 Author: yongari Date: Mon Mar 1 23:56:51 2010 New Revision: 204543 URL: http://svn.freebsd.org/changeset/base/204543 Log: Document newly added loader tunable and sysctl variable dev.mskc.%d.int_holdoff Modified: head/share/man/man4/msk.4 Modified: head/share/man/man4/msk.4 ============================================================================== --- head/share/man/man4/msk.4 Mon Mar 1 23:51:13 2010 (r204542) +++ head/share/man/man4/msk.4 Mon Mar 1 23:56:51 2010 (r204543) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 6, 2009 +.Dd March 1, 2010 .Dt MSK 4 .Os .Sh NAME @@ -235,6 +235,12 @@ variables and .Xr loader 8 tunables: .Bl -tag -width indent +.It Va dev.mskc.%d.int_holdoff +Maximum number of time to delay interrupts. +The valid range is 0 to 34359738 for 125MHz clock in units of 1us, +the default is 100 (100us). +The interface need to be brought down and up again before a change +takes effect. .It Va dev.mskc.%d.process_limit Maximum amount of Rx events to be processed in the event loop before rescheduling a taskqueue. From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 01:45:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BCF0106566C; Tue, 2 Mar 2010 01:45:03 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 196078FC16; Tue, 2 Mar 2010 01:45:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o221j2wP081532; Tue, 2 Mar 2010 01:45:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o221j2Pi081529; Tue, 2 Mar 2010 01:45:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003020145.o221j2Pi081529@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 2 Mar 2010 01:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204545 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 01:45:03 -0000 Author: yongari Date: Tue Mar 2 01:45:02 2010 New Revision: 204545 URL: http://svn.freebsd.org/changeset/base/204545 Log: Remove taskqueue based interrupt handling. After r204541 msk(4) does not generate excessive interrupts any more so we don't need to have two copies of interrupt handler. While I'm here remove two STAT_PUT_IDX register accesses in LE status event handler. After r204539 msk(4) always sync status LEs so there is no need to resort to reading STAT_PUT_IDX register to know the end of status LE processing. Just trust status LE's ownership bit. Modified: head/sys/dev/msk/if_msk.c head/sys/dev/msk/if_mskreg.h Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Tue Mar 2 01:21:33 2010 (r204544) +++ head/sys/dev/msk/if_msk.c Tue Mar 2 01:45:02 2010 (r204545) @@ -113,7 +113,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -257,9 +256,7 @@ static int msk_attach(device_t); static int msk_detach(device_t); static void msk_tick(void *); -static void msk_legacy_intr(void *); -static int msk_intr(void *); -static void msk_int_task(void *, int); +static void msk_intr(void *); static void msk_intr_phy(struct msk_if_softc *); static void msk_intr_gmac(struct msk_if_softc *); static __inline void msk_rxput(struct msk_if_softc *); @@ -273,8 +270,8 @@ static void msk_rxeof(struct msk_if_soft static void msk_jumbo_rxeof(struct msk_if_softc *, uint32_t, uint32_t, int); static void msk_txeof(struct msk_if_softc *, int); static int msk_encap(struct msk_if_softc *, struct mbuf **); -static void msk_tx_task(void *, int); static void msk_start(struct ifnet *); +static void msk_start_locked(struct ifnet *); static int msk_ioctl(struct ifnet *, u_long, caddr_t); static void msk_set_prefetch(struct msk_softc *, int, bus_addr_t, uint32_t); static void msk_set_rambuffer(struct msk_if_softc *); @@ -1511,9 +1508,6 @@ msk_attach(device_t dev) IFQ_SET_MAXLEN(&ifp->if_snd, MSK_TX_RING_CNT - 1); ifp->if_snd.ifq_drv_maxlen = MSK_TX_RING_CNT - 1; IFQ_SET_READY(&ifp->if_snd); - - TASK_INIT(&sc_if->msk_tx_task, 1, msk_tx_task, ifp); - /* * Get station address for this interface. Note that * dual port cards actually come with three station @@ -1836,25 +1830,10 @@ mskc_attach(device_t dev) } /* Hook interrupt last to avoid having to lock softc. */ - if (legacy_intr) - error = bus_setup_intr(dev, sc->msk_irq[0], INTR_TYPE_NET | - INTR_MPSAFE, NULL, msk_legacy_intr, sc, - &sc->msk_intrhand); - else { - TASK_INIT(&sc->msk_int_task, 0, msk_int_task, sc); - sc->msk_tq = taskqueue_create_fast("msk_taskq", M_WAITOK, - taskqueue_thread_enqueue, &sc->msk_tq); - taskqueue_start_threads(&sc->msk_tq, 1, PI_NET, "%s taskq", - device_get_nameunit(sc->msk_dev)); - error = bus_setup_intr(dev, sc->msk_irq[0], INTR_TYPE_NET | - INTR_MPSAFE, msk_intr, NULL, sc, &sc->msk_intrhand); - } - + error = bus_setup_intr(dev, sc->msk_irq[0], INTR_TYPE_NET | + INTR_MPSAFE, NULL, msk_intr, sc, &sc->msk_intrhand); if (error != 0) { device_printf(dev, "couldn't set up interrupt handler\n"); - if (legacy_intr == 0) - taskqueue_free(sc->msk_tq); - sc->msk_tq = NULL; goto fail; } fail: @@ -1891,7 +1870,6 @@ msk_detach(device_t dev) /* Can't hold locks while calling detach. */ MSK_IF_UNLOCK(sc_if); callout_drain(&sc_if->msk_tick_ch); - taskqueue_drain(taskqueue_fast, &sc_if->msk_tx_task); ether_ifdetach(ifp); MSK_IF_LOCK(sc_if); } @@ -1956,11 +1934,6 @@ mskc_detach(device_t dev) msk_status_dma_free(sc); - if (legacy_intr == 0 && sc->msk_tq != NULL) { - taskqueue_drain(sc->msk_tq, &sc->msk_int_task); - taskqueue_free(sc->msk_tq); - sc->msk_tq = NULL; - } if (sc->msk_intrhand) { bus_teardown_intr(dev, sc->msk_irq[0], sc->msk_intrhand); sc->msk_intrhand = NULL; @@ -2740,30 +2713,29 @@ msk_encap(struct msk_if_softc *sc_if, st } static void -msk_tx_task(void *arg, int pending) +msk_start(struct ifnet *ifp) { - struct ifnet *ifp; + struct msk_if_softc *sc_if; - ifp = arg; - msk_start(ifp); + sc_if = ifp->if_softc; + MSK_IF_LOCK(sc_if); + msk_start_locked(ifp); + MSK_IF_UNLOCK(sc_if); } static void -msk_start(struct ifnet *ifp) +msk_start_locked(struct ifnet *ifp) { - struct msk_if_softc *sc_if; - struct mbuf *m_head; + struct msk_if_softc *sc_if; + struct mbuf *m_head; int enq; sc_if = ifp->if_softc; - - MSK_IF_LOCK(sc_if); + MSK_IF_LOCK_ASSERT(sc_if); if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING || (sc_if->msk_flags & MSK_FLAG_LINK) == 0) { - MSK_IF_UNLOCK(sc_if); + IFF_DRV_RUNNING || (sc_if->msk_flags & MSK_FLAG_LINK) == 0) return; - } for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd) && sc_if->msk_cdata.msk_tx_cnt < @@ -2801,8 +2773,6 @@ msk_start(struct ifnet *ifp) /* Set a timeout in case the chip goes out to lunch. */ sc_if->msk_watchdog_timer = MSK_TX_TIMEOUT; } - - MSK_IF_UNLOCK(sc_if); } static void @@ -2830,7 +2800,7 @@ msk_watchdog(struct msk_if_softc *sc_if) ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc_if); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue(taskqueue_fast, &sc_if->msk_tx_task); + msk_start_locked(ifp); } static int @@ -3353,20 +3323,16 @@ msk_handle_events(struct msk_softc *sc) int rxput[2]; struct msk_stat_desc *sd; uint32_t control, status; - int cons, idx, len, port, rxprog; - - idx = CSR_READ_2(sc, STAT_PUT_IDX); - if (idx == sc->msk_stat_cons) - return (0); + int cons, len, port, rxprog; /* Sync status LEs. */ bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); rxput[MSK_PORT_A] = rxput[MSK_PORT_B] = 0; - rxprog = 0; - for (cons = sc->msk_stat_cons; cons != idx;) { + cons = sc->msk_stat_cons; + for (;;) { sd = &sc->msk_stat_ring[cons]; control = le32toh(sd->msk_control); if ((control & HW_OWNER) == 0) @@ -3439,17 +3405,17 @@ msk_handle_events(struct msk_softc *sc) if (rxput[MSK_PORT_B] > 0) msk_rxput(sc->msk_if[MSK_PORT_B]); - return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); + return (rxprog > sc->msk_process_limit ? EAGAIN : 0); } -/* Legacy interrupt handler for shared interrupt. */ static void -msk_legacy_intr(void *xsc) +msk_intr(void *xsc) { struct msk_softc *sc; struct msk_if_softc *sc_if0, *sc_if1; struct ifnet *ifp0, *ifp1; uint32_t status; + int domore; sc = xsc; MSK_LOCK(sc); @@ -3494,9 +3460,8 @@ msk_legacy_intr(void *xsc) if ((status & Y2_IS_HW_ERR) != 0) msk_intr_hwerr(sc); - while (msk_handle_events(sc) != 0) - ; - if ((status & Y2_IS_STAT_BMU) != 0) + domore = msk_handle_events(sc); + if ((status & Y2_IS_STAT_BMU) != 0 && domore == 0) CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_CLR_IRQ); /* Reenable interrupts. */ @@ -3504,103 +3469,12 @@ msk_legacy_intr(void *xsc) if (ifp0 != NULL && (ifp0->if_drv_flags & IFF_DRV_RUNNING) != 0 && !IFQ_DRV_IS_EMPTY(&ifp0->if_snd)) - taskqueue_enqueue(taskqueue_fast, &sc_if0->msk_tx_task); - if (ifp1 != NULL && (ifp1->if_drv_flags & IFF_DRV_RUNNING) != 0 && - !IFQ_DRV_IS_EMPTY(&ifp1->if_snd)) - taskqueue_enqueue(taskqueue_fast, &sc_if1->msk_tx_task); - - MSK_UNLOCK(sc); -} - -static int -msk_intr(void *xsc) -{ - struct msk_softc *sc; - uint32_t status; - - sc = xsc; - status = CSR_READ_4(sc, B0_Y2_SP_ISRC2); - /* Reading B0_Y2_SP_ISRC2 masks further interrupts. */ - if (status == 0 || status == 0xffffffff) { - CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2); - return (FILTER_STRAY); - } - - taskqueue_enqueue(sc->msk_tq, &sc->msk_int_task); - return (FILTER_HANDLED); -} - -static void -msk_int_task(void *arg, int pending) -{ - struct msk_softc *sc; - struct msk_if_softc *sc_if0, *sc_if1; - struct ifnet *ifp0, *ifp1; - uint32_t status; - int domore; - - sc = arg; - MSK_LOCK(sc); - - /* Get interrupt source. */ - status = CSR_READ_4(sc, B0_ISRC); - if (status == 0 || status == 0xffffffff || - (sc->msk_pflags & MSK_FLAG_SUSPEND) != 0 || - (status & sc->msk_intrmask) == 0) - goto done; - - sc_if0 = sc->msk_if[MSK_PORT_A]; - sc_if1 = sc->msk_if[MSK_PORT_B]; - ifp0 = ifp1 = NULL; - if (sc_if0 != NULL) - ifp0 = sc_if0->msk_ifp; - if (sc_if1 != NULL) - ifp1 = sc_if1->msk_ifp; - - if ((status & Y2_IS_IRQ_PHY1) != 0 && sc_if0 != NULL) - msk_intr_phy(sc_if0); - if ((status & Y2_IS_IRQ_PHY2) != 0 && sc_if1 != NULL) - msk_intr_phy(sc_if1); - if ((status & Y2_IS_IRQ_MAC1) != 0 && sc_if0 != NULL) - msk_intr_gmac(sc_if0); - if ((status & Y2_IS_IRQ_MAC2) != 0 && sc_if1 != NULL) - msk_intr_gmac(sc_if1); - if ((status & (Y2_IS_CHK_RX1 | Y2_IS_CHK_RX2)) != 0) { - device_printf(sc->msk_dev, "Rx descriptor error\n"); - sc->msk_intrmask &= ~(Y2_IS_CHK_RX1 | Y2_IS_CHK_RX2); - CSR_WRITE_4(sc, B0_IMSK, sc->msk_intrmask); - CSR_READ_4(sc, B0_IMSK); - } - if ((status & (Y2_IS_CHK_TXA1 | Y2_IS_CHK_TXA2)) != 0) { - device_printf(sc->msk_dev, "Tx descriptor error\n"); - sc->msk_intrmask &= ~(Y2_IS_CHK_TXA1 | Y2_IS_CHK_TXA2); - CSR_WRITE_4(sc, B0_IMSK, sc->msk_intrmask); - CSR_READ_4(sc, B0_IMSK); - } - if ((status & Y2_IS_HW_ERR) != 0) - msk_intr_hwerr(sc); - - domore = msk_handle_events(sc); - if ((status & Y2_IS_STAT_BMU) != 0) - CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_CLR_IRQ); - - if (ifp0 != NULL && (ifp0->if_drv_flags & IFF_DRV_RUNNING) != 0 && - !IFQ_DRV_IS_EMPTY(&ifp0->if_snd)) - taskqueue_enqueue(taskqueue_fast, &sc_if0->msk_tx_task); + msk_start_locked(ifp0); if (ifp1 != NULL && (ifp1->if_drv_flags & IFF_DRV_RUNNING) != 0 && !IFQ_DRV_IS_EMPTY(&ifp1->if_snd)) - taskqueue_enqueue(taskqueue_fast, &sc_if1->msk_tx_task); + msk_start_locked(ifp1); - if (domore > 0) { - taskqueue_enqueue(sc->msk_tq, &sc->msk_int_task); - MSK_UNLOCK(sc); - return; - } -done: MSK_UNLOCK(sc); - - /* Reenable interrupts. */ - CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2); } static void Modified: head/sys/dev/msk/if_mskreg.h ============================================================================== --- head/sys/dev/msk/if_mskreg.h Tue Mar 2 01:21:33 2010 (r204544) +++ head/sys/dev/msk/if_mskreg.h Tue Mar 2 01:45:02 2010 (r204545) @@ -2501,8 +2501,6 @@ struct msk_softc { int msk_int_holdoff; int msk_process_limit; int msk_stat_cons; - struct taskqueue *msk_tq; - struct task msk_int_task; struct mtx msk_mtx; }; @@ -2547,7 +2545,6 @@ struct msk_if_softc { struct msk_ring_data msk_rdata; struct msk_softc *msk_softc; /* parent controller */ struct msk_hw_stats msk_stats; - struct task msk_tx_task; int msk_if_flags; uint16_t msk_vtag; /* VLAN tag id. */ }; From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 05:43:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 741E71065672; Tue, 2 Mar 2010 05:43:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6346B8FC17; Tue, 2 Mar 2010 05:43:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o225h4tG034230; Tue, 2 Mar 2010 05:43:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o225h4bn034225; Tue, 2 Mar 2010 05:43:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003020543.o225h4bn034225@svn.freebsd.org> From: Warner Losh Date: Tue, 2 Mar 2010 05:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204548 - head/gnu/usr.bin/binutils/ld X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 05:43:04 -0000 Author: imp Date: Tue Mar 2 05:43:04 2010 New Revision: 204548 URL: http://svn.freebsd.org/changeset/base/204548 Log: Add n32 ABI generators... Submitted by: neel, jmallet Added: head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh - copied unchanged from r204272, head/gnu/usr.bin/binutils/ld/elf32btsmip_fbsd.sh head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh - copied unchanged from r204272, head/gnu/usr.bin/binutils/ld/elf32ltsmip_fbsd.sh Modified: head/gnu/usr.bin/binutils/ld/Makefile.mips head/gnu/usr.bin/binutils/ld/genscripts.sh Modified: head/gnu/usr.bin/binutils/ld/Makefile.mips ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.mips Tue Mar 2 05:40:01 2010 (r204547) +++ head/gnu/usr.bin/binutils/ld/Makefile.mips Tue Mar 2 05:43:04 2010 (r204548) @@ -10,7 +10,8 @@ NATIVE_EMULATION=elf${_sz}btsmip_fbsd NATIVE_EMULATION=elf${_sz}ltsmip_fbsd .endif -MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd +MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd \ + elf32btsmipn32_fbsd elf32ltsmipn32_fbsd .for abi in ${MIPS_ABIS} #.if (${abi} != ${NATIVE_EMULATION}) EMS+= ${abi} Copied: head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh (from r204272, head/gnu/usr.bin/binutils/ld/elf32btsmip_fbsd.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh Tue Mar 2 05:43:04 2010 (r204548, copy of r204272, head/gnu/usr.bin/binutils/ld/elf32btsmip_fbsd.sh) @@ -0,0 +1,4 @@ +# $FreeBSD$ +. ${srcdir}/emulparams/elf32btsmip.sh +. ${srcdir}/emulparams/elf_fbsd.sh +GENERATE_PIE_SCRIPT=yes Copied: head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh (from r204272, head/gnu/usr.bin/binutils/ld/elf32ltsmip_fbsd.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh Tue Mar 2 05:43:04 2010 (r204548, copy of r204272, head/gnu/usr.bin/binutils/ld/elf32ltsmip_fbsd.sh) @@ -0,0 +1,4 @@ +# $FreeBSD$ +. ${srcdir}/emulparams/elf32ltsmip.sh +. ${srcdir}/emulparams/elf_fbsd.sh +GENERATE_PIE_SCRIPT=yes Modified: head/gnu/usr.bin/binutils/ld/genscripts.sh ============================================================================== --- head/gnu/usr.bin/binutils/ld/genscripts.sh Tue Mar 2 05:40:01 2010 (r204547) +++ head/gnu/usr.bin/binutils/ld/genscripts.sh Tue Mar 2 05:43:04 2010 (r204548) @@ -50,6 +50,7 @@ fi if test -d ldscripts; then true else + rm -f ldscripts mkdir ldscripts fi From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 05:59:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 215D7106566B; Tue, 2 Mar 2010 05:59:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 109A48FC08; Tue, 2 Mar 2010 05:59:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o225xEk5037784; Tue, 2 Mar 2010 05:59:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o225xEfs037782; Tue, 2 Mar 2010 05:59:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003020559.o225xEfs037782@svn.freebsd.org> From: Warner Losh Date: Tue, 2 Mar 2010 05:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204549 - head/contrib/gcc/config/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 05:59:15 -0000 Author: imp Date: Tue Mar 2 05:59:14 2010 New Revision: 204549 URL: http://svn.freebsd.org/changeset/base/204549 Log: Bring in more built-in defines from NetBSD a few #defines from JC. # tested only with o32 at the moment Submitted by: C. Jayachandran (CJ) Obtained from: NetBSD Modified: head/contrib/gcc/config/mips/freebsd.h Modified: head/contrib/gcc/config/mips/freebsd.h ============================================================================== --- head/contrib/gcc/config/mips/freebsd.h Tue Mar 2 05:43:04 2010 (r204548) +++ head/contrib/gcc/config/mips/freebsd.h Tue Mar 2 05:59:14 2010 (r204549) @@ -130,10 +130,67 @@ Boston, MA 02110-1301, USA. */ if (TARGET_MIPS16) \ builtin_define ("__mips16"); \ \ + if (mips_abi == ABI_N32) \ + { \ + builtin_define ("__mips_n32"); \ + builtin_define ("_ABIN32=2"); \ + builtin_define ("_MIPS_SIM=_ABIN32"); \ + builtin_define ("_MIPS_SZLONG=32"); \ + builtin_define ("_MIPS_SZPTR=32"); \ + } \ + else if (mips_abi == ABI_64) \ + { \ + builtin_define ("__mips_n64"); \ + builtin_define ("_ABI64=3"); \ + builtin_define ("_MIPS_SIM=_ABI64"); \ + builtin_define ("_MIPS_SZLONG=64"); \ + builtin_define ("_MIPS_SZPTR=64"); \ + } \ + else if (mips_abi == ABI_O64) \ + { \ + builtin_define ("__mips_o64"); \ + builtin_define ("_ABIO64=4"); \ + builtin_define ("_MIPS_SIM=_ABIO64"); \ + builtin_define ("_MIPS_SZLONG=64"); \ + builtin_define ("_MIPS_SZPTR=64"); \ + } \ + else if (mips_abi == ABI_EABI) \ + { \ + builtin_define ("__mips_eabi"); \ + builtin_define ("_ABIEMB=5"); \ + builtin_define ("_MIPS_SIM=_ABIEMB"); \ + if (TARGET_LONG64) \ + builtin_define ("_MIPS_SZLONG=64"); \ + else \ + builtin_define ("_MIPS_SZLONG=32"); \ + if (TARGET_64BIT) \ + builtin_define ("_MIPS_SZPTR=64"); \ + else \ + builtin_define ("_MIPS_SZPTR=32"); \ + } \ + else \ + { \ + builtin_define ("__mips_o32"); \ + builtin_define ("_ABIO32=1"); \ + builtin_define ("_MIPS_SIM=_ABIO32"); \ + builtin_define ("_MIPS_SZLONG=32"); \ + builtin_define ("_MIPS_SZPTR=32"); \ + } \ + if (TARGET_FLOAT64) \ + builtin_define ("_MIPS_FPSET=32"); \ + else \ + builtin_define ("_MIPS_FPSET=16"); \ + \ + builtin_define ("_MIPS_SZINT=32"); \ + \ MIPS_CPP_SET_PROCESSOR ("_MIPS_ARCH", mips_arch_info); \ MIPS_CPP_SET_PROCESSOR ("_MIPS_TUNE", mips_tune_info); \ \ - if (ISA_MIPS3) \ + if (ISA_MIPS1) \ + builtin_define ("__mips=1"); \ + else if (ISA_MIPS2) \ + builtin_define ("__mips=2"); \ + else if (ISA_MIPS3) \ builtin_define ("__mips=3"); \ else if (ISA_MIPS4) \ builtin_define ("__mips=4"); \ @@ -152,7 +209,12 @@ Boston, MA 02110-1301, USA. */ builtin_define ("__mips=64"); \ builtin_define ("__mips_isa_rev=1"); \ } \ - \ +/* else if (ISA_MIPS64R2) \ + { \ + builtin_define ("__mips=64"); \ + builtin_define ("__mips_isa_rev=2"); \ + } \ +*/ \ if (TARGET_HARD_FLOAT) \ builtin_define ("__mips_hard_float"); \ else if (TARGET_SOFT_FLOAT) \ @@ -167,18 +229,6 @@ Boston, MA 02110-1301, USA. */ builtin_define ("__MIPSEL__"); \ \ /* No language dialect defines. */ \ - \ - if (mips_abi == ABI_EABI) \ - builtin_define ("__mips_eabi"); \ - else if (mips_abi == ABI_N32) \ - builtin_define ("__mips_n32"); \ - else if (mips_abi == ABI_64) \ - builtin_define ("__mips_n64"); \ - else if (mips_abi == ABI_O64) \ - builtin_define ("__mips_o64"); \ - else \ - builtin_define ("__mips_o32"); \ - \ if (TARGET_ABICALLS) \ builtin_define ("__ABICALLS__"); \ } \ @@ -241,6 +291,15 @@ Boston, MA 02110-1301, USA. */ #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." +/* Currently we don't support 128bit long doubles, so for now we force + n32 to be 64bit. */ +#undef LONG_DOUBLE_TYPE_SIZE +#define LONG_DOUBLE_TYPE_SIZE 64 + +#ifdef IN_LIBGCC2 +#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE +#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 +#endif /************************[ Debugger stuff ]*********************************/ From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 06:08:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD4F01065678; Tue, 2 Mar 2010 06:08:29 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5DA0A8FC23; Tue, 2 Mar 2010 06:08:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2262ucS057564; Mon, 1 Mar 2010 23:02:56 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 01 Mar 2010 23:03:11 -0700 (MST) Message-Id: <20100301.230311.343708041358427863.imp@bsdimp.com> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: "M. Warner Losh" In-Reply-To: <201003020543.o225h4bn034225@svn.freebsd.org> References: <201003020543.o225h4bn034225@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r204548 - head/gnu/usr.bin/binutils/ld X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 06:08:29 -0000 In message: <201003020543.o225h4bn034225@svn.freebsd.org> Warner Losh writes: : Author: imp : Date: Tue Mar 2 05:43:04 2010 : New Revision: 204548 : URL: http://svn.freebsd.org/changeset/base/204548 : : Log: : Add n32 ABI generators... : : Submitted by: neel, jmallet Correction: This was submitted by JC (C. Jayachandran). : Added: : head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh : - copied unchanged from r204272, head/gnu/usr.bin/binutils/ld/elf32btsmip_fbsd.sh : head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh : - copied unchanged from r204272, head/gnu/usr.bin/binutils/ld/elf32ltsmip_fbsd.sh : Modified: : head/gnu/usr.bin/binutils/ld/Makefile.mips : head/gnu/usr.bin/binutils/ld/genscripts.sh : : Modified: head/gnu/usr.bin/binutils/ld/Makefile.mips : ============================================================================== : --- head/gnu/usr.bin/binutils/ld/Makefile.mips Tue Mar 2 05:40:01 2010 (r204547) : +++ head/gnu/usr.bin/binutils/ld/Makefile.mips Tue Mar 2 05:43:04 2010 (r204548) : @@ -10,7 +10,8 @@ NATIVE_EMULATION=elf${_sz}btsmip_fbsd : NATIVE_EMULATION=elf${_sz}ltsmip_fbsd : .endif : : -MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd : +MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd \ : + elf32btsmipn32_fbsd elf32ltsmipn32_fbsd : .for abi in ${MIPS_ABIS} : #.if (${abi} != ${NATIVE_EMULATION}) : EMS+= ${abi} : : Copied: head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh (from r204272, head/gnu/usr.bin/binutils/ld/elf32btsmip_fbsd.sh) : ============================================================================== : --- /dev/null 00:00:00 1970 (empty, because file is newly added) : +++ head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh Tue Mar 2 05:43:04 2010 (r204548, copy of r204272, head/gnu/usr.bin/binutils/ld/elf32btsmip_fbsd.sh) : @@ -0,0 +1,4 @@ : +# $FreeBSD$ : +. ${srcdir}/emulparams/elf32btsmip.sh : +. ${srcdir}/emulparams/elf_fbsd.sh : +GENERATE_PIE_SCRIPT=yes : : Copied: head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh (from r204272, head/gnu/usr.bin/binutils/ld/elf32ltsmip_fbsd.sh) : ============================================================================== : --- /dev/null 00:00:00 1970 (empty, because file is newly added) : +++ head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh Tue Mar 2 05:43:04 2010 (r204548, copy of r204272, head/gnu/usr.bin/binutils/ld/elf32ltsmip_fbsd.sh) : @@ -0,0 +1,4 @@ : +# $FreeBSD$ : +. ${srcdir}/emulparams/elf32ltsmip.sh : +. ${srcdir}/emulparams/elf_fbsd.sh : +GENERATE_PIE_SCRIPT=yes : : Modified: head/gnu/usr.bin/binutils/ld/genscripts.sh : ============================================================================== : --- head/gnu/usr.bin/binutils/ld/genscripts.sh Tue Mar 2 05:40:01 2010 (r204547) : +++ head/gnu/usr.bin/binutils/ld/genscripts.sh Tue Mar 2 05:43:04 2010 (r204548) : @@ -50,6 +50,7 @@ fi : if test -d ldscripts; then : true : else : + rm -f ldscripts : mkdir ldscripts : fi : : From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 06:58:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19CE31065674; Tue, 2 Mar 2010 06:58:59 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 073778FC17; Tue, 2 Mar 2010 06:58:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o226wx0X051165; Tue, 2 Mar 2010 06:58:59 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o226wwB2051156; Tue, 2 Mar 2010 06:58:58 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201003020658.o226wwB2051156@svn.freebsd.org> From: Alfred Perlstein Date: Tue, 2 Mar 2010 06:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204552 - in head/sys: conf kern net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 06:58:59 -0000 Author: alfred Date: Tue Mar 2 06:58:58 2010 New Revision: 204552 URL: http://svn.freebsd.org/changeset/base/204552 Log: Merge projects/enhanced_coredumps (r204346) into HEAD: Enhanced process coredump routines. This brings in the following features: 1) Limit number of cores per process via the %I coredump formatter. Example: if corefilename is set to %N.%I.core AND num_cores = 3, then if a process "rpd" cores, then the corefile will be named "rpd.0.core", however if it cores again, then the kernel will generate "rpd.1.core" until we hit the limit of "num_cores". this is useful to get several corefiles, but also prevent filling the machine with corefiles. 2) Encode machine hostname in core dump name via %H. 3) Compress coredumps, useful for embedded platforms with limited space. A sysctl kern.compress_user_cores is made available if turned on. To enable compressed coredumps, the following config options need to be set: options COMPRESS_USER_CORES device zlib # brings in the zlib requirements. device gzio # brings in the kernel vnode gzip output module. 4) Eventhandlers are fired to indicate coredumps in progress. 5) The imgact sv_coredump routine has grown a flag to pass in more state, currently this is used only for passing a flag down to compress the coredump or not. Note that the gzio facility can be used for generic output of gzip'd streams via vnodes. Obtained from: Juniper Networks Reviewed by: kan Added: head/sys/kern/kern_gzio.c (contents, props changed) head/sys/net/zutil.h (contents, props changed) Modified: head/sys/conf/files head/sys/conf/options head/sys/kern/imgact_elf.c head/sys/kern/kern_sig.c head/sys/net/zlib.h head/sys/sys/eventhandler.h head/sys/sys/imgact.h head/sys/sys/imgact_aout.h head/sys/sys/imgact_elf.h head/sys/sys/sysent.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Mar 2 06:54:15 2010 (r204551) +++ head/sys/conf/files Tue Mar 2 06:58:58 2010 (r204552) @@ -2053,6 +2053,7 @@ kern/kern_exec.c standard kern/kern_exit.c standard kern/kern_fail.c standard kern/kern_fork.c standard +kern/kern_gzio.c optional gzio kern/kern_idle.c standard kern/kern_intr.c standard kern/kern_jail.c standard @@ -2344,7 +2345,7 @@ net/slcompress.c optional netgraph_vjc net/vnet.c optional vimage net/zlib.c optional crypto | geom_uzip | ipsec | \ mxge | netgraph_deflate | \ - ddb_ctf + ddb_ctf | zlib net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan wlan_acl net80211/ieee80211_action.c optional wlan Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Mar 2 06:54:15 2010 (r204551) +++ head/sys/conf/options Tue Mar 2 06:58:58 2010 (r204552) @@ -71,6 +71,7 @@ COMPAT_FREEBSD5 opt_compat.h COMPAT_FREEBSD6 opt_compat.h COMPAT_FREEBSD7 opt_compat.h COMPILING_LINT opt_global.h +COMPRESS_USER_CORES opt_core.h CY_PCI_FASTINTR DEADLKRES opt_watchdog.h DIRECTIO Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Tue Mar 2 06:54:15 2010 (r204551) +++ head/sys/kern/imgact_elf.c Tue Mar 2 06:58:58 2010 (r204552) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include "opt_core.h" #include #include @@ -58,6 +59,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include + +#include #include #include @@ -95,6 +100,12 @@ static boolean_t __elfN(check_note)(stru SYSCTL_NODE(_kern, OID_AUTO, __CONCAT(elf, __ELF_WORD_SIZE), CTLFLAG_RW, 0, ""); +#ifdef COMPRESS_USER_CORES +static int compress_core(gzFile, char *, char *, unsigned int, + struct thread * td); +#define CORE_BUF_SIZE (16 * 1024) +#endif + int __elfN(fallback_brand) = -1; SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, fallback_brand, CTLFLAG_RW, &__elfN(fallback_brand), 0, @@ -1003,16 +1014,38 @@ static void cb_put_phdr(vm_map_entry_t, static void cb_size_segment(vm_map_entry_t, void *); static void each_writable_segment(struct thread *, segment_callback, void *); static int __elfN(corehdr)(struct thread *, struct vnode *, struct ucred *, - int, void *, size_t); + int, void *, size_t, gzFile); static void __elfN(puthdr)(struct thread *, void *, size_t *, int); static void __elfN(putnote)(void *, size_t *, const char *, int, const void *, size_t); +#ifdef COMPRESS_USER_CORES +extern int compress_user_cores; +extern int compress_user_cores_gzlevel; +#endif + +static int +core_output(struct vnode *vp, void *base, size_t len, off_t offset, + struct ucred *active_cred, struct ucred *file_cred, + struct thread *td, char *core_buf, gzFile gzfile) { + + int error; + if (gzfile) { +#ifdef COMPRESS_USER_CORES + error = compress_core(gzfile, base, core_buf, len, td); +#else + panic("shouldn't be here"); +#endif + } else { + error = vn_rdwr_inchunks(UIO_WRITE, vp, base, len, offset, + UIO_USERSPACE, IO_UNIT | IO_DIRECT, active_cred, file_cred, + NULL, td); + } + return (error); +} + int -__elfN(coredump)(td, vp, limit) - struct thread *td; - struct vnode *vp; - off_t limit; +__elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags) { struct ucred *cred = td->td_ucred; int error = 0; @@ -1020,6 +1053,37 @@ __elfN(coredump)(td, vp, limit) void *hdr; size_t hdrsize; + gzFile gzfile = Z_NULL; + char *core_buf = NULL; +#ifdef COMPRESS_USER_CORES + char gzopen_flags[8]; + char *p; + int doing_compress = flags & IMGACT_CORE_COMPRESS; +#endif + + hdr = NULL; + +#ifdef COMPRESS_USER_CORES + if (doing_compress) { + p = gzopen_flags; + *p++ = 'w'; + if (compress_user_cores_gzlevel >= 0 && + compress_user_cores_gzlevel <= 9) + *p++ = '0' + compress_user_cores_gzlevel; + *p = 0; + gzfile = gz_open("", gzopen_flags, vp); + if (gzfile == Z_NULL) { + error = EFAULT; + goto done; + } + core_buf = malloc(CORE_BUF_SIZE, M_TEMP, M_WAITOK | M_ZERO); + if (!core_buf) { + error = ENOMEM; + goto done; + } + } +#endif + /* Size the program segments. */ seginfo.count = 0; seginfo.size = 0; @@ -1044,7 +1108,8 @@ __elfN(coredump)(td, vp, limit) if (hdr == NULL) { return (EINVAL); } - error = __elfN(corehdr)(td, vp, cred, seginfo.count, hdr, hdrsize); + error = __elfN(corehdr)(td, vp, cred, seginfo.count, hdr, hdrsize, + gzfile); /* Write the contents of all of the writable segments. */ if (error == 0) { @@ -1055,17 +1120,28 @@ __elfN(coredump)(td, vp, limit) php = (Elf_Phdr *)((char *)hdr + sizeof(Elf_Ehdr)) + 1; offset = hdrsize; for (i = 0; i < seginfo.count; i++) { - error = vn_rdwr_inchunks(UIO_WRITE, vp, - (caddr_t)(uintptr_t)php->p_vaddr, - php->p_filesz, offset, UIO_USERSPACE, - IO_UNIT | IO_DIRECT, cred, NOCRED, NULL, - curthread); + error = core_output(vp, (caddr_t)(uintptr_t)php->p_vaddr, + php->p_filesz, offset, cred, NOCRED, curthread, core_buf, gzfile); if (error != 0) break; offset += php->p_filesz; php++; } } + if (error) { + log(LOG_WARNING, + "Failed to write core file for process %s (error %d)\n", + curproc->p_comm, error); + } + +#ifdef COMPRESS_USER_CORES +done: +#endif + if (core_buf) + free(core_buf, M_TEMP); + if (gzfile) + gzclose(gzfile); + free(hdr, M_TEMP); return (error); @@ -1189,13 +1265,14 @@ each_writable_segment(td, func, closure) * the page boundary. */ static int -__elfN(corehdr)(td, vp, cred, numsegs, hdr, hdrsize) +__elfN(corehdr)(td, vp, cred, numsegs, hdr, hdrsize, gzfile) struct thread *td; struct vnode *vp; struct ucred *cred; int numsegs; size_t hdrsize; void *hdr; + gzFile gzfile; { size_t off; @@ -1204,10 +1281,26 @@ __elfN(corehdr)(td, vp, cred, numsegs, h off = 0; __elfN(puthdr)(td, hdr, &off, numsegs); - /* Write it to the core file. */ - return (vn_rdwr_inchunks(UIO_WRITE, vp, hdr, hdrsize, (off_t)0, - UIO_SYSSPACE, IO_UNIT | IO_DIRECT, cred, NOCRED, NULL, - td)); + if (!gzfile) { + /* Write it to the core file. */ + return (vn_rdwr_inchunks(UIO_WRITE, vp, hdr, hdrsize, (off_t)0, + UIO_SYSSPACE, IO_UNIT | IO_DIRECT, cred, NOCRED, NULL, + td)); + } else { +#ifdef COMPRESS_USER_CORES + if (gzwrite(gzfile, hdr, hdrsize) != hdrsize) { + log(LOG_WARNING, + "Failed to compress core file header for process" + " %s.\n", curproc->p_comm); + return (EFAULT); + } + else { + return (0); + } +#else + panic("shouldn't be here"); +#endif + } } #if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32 @@ -1476,3 +1569,50 @@ static struct execsw __elfN(execsw) = { __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) }; EXEC_SET(__CONCAT(elf, __ELF_WORD_SIZE), __elfN(execsw)); + +#ifdef COMPRESS_USER_CORES +/* + * Compress and write out a core segment for a user process. + * + * 'inbuf' is the starting address of a VM segment in the process' address + * space that is to be compressed and written out to the core file. 'dest_buf' + * is a buffer in the kernel's address space. The segment is copied from + * 'inbuf' to 'dest_buf' first before being processed by the compression + * routine gzwrite(). This copying is necessary because the content of the VM + * segment may change between the compression pass and the crc-computation pass + * in gzwrite(). This is because realtime threads may preempt the UNIX kernel. + */ +static int +compress_core (gzFile file, char *inbuf, char *dest_buf, unsigned int len, + struct thread *td) +{ + int len_compressed; + int error = 0; + unsigned int chunk_len; + + while (len) { + chunk_len = (len > CORE_BUF_SIZE) ? CORE_BUF_SIZE : len; + copyin(inbuf, dest_buf, chunk_len); + len_compressed = gzwrite(file, dest_buf, chunk_len); + + EVENTHANDLER_INVOKE(app_coredump_progress, td, len_compressed); + + if ((unsigned int)len_compressed != chunk_len) { + log(LOG_WARNING, + "compress_core: length mismatch (0x%x returned, " + "0x%x expected)\n", len_compressed, chunk_len); + EVENTHANDLER_INVOKE(app_coredump_error, td, + "compress_core: length mismatch %x -> %x", + chunk_len, len_compressed); + error = EFAULT; + break; + } + inbuf += chunk_len; + len -= chunk_len; + if (ticks - PCPU_GET(switchticks) >= hogticks) + uio_yield(); + } + + return (error); +} +#endif /* COMPRESS_USER_CORES */ Added: head/sys/kern/kern_gzio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/kern_gzio.c Tue Mar 2 06:58:58 2010 (r204552) @@ -0,0 +1,406 @@ +/* + * $Id: kern_gzio.c,v 1.6 2008-10-18 22:54:45 lbazinet Exp $ + * + * core_gzip.c -- gzip routines used in compressing user process cores + * + * This file is derived from src/lib/libz/gzio.c in FreeBSD. + */ + +/* gzio.c -- IO on .gz files + * Copyright (C) 1995-1998 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + * + */ + +/* @(#) $FreeBSD$ */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define GZ_HEADER_LEN 10 + +#ifndef Z_BUFSIZE +# ifdef MAXSEG_64K +# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */ +# else +# define Z_BUFSIZE 16384 +# endif +#endif +#ifndef Z_PRINTF_BUFSIZE +# define Z_PRINTF_BUFSIZE 4096 +#endif + +#define ALLOC(size) malloc(size, M_TEMP, M_WAITOK | M_ZERO) +#define TRYFREE(p) {if (p) free(p, M_TEMP);} + +static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ +#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define RESERVED 0xE0 /* bits 5..7: reserved */ + +typedef struct gz_stream { + z_stream stream; + int z_err; /* error code for last stream operation */ + int z_eof; /* set if end of input file */ + struct vnode *file; /* vnode pointer of .gz file */ + Byte *inbuf; /* input buffer */ + Byte *outbuf; /* output buffer */ + uLong crc; /* crc32 of uncompressed data */ + char *msg; /* error message */ + char *path; /* path name for debugging only */ + int transparent; /* 1 if input file is not a .gz file */ + char mode; /* 'w' or 'r' */ + long startpos; /* start of compressed data in file (header skipped) */ + off_t outoff; /* current offset in output file */ + int flags; +} gz_stream; + + +local int do_flush OF((gzFile file, int flush)); +local int destroy OF((gz_stream *s)); +local void putU32 OF((gz_stream *file, uint32_t x)); +local void *gz_alloc OF((void *notused, u_int items, u_int size)); +local void gz_free OF((void *notused, void *ptr)); + +/* =========================================================================== + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb"). The file is given either by file descriptor + or path name (if fd == -1). + gz_open return NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). +*/ +gzFile gz_open (path, mode, vp) + const char *path; + const char *mode; + struct vnode *vp; +{ + int err; + int level = Z_DEFAULT_COMPRESSION; /* compression level */ + int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */ + const char *p = mode; + gz_stream *s; + char fmode[80]; /* copy of mode, without the compression level */ + char *m = fmode; + int resid; + int error; + char buf[GZ_HEADER_LEN + 1]; + + if (!path || !mode) return Z_NULL; + + s = (gz_stream *)ALLOC(sizeof(gz_stream)); + if (!s) return Z_NULL; + + s->stream.zalloc = (alloc_func)gz_alloc; + s->stream.zfree = (free_func)gz_free; + s->stream.opaque = (voidpf)0; + s->stream.next_in = s->inbuf = Z_NULL; + s->stream.next_out = s->outbuf = Z_NULL; + s->stream.avail_in = s->stream.avail_out = 0; + s->file = NULL; + s->z_err = Z_OK; + s->z_eof = 0; + s->crc = 0; + s->msg = NULL; + s->transparent = 0; + s->outoff = 0; + s->flags = 0; + + s->path = (char*)ALLOC(strlen(path)+1); + if (s->path == NULL) { + return destroy(s), (gzFile)Z_NULL; + } + strcpy(s->path, path); /* do this early for debugging */ + + s->mode = '\0'; + do { + if (*p == 'r') s->mode = 'r'; + if (*p == 'w' || *p == 'a') s->mode = 'w'; + if (*p >= '0' && *p <= '9') { + level = *p - '0'; + } else if (*p == 'f') { + strategy = Z_FILTERED; + } else if (*p == 'h') { + strategy = Z_HUFFMAN_ONLY; + } else { + *m++ = *p; /* copy the mode */ + } + } while (*p++ && m != fmode + sizeof(fmode)); + + if (s->mode != 'w') { + log(LOG_ERR, "gz_open: mode is not w (%c)\n", s->mode); + return destroy(s), (gzFile)Z_NULL; + } + + err = deflateInit2(&(s->stream), level, + Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy); + /* windowBits is passed < 0 to suppress zlib header */ + + s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); + if (err != Z_OK || s->outbuf == Z_NULL) { + return destroy(s), (gzFile)Z_NULL; + } + + s->stream.avail_out = Z_BUFSIZE; + s->file = vp; + + /* Write a very simple .gz header: + */ + snprintf(buf, sizeof(buf), "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], + gz_magic[1], Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, + 0 /*xflags*/, OS_CODE); + + if ((error = vn_rdwr(UIO_WRITE, s->file, buf, GZ_HEADER_LEN, s->outoff, + UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, curproc->p_ucred, + NOCRED, &resid, curthread))) { + s->outoff += GZ_HEADER_LEN - resid; + return destroy(s), (gzFile)Z_NULL; + } + s->outoff += GZ_HEADER_LEN; + s->startpos = 10L; + + return (gzFile)s; +} + + + /* =========================================================================== + * Cleanup then free the given gz_stream. Return a zlib error code. + Try freeing in the reverse order of allocations. + */ +local int destroy (s) + gz_stream *s; +{ + int err = Z_OK; + + if (!s) return Z_STREAM_ERROR; + + TRYFREE(s->msg); + + if (s->stream.state != NULL) { + if (s->mode == 'w') { + err = deflateEnd(&(s->stream)); + } + } + if (s->z_err < 0) err = s->z_err; + + TRYFREE(s->inbuf); + TRYFREE(s->outbuf); + TRYFREE(s->path); + TRYFREE(s); + return err; +} + + +/* =========================================================================== + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of bytes actually written (0 in case of error). +*/ +int ZEXPORT gzwrite (file, buf, len) + gzFile file; + const voidp buf; + unsigned len; +{ + gz_stream *s = (gz_stream*)file; + off_t curoff; + size_t resid; + int error; + int vfslocked; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + s->stream.next_in = (Bytef*)buf; + s->stream.avail_in = len; + + curoff = s->outoff; + while (s->stream.avail_in != 0) { + + if (s->stream.avail_out == 0) { + + s->stream.next_out = s->outbuf; + vfslocked = VFS_LOCK_GIANT(s->file->v_mount); + error = vn_rdwr_inchunks(UIO_WRITE, s->file, s->outbuf, Z_BUFSIZE, + curoff, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, + curproc->p_ucred, NOCRED, &resid, curthread); + VFS_UNLOCK_GIANT(vfslocked); + if (error) { + log(LOG_ERR, "gzwrite: vn_rdwr return %d\n", error); + curoff += Z_BUFSIZE - resid; + s->z_err = Z_ERRNO; + break; + } + curoff += Z_BUFSIZE; + s->stream.avail_out = Z_BUFSIZE; + } + s->z_err = deflate(&(s->stream), Z_NO_FLUSH); + if (s->z_err != Z_OK) { + log(LOG_ERR, + "gzwrite: deflate returned error %d\n", s->z_err); + break; + } + } + + s->crc = ~crc32_raw(buf, len, ~s->crc); + s->outoff = curoff; + + return (int)(len - s->stream.avail_in); +} + + +/* =========================================================================== + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. +*/ +local int do_flush (file, flush) + gzFile file; + int flush; +{ + uInt len; + int done = 0; + gz_stream *s = (gz_stream*)file; + off_t curoff = s->outoff; + size_t resid; + int vfslocked = 0; + int error; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + if (s->stream.avail_in) { + log(LOG_WARNING, "do_flush: avail_in non-zero on entry\n"); + } + + s->stream.avail_in = 0; /* should be zero already anyway */ + + for (;;) { + len = Z_BUFSIZE - s->stream.avail_out; + + if (len != 0) { + vfslocked = VFS_LOCK_GIANT(s->file->v_mount); + error = vn_rdwr_inchunks(UIO_WRITE, s->file, s->outbuf, len, curoff, + UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, curproc->p_ucred, + NOCRED, &resid, curthread); + VFS_UNLOCK_GIANT(vfslocked); + if (error) { + s->z_err = Z_ERRNO; + s->outoff = curoff + len - resid; + return Z_ERRNO; + } + s->stream.next_out = s->outbuf; + s->stream.avail_out = Z_BUFSIZE; + curoff += len; + } + if (done) break; + s->z_err = deflate(&(s->stream), flush); + + /* Ignore the second of two consecutive flushes: */ + if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK; + + /* deflate has finished flushing only when it hasn't used up + * all the available space in the output buffer: + */ + done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END); + + if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break; + } + s->outoff = curoff; + + return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; +} + +int ZEXPORT gzflush (file, flush) + gzFile file; + int flush; +{ + gz_stream *s = (gz_stream*)file; + int err = do_flush (file, flush); + + if (err) return err; + return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; +} + + +/* =========================================================================== + Outputs a long in LSB order to the given file +*/ +local void putU32 (s, x) + gz_stream *s; + uint32_t x; +{ + uint32_t xx; + off_t curoff = s->outoff; + int resid; + +#if BYTE_ORDER == BIG_ENDIAN + xx = bswap32(x); +#else + xx = x; +#endif + vn_rdwr(UIO_WRITE, s->file, (caddr_t)&xx, sizeof(xx), curoff, + UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, curproc->p_ucred, + NOCRED, &resid, curthread); + s->outoff += sizeof(xx) - resid; +} + + +/* =========================================================================== + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. +*/ +int ZEXPORT gzclose (file) + gzFile file; +{ + int err; + gz_stream *s = (gz_stream*)file; + + if (s == NULL) return Z_STREAM_ERROR; + + if (s->mode == 'w') { + err = do_flush (file, Z_FINISH); + if (err != Z_OK) { + log(LOG_ERR, "gzclose: do_flush failed (err %d)\n", err); + return destroy((gz_stream*)file); + } +#if 0 + printf("gzclose: putting crc: %lld total: %lld\n", + (long long)s->crc, (long long)s->stream.total_in); + printf("sizeof uLong = %d\n", (int)sizeof(uLong)); +#endif + putU32 (s, s->crc); + putU32 (s, (uint32_t) s->stream.total_in); + } + return destroy((gz_stream*)file); +} + +/* + * Space allocation and freeing routines for use by zlib routines when called + * from gzip modules. + */ +static void * +gz_alloc(void *notused __unused, u_int items, u_int size) +{ + void *ptr; + + MALLOC(ptr, void *, items * size, M_TEMP, M_NOWAIT | M_ZERO); + return ptr; +} + +static void +gz_free(void *opaque __unused, void *ptr) +{ + FREE(ptr, M_TEMP); +} + Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Mar 2 06:54:15 2010 (r204551) +++ head/sys/kern/kern_sig.c Tue Mar 2 06:58:58 2010 (r204552) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_kdtrace.h" #include "opt_ktrace.h" +#include "opt_core.h" #include #include @@ -49,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -78,6 +80,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include @@ -98,7 +102,7 @@ SDT_PROBE_ARGTYPE(proc, kernel, , signal SDT_PROBE_ARGTYPE(proc, kernel, , signal_discard, 2, "int"); static int coredump(struct thread *); -static char *expand_name(const char *, uid_t, pid_t); +static char *expand_name(const char *, uid_t, pid_t, struct thread *, int); static int killpg1(struct thread *td, int sig, int pgid, int all, ksiginfo_t *ksi); static int issignal(struct thread *td, int stop_allowed); @@ -2936,12 +2940,51 @@ childproc_exited(struct proc *p) sigparent(p, reason, status); } +/* + * We only have 1 character for the core count in the format + * string, so the range will be 0-9 + */ +#define MAX_NUM_CORES 10 +static int num_cores = 5; + +static int +sysctl_debug_num_cores_check (SYSCTL_HANDLER_ARGS) +{ + int error; + int new_val; + + error = sysctl_handle_int(oidp, &new_val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (new_val > MAX_NUM_CORES) + new_val = MAX_NUM_CORES; + if (new_val < 0) + new_val = 0; + num_cores = new_val; + return (0); +} +SYSCTL_PROC(_debug, OID_AUTO, ncores, CTLTYPE_INT|CTLFLAG_RW, + 0, sizeof(int), sysctl_debug_num_cores_check, "I", ""); + +#if defined(COMPRESS_USER_CORES) +int compress_user_cores = 1; +SYSCTL_INT(_kern, OID_AUTO, compress_user_cores, CTLFLAG_RW, + &compress_user_cores, 0, ""); + +int compress_user_cores_gzlevel = -1; /* default level */ +SYSCTL_INT(_kern, OID_AUTO, compress_user_cores_gzlevel, CTLFLAG_RW, + &compress_user_cores_gzlevel, -1, "user core gz compression level"); + +#define GZ_SUFFIX ".gz" +#define GZ_SUFFIX_LEN 3 +#endif + static char corefilename[MAXPATHLEN] = {"%N.core"}; SYSCTL_STRING(_kern, OID_AUTO, corefile, CTLFLAG_RW, corefilename, sizeof(corefilename), "process corefile name format string"); /* - * expand_name(name, uid, pid) + * expand_name(name, uid, pid, td, compress) * Expand the name described in corefilename, using name, uid, and pid. * corefilename is a printf-like string, with three format specifiers: * %N name of process ("name") @@ -2952,20 +2995,21 @@ SYSCTL_STRING(_kern, OID_AUTO, corefile, * This is controlled by the sysctl variable kern.corefile (see above). */ static char * -expand_name(name, uid, pid) - const char *name; - uid_t uid; - pid_t pid; +expand_name(const char *name, uid_t uid, pid_t pid, struct thread *td, + int compress) { struct sbuf sb; const char *format; char *temp; size_t i; - + int indexpos; + char hostname[MAXHOSTNAMELEN]; + format = corefilename; temp = malloc(MAXPATHLEN, M_TEMP, M_NOWAIT | M_ZERO); if (temp == NULL) return (NULL); + indexpos = -1; (void)sbuf_new(&sb, temp, MAXPATHLEN, SBUF_FIXEDLEN); for (i = 0; format[i]; i++) { switch (format[i]) { @@ -2975,6 +3019,15 @@ expand_name(name, uid, pid) case '%': sbuf_putc(&sb, '%'); break; + case 'H': /* hostname */ + getcredhostname(td->td_ucred, hostname, + sizeof(hostname)); + sbuf_printf(&sb, "%s", hostname); + break; + case 'I': /* autoincrementing index */ + sbuf_printf(&sb, "0"); + indexpos = sbuf_len(&sb) - 1; + break; case 'N': /* process name */ sbuf_printf(&sb, "%s", name); break; @@ -2994,6 +3047,11 @@ expand_name(name, uid, pid) sbuf_putc(&sb, format[i]); } } +#ifdef COMPRESS_USER_CORES + if (compress) { + sbuf_printf(&sb, GZ_SUFFIX); + } +#endif if (sbuf_overflowed(&sb)) { sbuf_delete(&sb); log(LOG_ERR, "pid %ld (%s), uid (%lu): corename is too " @@ -3003,6 +3061,53 @@ expand_name(name, uid, pid) } sbuf_finish(&sb); sbuf_delete(&sb); + + /* + * If the core format has a %I in it, then we need to check + * for existing corefiles before returning a name. + * To do this we iterate over 0..num_cores to find a + * non-existing core file name to use. + */ + if (indexpos != -1) { + struct nameidata nd; + int error, n; + int flags = O_CREAT | O_EXCL | FWRITE | O_NOFOLLOW; + int cmode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP; + int vfslocked; + + for (n = 0; n < num_cores; n++) { + temp[indexpos] = '0' + n; + NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, + temp, td); + error = vn_open(&nd, &flags, cmode, NULL); + if (error) { + if (error == EEXIST) { + continue; + } + log(LOG_ERR, + "pid %d (%s), uid (%u): Path `%s' failed " + "on initial open test, error = %d\n", + pid, name, uid, temp, error); + free(temp, M_TEMP); + return (NULL); + } + vfslocked = NDHASGIANT(&nd); + NDFREE(&nd, NDF_ONLY_PNBUF); + VOP_UNLOCK(nd.ni_vp, 0); + error = vn_close(nd.ni_vp, FWRITE, td->td_ucred, td); + VFS_UNLOCK_GIANT(vfslocked); + if (error) { + log(LOG_ERR, + "pid %d (%s), uid (%u): Path `%s' failed " + "on close after initial open test, " + "error = %d\n", + pid, name, uid, temp, error); + free(temp, M_TEMP); + return (NULL); + } + break; + } + } return (temp); } @@ -3028,12 +3133,19 @@ coredump(struct thread *td) char *name; /* name of corefile */ off_t limit; int vfslocked; + int compress; +#ifdef COMPRESS_USER_CORES + compress = compress_user_cores; +#else + compress = 0; +#endif PROC_LOCK_ASSERT(p, MA_OWNED); MPASS((p->p_flag & P_HADTHREADS) == 0 || p->p_singlethread == td); _STOPEVENT(p, S_CORE, 0); - name = expand_name(p->p_comm, td->td_ucred->cr_uid, p->p_pid); + name = expand_name(p->p_comm, td->td_ucred->cr_uid, p->p_pid, td, + compress); if (name == NULL) { PROC_UNLOCK(p); #ifdef AUDIT @@ -3124,7 +3236,7 @@ restart: PROC_UNLOCK(p); error = p->p_sysent->sv_coredump ? - p->p_sysent->sv_coredump(td, vp, limit) : + p->p_sysent->sv_coredump(td, vp, limit, compress ? IMGACT_CORE_COMPRESS : 0) : ENOSYS; if (locked) { Modified: head/sys/net/zlib.h ============================================================================== --- head/sys/net/zlib.h Tue Mar 2 06:54:15 2010 (r204551) +++ head/sys/net/zlib.h Tue Mar 2 06:58:58 2010 (r204552) @@ -1010,6 +1010,13 @@ extern int EXPORT inflateInit2_ OF((z_st uLongf *get_crc_table OF((void)); /* can be used by asm versions of crc32() */ +#ifdef _KERNEL +struct vnode; +extern gzFile gz_open OF((const char *path, const char *mode, + struct vnode *vp)); +#endif + + #ifdef __cplusplus } #endif Added: head/sys/net/zutil.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/net/zutil.h Tue Mar 2 06:58:58 2010 (r204552) @@ -0,0 +1,231 @@ +/* zutil.h -- internal interface and configuration of the compression library + * Copyright (C) 1995-1996 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* From: zutil.h,v 1.16 1996/07/24 13:41:13 me Exp $ */ +/* $FreeBSD$ */ + +#ifndef _Z_UTIL_H +#define _Z_UTIL_H + +#define ZEXPORT + +#ifdef _KERNEL +#include +#else +#include "zlib.h" +#endif + +#ifdef _KERNEL +/* Assume this is a *BSD or SVR4 kernel */ +#include +#include +#include +#include +#include +#include +#include +# define HAVE_MEMCPY +# define memcpy(d, s, n) bcopy((s), (d), (n)) +# define memset(d, v, n) bzero((d), (n)) +# define memcmp bcmp + +#else +#if defined(__KERNEL__) +/* Assume this is a Linux kernel */ +#include +#define HAVE_MEMCPY + +#else /* not kernel */ + +#if defined(MSDOS)||defined(VMS)||defined(CRAY)||defined(WIN32)||defined(RISCOS) +# include +# include +#else + extern int errno; +#endif +#ifdef STDC +# include +# include +#endif +#endif /* __KERNEL__ */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 07:20:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7B59106564A; Tue, 2 Mar 2010 07:20:46 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA7C8FC1D; Tue, 2 Mar 2010 07:20:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o227KkPG055984; Tue, 2 Mar 2010 07:20:46 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o227KknH055981; Tue, 2 Mar 2010 07:20:46 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003020720.o227KknH055981@svn.freebsd.org> From: Joel Dahl Date: Tue, 2 Mar 2010 07:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204553 - head/bin/pkill X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 07:20:46 -0000 Author: joel (doc committer) Date: Tue Mar 2 07:20:46 2010 New Revision: 204553 URL: http://svn.freebsd.org/changeset/base/204553 Log: The NetBSD Foundation has granted permission to remove clause 3 and 4 from their software. Approved by: pjd Obtained from: NetBSD Modified: head/bin/pkill/pkill.1 head/bin/pkill/pkill.c Modified: head/bin/pkill/pkill.1 ============================================================================== --- head/bin/pkill/pkill.1 Tue Mar 2 06:58:58 2010 (r204552) +++ head/bin/pkill/pkill.1 Tue Mar 2 07:20:46 2010 (r204553) @@ -16,13 +16,6 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/bin/pkill/pkill.c ============================================================================== --- head/bin/pkill/pkill.c Tue Mar 2 06:58:58 2010 (r204552) +++ head/bin/pkill/pkill.c Tue Mar 2 07:20:46 2010 (r204553) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 07:24:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8530A1065670; Tue, 2 Mar 2010 07:24:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74F478FC08; Tue, 2 Mar 2010 07:24:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o227Ol46056901; Tue, 2 Mar 2010 07:24:47 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o227Olor056899; Tue, 2 Mar 2010 07:24:47 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003020724.o227Olor056899@svn.freebsd.org> From: Warner Losh Date: Tue, 2 Mar 2010 07:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204554 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 07:24:47 -0000 Author: imp Date: Tue Mar 2 07:24:47 2010 New Revision: 204554 URL: http://svn.freebsd.org/changeset/base/204554 Log: -mno-dsp hasn't been required for a while now. Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Tue Mar 2 07:20:46 2010 (r204553) +++ head/share/mk/bsd.cpu.mk Tue Mar 2 07:24:47 2010 (r204554) @@ -208,7 +208,7 @@ LD += -EB CFLAGS += -EL LD += -EL . endif -CFLAGS += -msoft-float -G0 -mno-dsp -mabicalls +CFLAGS += -msoft-float -G0 -mabicalls .endif # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 07:25:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFBBC106566B; Tue, 2 Mar 2010 07:25:20 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4CE68FC08; Tue, 2 Mar 2010 07:25:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o227PK4G057074; Tue, 2 Mar 2010 07:25:20 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o227PK2O057070; Tue, 2 Mar 2010 07:25:20 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003020725.o227PK2O057070@svn.freebsd.org> From: Joel Dahl Date: Tue, 2 Mar 2010 07:25:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204555 - head/lib/libedit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 07:25:20 -0000 Author: joel (doc committer) Date: Tue Mar 2 07:25:20 2010 New Revision: 204555 URL: http://svn.freebsd.org/changeset/base/204555 Log: The NetBSD Foundation has granted permission to remove clause 3 and 4 from their software. Obtained from: NetBSD Modified: head/lib/libedit/editline.3 head/lib/libedit/editrc.5 head/lib/libedit/read.h Modified: head/lib/libedit/editline.3 ============================================================================== --- head/lib/libedit/editline.3 Tue Mar 2 07:24:47 2010 (r204554) +++ head/lib/libedit/editline.3 Tue Mar 2 07:25:20 2010 (r204555) @@ -13,9 +13,6 @@ .\" 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. -.\" 3. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/lib/libedit/editrc.5 ============================================================================== --- head/lib/libedit/editrc.5 Tue Mar 2 07:24:47 2010 (r204554) +++ head/lib/libedit/editrc.5 Tue Mar 2 07:25:20 2010 (r204555) @@ -13,9 +13,6 @@ .\" 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. -.\" 3. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/lib/libedit/read.h ============================================================================== --- head/lib/libedit/read.h Tue Mar 2 07:24:47 2010 (r204554) +++ head/lib/libedit/read.h Tue Mar 2 07:25:20 2010 (r204555) @@ -13,9 +13,6 @@ * 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. - * 3. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 07:26:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 404AA1065674; Tue, 2 Mar 2010 07:26:08 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CAD18FC15; Tue, 2 Mar 2010 07:26:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o227Q8q1057298; Tue, 2 Mar 2010 07:26:08 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o227Q8Nq057288; Tue, 2 Mar 2010 07:26:08 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201003020726.o227Q8Nq057288@svn.freebsd.org> From: Ulf Lilleengen Date: Tue, 2 Mar 2010 07:26:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204556 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 07:26:08 -0000 Author: lulf Date: Tue Mar 2 07:26:07 2010 New Revision: 204556 URL: http://svn.freebsd.org/changeset/base/204556 Log: - Move csup away from contrib/ and into usr.bin/. Software is no longer contributed, and main development is happening in the FreeBSD repo. Suggested by: joel Added: head/usr.bin/csup/README - copied unchanged from r204523, head/contrib/csup/README head/usr.bin/csup/TODO - copied unchanged from r204523, head/contrib/csup/TODO head/usr.bin/csup/attrstack.c - copied unchanged from r204523, head/contrib/csup/attrstack.c head/usr.bin/csup/attrstack.h - copied unchanged from r204523, head/contrib/csup/attrstack.h head/usr.bin/csup/auth.c - copied unchanged from r204523, head/contrib/csup/auth.c head/usr.bin/csup/auth.h - copied unchanged from r204523, head/contrib/csup/auth.h head/usr.bin/csup/config.c - copied unchanged from r204523, head/contrib/csup/config.c head/usr.bin/csup/config.h - copied unchanged from r204523, head/contrib/csup/config.h head/usr.bin/csup/cpasswd.1 - copied unchanged from r204523, head/contrib/csup/cpasswd.1 head/usr.bin/csup/cpasswd.sh - copied unchanged from r204523, head/contrib/csup/cpasswd.sh head/usr.bin/csup/csup.1 - copied unchanged from r204523, head/contrib/csup/csup.1 head/usr.bin/csup/detailer.c - copied unchanged from r204523, head/contrib/csup/detailer.c head/usr.bin/csup/detailer.h - copied unchanged from r204523, head/contrib/csup/detailer.h head/usr.bin/csup/diff.c - copied unchanged from r204523, head/contrib/csup/diff.c head/usr.bin/csup/diff.h - copied unchanged from r204523, head/contrib/csup/diff.h head/usr.bin/csup/fattr.c - copied unchanged from r204523, head/contrib/csup/fattr.c head/usr.bin/csup/fattr.h - copied unchanged from r204523, head/contrib/csup/fattr.h head/usr.bin/csup/fattr_bsd.h - copied unchanged from r204523, head/contrib/csup/fattr_bsd.h head/usr.bin/csup/fattr_posix.h - copied unchanged from r204523, head/contrib/csup/fattr_posix.h head/usr.bin/csup/fixups.c - copied unchanged from r204523, head/contrib/csup/fixups.c head/usr.bin/csup/fixups.h - copied unchanged from r204523, head/contrib/csup/fixups.h head/usr.bin/csup/fnmatch.c - copied unchanged from r204523, head/contrib/csup/fnmatch.c head/usr.bin/csup/fnmatch.h - copied unchanged from r204523, head/contrib/csup/fnmatch.h head/usr.bin/csup/globtree.c - copied unchanged from r204523, head/contrib/csup/globtree.c head/usr.bin/csup/globtree.h - copied unchanged from r204523, head/contrib/csup/globtree.h head/usr.bin/csup/idcache.c - copied unchanged from r204523, head/contrib/csup/idcache.c head/usr.bin/csup/idcache.h - copied unchanged from r204523, head/contrib/csup/idcache.h head/usr.bin/csup/keyword.c - copied unchanged from r204523, head/contrib/csup/keyword.c head/usr.bin/csup/keyword.h - copied unchanged from r204523, head/contrib/csup/keyword.h head/usr.bin/csup/lex.rcs.c - copied unchanged from r204523, head/contrib/csup/lex.rcs.c head/usr.bin/csup/lister.c - copied unchanged from r204523, head/contrib/csup/lister.c head/usr.bin/csup/lister.h - copied unchanged from r204523, head/contrib/csup/lister.h head/usr.bin/csup/main.c - copied unchanged from r204523, head/contrib/csup/main.c head/usr.bin/csup/main.h - copied unchanged from r204523, head/contrib/csup/main.h head/usr.bin/csup/misc.c - copied unchanged from r204523, head/contrib/csup/misc.c head/usr.bin/csup/misc.h - copied unchanged from r204523, head/contrib/csup/misc.h head/usr.bin/csup/mux.c - copied unchanged from r204523, head/contrib/csup/mux.c head/usr.bin/csup/mux.h - copied unchanged from r204523, head/contrib/csup/mux.h head/usr.bin/csup/parse.y - copied unchanged from r204523, head/contrib/csup/parse.y head/usr.bin/csup/pathcomp.c - copied unchanged from r204523, head/contrib/csup/pathcomp.c head/usr.bin/csup/pathcomp.h - copied unchanged from r204523, head/contrib/csup/pathcomp.h head/usr.bin/csup/proto.c - copied unchanged from r204523, head/contrib/csup/proto.c head/usr.bin/csup/proto.h - copied unchanged from r204523, head/contrib/csup/proto.h head/usr.bin/csup/queue.h - copied unchanged from r204523, head/contrib/csup/queue.h head/usr.bin/csup/rcsfile.c - copied unchanged from r204523, head/contrib/csup/rcsfile.c head/usr.bin/csup/rcsfile.h - copied unchanged from r204523, head/contrib/csup/rcsfile.h head/usr.bin/csup/rcsparse.c - copied unchanged from r204523, head/contrib/csup/rcsparse.c head/usr.bin/csup/rcsparse.h - copied unchanged from r204523, head/contrib/csup/rcsparse.h head/usr.bin/csup/rcstokenizer.h - copied unchanged from r204523, head/contrib/csup/rcstokenizer.h head/usr.bin/csup/rcstokenizer.l - copied unchanged from r204523, head/contrib/csup/rcstokenizer.l head/usr.bin/csup/rsyncfile.c - copied unchanged from r204523, head/contrib/csup/rsyncfile.c head/usr.bin/csup/rsyncfile.h - copied unchanged from r204523, head/contrib/csup/rsyncfile.h head/usr.bin/csup/status.c - copied unchanged from r204523, head/contrib/csup/status.c head/usr.bin/csup/status.h - copied unchanged from r204523, head/contrib/csup/status.h head/usr.bin/csup/stream.c - copied unchanged from r204523, head/contrib/csup/stream.c head/usr.bin/csup/stream.h - copied unchanged from r204523, head/contrib/csup/stream.h head/usr.bin/csup/threads.c - copied unchanged from r204523, head/contrib/csup/threads.c head/usr.bin/csup/threads.h - copied unchanged from r204523, head/contrib/csup/threads.h head/usr.bin/csup/token.h - copied unchanged from r204523, head/contrib/csup/token.h head/usr.bin/csup/token.l - copied unchanged from r204523, head/contrib/csup/token.l head/usr.bin/csup/updater.c - copied unchanged from r204523, head/contrib/csup/updater.c head/usr.bin/csup/updater.h - copied unchanged from r204523, head/contrib/csup/updater.h Replaced: head/usr.bin/csup/Makefile - copied, changed from r204523, head/contrib/csup/Makefile Deleted: head/contrib/csup/ Copied and modified: head/usr.bin/csup/Makefile (from r204523, head/contrib/csup/Makefile) ============================================================================== --- head/contrib/csup/Makefile Mon Mar 1 17:20:04 2010 (r204523, copy source) +++ head/usr.bin/csup/Makefile Tue Mar 2 07:26:07 2010 (r204556) @@ -15,30 +15,6 @@ SRCS= attrstack.c auth.c config.c detail CFLAGS+= -I. -I${.CURDIR} -g -pthread -DHAVE_FFLAGS -DNDEBUG WARNS?= 1 -# A bit of tweaking is needed to get this Makefile working -# with the bsd.prog.mk of all the *BSD OSes... -.if (${UNAME} == "NetBSD") -LDFLAGS+= -pthread -YHEADER= yes - -.elif (${UNAME} == "OpenBSD") -# I bet there's a better way to do this with the OpenBSD mk -# framework but well, this works and I got bored. -LDFLAGS+= -pthread -YFLAGS= -d -CLEANFILES+= parse.c parse.h y.tab.h - -config.c: parse.h - -token.l: parse.h - -y.tab.h: parse.c - -parse.h: y.tab.h - cp ${.ALLSRC} ${.TARGET} - -.endif - DPADD= ${LIBCRYPTO} ${LIBZ} LDADD= -lcrypto -lz Copied: head/usr.bin/csup/README (from r204523, head/contrib/csup/README) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csup/README Tue Mar 2 07:26:07 2010 (r204556, copy of r204523, head/contrib/csup/README) @@ -0,0 +1,39 @@ +$FreeBSD$ + +Authors +------- + +CVSup was originally written in Modula-3 by + John Polstra . + +Csup is a rewrite of CVSup in C. It has been mostly written by + Maxime Henrion . + +A few contributors have helped him in his task and they are listed here in +alphabetical order : + + Olivier Houchard + Ulf Lilleengen + Christoph Mathys (Google SoC Project) + Etienne Vidal + + +Building & Installing +--------------------- + +Csup should build and run fine under any *BSD OS (that includes FreeBSD, +NetBSD, OpenBSD and DragonFlyBSD), as well as Linux and Darwin. If you +have a problem building from source, drop me a mail! + +There is one Makefile specifically tailored for *BSD systems named +Makefile and another one that is gmake-specific for Darwin and Linux +users named GNUmakefile. You don't really need to worry about that +since whatever your "make" command is, it should pick up the correct +Makefile. + +As usual, to build the source code, just run "make". Once this is done, +just run "make install" to install the binary and manual page. + +Be warned however that if the packaging system of your OS knows about +csup, it is certainly better to install it from there rather than by +hand, so that it can then be properly deinstalled. Copied: head/usr.bin/csup/TODO (from r204523, head/contrib/csup/TODO) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csup/TODO Tue Mar 2 07:26:07 2010 (r204556, copy of r204523, head/contrib/csup/TODO) @@ -0,0 +1,29 @@ +$FreeBSD$ + +BUGS: + +- Fix every XXX in the code :-). +- The stream API needs some polishing. It needs proper error numbers + and a stream_error() function similar to the ferror() function. +- The yacc/lex code to parse the configuration file is sub-optimal. It + has global variables because of yacc, but I think it should be possible + to do it better by using YYFUNC_PROTOTYPE or something. I think it + should also be possible to completely get rid of the lex file. +- The $Log$ CVS keyword is not supported. +- Add missing support for supfile keywords and add sanity checks for + some of them. Also, we're not supposed to choke on unknown keywords + to stay in line with CVSup, which just ignores them in order to + maintain compatibility with sup configuration files. + +MISSING FEATURES: + +- Add support for shell commands sent by the server. +- Add missing support for various CVSup options : -D, -a (requires + authentication support), -e and -E (requires shell commands support) + and the destDir parameter. +- For now, this code should build fine on FreeBSD, NetBSD, OpenBSD, + Linux and Darwin. Solaris support would also be nice at some point. +- Implement some new useful options : the ability to generate CVS + checkout files (files in CVS/ subdirectores), a command line override + to only update a specific collection and a third verbosity level to + display commit log messages. Copied: head/usr.bin/csup/attrstack.c (from r204523, head/contrib/csup/attrstack.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csup/attrstack.c Tue Mar 2 07:26:07 2010 (r204556, copy of r204523, head/contrib/csup/attrstack.c) @@ -0,0 +1,90 @@ +/*- + * Copyright (c) 2006, Maxime Henrion + * 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 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 AUTHOR 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. + * + * $Id$ + */ + +#include +#include + +#include "attrstack.h" +#include "fattr.h" +#include "misc.h" + +#define ATTRSTACK_DEFSIZE 16 /* Initial size of the stack. */ + +struct attrstack { + struct fattr **stack; + size_t cur; + size_t size; +}; + +struct attrstack * +attrstack_new(void) +{ + struct attrstack *as; + + as = xmalloc(sizeof(struct attrstack)); + as->stack = xmalloc(sizeof(struct fattr *) * ATTRSTACK_DEFSIZE); + as->size = ATTRSTACK_DEFSIZE; + as->cur = 0; + return (as); +} + +struct fattr * +attrstack_pop(struct attrstack *as) +{ + + assert(as->cur > 0); + return (as->stack[--as->cur]); +} + +void +attrstack_push(struct attrstack *as, struct fattr *fa) +{ + + if (as->cur >= as->size) { + as->size *= 2; + as->stack = xrealloc(as->stack, + sizeof(struct fattr *) * as->size); + } + as->stack[as->cur++] = fa; +} + +size_t +attrstack_size(struct attrstack *as) +{ + + return (as->cur); +} + +void +attrstack_free(struct attrstack *as) +{ + + assert(as->cur == 0); + free(as->stack); + free(as); +} Copied: head/usr.bin/csup/attrstack.h (from r204523, head/contrib/csup/attrstack.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csup/attrstack.h Tue Mar 2 07:26:07 2010 (r204556, copy of r204523, head/contrib/csup/attrstack.h) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2006, Maxime Henrion + * 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 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 AUTHOR 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. + * + * $Id$ + */ +#ifndef _ATTRSTACK_H_ +#define _ATTRSTACK_H_ + +struct fattr; +struct attrstack; + +struct attrstack *attrstack_new(void); +void attrstack_push(struct attrstack *, struct fattr *); +struct fattr *attrstack_pop(struct attrstack *); +size_t attrstack_size(struct attrstack *); +void attrstack_free(struct attrstack *); + +#endif /* !_ATTRSTACK_H_ */ Copied: head/usr.bin/csup/auth.c (from r204523, head/contrib/csup/auth.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csup/auth.c Tue Mar 2 07:26:07 2010 (r204556, copy of r204523, head/contrib/csup/auth.c) @@ -0,0 +1,331 @@ +/*- + * Copyright (c) 2003-2007, Petar Zhivkov Petrov + * 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 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 AUTHOR 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. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "auth.h" +#include "config.h" +#include "misc.h" +#include "proto.h" +#include "stream.h" + +#define MD5_BYTES 16 + +/* This should be at least 2 * MD5_BYTES + 6 (length of "$md5$" + 1) */ +#define MD5_CHARS_MAX (2*(MD5_BYTES)+6) + +struct srvrecord { + char server[MAXHOSTNAMELEN]; + char client[256]; + char password[256]; +}; + +static int auth_domd5auth(struct config *); +static int auth_lookuprecord(char *, struct srvrecord *); +static int auth_parsetoken(char **, char *, int); +static void auth_makesecret(struct srvrecord *, char *); +static void auth_makeresponse(char *, char *, char *); +static void auth_readablesum(unsigned char *, char *); +static void auth_makechallenge(struct config *, char *); +static int auth_checkresponse(char *, char *, char *); + +int auth_login(struct config *config) +{ + struct stream *s; + char hostbuf[MAXHOSTNAMELEN]; + char *login, *host; + int error; + + s = config->server; + error = gethostname(hostbuf, sizeof(hostbuf)); + hostbuf[sizeof(hostbuf) - 1] = '\0'; + if (error) + host = NULL; + else + host = hostbuf; + login = getlogin(); + proto_printf(s, "USER %s %s\n", login != NULL ? login : "?", + host != NULL ? host : "?"); + stream_flush(s); + error = auth_domd5auth(config); + return (error); +} + +static int +auth_domd5auth(struct config *config) +{ + struct stream *s; + char *line, *cmd, *challenge, *realm, *client, *srvresponse, *msg; + char shrdsecret[MD5_CHARS_MAX], response[MD5_CHARS_MAX]; + char clichallenge[MD5_CHARS_MAX]; + struct srvrecord auth; + int error; + + lprintf(2, "MD5 authentication started\n"); + s = config->server; + line = stream_getln(s, NULL); + cmd = proto_get_ascii(&line); + realm = proto_get_ascii(&line); + challenge = proto_get_ascii(&line); + if (challenge == NULL || + line != NULL || + (strcmp(cmd, "AUTHMD5") != 0)) { + lprintf(-1, "Invalid server reply to USER\n"); + return (STATUS_FAILURE); + } + + client = NULL; + response[0] = clichallenge[0] = '.'; + response[1] = clichallenge[1] = 0; + if (config->reqauth || (strcmp(challenge, ".") != 0)) { + if (strcmp(realm, ".") == 0) { + lprintf(-1, "Authentication required, but not enabled on server\n"); + return (STATUS_FAILURE); + } + error = auth_lookuprecord(realm, &auth); + if (error != STATUS_SUCCESS) + return (error); + client = auth.client; + auth_makesecret(&auth, shrdsecret); + } + + if (strcmp(challenge, ".") != 0) + auth_makeresponse(challenge, shrdsecret, response); + if (config->reqauth) + auth_makechallenge(config, clichallenge); + proto_printf(s, "AUTHMD5 %s %s %s\n", + client == NULL ? "." : client, response, clichallenge); + stream_flush(s); + line = stream_getln(s, NULL); + cmd = proto_get_ascii(&line); + if (cmd == NULL || line == NULL) + goto bad; + if (strcmp(cmd, "OK") == 0) { + srvresponse = proto_get_ascii(&line); + if (srvresponse == NULL) + goto bad; + if (config->reqauth && + !auth_checkresponse(srvresponse, clichallenge, shrdsecret)) { + lprintf(-1, "Server failed to authenticate itself to client\n"); + return (STATUS_FAILURE); + } + lprintf(2, "MD5 authentication successfull\n"); + return (STATUS_SUCCESS); + } + if (strcmp(cmd, "!") == 0) { + msg = proto_get_rest(&line); + if (msg == NULL) + goto bad; + lprintf(-1, "Server error: %s\n", msg); + return (STATUS_FAILURE); + } +bad: + lprintf(-1, "Invalid server reply to AUTHMD5\n"); + return (STATUS_FAILURE); +} + +static int +auth_lookuprecord(char *server, struct srvrecord *auth) +{ + char *home, *line, authfile[FILENAME_MAX]; + struct stream *s; + int linenum = 0, error; + + home = getenv("HOME"); + if (home == NULL) { + lprintf(-1, "Environment variable \"HOME\" is not set\n"); + return (STATUS_FAILURE); + } + snprintf(authfile, sizeof(authfile), "%s/%s", home, AUTHFILE); + s = stream_open_file(authfile, O_RDONLY); + if (s == NULL) { + lprintf(-1, "Could not open file %s\n", authfile); + return (STATUS_FAILURE); + } + + while ((line = stream_getln(s, NULL)) != NULL) { + linenum++; + if (line[0] == '#' || line[0] == '\0') + continue; + error = auth_parsetoken(&line, auth->server, + sizeof(auth->server)); + if (error != STATUS_SUCCESS) { + lprintf(-1, "%s:%d Missng client name\n", authfile, linenum); + goto close; + } + /* Skip the rest of this line, it isn't what we are looking for. */ + if (strcmp(auth->server, server) != 0) + continue; + error = auth_parsetoken(&line, auth->client, + sizeof(auth->client)); + if (error != STATUS_SUCCESS) { + lprintf(-1, "%s:%d Missng password\n", authfile, linenum); + goto close; + } + error = auth_parsetoken(&line, auth->password, + sizeof(auth->password)); + if (error != STATUS_SUCCESS) { + lprintf(-1, "%s:%d Missng comment\n", authfile, linenum); + goto close; + } + stream_close(s); + lprintf(2, "Found authentication record for server \"%s\"\n", + server); + return (STATUS_SUCCESS); + } + lprintf(-1, "Unknown server \"%s\". Fix your %s\n", server , authfile); + memset(auth->password, 0, sizeof(auth->password)); +close: + stream_close(s); + return (STATUS_FAILURE); +} + +static int +auth_parsetoken(char **line, char *buf, int len) +{ + char *colon; + + colon = strchr(*line, ':'); + if (colon == NULL) + return (STATUS_FAILURE); + *colon = 0; + buf[len - 1] = 0; + strncpy(buf, *line, len - 1); + *line = colon + 1; + return (STATUS_SUCCESS); +} + +static void +auth_makesecret(struct srvrecord *auth, char *secret) +{ + char *s, ch; + const char *md5salt = "$md5$"; + unsigned char md5sum[MD5_BYTES]; + MD5_CTX md5; + + MD5_Init(&md5); + for (s = auth->client; *s != 0; ++s) { + ch = tolower(*s); + MD5_Update(&md5, &ch, 1); + } + MD5_Update(&md5, ":", 1); + for (s = auth->server; *s != 0; ++s) { + ch = tolower(*s); + MD5_Update(&md5, &ch, 1); + } + MD5_Update(&md5, ":", 1); + MD5_Update(&md5, auth->password, strlen(auth->password)); + MD5_Final(md5sum, &md5); + memset(secret, 0, sizeof(secret)); + strcpy(secret, md5salt); + auth_readablesum(md5sum, secret + strlen(md5salt)); +} + +static void +auth_makeresponse(char *challenge, char *sharedsecret, char *response) +{ + MD5_CTX md5; + unsigned char md5sum[MD5_BYTES]; + + MD5_Init(&md5); + MD5_Update(&md5, sharedsecret, strlen(sharedsecret)); + MD5_Update(&md5, ":", 1); + MD5_Update(&md5, challenge, strlen(challenge)); + MD5_Final(md5sum, &md5); + auth_readablesum(md5sum, response); +} + +/* + * Generates a challenge string which is an MD5 sum + * of a fairly random string. The purpose is to decrease + * the possibility of generating the same challenge + * string (even by different clients) more then once + * for the same server. + */ +static void +auth_makechallenge(struct config *config, char *challenge) +{ + MD5_CTX md5; + unsigned char md5sum[MD5_BYTES]; + char buf[128]; + struct timeval tv; + struct sockaddr_in laddr; + pid_t pid, ppid; + int error, addrlen; + + gettimeofday(&tv, NULL); + pid = getpid(); + ppid = getppid(); + srand(tv.tv_usec ^ tv.tv_sec ^ pid); + addrlen = sizeof(laddr); + error = getsockname(config->socket, (struct sockaddr *)&laddr, &addrlen); + if (error < 0) { + memset(&laddr, 0, sizeof(laddr)); + } + gettimeofday(&tv, NULL); + MD5_Init(&md5); + snprintf(buf, sizeof(buf), "%s:%ld:%ld:%ld:%d:%d", + inet_ntoa(laddr.sin_addr), tv.tv_sec, tv.tv_usec, random(), pid, ppid); + MD5_Update(&md5, buf, strlen(buf)); + MD5_Final(md5sum, &md5); + auth_readablesum(md5sum, challenge); +} + +static int +auth_checkresponse(char *response, char *challenge, char *secret) +{ + char correctresponse[MD5_CHARS_MAX]; + + auth_makeresponse(challenge, secret, correctresponse); + return (strcmp(response, correctresponse) == 0); +} + +static void +auth_readablesum(unsigned char *md5sum, char *readable) +{ + unsigned int i; + char *s = readable; + + for (i = 0; i < MD5_BYTES; ++i, s+=2) { + sprintf(s, "%.2x", md5sum[i]); + } +} + Copied: head/usr.bin/csup/auth.h (from r204523, head/contrib/csup/auth.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csup/auth.h Tue Mar 2 07:26:07 2010 (r204556, copy of r204523, head/contrib/csup/auth.h) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2003-2007, Petar Zhivkov Petrov + * 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 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 AUTHOR 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. + * + * $FreeBSD$ + */ +#ifndef _AUTH_H_ +#define _AUTH_H_ + +#define AUTHFILE ".csup/auth" /* user home relative */ + +struct config; + +int auth_login(struct config *); + +#endif /* !_AUTH_H_ */ + Copied: head/usr.bin/csup/config.c (from r204523, head/contrib/csup/config.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csup/config.c Tue Mar 2 07:26:07 2010 (r204556, copy of r204523, head/contrib/csup/config.c) @@ -0,0 +1,579 @@ +/*- + * Copyright (c) 2003-2006, Maxime Henrion + * 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 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 AUTHOR 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. + * + * $FreeBSD$ + */ + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "config.h" +#include "globtree.h" +#include "keyword.h" +#include "misc.h" +#include "parse.h" +#include "stream.h" +#include "token.h" + +static int config_parse_refusefiles(struct coll *); +static int config_parse_refusefile(struct coll *, char *); + +extern FILE *yyin; + +/* These are globals because I can't think of a better way with yacc. */ +static STAILQ_HEAD(, coll) colls; +static struct coll *cur_coll; +static struct coll *defaults; +static struct coll *ovcoll; +static int ovmask; +static const char *cfgfile; + +/* + * Extract all the configuration information from the config + * file and some command line parameters. + */ +struct config * +config_init(const char *file, struct coll *override, int overridemask) +{ + struct config *config; + struct coll *coll; + size_t slen; + char *prefix; + int error; + mode_t mask; + + config = xmalloc(sizeof(struct config)); + memset(config, 0, sizeof(struct config)); + STAILQ_INIT(&colls); + + defaults = coll_new(NULL); + /* Set the default umask. */ + mask = umask(0); + umask(mask); + defaults->co_umask = mask; + ovcoll = override; + ovmask = overridemask; + + /* Extract a list of collections from the configuration file. */ + cur_coll = coll_new(defaults); + yyin = fopen(file, "r"); + if (yyin == NULL) { + lprintf(-1, "Cannot open \"%s\": %s\n", file, strerror(errno)); + goto bad; + } + cfgfile = file; + error = yyparse(); + fclose(yyin); + if (error) + goto bad; + + memcpy(&config->colls, &colls, sizeof(colls)); + if (STAILQ_EMPTY(&config->colls)) { + lprintf(-1, "Empty supfile\n"); + goto bad; + } + + /* Fixup the list of collections. */ + STAILQ_FOREACH(coll, &config->colls, co_next) { + if (coll->co_base == NULL) + coll->co_base = xstrdup("/usr/local/etc/cvsup"); + if (coll->co_colldir == NULL) + coll->co_colldir = "sup"; + if (coll->co_prefix == NULL) { + coll->co_prefix = xstrdup(coll->co_base); + /* + * If prefix is not an absolute pathname, it is + * interpreted relative to base. + */ + } else if (coll->co_prefix[0] != '/') { + slen = strlen(coll->co_base); + if (slen > 0 && coll->co_base[slen - 1] != '/') + xasprintf(&prefix, "%s/%s", coll->co_base, + coll->co_prefix); + else + xasprintf(&prefix, "%s%s", coll->co_base, + coll->co_prefix); + free(coll->co_prefix); + coll->co_prefix = prefix; + } + coll->co_prefixlen = strlen(coll->co_prefix); + /* Determine whether to checksum RCS files or not. */ + if (coll->co_options & CO_EXACTRCS) + coll->co_options |= CO_CHECKRCS; + else + coll->co_options &= ~CO_CHECKRCS; + /* In recent versions, we always try to set the file modes. */ + coll->co_options |= CO_SETMODE; + coll->co_options |= CO_NORSYNC; + error = config_parse_refusefiles(coll); + if (error) + goto bad; + } + + coll_free(cur_coll); + coll_free(defaults); + config->host = STAILQ_FIRST(&config->colls)->co_host; + return (config); +bad: + coll_free(cur_coll); + coll_free(defaults); + config_free(config); + return (NULL); +} + +int +config_checkcolls(struct config *config) +{ + char linkname[4]; + struct stat sb; + struct coll *coll; + int error, numvalid, ret; + + numvalid = 0; + STAILQ_FOREACH(coll, &config->colls, co_next) { + error = stat(coll->co_prefix, &sb); + if (error || !S_ISDIR(sb.st_mode)) { + /* Skip this collection, and warn about it unless its + prefix is a symbolic link pointing to "SKIP". */ + coll->co_options |= CO_SKIP; + ret = readlink(coll->co_prefix, linkname, + sizeof(linkname)); + if (ret != 4 || memcmp(linkname, "SKIP", 4) != 0) { + lprintf(-1,"Nonexistent prefix \"%s\" for " + "%s/%s\n", coll->co_prefix, coll->co_name, + coll->co_release); + } + continue; + } + numvalid++; + } + return (numvalid); +} + +static int +config_parse_refusefiles(struct coll *coll) +{ + char *collstem, *suffix, *supdir, *path; + int error; + + if (coll->co_colldir[0] == '/') + supdir = xstrdup(coll->co_colldir); + else + xasprintf(&supdir, "%s/%s", coll->co_base, coll->co_colldir); + + /* First, the global refuse file that applies to all collections. */ + xasprintf(&path, "%s/refuse", supdir); + error = config_parse_refusefile(coll, path); + free(path); + if (error) { + free(supdir); + return (error); + } + + /* Next the per-collection refuse files that applies to all release/tag + combinations. */ + xasprintf(&collstem, "%s/%s/refuse", supdir, coll->co_name); + free(supdir); + error = config_parse_refusefile(coll, collstem); + if (error) { + free(collstem); + return (error); + } + + /* Finally, the per-release and per-tag refuse file. */ + suffix = coll_statussuffix(coll); + if (suffix != NULL) { + xasprintf(&path, "%s%s", collstem, suffix); + free(suffix); + error = config_parse_refusefile(coll, path); + free(path); + } + free(collstem); + return (error); +} + +/* + * Parses a "refuse" file, and records the relevant information in + * coll->co_refusals. If the file does not exist, it is silently + * ignored. + */ +static int +config_parse_refusefile(struct coll *coll, char *path) +{ + struct stream *rd; + char *cp, *line, *pat; + + rd = stream_open_file(path, O_RDONLY); + if (rd == NULL) + return (0); + while ((line = stream_getln(rd, NULL)) != NULL) { + pat = line; + for (;;) { + /* Trim leading whitespace. */ + pat += strspn(pat, " \t"); + if (pat[0] == '\0') + break; + cp = strpbrk(pat, " \t"); + if (cp != NULL) + *cp = '\0'; + pattlist_add(coll->co_refusals, pat); + if (cp == NULL) + break; + pat = cp + 1; + } + } + if (!stream_eof(rd)) { + stream_close(rd); + lprintf(-1, "Read failure from \"%s\": %s\n", path, + strerror(errno)); + return (-1); + } + stream_close(rd); + return (0); +} + +void +config_free(struct config *config) +{ + struct coll *coll; + + while (!STAILQ_EMPTY(&config->colls)) { + coll = STAILQ_FIRST(&config->colls); + STAILQ_REMOVE_HEAD(&config->colls, co_next); + coll_free(coll); + } + if (config->server != NULL) + stream_close(config->server); + if (config->laddr != NULL) + free(config->laddr); + free(config); +} + +/* Create a new collection, inheriting options from the default collection. */ +struct coll * +coll_new(struct coll *def) +{ + struct coll *new; + + new = xmalloc(sizeof(struct coll)); + memset(new, 0, sizeof(struct coll)); + if (def != NULL) { + new->co_options = def->co_options; + new->co_umask = def->co_umask; + if (def->co_host != NULL) + new->co_host = xstrdup(def->co_host); + if (def->co_base != NULL) + new->co_base = xstrdup(def->co_base); + if (def->co_date != NULL) + new->co_date = xstrdup(def->co_date); + if (def->co_prefix != NULL) + new->co_prefix = xstrdup(def->co_prefix); + if (def->co_release != NULL) + new->co_release = xstrdup(def->co_release); + if (def->co_tag != NULL) + new->co_tag = xstrdup(def->co_tag); + if (def->co_listsuffix != NULL) + new->co_listsuffix = xstrdup(def->co_listsuffix); + } else { + new->co_tag = xstrdup("."); + new->co_date = xstrdup("."); + } + new->co_keyword = keyword_new(); + new->co_accepts = pattlist_new(); + new->co_refusals = pattlist_new(); + new->co_attrignore = FA_DEV | FA_INODE; + return (new); +} + +void +coll_override(struct coll *coll, struct coll *from, int mask) +{ + size_t i; + int newoptions, oldoptions; + + newoptions = from->co_options & mask; + oldoptions = coll->co_options & (CO_MASK & ~mask); + + if (from->co_release != NULL) { + if (coll->co_release != NULL) + free(coll->co_release); + coll->co_release = xstrdup(from->co_release); + } + if (from->co_host != NULL) { + if (coll->co_host != NULL) + free(coll->co_host); + coll->co_host = xstrdup(from->co_host); + } + if (from->co_base != NULL) { + if (coll->co_base != NULL) + free(coll->co_base); + coll->co_base = xstrdup(from->co_base); + } + if (from->co_colldir != NULL) + coll->co_colldir = from->co_colldir; + if (from->co_prefix != NULL) { + if (coll->co_prefix != NULL) + free(coll->co_prefix); + coll->co_prefix = xstrdup(from->co_prefix); + } + if (newoptions & CO_CHECKOUTMODE) { + if (from->co_tag != NULL) { + if (coll->co_tag != NULL) + free(coll->co_tag); + coll->co_tag = xstrdup(from->co_tag); + } + if (from->co_date != NULL) { + if (coll->co_date != NULL) + free(coll->co_date); + coll->co_date = xstrdup(from->co_date); + } + } + if (from->co_listsuffix != NULL) { + if (coll->co_listsuffix != NULL) + free(coll->co_listsuffix); + coll->co_listsuffix = xstrdup(from->co_listsuffix); + } + for (i = 0; i < pattlist_size(from->co_accepts); i++) { + pattlist_add(coll->co_accepts, + pattlist_get(from->co_accepts, i)); + } + for (i = 0; i < pattlist_size(from->co_refusals); i++) { + pattlist_add(coll->co_refusals, + pattlist_get(from->co_refusals, i)); + } + coll->co_options = oldoptions | newoptions; +} + +char * +coll_statussuffix(struct coll *coll) +{ + const char *tag; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 07:27:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 562FD106566B; Tue, 2 Mar 2010 07:27:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4534C8FC1C; Tue, 2 Mar 2010 07:27:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o227RVAt057661; Tue, 2 Mar 2010 07:27:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o227RV9P057657; Tue, 2 Mar 2010 07:27:31 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003020727.o227RV9P057657@svn.freebsd.org> From: Warner Losh Date: Tue, 2 Mar 2010 07:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204557 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 07:27:31 -0000 Author: imp Date: Tue Mar 2 07:27:30 2010 New Revision: 204557 URL: http://svn.freebsd.org/changeset/base/204557 Log: Update macros for multiple ABI support from NetBSD. Also update SZREG define in ucontext Modified: head/sys/mips/include/asm.h head/sys/mips/include/cdefs.h head/sys/mips/include/ucontext.h Modified: head/sys/mips/include/asm.h ============================================================================== --- head/sys/mips/include/asm.h Tue Mar 2 07:26:07 2010 (r204556) +++ head/sys/mips/include/asm.h Tue Mar 2 07:27:30 2010 (r204557) @@ -340,17 +340,47 @@ _C_LABEL(x): #define NON_LEAF(x, fsize, retpc) NESTED(x, fsize, retpc) #define NNON_LEAF(x, fsize, retpc) NESTED_NOPROFILE(x, fsize, retpc) +#if defined(__mips_o32) +#define SZREG 4 +#else +#define SZREG 8 +#endif + +#if defined(__mips_o32) || defined(__mips_o64) +#define ALSK 7 /* stack alignment */ +#define ALMASK -7 /* stack alignment */ +#define SZFPREG 4 +#define FP_L lwc1 +#define FP_S swc1 +#else +#define ALSK 15 /* stack alignment */ +#define ALMASK -15 /* stack alignment */ +#define SZFPREG 8 +#define FP_L ldc1 +#define FP_S sdc1 +#endif + /* * standard callframe { - * register_t cf_args[4]; arg0 - arg3 + * register_t cf_pad[N]; o32/64 (N=0), n32 (N=1) n64 (N=1) + * register_t cf_args[4]; arg0 - arg3 (only on o32 and o64) + * register_t cf_gp; global pointer (only on n32 and n64) * register_t cf_sp; frame pointer * register_t cf_ra; return address * }; */ -#define CALLFRAME_SIZ (4 * (4 + 2)) -#define CALLFRAME_SP (4 * 4) -#define CALLFRAME_RA (4 * 5) -#define START_FRAME CALLFRAME_SIZ +#if defined(__mips_o32) || defined(__mips_o64) +#define CALLFRAME_SIZ (SZREG * (4 + 2)) +#define CALLFRAME_S0 0 +#elif defined(__mips_n32) || defined(__mips_n64) +#define CALLFRAME_SIZ (SZREG * 4) +#define CALLFRAME_S0 (CALLFRAME_SIZ - 4 * SZREG) +#endif +#ifndef _KERNEL +#define CALLFRAME_GP (CALLFRAME_SIZ - 3 * SZREG) +#endif +#define CALLFRAME_SP (CALLFRAME_SIZ - 2 * SZREG) +#define CALLFRAME_RA (CALLFRAME_SIZ - 1 * SZREG) /* * While it would be nice to be compatible with the SGI @@ -361,27 +391,264 @@ _C_LABEL(x): * assembler to prevent the assembler from generating 64-bit style * ABI calls. */ +#if _MIPS_SZPTR == 32 +#define PTR_ADD add +#define PTR_ADDI addi +#define PTR_ADDU addu +#define PTR_ADDIU addiu +#define PTR_SUB add +#define PTR_SUBI subi +#define PTR_SUBU subu +#define PTR_SUBIU subu +#define PTR_L lw +#define PTR_LA la +#define PTR_S sw +#define PTR_SLL sll +#define PTR_SLLV sllv +#define PTR_SRL srl +#define PTR_SRLV srlv +#define PTR_SRA sra +#define PTR_SRAV srav +#define PTR_LL ll +#define PTR_SC sc +#define PTR_WORD .word +#define PTR_SCALESHIFT 2 +#else /* _MIPS_SZPTR == 64 */ +#define PTR_ADD dadd +#define PTR_ADDI daddi +#define PTR_ADDU daddu +#define PTR_ADDIU daddiu +#define PTR_SUB dadd +#define PTR_SUBI dsubi +#define PTR_SUBU dsubu +#define PTR_SUBIU dsubu +#define PTR_L ld +#define PTR_LA dla +#define PTR_S sd +#define PTR_SLL dsll +#define PTR_SLLV dsllv +#define PTR_SRL dsrl +#define PTR_SRLV dsrlv +#define PTR_SRA dsra +#define PTR_SRAV dsrav +#define PTR_LL lld +#define PTR_SC scd +#define PTR_WORD .dword +#define PTR_SCALESHIFT 3 +#endif /* _MIPS_SZPTR == 64 */ + +#if _MIPS_SZINT == 32 +#define INT_ADD add +#define INT_ADDI addi +#define INT_ADDU addu +#define INT_ADDIU addiu +#define INT_SUB add +#define INT_SUBI subi +#define INT_SUBU subu +#define INT_SUBIU subu +#define INT_L lw +#define INT_LA la +#define INT_S sw +#define INT_SLL sll +#define INT_SLLV sllv +#define INT_SRL srl +#define INT_SRLV srlv +#define INT_SRA sra +#define INT_SRAV srav +#define INT_LL ll +#define INT_SC sc +#define INT_WORD .word +#define INT_SCALESHIFT 2 +#else +#define INT_ADD dadd +#define INT_ADDI daddi +#define INT_ADDU daddu +#define INT_ADDIU daddiu +#define INT_SUB dadd +#define INT_SUBI dsubi +#define INT_SUBU dsubu +#define INT_SUBIU dsubu +#define INT_L ld +#define INT_LA dla +#define INT_S sd +#define INT_SLL dsll +#define INT_SLLV dsllv +#define INT_SRL dsrl +#define INT_SRLV dsrlv +#define INT_SRA dsra +#define INT_SRAV dsrav +#define INT_LL lld +#define INT_SC scd +#define INT_WORD .dword +#define INT_SCALESHIFT 3 +#endif -#if !defined(_MIPS_BSD_API) || _MIPS_BSD_API == _MIPS_BSD_API_LP32 -/* #if !defined(__mips_n64) */ +#if _MIPS_SZLONG == 32 +#define LONG_ADD add +#define LONG_ADDI addi +#define LONG_ADDU addu +#define LONG_ADDIU addiu +#define LONG_SUB add +#define LONG_SUBI subi +#define LONG_SUBU subu +#define LONG_SUBIU subu +#define LONG_L lw +#define LONG_LA la +#define LONG_S sw +#define LONG_SLL sll +#define LONG_SLLV sllv +#define LONG_SRL srl +#define LONG_SRLV srlv +#define LONG_SRA sra +#define LONG_SRAV srav +#define LONG_LL ll +#define LONG_SC sc +#define LONG_WORD .word +#define LONG_SCALESHIFT 2 +#else +#define LONG_ADD dadd +#define LONG_ADDI daddi +#define LONG_ADDU daddu +#define LONG_ADDIU daddiu +#define LONG_SUB dadd +#define LONG_SUBI dsubi +#define LONG_SUBU dsubu +#define LONG_SUBIU dsubu +#define LONG_L ld +#define LONG_LA dla +#define LONG_S sd +#define LONG_SLL dsll +#define LONG_SLLV dsllv +#define LONG_SRL dsrl +#define LONG_SRLV dsrlv +#define LONG_SRA dsra +#define LONG_SRAV dsrav +#define LONG_LL lld +#define LONG_SC scd +#define LONG_WORD .dword +#define LONG_SCALESHIFT 3 +#endif + +#if SZREG == 4 #define REG_L lw #define REG_S sw #define REG_LI li -#define REG_PROLOGUE .set push -#define REG_EPILOGUE .set pop -#define SZREG 4 -#define PTR_LA la -#define PTR_ADDU addu +#define REG_ADDU addu +#define REG_SLL sll +#define REG_SLLV sllv +#define REG_SRL srl +#define REG_SRLV srlv +#define REG_SRA sra +#define REG_SRAV srav +#define REG_LL ll +#define REG_SC sc +#define REG_SCALESHIFT 2 #else #define REG_L ld #define REG_S sd #define REG_LI dli +#define REG_ADDU daddu +#define REG_SLL dsll +#define REG_SLLV dsllv +#define REG_SRL dsrl +#define REG_SRLV dsrlv +#define REG_SRA dsra +#define REG_SRAV dsrav +#define REG_LL lld +#define REG_SC scd +#define REG_SCALESHIFT 3 +#endif + +#if _MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2 || \ + _MIPS_ISA == _MIPS_ISA_MIPS32 +#define MFC0 mfc0 +#define MTC0 mtc0 +#endif +#if _MIPS_ISA == _MIPS_ISA_MIPS3 || _MIPS_ISA == _MIPS_ISA_MIPS4 || \ + _MIPS_ISA == _MIPS_ISA_MIPS64 +#define MFC0 dmfc0 +#define MTC0 dmtc0 +#endif + +#if defined(__mips_o32) || defined(__mips_o64) + +#ifdef __ABICALLS__ +#define CPRESTORE(r) .cprestore r +#define CPLOAD(r) .cpload r +#else +#define CPRESTORE(r) /* not needed */ +#define CPLOAD(r) /* not needed */ +#endif + +#define SETUP_GP \ + .set push; \ + .set noreorder; \ + .cpload t9; \ + .set pop +#define SETUP_GPX(r) \ + .set push; \ + .set noreorder; \ + move r,ra; /* save old ra */ \ + bal 7f; \ + nop; \ + 7: .cpload ra; \ + move ra,r; \ + .set pop +#define SETUP_GPX_L(r,lbl) \ + .set push; \ + .set noreorder; \ + move r,ra; /* save old ra */ \ + bal lbl; \ + nop; \ + lbl: .cpload ra; \ + move ra,r; \ + .set pop +#define SAVE_GP(x) .cprestore x + +#define SETUP_GP64(a,b) /* n32/n64 specific */ +#define SETUP_GP64_R(a,b) /* n32/n64 specific */ +#define SETUP_GPX64(a,b) /* n32/n64 specific */ +#define SETUP_GPX64_L(a,b,c) /* n32/n64 specific */ +#define RESTORE_GP64 /* n32/n64 specific */ +#define USE_ALT_CP(a) /* n32/n64 specific */ +#endif /* __mips_o32 || __mips_o64 */ + +#if defined(__mips_o32) || defined(__mips_o64) +#define REG_PROLOGUE .set push +#define REG_EPILOGUE .set pop +#endif +#if defined(__mips_n32) || defined(__mips_n64) #define REG_PROLOGUE .set push ; .set mips3 #define REG_EPILOGUE .set pop -#define SZREG 8 -#define PTR_LA dla -#define PTR_ADDU daddu -#endif /* _MIPS_BSD_API */ +#endif + +#if defined(__mips_n32) || defined(__mips_n64) +#define SETUP_GP /* o32 specific */ +#define SETUP_GPX(r) /* o32 specific */ +#define SETUP_GPX_L(r,lbl) /* o32 specific */ +#define SAVE_GP(x) /* o32 specific */ +#define SETUP_GP64(a,b) .cpsetup $25, a, b +#define SETUP_GPX64(a,b) \ + .set push; \ + move b,ra; \ + .set noreorder; \ + bal 7f; \ + nop; \ + 7: .set pop; \ + .cpsetup ra, a, 7b; \ + move ra,b +#define SETUP_GPX64_L(a,b,c) \ + .set push; \ + move b,ra; \ + .set noreorder; \ + bal c; \ + nop; \ + c: .set pop; \ + .cpsetup ra, a, c; \ + move ra,b +#define RESTORE_GP64 .cpreturn +#define USE_ALT_CP(a) .cplocal a +#endif /* __mips_n32 || __mips_n64 */ #define mfc0_macro(data, spr) \ __asm __volatile ("mfc0 %0, $%1" \ Modified: head/sys/mips/include/cdefs.h ============================================================================== --- head/sys/mips/include/cdefs.h Tue Mar 2 07:26:07 2010 (r204556) +++ head/sys/mips/include/cdefs.h Tue Mar 2 07:27:30 2010 (r204557) @@ -25,11 +25,16 @@ * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. + * + * $FreeBSD$ */ #ifndef _MIPS_CDEFS_H_ #define _MIPS_CDEFS_H_ +/* + * These are depreciated. Use __mips_{o32,o64,n32,n64} instead. + */ /* MIPS Subprogram Interface Model */ #define _MIPS_SIM_ABIX32 4 /* 64 bit safe, ILP32 o32 model */ #define _MIPS_SIM_ABI64 3 @@ -38,17 +43,34 @@ #define _MIPS_BSD_API_LP32 _MIPS_SIM_ABI32 #define _MIPS_BSD_API_LP32_64CLEAN _MIPS_SIM_ABIX32 -#define _MIPS_BSD_API_N32 _MIPS_SIM_NABI32 #define _MIPS_BSD_API_LP64 _MIPS_SIM_ABI64 +#define _MIPS_BSD_API_O32 _MIPS_SIM_ABI32 +#define _MIPS_BSD_API_O64 _MIPS_SIM_ABIX32 +#define _MIPS_BSD_API_N32 _MIPS_SIM_NABI32 +#define _MIPS_BSD_API_N64 _MIPS_SIM_ABI64 + +#define _MIPS_SIM_NEWABI_P(abi) ((abi) == _MIPS_SIM_NABI32 || \ + (abi) == _MIPS_SIM_ABI64) + +#define _MIPS_SIM_LP64_P(abi) ((abi) == _MIPS_SIM_ABIX32 || \ + (abi) == _MIPS_SIM_ABI64) + #if defined(__mips_n64) -#define _MIPS_BSD_API _MIPS_BSD_API_LP64 +#define _MIPS_BSD_API _MIPS_BSD_API_N64 #elif defined(__mips_n32) #define _MIPS_BSD_API _MIPS_BSD_API_N32 #elif defined(__mips_o64) -#define _MIPS_BSD_API _MIPS_BSD_API_LP32_64CLEAN +#define _MIPS_BSD_API _MIPS_BSD_API_O64 #else -#define _MIPS_BSD_API _MIPS_BSD_API_LP32 +#define _MIPS_BSD_API _MIPS_BSD_API_O32 #endif +#define _MIPS_ISA_MIPS1 1 +#define _MIPS_ISA_MIPS2 2 +#define _MIPS_ISA_MIPS3 3 +#define _MIPS_ISA_MIPS4 4 +#define _MIPS_ISA_MIPS32 5 +#define _MIPS_ISA_MIPS64 6 + #endif /* !_MIPS_CDEFS_H_ */ Modified: head/sys/mips/include/ucontext.h ============================================================================== --- head/sys/mips/include/ucontext.h Tue Mar 2 07:26:07 2010 (r204556) +++ head/sys/mips/include/ucontext.h Tue Mar 2 07:27:30 2010 (r204557) @@ -58,10 +58,12 @@ typedef struct __mcontext { } mcontext_t; #endif -#if defined(__mips_n64) || defined(__mips_n32) -#define SZREG 8 +#ifndef SZREG +#if defined(__mips_o32) +#define SZREG 4 #else -#define SZREG 4 +#define SZREG 8 +#endif #endif /* offsets into mcontext_t */ From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 07:37:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B584B1065673; Tue, 2 Mar 2010 07:37:35 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4EB58FC18; Tue, 2 Mar 2010 07:37:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o227bZw3059943; Tue, 2 Mar 2010 07:37:35 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o227bZLb059941; Tue, 2 Mar 2010 07:37:35 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201003020737.o227bZLb059941@svn.freebsd.org> From: Ulf Lilleengen Date: Tue, 2 Mar 2010 07:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204558 - head/usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 07:37:35 -0000 Author: lulf Date: Tue Mar 2 07:37:35 2010 New Revision: 204558 URL: http://svn.freebsd.org/changeset/base/204558 Log: - Unmark authentication support as a TODO item. Modified: head/usr.bin/csup/TODO Modified: head/usr.bin/csup/TODO ============================================================================== --- head/usr.bin/csup/TODO Tue Mar 2 07:27:30 2010 (r204557) +++ head/usr.bin/csup/TODO Tue Mar 2 07:37:35 2010 (r204558) @@ -18,9 +18,8 @@ BUGS: MISSING FEATURES: - Add support for shell commands sent by the server. -- Add missing support for various CVSup options : -D, -a (requires - authentication support), -e and -E (requires shell commands support) - and the destDir parameter. +- Add missing support for various CVSup options : -D, -e and -E (requires + shell commands support) and the destDir parameter. - For now, this code should build fine on FreeBSD, NetBSD, OpenBSD, Linux and Darwin. Solaris support would also be nice at some point. - Implement some new useful options : the ability to generate CVS From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 07:44:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B836D106564A; Tue, 2 Mar 2010 07:44:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7E678FC1B; Tue, 2 Mar 2010 07:44:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o227icAq061502; Tue, 2 Mar 2010 07:44:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o227icAZ061500; Tue, 2 Mar 2010 07:44:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003020744.o227icAZ061500@svn.freebsd.org> From: Warner Losh Date: Tue, 2 Mar 2010 07:44:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204559 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 07:44:38 -0000 Author: imp Date: Tue Mar 2 07:44:38 2010 New Revision: 204559 URL: http://svn.freebsd.org/changeset/base/204559 Log: -mabi-calls and -msoft-float aren't needed either Submitted by: jmallet@ Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Tue Mar 2 07:37:35 2010 (r204558) +++ head/share/mk/bsd.cpu.mk Tue Mar 2 07:44:38 2010 (r204559) @@ -208,7 +208,7 @@ LD += -EB CFLAGS += -EL LD += -EL . endif -CFLAGS += -msoft-float -G0 -mabicalls +CFLAGS += -G0 .endif # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 09:24:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34FEA106568F; Tue, 2 Mar 2010 09:24:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2A88FC49; Tue, 2 Mar 2010 09:23:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o229Ntu2083694; Tue, 2 Mar 2010 09:23:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o229Ntmx083691; Tue, 2 Mar 2010 09:23:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003020923.o229Ntmx083691@svn.freebsd.org> From: Alexander Motin Date: Tue, 2 Mar 2010 09:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204565 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 09:24:18 -0000 Author: mav Date: Tue Mar 2 09:23:54 2010 New Revision: 204565 URL: http://svn.freebsd.org/changeset/base/204565 Log: Some style and language improvements. Submitted by: ru Modified: head/share/man/man4/ahci.4 head/share/man/man4/siis.4 Modified: head/share/man/man4/ahci.4 ============================================================================== --- head/share/man/man4/ahci.4 Tue Mar 2 08:39:43 2010 (r204564) +++ head/share/man/man4/ahci.4 Tue Mar 2 09:23:54 2010 (r204565) @@ -48,9 +48,10 @@ module at boot time, place the following ahci_load="YES" .Ed .Pp -The following tunables are settable from the loader: +The following tunables are settable from the +.Xr loader 8 : .Bl -ohang -.It Va hint.ahci.X.msi +.It Va hint.ahci. Ns Ar X Ns Va .msi controls Message Signaled Interrupts (MSI) usage by the specified controller .Bl -tag -compact .It 0 @@ -60,15 +61,15 @@ single MSI vector used, if supported (de .It 2 multiple MSI vectors used, if supported; .El -.It Va hint.ahci.X.ccc +.It Va hint.ahci. Ns Ar X Ns Va .ccc controls Command Completion Coalescing (CCC) usage by the specified controller. Non-zero value enables CCC and defines maximum time (in ms), request can wait for interrupt, if there are some more requests present on controller queue. CCC reduces number of context switches on systems with many parallel requests, but it can decrease disk performance on some workloads due to additional command latency. -.It Va hint.ahcich.X.pm_level -controls SATA interface Power Management for specified channel, +.It Va hint.ahcich. Ns Ar X Ns Va .pm_level +controls SATA interface Power Management for the specified channel, allowing some power to be saved at the cost of additional command latency. Possible values: @@ -92,18 +93,20 @@ Because of artificial entering latency, .Pp Note that interface Power Management is not compatible with device presence detection. -You will have to reset bus manually on device hot-plug. -.It Va hint.ahcich.X.sata_rev +A manual bus reset is needed on device hot-plug. +.It Va hint.ahcich. Ns Ar X Ns Va .sata_rev setting to nonzero value limits maximum SATA revision (speed). Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. .El .Sh DESCRIPTION -This driver provides the CAM subsystem with native access to the +This driver provides the +.Xr CAM 4 +subsystem with native access to the .Tn SATA ports of AHCI-compatible controllers. Each SATA port found is represented to CAM as a separate bus with one target, or, if HBA supports Port Multipliers, 16 targets. -Most of the bus-management details are handled by the SATA-specific +Most of the bus-management details are handled by the SATA-specific transport of CAM. Connected ATA disks are handled by the ATA protocol disk peripheral driver .Xr ada 4 . @@ -121,7 +124,8 @@ and Message Signaled Interrupts. .Pp AHCI hardware is also supported by ataahci driver from .Xr ata 4 -subsystem. If both drivers are loaded at the same time, this one will be +subsystem. +If both drivers are loaded at the same time, this one will be given precedence as the more functional of the two. .Sh HARDWARE The @@ -134,11 +138,11 @@ it supports AHCI part of legacy-PATA + A such as JMicron JMB36x and Marvell 88SX61xx. .Sh SEE ALSO .Xr ada 4 , +.Xr ata 4 , .Xr cd 4 , .Xr da 4 , .Xr sa 4 , -.Xr scsi 4 , -.Xr ata 4 +.Xr scsi 4 .Sh HISTORY The .Nm Modified: head/share/man/man4/siis.4 ============================================================================== --- head/share/man/man4/siis.4 Tue Mar 2 08:39:43 2010 (r204564) +++ head/share/man/man4/siis.4 Tue Mar 2 09:23:54 2010 (r204565) @@ -48,12 +48,13 @@ module at boot time, place the following siis_load="YES" .Ed .Pp -The following tunables are settable from the loader: +The following tunables are settable from the +.Xr loader 8 : .Bl -ohang -.It Va hint.siis.X.msi +.It Va hint.siis. Ns Ar X Ns Va .msi controls Message Signaled Interrupts (MSI) usage by the specified controller. -.It Va hint.siisch.X.pm_level -controls SATA interface Power Management for specified channel, +.It Va hint.siisch. Ns Ar X Ns Va .pm_level +controls SATA interface Power Management for the specified channel, allowing some power to be saved at the cost of additional command latency. Possible values: @@ -65,13 +66,15 @@ device is allowed to initiate PM state c .El Note that interface Power Management is not compatible with device presence detection. -You will have to reset bus manually on device hot-plug. -.It Va hint.siisch.X.sata_rev +A manual bus reset is needed on device hot-plug. +.It Va hint.siisch. Ns Ar X Ns Va .sata_rev setting to nonzero value limits maximum SATA revision (speed). Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. .El .Sh DESCRIPTION -This driver provides the CAM subsystem native access to the +This driver provides the +.Xr CAM 4 +subsystem with native access to the .Tn SATA ports of controller. Each SATA port is represented to CAM as a separate bus with 16 targets. @@ -90,14 +93,15 @@ Port Multipliers (including FIS-based sw (31 command per port), Native Command Queuing, SATA interface Power Management, device hot-plug and Message Signaled Interrupts. .Pp -Same hardware is also supported by atasiliconimage driver from +Same hardware is also supported by the atasiliconimage driver from .Xr ata 4 -subsystem. If both drivers are loaded at the same time, this one will be +subsystem. +If both drivers are loaded at the same time, this one will be given precedence as the more functional of the two. .Sh HARDWARE The .Nm -driver supports following controllers: +driver supports the following controllers: .Bl -bullet -compact .It SiI3124 @@ -108,11 +112,11 @@ SiI3531 .El .Sh SEE ALSO .Xr ada 4 , +.Xr ata 4 , .Xr cd 4 , .Xr da 4 , .Xr sa 4 , -.Xr scsi 4 , -.Xr ata 4 +.Xr scsi 4 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 10:03:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0252E106566C; Tue, 2 Mar 2010 10:03:07 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAFD88FC15; Tue, 2 Mar 2010 10:03:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22A36tp092590; Tue, 2 Mar 2010 10:03:06 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22A36Jc092588; Tue, 2 Mar 2010 10:03:06 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003021003.o22A36Jc092588@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 2 Mar 2010 10:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204566 - head/contrib/tzdata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 10:03:07 -0000 Author: edwin Date: Tue Mar 2 10:03:06 2010 New Revision: 204566 URL: http://svn.freebsd.org/changeset/base/204566 Log: MFV of r204563, tzdata2010c: Paraguay changes its DST schedule, postponing the March rule to April and modifying the October date. Modified: head/contrib/tzdata/southamerica Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/southamerica ============================================================================== --- head/contrib/tzdata/southamerica Tue Mar 2 09:23:54 2010 (r204565) +++ head/contrib/tzdata/southamerica Tue Mar 2 10:03:06 2010 (r204566) @@ -1,5 +1,5 @@ #
-# @(#)southamerica	8.40
+# @(#)southamerica	8.41
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1364,8 +1364,24 @@ Rule	Para	2002	2003	-	Sep	Sun>=1	0:00	1:
 # Decree 1,867 (2004-03-05)
 # From Carlos Raul Perasso via Jesper Norgaard Welen (2006-10-13)
 # 
-Rule	Para	2004	max	-	Oct	Sun>=15	0:00	1:00	S
-Rule	Para	2005	max	-	Mar	Sun>=8	0:00	0	-
+Rule	Para	2004	2009	-	Oct	Sun>=15	0:00	1:00	S
+Rule	Para	2005	2009	-	Mar	Sun>=8	0:00	0	-
+# From Carlos Raul Perasso (2010-02-18):
+# By decree number 3958 issued yesterday (
+# 
+# http://www.presidencia.gov.py/v1/wp-content/uploads/2010/02/decreto3958.pdf
+# 
+# )
+# Paraguay changes its DST schedule, postponing the March rule to April and
+# modifying the October date. The decree reads:
+# ...
+# Art. 1. It is hereby established that from the second Sunday of the month of
+# April of this year (2010), the official time is to be set back 60 minutes,
+# and that on the first Sunday of the month of October, it is to be set
+# forward 60 minutes, in all the territory of the Paraguayan Republic.
+# ...
+Rule	Para	2010	max	-	Oct	Sun<=7	0:00	1:00	S
+Rule	Para	2010	max	-	Apr	Sun>=8	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Asuncion	-3:50:40 -	LMT	1890

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 10:43:41 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C062F1065673;
	Tue,  2 Mar 2010 10:43:41 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AF4188FC08;
	Tue,  2 Mar 2010 10:43:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22Ahfs7002081;
	Tue, 2 Mar 2010 10:43:41 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22AhfCS002080;
	Tue, 2 Mar 2010 10:43:41 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201003021043.o22AhfCS002080@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Tue, 2 Mar 2010 10:43:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204574 - head/share/man/man4
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 10:43:41 -0000

Author: glebius
Date: Tue Mar  2 10:43:41 2010
New Revision: 204574
URL: http://svn.freebsd.org/changeset/base/204574

Log:
  Sync with recent changes from luigi - struct ng_ipfw_tag superceeded
  by more general ipfw_rule_ref. The latter isn't documented here, since
  it should be documented in ipfw.4.

Modified:
  head/share/man/man4/ng_ipfw.4

Modified: head/share/man/man4/ng_ipfw.4
==============================================================================
--- head/share/man/man4/ng_ipfw.4	Tue Mar  2 10:41:34 2010	(r204573)
+++ head/share/man/man4/ng_ipfw.4	Tue Mar  2 10:43:41 2010	(r204574)
@@ -24,13 +24,14 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 10, 2009
+.Dd March 2, 2010
 .Dt NG_IPFW 4
 .Os
 .Sh NAME
 .Nm ng_ipfw
 .Nd interface between netgraph and IP firewall
 .Sh SYNOPSIS
+.In netinet/ip_var.h
 .In netgraph/ng_ipfw.h
 .Sh DESCRIPTION
 The
@@ -73,30 +74,18 @@ If no hook matches, packets are discarde
 Packets injected via the
 .Cm netgraph
 command are tagged with
-.Vt "struct ng_ipfw_tag" .
+.Vt "struct ipfw_rule_ref" .
 This tag contains information that helps the packet to re-enter
 .Xr ipfw 4
 processing, should the packet come back from
 .Xr netgraph 4
 to
 .Xr ipfw 4 .
-.Bd -literal -offset 4n
-struct ng_ipfw_tag {
-	struct m_tag	mt;		/* tag header */
-	struct ip_fw	*rule;		/* matching rule */
-	uint32_t	rule_id;	/* matching rule id */
-	uint32_t	chain_id;	/* ruleset id */
-        struct ifnet	*ifp;		/* interface, for ip_output */
-	int		dir;		/* packet direction */
-#define	NG_IPFW_OUT	0
-#define	NG_IPFW_IN	1
-};
-.Ed
 .Pp
 Packets received by a node from
 .Xr netgraph 4
-must be tagged with
-.Vt "struct ng_ipfw_tag"
+subsystem must be tagged with
+.Vt "struct ipfw_rule_ref"
 tag.
 Packets re-enter IP firewall processing at the next rule.
 If no tag is supplied, packets are discarded.

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 10:51:22 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C10221065708;
	Tue,  2 Mar 2010 10:51:22 +0000 (UTC)
	(envelope-from niclas.zeising@gmail.com)
Received: from mxf2.bahnhof.se (mxf2.bahnhof.se [213.80.101.26])
	by mx1.freebsd.org (Postfix) with ESMTP id 749F48FC13;
	Tue,  2 Mar 2010 10:51:22 +0000 (UTC)
Received: from localhost (mxf2.local [127.0.0.1])
	by mxf2-reinject (Postfix) with ESMTP id A1CCB96947D;
	Tue,  2 Mar 2010 11:32:57 +0100 (CET)
X-Virus-Scanned: by amavisd-new using ClamAV at bahnhof.se (MXF2)
X-Spam-Score: 4.245
X-Spam-Level: ****
X-Spam-Status: No, score=4.245 tagged_above=-99 required=5
	tests=[DNS_FROM_RFC_POST=1.44, RATWARE_GECKO_BUILD=1.426,
	SPF_NEUTRAL=1.379]
Received: from mxf2.bahnhof.se ([127.0.0.1])
	by localhost (mxf2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id WZc+fj8uwPni; Tue,  2 Mar 2010 11:32:55 +0100 (CET)
Received: from [192.168.1.33] (h-90-99.A163.priv.bahnhof.se [79.136.90.99])
	by mxf2.bahnhof.se (Postfix) with ESMTP id 7467796947A;
	Tue,  2 Mar 2010 11:32:55 +0100 (CET)
Received: from 127.0.0.1 (AVG SMTP 9.0.733 [271.1.1/2716]);
	Tue, 02 Mar 2010 11:32:52 +0100
Message-ID: <4B8CE954.3080503@gmail.com>
Date: Tue, 02 Mar 2010 11:32:52 +0100
From: Niclas Zeising 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US;
	rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2
MIME-Version: 1.0
To: Alfred Perlstein 
References: <201003020658.o226wwB2051156@svn.freebsd.org>
In-Reply-To: <201003020658.o226wwB2051156@svn.freebsd.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 10:51:22 -0000

On 2010-03-02 07:58, Alfred Perlstein wrote:
> Author: alfred
> Date: Tue Mar  2 06:58:58 2010
> New Revision: 204552
> URL: http://svn.freebsd.org/changeset/base/204552
>
> Log:
>    Merge projects/enhanced_coredumps (r204346) into HEAD:
>
>      Enhanced process coredump routines.
>
>      This brings in the following features:
>      1) Limit number of cores per process via the %I coredump formatter.
>      Example:
>        if corefilename is set to %N.%I.core AND num_cores = 3, then
>        if a process "rpd" cores, then the corefile will be named
>        "rpd.0.core", however if it cores again, then the kernel will
>        generate "rpd.1.core" until we hit the limit of "num_cores".
>
>        this is useful to get several corefiles, but also prevent filling
>        the machine with corefiles.
>
>      2) Encode machine hostname in core dump name via %H.
>
>      3) Compress coredumps, useful for embedded platforms with limited space.
>        A sysctl kern.compress_user_cores is made available if turned on.
>
>        To enable compressed coredumps, the following config options need to be set:
>        options COMPRESS_USER_CORES
>        device zlib   # brings in the zlib requirements.
>        device gzio   # brings in the kernel vnode gzip output module.
>
>      4) Eventhandlers are fired to indicate coredumps in progress.
>
>      5) The imgact sv_coredump routine has grown a flag to pass in more
>      state, currently this is used only for passing a flag down to compress
>      the coredump or not.
>
>      Note that the gzio facility can be used for generic output of gzip'd
>      streams via vnodes.
>
>    Obtained from: Juniper Networks
>    Reviewed by: kan
>

[SNIP diff]

Nice work!
Can you please document the gernel options and devices in NOTES and 
where to change the core filename format somewhere so it doesn't get lost.

Thanks!
//Niclas

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 11:03:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 575E1106564A;
	Tue,  2 Mar 2010 11:03:00 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 46A0B8FC14;
	Tue,  2 Mar 2010 11:03:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22B30pA008148;
	Tue, 2 Mar 2010 11:03:00 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22B305N008146;
	Tue, 2 Mar 2010 11:03:00 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201003021103.o22B305N008146@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 2 Mar 2010 11:03:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204576 - head/sys/fs/msdosfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 11:03:00 -0000

Author: kib
Date: Tue Mar  2 11:02:59 2010
New Revision: 204576
URL: http://svn.freebsd.org/changeset/base/204576

Log:
  Only destroy pm_fatlock on error if it was initialized.
  
  MFC after:	3 weeks

Modified:
  head/sys/fs/msdosfs/msdosfs_vfsops.c

Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_vfsops.c	Tue Mar  2 11:00:10 2010	(r204575)
+++ head/sys/fs/msdosfs/msdosfs_vfsops.c	Tue Mar  2 11:02:59 2010	(r204576)
@@ -770,8 +770,8 @@ error_exit:
 		g_topology_unlock();
 		PICKUP_GIANT();
 	}
-	lockdestroy(&pmp->pm_fatlock);
 	if (pmp) {
+		lockdestroy(&pmp->pm_fatlock);
 		if (pmp->pm_inusemap)
 			free(pmp->pm_inusemap, M_MSDOSFSFAT);
 		free(pmp, M_MSDOSFSMNT);

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 12:04:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D665C106564A;
	Tue,  2 Mar 2010 12:04:05 +0000 (UTC)
	(envelope-from bms@incunabulum.net)
Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com
	[66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 9E4CA8FC1B;
	Tue,  2 Mar 2010 12:04:05 +0000 (UTC)
Received: from compute2.internal (compute2 [10.202.2.42])
	by gateway1.messagingengine.com (Postfix) with ESMTP id 091DEE2F59;
	Tue,  2 Mar 2010 07:04:05 -0500 (EST)
Received: from heartbeat1.messagingengine.com ([10.202.2.160])
	by compute2.internal (MEProxy); Tue, 02 Mar 2010 07:04:05 -0500
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com;
	h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding;
	s=smtpout; bh=W8j91U5kkyIQGPJtAWJRhlsVRbU=;
	b=F2V0+aCjtQGow0ASvXSoEKStrKpw9vzAB73pmueFEEN79+J1MLT01Sq7LveLGGoxOZAUUFBSGsdh4Eke/vF0GwmuQNdKLb24X8Ymk4D5FuzM0ZXTMtIU3s+j7pw8qV2DUTn4uxo4+P2v0mI8A9uMvWRKoALHfeB9gak6F13DTcc=
X-Sasl-enc: cC7HyT/HvcNjBiWq1GlQHF9UV3VVOnZEIwVqNz8+27WG 1267531444
Received: from anglepoise.lon.incunabulum.net
	(cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254])
	by mail.messagingengine.com (Postfix) with ESMTPSA id 56DA449F24D;
	Tue,  2 Mar 2010 07:04:04 -0500 (EST)
Message-ID: <4B8CFEB2.20905@incunabulum.net>
Date: Tue, 02 Mar 2010 12:04:02 +0000
From: Bruce Simpson 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.1.8) Gecko/20100228 Thunderbird/3.0.2
MIME-Version: 1.0
To: Jason Evans 
References: <201002282257.o1SMvDRe017954@svn.freebsd.org>
In-Reply-To: <201002282257.o1SMvDRe017954@svn.freebsd.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204493 - head/lib/libc/stdlib
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 12:04:05 -0000

Hey Jason,

Have you looked at  ? It is used by pf and the multicast code.

cheers
Bruce

On 02/28/10 22:57, Jason Evans wrote:
> Author: jasone
> Date: Sun Feb 28 22:57:13 2010
> New Revision: 204493
> URL: http://svn.freebsd.org/changeset/base/204493
>
> Log:
>    Rewrite red-black trees to do lazy balance fixup.  This improves
>    insert/remove speed by ~30%.
>    


From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 12:11:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B8853106566B;
	Tue,  2 Mar 2010 12:11:00 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 98AAF8FC1D;
	Tue,  2 Mar 2010 12:11:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22CB0Cd023425;
	Tue, 2 Mar 2010 12:11:00 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22CB0sh023419;
	Tue, 2 Mar 2010 12:11:00 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201003021211.o22CB0sh023419@svn.freebsd.org>
From: Randall Stewart 
Date: Tue, 2 Mar 2010 12:11:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204577 - in head/sys/mips: include rmi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 12:11:00 -0000

Author: rrs
Date: Tue Mar  2 12:11:00 2010
New Revision: 204577
URL: http://svn.freebsd.org/changeset/base/204577

Log:
  - Move rmi_pci_bus_space to header and avoid extern
  - remove unused and commented code (MIPS_BUS_SPACE_PCI, pic_usb_ack)
  - use rmi_pci_bus_space for USB too (needs byteswap)
  - uncomment xls_ehci.c in files.xlr
  - changes to xls_ehci.c - updated with dev/usb/controller/ehci_*.c as
  
  Obtained from:	JC - c.jayachandran@gmail.com

Modified:
  head/sys/mips/include/bus.h
  head/sys/mips/rmi/files.xlr
  head/sys/mips/rmi/iodi.c
  head/sys/mips/rmi/xlr_pci.c
  head/sys/mips/rmi/xls_ehci.c

Modified: head/sys/mips/include/bus.h
==============================================================================
--- head/sys/mips/include/bus.h	Tue Mar  2 11:02:59 2010	(r204576)
+++ head/sys/mips/include/bus.h	Tue Mar  2 12:11:00 2010	(r204577)
@@ -721,6 +721,7 @@ extern bus_space_tag_t mips_bus_space_ge
 /* Special bus space for RMI processors */
 #ifdef TARGET_XLR_XLS
 extern bus_space_tag_t rmi_bus_space;
+extern bus_space_tag_t rmi_pci_bus_space;
 #endif
 
 #include 

Modified: head/sys/mips/rmi/files.xlr
==============================================================================
--- head/sys/mips/rmi/files.xlr	Tue Mar  2 11:02:59 2010	(r204576)
+++ head/sys/mips/rmi/files.xlr	Tue Mar  2 12:11:00 2010	(r204577)
@@ -15,7 +15,7 @@ mips/rmi/uart_cpu_mips_xlr.c			optional 
 mips/rmi/perfmon_kern.c				optional xlr_perfmon
 mips/rmi/perfmon_percpu.c			optional xlr_perfmon
 mips/rmi/xlr_pci.c				optional pci
-#mips/rmi/xls_ehci.c				optional usb ehci
+mips/rmi/xls_ehci.c				optional usb ehci
 mips/rmi/bus_space_rmi.c			standard
 mips/rmi/bus_space_rmi_pci.c			optional pci
 mips/rmi/dev/sec/rmisec.c			optional rmisec

Modified: head/sys/mips/rmi/iodi.c
==============================================================================
--- head/sys/mips/rmi/iodi.c	Tue Mar  2 11:02:59 2010	(r204576)
+++ head/sys/mips/rmi/iodi.c	Tue Mar  2 12:11:00 2010	(r204577)
@@ -74,8 +74,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-extern void iodi_activateirqs(void);
-
 extern bus_space_tag_t uart_bus_space_mem;
 
 static struct resource *
@@ -91,19 +89,6 @@ iodi_setup_intr(device_t, device_t, stru
 
 struct iodi_softc *iodi_softc;	/* There can be only one. */
 
-/*
-static void pic_usb_ack(void *arg)
-{
-	xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET);
-	int irq = PIC_USB_IRQ ;
-
-	mtx_lock_spin(&xlr_pic_lock);
-	xlr_write_reg(mmio, PIC_INT_ACK, (1 << (irq - PIC_IRQ_BASE)));
-	mtx_unlock_spin(&xlr_pic_lock);
-}
-*/
-
-
 static int
 iodi_setup_intr(device_t dev, device_t child,
     struct resource *ires, int flags, driver_filter_t * filt, driver_intr_t * intr, void *arg,
@@ -157,11 +142,6 @@ iodi_setup_intr(device_t dev, device_t c
 	return (0);
 }
 
-/* Strange hook found in mips/include/bus.h */
-#ifndef MIPS_BUS_SPACE_PCI
-#define MIPS_BUS_SPACE_PCI	10
-#endif
-
 static struct resource *
 iodi_alloc_resource(device_t bus, device_t child, int type, int *rid,
     u_long start, u_long end, u_long count, u_int flags)
@@ -199,7 +179,7 @@ iodi_alloc_resource(device_t bus, device
 		res->r_bustag = uart_bus_space_mem;
 	} else if (strcmp(device_get_name(child), "ehci") == 0) {
 		res->r_bushandle = 0xbef24000;
-		res->r_bustag = (bus_space_tag_t) MIPS_BUS_SPACE_PCI;
+		res->r_bustag = rmi_pci_bus_space;
 	} else if (strcmp(device_get_name(child), "cfi") == 0) {
 		res->r_bushandle = 0xbc000000;
 		res->r_bustag = 0;

Modified: head/sys/mips/rmi/xlr_pci.c
==============================================================================
--- head/sys/mips/rmi/xlr_pci.c	Tue Mar  2 11:02:59 2010	(r204576)
+++ head/sys/mips/rmi/xlr_pci.c	Tue Mar  2 12:11:00 2010	(r204577)
@@ -115,7 +115,6 @@ struct xlr_pcib_softc {
 	int junk;		/* no softc */
 };
 
-extern bus_space_tag_t rmi_pci_bus_space;
 static devclass_t pcib_devclass;
 static void *xlr_pci_config_base;
 static struct rman irq_rman, port_rman, mem_rman;

Modified: head/sys/mips/rmi/xls_ehci.c
==============================================================================
--- head/sys/mips/rmi/xls_ehci.c	Tue Mar  2 11:02:59 2010	(r204576)
+++ head/sys/mips/rmi/xls_ehci.c	Tue Mar  2 12:11:00 2010	(r204577)
@@ -38,58 +38,50 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-/*
- * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller.
- *
- * The EHCI 1.0 spec can be found at
- * http://developer.intel.com/technology/usb/download/ehci-r10.pdf
- * and the USB 2.0 spec at
- * http://www.usb.org/developers/docs/usb_20.zip
- */
-
-/* The low level controller code for EHCI has been split into
- * PCI probes and EHCI specific code. This was done to facilitate the
- * sharing of code between *BSD's
- */
-
 #include "opt_bus.h"
 
+#include 
+#include 
 #include 
+#include 
+#include 
 #include 
 #include 
-#include 
 #include 
-#include 
+#include 
+#include 
 #include 
-#include 
-#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 
 #include 
 #include 
-/*#include   */
-/*#include    */
-
-#include 
-#include 
 
-#ifdef USB_DEBUG
-#define EHCI_DEBUG USB_DEBUG
-#define DPRINTF(x)	do { if (ehcidebug) logprintf x; } while (0)
-extern int ehcidebug;
-
-#else
-#define DPRINTF(x)
-#endif
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
 
 static int ehci_xls_attach(device_t self);
 static int ehci_xls_detach(device_t self);
 static int ehci_xls_shutdown(device_t self);
 static int ehci_xls_suspend(device_t self);
 static int ehci_xls_resume(device_t self);
-static void ehci_xls_givecontroller(device_t self);
-static void ehci_xls_takecontroller(device_t self);
 
 static int
 ehci_xls_suspend(device_t self)
@@ -100,9 +92,8 @@ ehci_xls_suspend(device_t self)
 	err = bus_generic_suspend(self);
 	if (err)
 		return (err);
-	ehci_power(PWR_SUSPEND, sc);
-
-	return 0;
+	ehci_suspend(sc);
+	return (0);
 }
 
 static int
@@ -110,11 +101,11 @@ ehci_xls_resume(device_t self)
 {
 	ehci_softc_t *sc = device_get_softc(self);
 
-	ehci_xls_takecontroller(self);
-	ehci_power(PWR_RESUME, sc);
+	ehci_resume(sc);
+
 	bus_generic_resume(self);
 
-	return 0;
+	return (0);
 }
 
 static int
@@ -127,18 +118,16 @@ ehci_xls_shutdown(device_t self)
 	if (err)
 		return (err);
 	ehci_shutdown(sc);
-	ehci_xls_givecontroller(self);
 
-	return 0;
+	return (0);
 }
 
-
 static const char *xlr_usb_dev_desc = "RMI XLR USB 2.0 controller";
 static const char *xlr_vendor_desc = "RMI Corp";
+
 static int
 ehci_xls_probe(device_t self)
 {
-
 	/* TODO see if usb is enabled on the board */
 	device_set_desc(self, xlr_usb_dev_desc);
 	return BUS_PROBE_DEFAULT;
@@ -148,132 +137,125 @@ static int
 ehci_xls_attach(device_t self)
 {
 	ehci_softc_t *sc = device_get_softc(self);
-	device_t parent;
-	device_t *neighbors;
 	int err;
 	int rid;
-	int count;
-	int res;
 
-
-	sc->sc_bus.usbrev = USBREV_2_0;
+	sc->sc_bus.parent = self;
+	sc->sc_bus.devices = sc->sc_devices;
+	sc->sc_bus.devices_max = EHCI_MAX_DEVICES;
+
+	/* get all DMA memory */
+	if (usb_bus_mem_alloc_all(&sc->sc_bus,
+	    USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) {
+		return (ENOMEM);
+	}
 
 	rid = 0;
-	sc->io_res = bus_alloc_resource(self, SYS_RES_MEMORY, &rid,
-	    0ul, ~0ul, 0x400, RF_ACTIVE);
-	if (!sc->io_res) {
+	sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid,
+	    RF_ACTIVE);
+	if (!sc->sc_io_res) {
 		device_printf(self, "Could not map memory\n");
-		return ENXIO;
+		goto error;
 	}
-	sc->iot = rman_get_bustag(sc->io_res);
-	sc->ioh = rman_get_bushandle(sc->io_res);
+	sc->sc_io_tag = rman_get_bustag(sc->sc_io_res);
+	sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res);
+	printf("IO Resource tag %lx, hdl %lx, size %lx\n",
+	       (u_long)sc->sc_io_tag, (u_long)sc->sc_io_hdl, 
+	       (u_long)sc->sc_io_size);
 
 	rid = 0;
-	sc->irq_res = bus_alloc_resource(self, SYS_RES_IRQ, &rid,
-	    39, 39, 1, RF_SHAREABLE | RF_ACTIVE);
-	if (sc->irq_res == NULL) {
+	sc->sc_irq_res = bus_alloc_resource(self, SYS_RES_IRQ, &rid,
+	    PIC_USB_IRQ, PIC_USB_IRQ, 1, RF_SHAREABLE | RF_ACTIVE);
+	if (sc->sc_irq_res == NULL) {
 		device_printf(self, "Could not allocate irq\n");
-		ehci_xls_detach(self);
-		return ENXIO;
+		goto error;
 	}
-	sc->sc_bus.bdev = device_add_child(self, "usb", -1);
+
+	sc->sc_bus.bdev = device_add_child(self, "usbus", -1);
 	if (!sc->sc_bus.bdev) {
 		device_printf(self, "Could not add USB device\n");
-		ehci_xls_detach(self);
-		return ENOMEM;
+		goto error;
 	}
 	device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus);
-
-	/* ehci_pci_match will never return NULL if ehci_pci_probe succeeded */
 	device_set_desc(sc->sc_bus.bdev, xlr_usb_dev_desc);
+
 	sprintf(sc->sc_vendor, xlr_vendor_desc);
 
-	err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO,
-	    (driver_intr_t *) ehci_intr, sc, &sc->ih);
+	err = bus_setup_intr(self, sc->sc_irq_res,
+	    INTR_TYPE_BIO | INTR_MPSAFE, NULL,
+	    (driver_intr_t *) ehci_interrupt, sc, &sc->sc_intr_hdl);
 	if (err) {
 		device_printf(self, "Could not setup irq, %d\n", err);
-		sc->ih = NULL;
-		ehci_xls_detach(self);
-		return ENXIO;
+		sc->sc_intr_hdl = NULL;
+		goto error;
 	}
-	/*
-	 * Find companion controllers.  According to the spec they always
-	 * have lower function numbers so they should be enumerated already.
-	 */
-	parent = device_get_parent(self);
-	res = device_get_children(parent, &neighbors, &count);
-	if (res != 0) {
-		device_printf(self, "Error finding companion busses\n");
-		ehci_xls_detach(self);
-		return ENXIO;
-	}
-	sc->sc_ncomp = 0;
 
-	ehci_xls_takecontroller(self);
 	err = ehci_init(sc);
-	if (!err) {
-		sc->sc_flags |= EHCI_SCFLG_DONEINIT;
-		err = device_probe_and_attach(sc->sc_bus.bdev);
-	}
 	if (err) {
 		device_printf(self, "USB init failed err=%d\n", err);
-		ehci_xls_detach(self);
-		return EIO;
+		goto error;
 	}
-	return 0;
+
+	err = device_probe_and_attach(sc->sc_bus.bdev);
+	if (err) {
+		device_printf(self, "USB probe and attach failed err=%d\n", err);
+		goto error;
+	}
+
+	return (0);
+
+error:
+	ehci_xls_detach(self);
+	return (ENXIO);
 }
 
 static int
 ehci_xls_detach(device_t self)
 {
 	ehci_softc_t *sc = device_get_softc(self);
+	device_t bdev;
+	int err;
 
-	if (sc->sc_flags & EHCI_SCFLG_DONEINIT) {
-		ehci_detach(sc, 0);
-		sc->sc_flags &= ~EHCI_SCFLG_DONEINIT;
+ 	if (sc->sc_bus.bdev) {
+		bdev = sc->sc_bus.bdev;
+		device_detach(bdev);
+		device_delete_child(self, bdev);
 	}
+	/* during module unload there are lots of children leftover */
+	device_delete_all_children(self);
+
 	/*
 	 * disable interrupts that might have been switched on in ehci_init
 	 */
-	if (sc->iot && sc->ioh)
-		bus_space_write_4(sc->iot, sc->ioh, EHCI_USBINTR, 0);
+	if (sc->sc_io_res) {
+		EWRITE4(sc, EHCI_USBINTR, 0);
+	}
 
-	if (sc->irq_res && sc->ih) {
-		int err = bus_teardown_intr(self, sc->irq_res, sc->ih);
+	if (sc->sc_irq_res && sc->sc_intr_hdl) {
+		ehci_detach(sc);
 
+		err = bus_teardown_intr(self, sc->sc_irq_res, sc->sc_intr_hdl);
 		if (err)
-			/* XXX or should we panic? */
 			device_printf(self, "Could not tear down irq, %d\n",
 			    err);
-		sc->ih = NULL;
+		sc->sc_intr_hdl = 0;
 	}
-	if (sc->sc_bus.bdev) {
-		device_delete_child(self, sc->sc_bus.bdev);
-		sc->sc_bus.bdev = NULL;
-	}
-	if (sc->irq_res) {
-		bus_release_resource(self, SYS_RES_IRQ, 0, sc->irq_res);
-		sc->irq_res = NULL;
-	}
-	if (sc->io_res) {
-		bus_release_resource(self, SYS_RES_MEMORY, PCI_CBMEM, sc->io_res);
-		sc->io_res = NULL;
-		sc->iot = 0;
-		sc->ioh = 0;
+
+	if (sc->sc_irq_res) {
+		bus_release_resource(self, SYS_RES_IRQ, 0, sc->sc_irq_res);
+		sc->sc_irq_res = NULL;
+	}
+	if (sc->sc_io_res) {
+		bus_release_resource(self, SYS_RES_MEMORY, 0,
+		    sc->sc_io_res);
+		sc->sc_io_res = NULL;
+		sc->sc_io_tag = 0;
+		sc->sc_io_hdl = 0;
 	}
-	return 0;
-}
 
-static void
-ehci_xls_takecontroller(device_t self)
-{
-	//device_printf(self, "In func %s\n", __func__);
-}
+	usb_bus_mem_free_all(&sc->sc_bus, &ehci_iterate_hw_softc);
 
-static void
-ehci_xls_givecontroller(device_t self)
-{
-	//device_printf(self, "In func %s\n", __func__);
+	return (0);
 }
 
 static device_method_t ehci_methods[] = {
@@ -294,10 +276,10 @@ static device_method_t ehci_methods[] = 
 static driver_t ehci_driver = {
 	"ehci",
 	ehci_methods,
-	sizeof(ehci_softc_t),
+	sizeof(struct ehci_softc),
 };
 
 static devclass_t ehci_devclass;
 
 DRIVER_MODULE(ehci, iodi, ehci_driver, ehci_devclass, 0, 0);
-/* DRIVER_MODULE(ehci, cardbus, ehci_driver, ehci_devclass, 0, 0); */
+MODULE_DEPEND(ehci, usb, 1, 1, 1);

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 12:51:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5A1EB1065670;
	Tue,  2 Mar 2010 12:51:39 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 49AC18FC1A;
	Tue,  2 Mar 2010 12:51:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22CpdRL032578;
	Tue, 2 Mar 2010 12:51:39 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22Cpdcv032576;
	Tue, 2 Mar 2010 12:51:39 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201003021251.o22Cpdcv032576@svn.freebsd.org>
From: Rui Paulo 
Date: Tue, 2 Mar 2010 12:51:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204578 - head/sys/modules/ath
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 12:51:39 -0000

Author: rpaulo
Date: Tue Mar  2 12:51:39 2010
New Revision: 204578
URL: http://svn.freebsd.org/changeset/base/204578

Log:
  Add AR9285 sources.

Modified:
  head/sys/modules/ath/Makefile

Modified: head/sys/modules/ath/Makefile
==============================================================================
--- head/sys/modules/ath/Makefile	Tue Mar  2 12:11:00 2010	(r204577)
+++ head/sys/modules/ath/Makefile	Tue Mar  2 12:51:39 2010	(r204578)
@@ -92,6 +92,7 @@ SRCS+=	ar9160_attach.c
 SRCS+=	ar9280.c ar9280_attach.c
 # RF backend for 5416 and 9160
 SRCS+=	ar2133.c
+SRCS+=	ar9285.c ar9285_attach.c
 
 # NB: rate control is bound to the driver by symbol names so only pick one
 .if ${ATH_RATE} == "sample"

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 12:59:43 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 51DF31065675;
	Tue,  2 Mar 2010 12:59:43 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 407D48FC29;
	Tue,  2 Mar 2010 12:59:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22CxgN7034390;
	Tue, 2 Mar 2010 12:59:42 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22CxgVw034382;
	Tue, 2 Mar 2010 12:59:42 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201003021259.o22CxgVw034382@svn.freebsd.org>
From: Rui Paulo 
Date: Tue, 2 Mar 2010 12:59:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204579 - in head/sys/dev/ath/ath_hal: . ar5212 ar5416
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 12:59:43 -0000

Author: rpaulo
Date: Tue Mar  2 12:59:42 2010
New Revision: 204579
URL: http://svn.freebsd.org/changeset/base/204579

Log:
  Couple of suggestions from Sam regarding latest commit:
  o rename the new variables to comply with the naming scheme
  o move the new variables to an AR5212 specific struct
  o use ahp when available
  o revert to previous ts_flags check

Modified:
  head/sys/dev/ath/ath_hal/ah_internal.h
  head/sys/dev/ath/ath_hal/ar5212/ar5212.h
  head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
  head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c

Modified: head/sys/dev/ath/ath_hal/ah_internal.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_internal.h	Tue Mar  2 12:51:39 2010	(r204578)
+++ head/sys/dev/ath/ath_hal/ah_internal.h	Tue Mar  2 12:59:42 2010	(r204579)
@@ -281,8 +281,6 @@ struct ath_hal_private {
 	uint16_t	ah_maxPowerLevel;	/* calculated max tx power */
 	u_int		ah_tpScale;		/* tx power scale factor */
 	uint32_t	ah_11nCompat;		/* 11n compat controls */
-	uint8_t		ah_txtrig_level;	/* current Tx trigger level */
-	uint8_t		ah_max_txtrig_level;	/* max tx trigger level */
 
 	/*
 	 * State for regulatory domain handling.

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212.h	Tue Mar  2 12:51:39 2010	(r204578)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h	Tue Mar  2 12:59:42 2010	(r204579)
@@ -327,6 +327,9 @@ struct ath_hal_5212 {
 	uint16_t	*ah_pcdacTable;
 	u_int		ah_pcdacTableSize;
 	uint16_t	ah_ratesArray[16];
+
+	uint8_t		ah_txTrigLev;		/* current Tx trigger level */
+	uint8_t		ah_maxTxTrigLev;	/* max tx trigger level */
 };
 #define	AH5212(_ah)	((struct ath_hal_5212 *)(_ah))
 

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c	Tue Mar  2 12:51:39 2010	(r204578)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c	Tue Mar  2 12:59:42 2010	(r204579)
@@ -149,9 +149,6 @@ static const struct ath_hal_private ar52
 	.ah_getInterrupts		= ar5212GetInterrupts,
 	.ah_setInterrupts		= ar5212SetInterrupts },
 
-	.ah_txtrig_level		= INIT_TX_FIFO_THRESHOLD,
-	.ah_max_txtrig_level		= MAX_TX_FIFO_THRESHOLD,
-
 	.ah_getChannelEdges		= ar5212GetChannelEdges,
 	.ah_getWirelessModes		= ar5212GetWirelessModes,
 	.ah_eepromRead			= ar5212EepromRead,
@@ -251,6 +248,9 @@ ar5212InitState(struct ath_hal_5212 *ahp
 	ahp->ah_acktimeout = (u_int) -1;
 	ahp->ah_ctstimeout = (u_int) -1;
 	ahp->ah_sifstime = (u_int) -1;
+	ahp->ah_txTrigLev = INIT_TX_FIFO_THRESHOLD,
+	ahp->ah_maxTxTrigLev = MAX_TX_FIFO_THRESHOLD,
+
 	OS_MEMCPY(&ahp->ah_bssidmask, defbssidmask, IEEE80211_ADDR_LEN);
 #undef N
 }

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c	Tue Mar  2 12:51:39 2010	(r204578)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c	Tue Mar  2 12:59:42 2010	(r204579)
@@ -48,8 +48,7 @@ ar5212UpdateTxTrigLevel(struct ath_hal *
 	uint32_t txcfg, curLevel, newLevel;
 	HAL_INT omask;
 
-	if (AH_PRIVATE(ah)->ah_txtrig_level >=
-	    AH_PRIVATE(ah)->ah_max_txtrig_level)
+	if (ahp->ah_txTrigLev >= ahp->ah_maxTxTrigLev)
 		return AH_FALSE;
 
 	/*
@@ -61,7 +60,7 @@ ar5212UpdateTxTrigLevel(struct ath_hal *
 	curLevel = MS(txcfg, AR_FTRIG);
 	newLevel = curLevel;
 	if (bIncTrigLevel) {		/* increase the trigger level */
-		if (curLevel < AH_PRIVATE(ah)->ah_max_txtrig_level)
+		if (curLevel < ahp->ah_maxTxTrigLev)
 			newLevel++;
 	} else if (curLevel > MIN_TX_FIFO_THRESHOLD)
 		newLevel--;
@@ -70,7 +69,7 @@ ar5212UpdateTxTrigLevel(struct ath_hal *
 		OS_REG_WRITE(ah, AR_TXCFG,
 			(txcfg &~ AR_FTRIG) | SM(newLevel, AR_FTRIG));
 
-	AH_PRIVATE(ah)->ah_txtrig_level = newLevel;
+	ahp->ah_txTrigLev = newLevel;
 
 	/* re-enable chip interrupts */
 	ah->ah_setInterrupts(ah, omask);

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Tue Mar  2 12:51:39 2010	(r204578)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Tue Mar  2 12:59:42 2010	(r204579)
@@ -436,6 +436,7 @@ ar5416ChannelChange(struct ath_hal *ah, 
 static void
 ar5416InitDMA(struct ath_hal *ah)
 {
+	struct ath_hal_5212 *ahp = AH5212(ah);
 
 	/*
 	 * set AHB_MODE not to do cacheline prefetches
@@ -457,7 +458,7 @@ ar5416InitDMA(struct ath_hal *ah)
 	/* restore TX trigger level */
 	OS_REG_WRITE(ah, AR_TXCFG,
 		(OS_REG_READ(ah, AR_TXCFG) &~ AR_FTRIG) |
-		    SM(AH_PRIVATE(ah)->ah_txtrig_level, AR_FTRIG));
+		    SM(ahp->ah_txTrigLev, AR_FTRIG));
 
 	/*
 	 * Setup receive FIFO threshold to hold off TX activities

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c	Tue Mar  2 12:51:39 2010	(r204578)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c	Tue Mar  2 12:59:42 2010	(r204579)
@@ -568,8 +568,7 @@ ar5416ProcTxDesc(struct ath_hal *ah,
 
 	/* handle tx trigger level changes internally */
 	if ((ts->ts_status & HAL_TXERR_FIFO) ||
-	    (ts->ts_flags & HAL_TX_DATA_UNDERRUN) ||
-	    (ts->ts_flags & HAL_TX_DELIM_UNDERRUN))
+	    (ts->ts_flags & (HAL_TX_DATA_UNDERRUN | HAL_TX_DELIM_UNDERRUN)))
 		ar5212UpdateTxTrigLevel(ah, AH_TRUE);
 
 	return HAL_OK;

Modified: head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c	Tue Mar  2 12:51:39 2010	(r204578)
+++ head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c	Tue Mar  2 12:59:42 2010	(r204579)
@@ -122,7 +122,7 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s
 	AH5416(ah)->ah_rx_chainmask	= AR9285_DEFAULT_RXCHAINMASK;
 	AH5416(ah)->ah_tx_chainmask	= AR9285_DEFAULT_TXCHAINMASK;
 	
-	AH_PRIVATE(ah)->ah_max_txtrig_level = MAX_TX_FIFO_THRESHOLD >> 1;
+	ahp->ah_maxTxTrigLev		= MAX_TX_FIFO_THRESHOLD >> 1;
 
 	if (!ar5416SetResetReg(ah, HAL_RESET_POWER_ON)) {
 		/* reset chip */

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 13:11:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A7C80106566C;
	Tue,  2 Mar 2010 13:11:45 +0000 (UTC)
	(envelope-from emaste@freebsd.org)
Received: from mail2.sandvine.com (Mail1.sandvine.com [64.7.137.134])
	by mx1.freebsd.org (Postfix) with ESMTP id EA5438FC16;
	Tue,  2 Mar 2010 13:11:44 +0000 (UTC)
Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by
	mail2.sandvine.com with Microsoft SMTPSVC(6.0.3790.3959); 
	Tue, 2 Mar 2010 08:11:38 -0500
Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 10332)
	id 350C111656; Tue,  2 Mar 2010 08:11:44 -0500 (EST)
Date: Tue, 2 Mar 2010 08:11:44 -0500
From: Ed Maste 
To: Alfred Perlstein 
Message-ID: <20100302131143.GA85090@sandvine.com>
References: <201003020658.o226wwB2051156@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201003020658.o226wwB2051156@svn.freebsd.org>
User-Agent: Mutt/1.4.2.1i
X-OriginalArrivalTime: 02 Mar 2010 13:11:38.0425 (UTC)
	FILETIME=[E47B7A90:01CABA09]
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 13:11:45 -0000

On Tue, Mar 02, 2010 at 06:58:58AM +0000, Alfred Perlstein wrote:

>     1) Limit number of cores per process via the %I coredump formatter.

>     2) Encode machine hostname in core dump name via %H.

You should update core(5) with these too.

-Ed

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 13:30:03 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CCB501065676;
	Tue,  2 Mar 2010 13:30:03 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 89C698FC1C;
	Tue,  2 Mar 2010 13:30:03 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 251C846B0C;
	Tue,  2 Mar 2010 08:30:03 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 5FD918A024;
	Tue,  2 Mar 2010 08:30:02 -0500 (EST)
From: John Baldwin 
To: Alfred Perlstein 
Date: Tue, 2 Mar 2010 07:56:48 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; )
References: <201003020658.o226wwB2051156@svn.freebsd.org>
In-Reply-To: <201003020658.o226wwB2051156@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201003020756.48609.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Tue, 02 Mar 2010 08:30:02 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 13:30:04 -0000

On Tuesday 02 March 2010 1:58:58 am Alfred Perlstein wrote:
> Author: alfred
> Date: Tue Mar  2 06:58:58 2010
> New Revision: 204552
> URL: http://svn.freebsd.org/changeset/base/204552
> 
> Log:
>   Merge projects/enhanced_coredumps (r204346) into HEAD:
>   
>     Enhanced process coredump routines.
>   
>     This brings in the following features:
>     1) Limit number of cores per process via the %I coredump formatter.
>     Example:
>       if corefilename is set to %N.%I.core AND num_cores = 3, then
>       if a process "rpd" cores, then the corefile will be named
>       "rpd.0.core", however if it cores again, then the kernel will
>       generate "rpd.1.core" until we hit the limit of "num_cores".
>   
>       this is useful to get several corefiles, but also prevent filling
>       the machine with corefiles.
>   
>     2) Encode machine hostname in core dump name via %H.
>   
>     3) Compress coredumps, useful for embedded platforms with limited space.
>       A sysctl kern.compress_user_cores is made available if turned on.
>   
>       To enable compressed coredumps, the following config options need to be set:
>       options COMPRESS_USER_CORES
>       device zlib   # brings in the zlib requirements.
>       device gzio   # brings in the kernel vnode gzip output module.
>   
>     4) Eventhandlers are fired to indicate coredumps in progress.
>   
>     5) The imgact sv_coredump routine has grown a flag to pass in more
>     state, currently this is used only for passing a flag down to compress
>     the coredump or not.
>   
>     Note that the gzio facility can be used for generic output of gzip'd
>     streams via vnodes.
>   
>   Obtained from: Juniper Networks
>   Reviewed by: kan
> 
> Added:
>   head/sys/kern/kern_gzio.c   (contents, props changed)
>   head/sys/net/zutil.h   (contents, props changed)
> Modified:
>   head/sys/conf/files
>   head/sys/conf/options
>   head/sys/kern/imgact_elf.c
>   head/sys/kern/kern_sig.c
>   head/sys/net/zlib.h
>   head/sys/sys/eventhandler.h
>   head/sys/sys/imgact.h
>   head/sys/sys/imgact_aout.h
>   head/sys/sys/imgact_elf.h
>   head/sys/sys/sysent.h
> 
> Modified: head/sys/conf/files
> ==============================================================================
> --- head/sys/conf/files	Tue Mar  2 06:54:15 2010	(r204551)
> +++ head/sys/conf/files	Tue Mar  2 06:58:58 2010	(r204552)
> @@ -2053,6 +2053,7 @@ kern/kern_exec.c		standard
>  kern/kern_exit.c		standard
>  kern/kern_fail.c		standard
>  kern/kern_fork.c		standard
> +kern/kern_gzio.c		optional gzio
>  kern/kern_idle.c		standard
>  kern/kern_intr.c		standard
>  kern/kern_jail.c		standard
> @@ -2344,7 +2345,7 @@ net/slcompress.c		optional netgraph_vjc 
>  net/vnet.c			optional vimage
>  net/zlib.c			optional crypto | geom_uzip | ipsec | \
>  					 mxge | netgraph_deflate | \
> -					 ddb_ctf
> +					 ddb_ctf | zlib
>  net80211/ieee80211.c		optional wlan
>  net80211/ieee80211_acl.c	optional wlan wlan_acl
>  net80211/ieee80211_action.c	optional wlan

Did you consider just making net/zlib.c be included if 'gzio' was defined?
Then you would just need to add 'device gzio'.  This would appear to be more
consistent with the rest of the zlib-using kernel components as they all do
that rather than requiring a separate 'device zlib' line.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 15:05:49 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1CED3106564A;
	Tue,  2 Mar 2010 15:05:49 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E50FD8FC17;
	Tue,  2 Mar 2010 15:05:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22F5mCE062305;
	Tue, 2 Mar 2010 15:05:48 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22F5mFD062301;
	Tue, 2 Mar 2010 15:05:48 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <201003021505.o22F5mFD062301@svn.freebsd.org>
From: Robert Watson 
Date: Tue, 2 Mar 2010 15:05:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204581 - in head/sys/security: mac_biba mac_lomac
	mac_mls
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 15:05:49 -0000

Author: rwatson
Date: Tue Mar  2 15:05:48 2010
New Revision: 204581
URL: http://svn.freebsd.org/changeset/base/204581

Log:
  Update device-labeling logic for Biba, LOMAC, and MLS to recognize new-style
  pts devices when various policy ptys_equal flags are enabled.
  
  Submitted by:	Estella Mystagic 
  MFC after:	1 week

Modified:
  head/sys/security/mac_biba/mac_biba.c
  head/sys/security/mac_lomac/mac_lomac.c
  head/sys/security/mac_mls/mac_mls.c

Modified: head/sys/security/mac_biba/mac_biba.c
==============================================================================
--- head/sys/security/mac_biba/mac_biba.c	Tue Mar  2 13:13:12 2010	(r204580)
+++ head/sys/security/mac_biba/mac_biba.c	Tue Mar  2 15:05:48 2010	(r204581)
@@ -955,6 +955,7 @@ biba_devfs_create_device(struct ucred *c
 		biba_type = MAC_BIBA_TYPE_EQUAL;
 	else if (ptys_equal &&
 	    (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 ||
+	    strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 ||
 	    strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0))
 		biba_type = MAC_BIBA_TYPE_EQUAL;
 	else

Modified: head/sys/security/mac_lomac/mac_lomac.c
==============================================================================
--- head/sys/security/mac_lomac/mac_lomac.c	Tue Mar  2 13:13:12 2010	(r204580)
+++ head/sys/security/mac_lomac/mac_lomac.c	Tue Mar  2 15:05:48 2010	(r204581)
@@ -1043,6 +1043,7 @@ lomac_devfs_create_device(struct ucred *
 		lomac_type = MAC_LOMAC_TYPE_EQUAL;
 	else if (ptys_equal &&
 	    (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 ||
+	    strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 ||
 	    strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0))
 		lomac_type = MAC_LOMAC_TYPE_EQUAL;
 	else

Modified: head/sys/security/mac_mls/mac_mls.c
==============================================================================
--- head/sys/security/mac_mls/mac_mls.c	Tue Mar  2 13:13:12 2010	(r204580)
+++ head/sys/security/mac_mls/mac_mls.c	Tue Mar  2 15:05:48 2010	(r204581)
@@ -918,6 +918,7 @@ mls_devfs_create_device(struct ucred *cr
 		mls_type = MAC_MLS_TYPE_HIGH;
 	else if (ptys_equal &&
 	    (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 ||
+	    strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 ||
 	    strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0))
 		mls_type = MAC_MLS_TYPE_EQUAL;
 	else

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 16:24:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 49ABC106564A;
	Tue,  2 Mar 2010 16:24:17 +0000 (UTC)
	(envelope-from luigi@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F0468FC08;
	Tue,  2 Mar 2010 16:24:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22GOH9W079510;
	Tue, 2 Mar 2010 16:24:17 GMT (envelope-from luigi@svn.freebsd.org)
Received: (from luigi@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22GOHnm079508;
	Tue, 2 Mar 2010 16:24:17 GMT (envelope-from luigi@svn.freebsd.org)
Message-Id: <201003021624.o22GOHnm079508@svn.freebsd.org>
From: Luigi Rizzo 
Date: Tue, 2 Mar 2010 16:24:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204582 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 16:24:17 -0000

Author: luigi
Date: Tue Mar  2 16:24:16 2010
New Revision: 204582
URL: http://svn.freebsd.org/changeset/base/204582

Log:
  remove unnecessary casts leftover from a bogus fix to a previous bug

Modified:
  head/sys/net/radix.c

Modified: head/sys/net/radix.c
==============================================================================
--- head/sys/net/radix.c	Tue Mar  2 15:05:48 2010	(r204581)
+++ head/sys/net/radix.c	Tue Mar  2 16:24:16 2010	(r204582)
@@ -936,7 +936,7 @@ on1:
 			if (m)
 				log(LOG_ERR,
 				    "rn_delete: Orphaned Mask %p at %p\n",
-				    (void *)m, (void *)x);
+				    m, x);
 		}
 	}
 	/*

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 16:58:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8E13E106564A;
	Tue,  2 Mar 2010 16:58:05 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7A33E8FC19;
	Tue,  2 Mar 2010 16:58:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22Gw5xf087165;
	Tue, 2 Mar 2010 16:58:05 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22Gw5a9087143;
	Tue, 2 Mar 2010 16:58:05 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201003021658.o22Gw5a9087143@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Tue, 2 Mar 2010 16:58:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204585 - in head: lib/libbsnmp lib/libbsnmp/libbsnmp
	lib/libpam/modules/pam_krb5 sbin/ddb sbin/ipf/ipftest
	share/examples/autofs/driver tools/regression/kqueue
	tools/regression/priv to...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 16:58:05 -0000

Author: uqs
Date: Tue Mar  2 16:58:04 2010
New Revision: 204585
URL: http://svn.freebsd.org/changeset/base/204585

Log:
  Always assign WARNS using ?=
  
  - fix some nearby style bugs
  - include Makefile.inc where it makes sense and reduces duplication
  
  Approved by:	ed (co-mentor)

Modified:
  head/lib/libbsnmp/Makefile.inc
  head/lib/libbsnmp/libbsnmp/Makefile
  head/lib/libpam/modules/pam_krb5/Makefile
  head/sbin/ddb/Makefile
  head/sbin/ipf/ipftest/Makefile
  head/share/examples/autofs/driver/Makefile
  head/tools/regression/kqueue/Makefile
  head/tools/regression/priv/Makefile
  head/tools/regression/sockets/unix_gc/Makefile
  head/tools/regression/sockets/unix_sorflush/Makefile
  head/tools/regression/tmpfs/Makefile
  head/tools/tools/netrate/http/Makefile
  head/tools/tools/netrate/httpd/Makefile
  head/tools/tools/netrate/juggle/Makefile
  head/tools/tools/netrate/tcpconnect/Makefile
  head/tools/tools/netrate/tcpp/Makefile
  head/tools/tools/netrate/tcpreceive/Makefile
  head/tools/tools/umastat/Makefile
  head/usr.bin/locale/Makefile
  head/usr.sbin/fwcontrol/Makefile
  head/usr.sbin/uhsoctl/Makefile

Modified: head/lib/libbsnmp/Makefile.inc
==============================================================================
--- head/lib/libbsnmp/Makefile.inc	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/lib/libbsnmp/Makefile.inc	Tue Mar  2 16:58:04 2010	(r204585)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-SHLIB_MAJOR=	5
-WARNS?=		6
 NO_WERROR=
 INCSDIR=	${INCLUDEDIR}/bsnmp
+
+.include "../Makefile.inc"

Modified: head/lib/libbsnmp/libbsnmp/Makefile
==============================================================================
--- head/lib/libbsnmp/libbsnmp/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/lib/libbsnmp/libbsnmp/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -5,9 +5,8 @@
 CONTRIB= ${.CURDIR}/../../../contrib/bsnmp/lib
 .PATH: ${CONTRIB}
 
-LIB	= bsnmp
-SHLIBDIR ?= /lib
-WARNS	?= 6
+LIB=	bsnmp
+SHLIBDIR?= /lib
 
 CFLAGS+= -I${CONTRIB} -DHAVE_ERR_H -DHAVE_GETADDRINFO -DHAVE_STRLCPY
 CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DQUADFMT='"llu"' -DQUADXFMT='"llx"'

Modified: head/lib/libpam/modules/pam_krb5/Makefile
==============================================================================
--- head/lib/libpam/modules/pam_krb5/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/lib/libpam/modules/pam_krb5/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -29,7 +29,7 @@ SRCS=	pam_krb5.c
 MAN=	pam_krb5.8
 .if defined(_FREEFALL_CONFIG)
 CFLAGS+=-D_FREEFALL_CONFIG
-WARNS=	3
+WARNS?=	3
 .endif
 
 DPADD=	${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO}

Modified: head/sbin/ddb/Makefile
==============================================================================
--- head/sbin/ddb/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/sbin/ddb/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -3,7 +3,7 @@
 PROG=	ddb
 SRCS=	ddb.c ddb_capture.c ddb_script.c
 MAN=	ddb.8
-WARNS=	3
+WARNS?=	3
 
 DPADD=	${LIBKVM}
 LDADD=	-lkvm

Modified: head/sbin/ipf/ipftest/Makefile
==============================================================================
--- head/sbin/ipf/ipftest/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/sbin/ipf/ipftest/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -1,7 +1,5 @@
 #	$FreeBSD$
 
-WARNS=0
-
 PROG=		ipftest
 SRCS=		${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \
 		ip_proxy.c ip_auth.c ip_htable.c ip_lookup.c \
@@ -10,6 +8,7 @@ SRCS=		${GENHDRS} ipftest.c fil.c ip_fra
 		ipf_l.c ipnat_y.c ipnat_l.c md5.c radix.c bpf_filter.c
 MAN=		ipftest.1
 
+WARNS?=		0
 CFLAGS+=	-DIPFILTER_LOG -DIPFILTER_COMPILED -DIPFILTER_LOOKUP \
 		-DIPFILTER_SCAN -DIPFILTER_SYNC -DIPFILTER_CKSUM -I.
 

Modified: head/share/examples/autofs/driver/Makefile
==============================================================================
--- head/share/examples/autofs/driver/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/share/examples/autofs/driver/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -1,11 +1,11 @@
 # $Id: Makefile,v 1.5 2004/09/08 08:27:12 bright Exp $
 # $FreeBSD$
 
-PROG=autodriver
+PROG=		autodriver
+NO_MAN=
 
 SRCS=		autodriver.c
-NO_MAN=
-WARNS=		4
+WARNS?=		4
 CFLAGS+=	-g
 BINDIR?=	/sbin
 

Modified: head/tools/regression/kqueue/Makefile
==============================================================================
--- head/tools/regression/kqueue/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/regression/kqueue/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -16,6 +16,6 @@ SRCS=			\
 	signal.c	\
 	user.c
 NO_MAN=
-WARNS=2
+WARNS?=	2
 
 .include "bsd.prog.mk"

Modified: head/tools/regression/priv/Makefile
==============================================================================
--- head/tools/regression/priv/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/regression/priv/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -46,7 +46,7 @@ SRCS=	main.c				\
 	priv_vm_munlock.c
 
 NO_MAN=
-WARNS=	3
+WARNS?=	3
 
 DPADD+= ${LIBIPSEC}
 LDADD+= -lipsec

Modified: head/tools/regression/sockets/unix_gc/Makefile
==============================================================================
--- head/tools/regression/sockets/unix_gc/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/regression/sockets/unix_gc/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PROG=	unix_gc
-WARNS=	3
 NO_MAN=
+WARNS?=	3
 
 .include 

Modified: head/tools/regression/sockets/unix_sorflush/Makefile
==============================================================================
--- head/tools/regression/sockets/unix_sorflush/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/regression/sockets/unix_sorflush/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -2,6 +2,6 @@
 
 PROG=	unix_sorflush
 NO_MAN=
-WARNS=	3
+WARNS?=	3
 
 .include 

Modified: head/tools/regression/tmpfs/Makefile
==============================================================================
--- head/tools/regression/tmpfs/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/regression/tmpfs/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -31,7 +31,7 @@ regress: ${tests}
 
 PROG=	h_tools
 NO_MAN=	# defined
-WARNS=	4
+WARNS?=	4
 
 t_sizes t_sockets t_statvfs: h_tools
 

Modified: head/tools/tools/netrate/http/Makefile
==============================================================================
--- head/tools/tools/netrate/http/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/tools/netrate/http/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
 PROG=	http
-WARNS=	3
 NO_MAN=
+WARNS?=	3
 DPADD=	${LIBPTHREAD}
 LDADD=	-lpthread
 

Modified: head/tools/tools/netrate/httpd/Makefile
==============================================================================
--- head/tools/tools/netrate/httpd/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/tools/netrate/httpd/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
 PROG=	httpd
-WARNS=	3
 NO_MAN=
+WARNS?=	3
 DPADD=	${LIBPTHREAD}
 LDADD=	-lpthread
 

Modified: head/tools/tools/netrate/juggle/Makefile
==============================================================================
--- head/tools/tools/netrate/juggle/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/tools/netrate/juggle/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -2,9 +2,8 @@
 
 PROG=	juggle
 NO_MAN=
-WARNS=	3
-
-LDADD=	-lpthread
+WARNS?=	3
 DPADD=	${LIBPTHREAD}
+LDADD=	-lpthread
 
 .include 

Modified: head/tools/tools/netrate/tcpconnect/Makefile
==============================================================================
--- head/tools/tools/netrate/tcpconnect/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/tools/netrate/tcpconnect/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PROG=	tcpconnect
-WARNS=	3
 NO_MAN=
+WARNS?=	3
 
 .include 

Modified: head/tools/tools/netrate/tcpp/Makefile
==============================================================================
--- head/tools/tools/netrate/tcpp/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/tools/netrate/tcpp/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -4,6 +4,6 @@ PROG=	tcpp
 INCS=	tcpp.h
 NO_MAN=	
 SRCS=	tcpp.c tcpp_client.c tcpp_server.c tcpp_util.c
-WARNS=	3
+WARNS?=	3
 
 .include 

Modified: head/tools/tools/netrate/tcpreceive/Makefile
==============================================================================
--- head/tools/tools/netrate/tcpreceive/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/tools/netrate/tcpreceive/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PROG=	tcpreceive
-WARNS=	3
 NO_MAN=
+WARNS?=	3
 
 .include 

Modified: head/tools/tools/umastat/Makefile
==============================================================================
--- head/tools/tools/umastat/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/tools/tools/umastat/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -2,10 +2,9 @@
 
 PROG=	umastat
 NO_MAN=
+WARNS?=	3
 
 DPADD=	${LIBKVM}
 LDADD=	-lkvm
 
-WARNS=	3
-
 .include 

Modified: head/usr.bin/locale/Makefile
==============================================================================
--- head/usr.bin/locale/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/usr.bin/locale/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
-PROG = locale
-CFLAGS += -I${.CURDIR}/../../lib/libc/locale
-WARNS ?= 3
+PROG=	locale
+WARNS?=	3
+CFLAGS+= -I${.CURDIR}/../../lib/libc/locale
 
 .include 

Modified: head/usr.sbin/fwcontrol/Makefile
==============================================================================
--- head/usr.sbin/fwcontrol/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/usr.sbin/fwcontrol/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -3,7 +3,7 @@
 PROG=	fwcontrol
 SRCS=	fwcontrol.c fwcrom.c fwdv.c fwmpegts.c
 MAN=	fwcontrol.8
-WARNS=	3
+WARNS?=	3
 
 .PATH:	${.CURDIR}/../../sys/dev/firewire
 

Modified: head/usr.sbin/uhsoctl/Makefile
==============================================================================
--- head/usr.sbin/uhsoctl/Makefile	Tue Mar  2 16:29:08 2010	(r204584)
+++ head/usr.sbin/uhsoctl/Makefile	Tue Mar  2 16:58:04 2010	(r204585)
@@ -2,7 +2,7 @@
 
 PROG=	uhsoctl
 MAN=	uhsoctl.1
-WARNS=	1
+WARNS?=	1
 
 DPADD=	${LIBUTIL}
 LDADD=	-lutil

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 17:05:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 74FCA106564A;
	Tue,  2 Mar 2010 17:05:20 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D34C8FC13;
	Tue,  2 Mar 2010 17:05:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22H5KNh088814;
	Tue, 2 Mar 2010 17:05:20 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22H5Kps088812;
	Tue, 2 Mar 2010 17:05:20 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201003021705.o22H5Kps088812@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 2 Mar 2010 17:05:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204586 - head/tools/regression/sysvsem
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 17:05:20 -0000

Author: joel (doc committer)
Date: Tue Mar  2 17:05:19 2010
New Revision: 204586
URL: http://svn.freebsd.org/changeset/base/204586

Log:
  The NetBSD Foundation has granted permission to remove clause 3 and 4 from
  their software.
  
  Obtained from:	NetBSD

Modified:
  head/tools/regression/sysvsem/semtest.c

Modified: head/tools/regression/sysvsem/semtest.c
==============================================================================
--- head/tools/regression/sysvsem/semtest.c	Tue Mar  2 16:58:04 2010	(r204585)
+++ head/tools/regression/sysvsem/semtest.c	Tue Mar  2 17:05:19 2010	(r204586)
@@ -14,13 +14,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 17:06:41 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 511851065670;
	Tue,  2 Mar 2010 17:06:41 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 409DF8FC0A;
	Tue,  2 Mar 2010 17:06:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22H6fD8089155;
	Tue, 2 Mar 2010 17:06:41 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22H6fmi089153;
	Tue, 2 Mar 2010 17:06:41 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201003021706.o22H6fmi089153@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 2 Mar 2010 17:06:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204587 - head/lib/libutil
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 17:06:41 -0000

Author: joel (doc committer)
Date: Tue Mar  2 17:06:40 2010
New Revision: 204587
URL: http://svn.freebsd.org/changeset/base/204587

Log:
  The NetBSD Foundation has granted permission to remove clause 3 and 4 from
  their software.
  
  Obtained from:	NetBSD

Modified:
  head/lib/libutil/humanize_number.3

Modified: head/lib/libutil/humanize_number.3
==============================================================================
--- head/lib/libutil/humanize_number.3	Tue Mar  2 17:05:19 2010	(r204586)
+++ head/lib/libutil/humanize_number.3	Tue Mar  2 17:06:40 2010	(r204587)
@@ -15,13 +15,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 17:20:04 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F670106566B;
	Tue,  2 Mar 2010 17:20:04 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7D49B8FC1B;
	Tue,  2 Mar 2010 17:20:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22HK4vi092200;
	Tue, 2 Mar 2010 17:20:04 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22HK41w092193;
	Tue, 2 Mar 2010 17:20:04 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201003021720.o22HK41w092193@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 2 Mar 2010 17:20:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204588 - in head/lib/libc: gen include sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 17:20:04 -0000

Author: joel (doc committer)
Date: Tue Mar  2 17:20:04 2010
New Revision: 204588
URL: http://svn.freebsd.org/changeset/base/204588

Log:
  The NetBSD Foundation has granted permission to remove clause 3 and 4 from
  their software.
  
  Obtained from:	NetBSD

Modified:
  head/lib/libc/gen/fmtcheck.3
  head/lib/libc/gen/stringlist.3
  head/lib/libc/include/reentrant.h
  head/lib/libc/sys/mlockall.2
  head/lib/libc/sys/ntp_adjtime.2
  head/lib/libc/sys/utrace.2

Modified: head/lib/libc/gen/fmtcheck.3
==============================================================================
--- head/lib/libc/gen/fmtcheck.3	Tue Mar  2 17:06:40 2010	(r204587)
+++ head/lib/libc/gen/fmtcheck.3	Tue Mar  2 17:20:04 2010	(r204588)
@@ -11,13 +11,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/gen/stringlist.3
==============================================================================
--- head/lib/libc/gen/stringlist.3	Tue Mar  2 17:06:40 2010	(r204587)
+++ head/lib/libc/gen/stringlist.3	Tue Mar  2 17:20:04 2010	(r204588)
@@ -13,13 +13,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/include/reentrant.h
==============================================================================
--- head/lib/libc/include/reentrant.h	Tue Mar  2 17:06:40 2010	(r204587)
+++ head/lib/libc/include/reentrant.h	Tue Mar  2 17:20:04 2010	(r204588)
@@ -13,13 +13,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *        This product includes software developed by the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/sys/mlockall.2
==============================================================================
--- head/lib/libc/sys/mlockall.2	Tue Mar  2 17:06:40 2010	(r204587)
+++ head/lib/libc/sys/mlockall.2	Tue Mar  2 17:20:04 2010	(r204588)
@@ -15,13 +15,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/sys/ntp_adjtime.2
==============================================================================
--- head/lib/libc/sys/ntp_adjtime.2	Tue Mar  2 17:06:40 2010	(r204587)
+++ head/lib/libc/sys/ntp_adjtime.2	Tue Mar  2 17:20:04 2010	(r204588)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: head/lib/libc/sys/utrace.2
==============================================================================
--- head/lib/libc/sys/utrace.2	Tue Mar  2 17:06:40 2010	(r204587)
+++ head/lib/libc/sys/utrace.2	Tue Mar  2 17:20:04 2010	(r204588)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"      This product includes software developed by the NetBSD
-.\"      Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 17:24:33 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 667551065670;
	Tue,  2 Mar 2010 17:24:33 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5624B8FC1B;
	Tue,  2 Mar 2010 17:24:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22HOXKR093240;
	Tue, 2 Mar 2010 17:24:33 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22HOX4O093238;
	Tue, 2 Mar 2010 17:24:33 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201003021724.o22HOX4O093238@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 2 Mar 2010 17:24:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204589 - head/sys/fs/msdosfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 17:24:33 -0000

Author: kib
Date: Tue Mar  2 17:24:33 2010
New Revision: 204589
URL: http://svn.freebsd.org/changeset/base/204589

Log:
  Do not leak vnode lock when msdosfs mount is updated and specified
  device is different from the device used to the original mount.
  
  Note that update_mp does not need devvp locked, and pmp->pm_devvp cannot
  be freed meantime.
  
  Reported and tested by:	pho
  MFC after:	3 weeks

Modified:
  head/sys/fs/msdosfs/msdosfs_vfsops.c

Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_vfsops.c	Tue Mar  2 17:20:04 2010	(r204588)
+++ head/sys/fs/msdosfs/msdosfs_vfsops.c	Tue Mar  2 17:24:33 2010	(r204589)
@@ -383,10 +383,9 @@ msdosfs_mount(struct mount *mp)
 		pmp = VFSTOMSDOSFS(mp);
 #endif
 	} else {
+		vput(devvp);
 		if (devvp != pmp->pm_devvp)
-			error = EINVAL;	/* XXX needs translation */
-		else
-			vput(devvp);
+			return (EINVAL);	/* XXX needs translation */
 	}
 	if (error) {
 		vrele(devvp);

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 17:34:11 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6DE7B106564A;
	Tue,  2 Mar 2010 17:34:11 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5D3C38FC15;
	Tue,  2 Mar 2010 17:34:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22HYBYg095412;
	Tue, 2 Mar 2010 17:34:11 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22HYBYa095409;
	Tue, 2 Mar 2010 17:34:11 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201003021734.o22HYBYa095409@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 2 Mar 2010 17:34:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204590 - head/sys/dev/mfi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 17:34:11 -0000

Author: kib
Date: Tue Mar  2 17:34:11 2010
New Revision: 204590
URL: http://svn.freebsd.org/changeset/base/204590

Log:
  Correct mfip module dependency on mfi. This allows mfip to be loaded as
  module when mfi is a module itself.
  
  Reviewed by:	jhb, scottl
  MFC after:	1 week

Modified:
  head/sys/dev/mfi/mfi_cam.c
  head/sys/dev/mfi/mfi_pci.c

Modified: head/sys/dev/mfi/mfi_cam.c
==============================================================================
--- head/sys/dev/mfi/mfi_cam.c	Tue Mar  2 17:24:33 2010	(r204589)
+++ head/sys/dev/mfi/mfi_cam.c	Tue Mar  2 17:34:11 2010	(r204590)
@@ -95,6 +95,7 @@ static driver_t mfip_driver = {
 };
 DRIVER_MODULE(mfip, mfi, mfip_driver, mfip_devclass, 0, 0);
 MODULE_DEPEND(mfip, cam, 1, 1, 1);
+MODULE_DEPEND(mfip, mfi, 1, 1, 1);
 
 #define ccb_mfip_ptr sim_priv.entries[0].ptr
 

Modified: head/sys/dev/mfi/mfi_pci.c
==============================================================================
--- head/sys/dev/mfi/mfi_pci.c	Tue Mar  2 17:24:33 2010	(r204589)
+++ head/sys/dev/mfi/mfi_pci.c	Tue Mar  2 17:34:11 2010	(r204590)
@@ -105,6 +105,7 @@ static driver_t mfi_pci_driver = {
 
 static devclass_t	mfi_devclass;
 DRIVER_MODULE(mfi, pci, mfi_pci_driver, mfi_devclass, 0, 0);
+MODULE_VERSION(mfi, 1);
 
 struct mfi_ident {
 	uint16_t	vendor;

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 17:40:48 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CBF5E106566B;
	Tue,  2 Mar 2010 17:40:48 +0000 (UTC)
	(envelope-from luigi@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B87AB8FC15;
	Tue,  2 Mar 2010 17:40:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22HemjX096947;
	Tue, 2 Mar 2010 17:40:48 GMT (envelope-from luigi@svn.freebsd.org)
Received: (from luigi@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22HemPA096942;
	Tue, 2 Mar 2010 17:40:48 GMT (envelope-from luigi@svn.freebsd.org)
Message-Id: <201003021740.o22HemPA096942@svn.freebsd.org>
From: Luigi Rizzo 
Date: Tue, 2 Mar 2010 17:40:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204591 - in head: sbin/ipfw sys/conf sys/net
	sys/netinet sys/netinet/ipfw sys/netinet/ipfw/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 17:40:49 -0000

Author: luigi
Date: Tue Mar  2 17:40:48 2010
New Revision: 204591
URL: http://svn.freebsd.org/changeset/base/204591

Log:
  Bring in the most recent version of ipfw and dummynet, developed
  and tested over the past two months in the ipfw3-head branch.  This
  also happens to be the same code available in the Linux and Windows
  ports of ipfw and dummynet.
  
  The major enhancement is a completely restructured version of
  dummynet, with support for different packet scheduling algorithms
  (loadable at runtime), faster queue/pipe lookup, and a much cleaner
  internal architecture and kernel/userland ABI which simplifies
  future extensions.
  
  In addition to the existing schedulers (FIFO and WF2Q+), we include
  a Deficit Round Robin (DRR or RR for brevity) scheduler, and a new,
  very fast version of WF2Q+ called QFQ.
  
  Some test code is also present (in sys/netinet/ipfw/test) that
  lets you build and test schedulers in userland.
  
  Also, we have added a compatibility layer that understands requests
  from the RELENG_7 and RELENG_8 versions of the /sbin/ipfw binaries,
  and replies correctly (at least, it does its best; sometimes you
  just cannot tell who sent the request and how to answer).
  The compatibility layer should make it possible to MFC this code in a
  relatively short time.
  
  Some minor glitches (e.g. handling of ipfw set enable/disable,
  and a workaround for a bug in RELENG_7's /sbin/ipfw) will be
  fixed with separate commits.
  
  CREDITS:
  This work has been partly supported by the ONELAB2 project, and
  mostly developed by Riccardo Panicucci and myself.
  The code for the qfq scheduler is mostly from Fabio Checconi,
  and Marta Carbone and Francesco Magno have helped with testing,
  debugging and some bug fixes.

Added:
  head/sys/netinet/ipfw/dn_heap.c   (contents, props changed)
  head/sys/netinet/ipfw/dn_heap.h   (contents, props changed)
  head/sys/netinet/ipfw/dn_sched.h   (contents, props changed)
  head/sys/netinet/ipfw/dn_sched_fifo.c   (contents, props changed)
  head/sys/netinet/ipfw/dn_sched_qfq.c   (contents, props changed)
  head/sys/netinet/ipfw/dn_sched_rr.c   (contents, props changed)
  head/sys/netinet/ipfw/dn_sched_wf2q.c   (contents, props changed)
  head/sys/netinet/ipfw/dummynet.txt   (contents, props changed)
  head/sys/netinet/ipfw/ip_dn_glue.c   (contents, props changed)
  head/sys/netinet/ipfw/ip_dn_io.c   (contents, props changed)
  head/sys/netinet/ipfw/ip_dn_private.h   (contents, props changed)
  head/sys/netinet/ipfw/test/
  head/sys/netinet/ipfw/test/Makefile   (contents, props changed)
  head/sys/netinet/ipfw/test/dn_test.h   (contents, props changed)
  head/sys/netinet/ipfw/test/main.c   (contents, props changed)
  head/sys/netinet/ipfw/test/mylist.h   (contents, props changed)
  head/sys/netinet/ipfw/test/test_dn_heap.c   (contents, props changed)
  head/sys/netinet/ipfw/test/test_dn_sched.c   (contents, props changed)
Modified:
  head/sbin/ipfw/Makefile
  head/sbin/ipfw/altq.c
  head/sbin/ipfw/dummynet.c
  head/sbin/ipfw/ipfw.8
  head/sbin/ipfw/ipfw2.c
  head/sbin/ipfw/ipfw2.h
  head/sbin/ipfw/main.c
  head/sys/conf/files
  head/sys/net/if_bridge.c
  head/sys/net/if_ethersubr.c
  head/sys/netinet/ip_dummynet.h
  head/sys/netinet/ip_fw.h
  head/sys/netinet/ipfw/ip_dummynet.c
  head/sys/netinet/ipfw/ip_fw2.c
  head/sys/netinet/ipfw/ip_fw_dynamic.c
  head/sys/netinet/ipfw/ip_fw_log.c
  head/sys/netinet/ipfw/ip_fw_pfil.c
  head/sys/netinet/ipfw/ip_fw_private.h
  head/sys/netinet/ipfw/ip_fw_sockopt.c
  head/sys/netinet/ipfw/ip_fw_table.c

Modified: head/sbin/ipfw/Makefile
==============================================================================
--- head/sbin/ipfw/Makefile	Tue Mar  2 17:34:11 2010	(r204590)
+++ head/sbin/ipfw/Makefile	Tue Mar  2 17:40:48 2010	(r204591)
@@ -3,7 +3,6 @@
 PROG=	ipfw
 SRCS=	ipfw2.c dummynet.c ipv6.c main.c nat.c altq.c
 WARNS?=	2
-DPADD=	${LIBUTIL}
 LDADD=	-lutil
 MAN=	ipfw.8
 

Modified: head/sbin/ipfw/altq.c
==============================================================================
--- head/sbin/ipfw/altq.c	Tue Mar  2 17:34:11 2010	(r204590)
+++ head/sbin/ipfw/altq.c	Tue Mar  2 17:40:48 2010	(r204591)
@@ -39,6 +39,7 @@
 
 #include 		/* IFNAMSIZ */
 #include 
+#include 	/* in_addr */
 #include 
 
 /*

Modified: head/sbin/ipfw/dummynet.c
==============================================================================
--- head/sbin/ipfw/dummynet.c	Tue Mar  2 17:34:11 2010	(r204590)
+++ head/sbin/ipfw/dummynet.c	Tue Mar  2 17:40:48 2010	(r204591)
@@ -1,10 +1,5 @@
 /*
- * Copyright (c) 2002-2003 Luigi Rizzo
- * Copyright (c) 1996 Alex Nash, Paul Traina, Poul-Henning Kamp
- * Copyright (c) 1994 Ugen J.S.Antsilevich
- *
- * Idea and grammar partially left from:
- * Copyright (c) 1993 Daniel Boulet
+ * Copyright (c) 2002-2003,2010 Luigi Rizzo
  *
  * Redistribution and use in source forms, with and without modification,
  * are permitted provided that this entire comment appears intact.
@@ -24,7 +19,6 @@
 
 #include 
 #include 
-#include 
 /* XXX there are several sysctl leftover here */
 #include 
 
@@ -46,6 +40,7 @@
 #include 
 #include 	/* inet_ntoa */
 
+
 static struct _s_x dummynet_params[] = {
 	{ "plr",		TOK_PLR },
 	{ "noerror",		TOK_NOERROR },
@@ -56,27 +51,59 @@ static struct _s_x dummynet_params[] = {
 	{ "src-port",		TOK_SRCPORT },
 	{ "proto",		TOK_PROTO },
 	{ "weight",		TOK_WEIGHT },
+	{ "lmax",		TOK_LMAX },
+	{ "maxlen",		TOK_LMAX },
 	{ "all",		TOK_ALL },
-	{ "mask",		TOK_MASK },
+	{ "mask",		TOK_MASK }, /* alias for both */
+	{ "sched_mask",		TOK_SCHED_MASK },
+	{ "flow_mask",		TOK_FLOW_MASK },
 	{ "droptail",		TOK_DROPTAIL },
 	{ "red",		TOK_RED },
 	{ "gred",		TOK_GRED },
 	{ "bw",			TOK_BW },
 	{ "bandwidth",		TOK_BW },
 	{ "delay",		TOK_DELAY },
+	{ "link",		TOK_LINK },
 	{ "pipe",		TOK_PIPE },
 	{ "queue",		TOK_QUEUE },
+	{ "flowset",		TOK_FLOWSET },
+	{ "sched",		TOK_SCHED },
+	{ "pri",		TOK_PRI },
+	{ "priority",		TOK_PRI },
+	{ "type",		TOK_TYPE },
 	{ "flow-id",		TOK_FLOWID},
 	{ "dst-ipv6",		TOK_DSTIP6},
 	{ "dst-ip6",		TOK_DSTIP6},
 	{ "src-ipv6",		TOK_SRCIP6},
 	{ "src-ip6",		TOK_SRCIP6},
-	{ "profile",		TOK_PIPE_PROFILE},
+	{ "profile",		TOK_PROFILE},
 	{ "burst",		TOK_BURST},
 	{ "dummynet-params",	TOK_NULL },
 	{ NULL, 0 }	/* terminator */
 };
 
+#define O_NEXT(p, len) ((void *)((char *)p + len))
+
+static void
+oid_fill(struct dn_id *oid, int len, int type, uintptr_t id)
+{
+	oid->len = len;
+	oid->type = type;
+	oid->subtype = 0;
+	oid->id = id;
+}
+
+/* make room in the buffer and move the pointer forward */
+static void *
+o_next(struct dn_id **o, int len, int type)
+{
+	struct dn_id *ret = *o;
+	oid_fill(ret, len, type, 0);
+	*o = O_NEXT(*o, len);
+	return ret;
+}
+
+#if 0
 static int
 sort_q(void *arg, const void *pa, const void *pb)
 {
@@ -108,117 +135,81 @@ sort_q(void *arg, const void *pa, const 
 		res = 1;
 	return (int)(rev ? res : -res);
 }
+#endif
 
+/* print a mask and header for the subsequent list of flows */
 static void
-list_queues(struct dn_flow_set *fs, struct dn_flow_queue *q)
+print_mask(struct ipfw_flow_id *id)
+{
+	if (!IS_IP6_FLOW_ID(id)) {
+		printf("    "
+		    "mask: 0x%02x 0x%08x/0x%04x -> 0x%08x/0x%04x\n",
+		    id->proto,
+		    id->src_ip, id->src_port,
+		    id->dst_ip, id->dst_port);
+
+		printf("BKT Prot ___Source IP/port____ "
+		    "____Dest. IP/port____ "
+		    "Tot_pkt/bytes Pkt/Byte Drp\n");
+	} else {
+		char buf[255];
+		printf("\n        mask: proto: 0x%02x, flow_id: 0x%08x,  ",
+		    id->proto, id->flow_id6);
+		inet_ntop(AF_INET6, &(id->src_ip6), buf, sizeof(buf));
+		printf("%s/0x%04x -> ", buf, id->src_port);
+		inet_ntop(AF_INET6, &(id->dst_ip6), buf, sizeof(buf));
+		printf("%s/0x%04x\n", buf, id->dst_port);
+
+		printf("BKT ___Prot___ _flow-id_ "
+		    "______________Source IPv6/port_______________ "
+		    "_______________Dest. IPv6/port_______________ "
+		    "Tot_pkt/bytes Pkt/Byte Drp\n");
+	}
+}
+
+static void
+list_flow(struct dn_flow *ni)
 {
-	int l;
-	int index_printed, indexes = 0;
 	char buff[255];
 	struct protoent *pe;
+	struct in_addr ina;
+	struct ipfw_flow_id *id = &ni->fid;
 
-	if (fs->rq_elements == 0)
-		return;
-
-	if (co.do_sort != 0)
-		qsort_r(q, fs->rq_elements, sizeof *q, NULL, sort_q);
-
-	/* Print IPv4 flows */
-	index_printed = 0;
-	for (l = 0; l < fs->rq_elements; l++) {
-		struct in_addr ina;
-
+	pe = getprotobynumber(id->proto);
 		/* XXX: Should check for IPv4 flows */
-		if (IS_IP6_FLOW_ID(&(q[l].id)))
-			continue;
-
-		if (!index_printed) {
-			index_printed = 1;
-			if (indexes > 0)	/* currently a no-op */
-				printf("\n");
-			indexes++;
-			printf("    "
-			    "mask: 0x%02x 0x%08x/0x%04x -> 0x%08x/0x%04x\n",
-			    fs->flow_mask.proto,
-			    fs->flow_mask.src_ip, fs->flow_mask.src_port,
-			    fs->flow_mask.dst_ip, fs->flow_mask.dst_port);
-
-			printf("BKT Prot ___Source IP/port____ "
-			    "____Dest. IP/port____ "
-			    "Tot_pkt/bytes Pkt/Byte Drp\n");
-		}
-
-		printf("%3d ", q[l].hash_slot);
-		pe = getprotobynumber(q[l].id.proto);
+	printf("%3u ", (ni->oid.id) & 0xff);
+	if (!IS_IP6_FLOW_ID(id)) {
 		if (pe)
 			printf("%-4s ", pe->p_name);
 		else
-			printf("%4u ", q[l].id.proto);
-		ina.s_addr = htonl(q[l].id.src_ip);
+			printf("%4u ", id->proto);
+		ina.s_addr = htonl(id->src_ip);
 		printf("%15s/%-5d ",
-		    inet_ntoa(ina), q[l].id.src_port);
-		ina.s_addr = htonl(q[l].id.dst_ip);
+		    inet_ntoa(ina), id->src_port);
+		ina.s_addr = htonl(id->dst_ip);
 		printf("%15s/%-5d ",
-		    inet_ntoa(ina), q[l].id.dst_port);
-		printf("%4llu %8llu %2u %4u %3u\n",
-		    align_uint64(&q[l].tot_pkts),
-		    align_uint64(&q[l].tot_bytes),
-		    q[l].len, q[l].len_bytes, q[l].drops);
-		if (co.verbose)
-			printf("   S %20llu  F %20llu\n",
-			    align_uint64(&q[l].S), align_uint64(&q[l].F));
-	}
-
-	/* Print IPv6 flows */
-	index_printed = 0;
-	for (l = 0; l < fs->rq_elements; l++) {
-		if (!IS_IP6_FLOW_ID(&(q[l].id)))
-			continue;
-
-		if (!index_printed) {
-			index_printed = 1;
-			if (indexes > 0)
-				printf("\n");
-			indexes++;
-			printf("\n        mask: proto: 0x%02x, flow_id: 0x%08x,  ",
-			    fs->flow_mask.proto, fs->flow_mask.flow_id6);
-			inet_ntop(AF_INET6, &(fs->flow_mask.src_ip6),
-			    buff, sizeof(buff));
-			printf("%s/0x%04x -> ", buff, fs->flow_mask.src_port);
-			inet_ntop( AF_INET6, &(fs->flow_mask.dst_ip6),
-			    buff, sizeof(buff) );
-			printf("%s/0x%04x\n", buff, fs->flow_mask.dst_port);
-
-			printf("BKT ___Prot___ _flow-id_ "
-			    "______________Source IPv6/port_______________ "
-			    "_______________Dest. IPv6/port_______________ "
-			    "Tot_pkt/bytes Pkt/Byte Drp\n");
-		}
-		printf("%3d ", q[l].hash_slot);
-		pe = getprotobynumber(q[l].id.proto);
+		    inet_ntoa(ina), id->dst_port);
+	} else {
+		/* Print IPv6 flows */
 		if (pe != NULL)
 			printf("%9s ", pe->p_name);
 		else
-			printf("%9u ", q[l].id.proto);
-		printf("%7d  %39s/%-5d ", q[l].id.flow_id6,
-		    inet_ntop(AF_INET6, &(q[l].id.src_ip6), buff, sizeof(buff)),
-		    q[l].id.src_port);
+			printf("%9u ", id->proto);
+		printf("%7d  %39s/%-5d ", id->flow_id6,
+		    inet_ntop(AF_INET6, &(id->src_ip6), buff, sizeof(buff)),
+		    id->src_port);
 		printf(" %39s/%-5d ",
-		    inet_ntop(AF_INET6, &(q[l].id.dst_ip6), buff, sizeof(buff)),
-		    q[l].id.dst_port);
-		printf(" %4llu %8llu %2u %4u %3u\n",
-		    align_uint64(&q[l].tot_pkts),
-		    align_uint64(&q[l].tot_bytes),
-		    q[l].len, q[l].len_bytes, q[l].drops);
-		if (co.verbose)
-			printf("   S %20llu  F %20llu\n",
-			    align_uint64(&q[l].S),
-			    align_uint64(&q[l].F));
+		    inet_ntop(AF_INET6, &(id->dst_ip6), buff, sizeof(buff)),
+		    id->dst_port);
 	}
+	printf("%4llu %8llu %2u %4u %3u\n",
+	    align_uint64(&ni->tot_pkts),
+	    align_uint64(&ni->tot_bytes),
+	    ni->length, ni->len_bytes, ni->drops);
 }
 
 static void
-print_flowset_parms(struct dn_flow_set *fs, char *prefix)
+print_flowset_parms(struct dn_fs *fs, char *prefix)
 {
 	int l;
 	char qs[30];
@@ -226,7 +217,7 @@ print_flowset_parms(struct dn_flow_set *
 	char red[90];	/* Display RED parameters */
 
 	l = fs->qsize;
-	if (fs->flags_fs & DN_QSIZE_IS_BYTES) {
+	if (fs->flags & DN_QSIZE_BYTES) {
 		if (l >= 8192)
 			sprintf(qs, "%d KB", l / 1024);
 		else
@@ -237,23 +228,34 @@ print_flowset_parms(struct dn_flow_set *
 		sprintf(plr, "plr %f", 1.0 * fs->plr / (double)(0x7fffffff));
 	else
 		plr[0] = '\0';
-	if (fs->flags_fs & DN_IS_RED)	/* RED parameters */
+
+	if (fs->flags & DN_IS_RED)	/* RED parameters */
 		sprintf(red,
 		    "\n\t %cRED w_q %f min_th %d max_th %d max_p %f",
-		    (fs->flags_fs & DN_IS_GENTLE_RED) ? 'G' : ' ',
+		    (fs->flags & DN_IS_GENTLE_RED) ? 'G' : ' ',
 		    1.0 * fs->w_q / (double)(1 << SCALE_RED),
-		    SCALE_VAL(fs->min_th),
-		    SCALE_VAL(fs->max_th),
+		    fs->min_th,
+		    fs->max_th,
 		    1.0 * fs->max_p / (double)(1 << SCALE_RED));
 	else
 		sprintf(red, "droptail");
 
-	printf("%s %s%s %d queues (%d buckets) %s\n",
-	    prefix, qs, plr, fs->rq_elements, fs->rq_size, red);
+	if (prefix[0]) {
+	    printf("%s %s%s %d queues (%d buckets) %s\n",
+		prefix, qs, plr, fs->oid.id, fs->buckets, red);
+	    prefix[0] = '\0';
+	} else {
+	    printf("q%05d %s%s %d flows (%d buckets) sched %d "
+			"weight %d lmax %d pri %d %s\n",
+		fs->fs_nr, qs, plr, fs->oid.id, fs->buckets,
+		fs->sched_nr, fs->par[0], fs->par[1], fs->par[2], red);
+	    if (fs->flags & DN_HAVE_MASK)
+		print_mask(&fs->flow_mask);
+	}
 }
 
 static void
-print_extra_delay_parms(struct dn_pipe *p)
+print_extra_delay_parms(struct dn_profile *p)
 {
 	double loss;
 	if (p->samples_no <= 0)
@@ -265,105 +267,126 @@ print_extra_delay_parms(struct dn_pipe *
 		p->name, loss, p->samples_no);
 }
 
-void
-ipfw_list_pipes(void *data, uint nbytes, int ac, char *av[])
+static void
+flush_buf(char *buf)
 {
-	int rulenum;
-	void *next = data;
-	struct dn_pipe *p = (struct dn_pipe *) data;
-	struct dn_flow_set *fs;
-	struct dn_flow_queue *q;
-	int l;
-
-	if (ac > 0)
-		rulenum = strtoul(*av++, NULL, 10);
-	else
-		rulenum = 0;
-	for (; nbytes >= sizeof *p; p = (struct dn_pipe *)next) {
-		double b = p->bandwidth;
-		char buf[30];
-		char prefix[80];
-		char burst[5 + 7];
-
-		if (SLIST_NEXT(p, next) != (struct dn_pipe *)DN_IS_PIPE)
-			break;	/* done with pipes, now queues */
-
-		/*
-		 * compute length, as pipe have variable size
-		 */
-		l = sizeof(*p) + p->fs.rq_elements * sizeof(*q);
-		next = (char *)p + l;
-		nbytes -= l;
-
-		if ((rulenum != 0 && rulenum != p->pipe_nr) || co.do_pipe == 2)
-			continue;
-
-		/*
-		 * Print rate (or clocking interface)
-		 */
-		if (p->if_name[0] != '\0')
-			sprintf(buf, "%s", p->if_name);
-		else if (b == 0)
-			sprintf(buf, "unlimited");
-		else if (b >= 1000000)
-			sprintf(buf, "%7.3f Mbit/s", b/1000000);
-		else if (b >= 1000)
-			sprintf(buf, "%7.3f Kbit/s", b/1000);
-		else
-			sprintf(buf, "%7.3f bit/s ", b);
-
-		sprintf(prefix, "%05d: %s %4d ms ",
-		    p->pipe_nr, buf, p->delay);
-
-		print_flowset_parms(&(p->fs), prefix);
-
-		if (humanize_number(burst, sizeof(burst), p->burst,
-		    "Byte", HN_AUTOSCALE, 0) < 0 || co.verbose)
-			printf("\t burst: %ju Byte\n", p->burst);
-		else
-			printf("\t burst: %s\n", burst);
-
-		print_extra_delay_parms(p);
-
-		q = (struct dn_flow_queue *)(p+1);
-		list_queues(&(p->fs), q);
-	}
-	for (fs = next; nbytes >= sizeof *fs; fs = next) {
-		char prefix[80];
+	if (buf[0])
+		printf("%s\n", buf);
+	buf[0] = '\0';
+}
+	
+/*
+ * generic list routine. We expect objects in a specific order, i.e.
+ * PIPES AND SCHEDULERS:
+ *	link; scheduler; internal flowset if any; instances
+ * we can tell a pipe from the number.
+ *
+ * FLOWSETS:
+ *	flowset; queues;
+ * link i (int queue); scheduler i; si(i) { flowsets() : queues }
+ */
+static void
+list_pipes(struct dn_id *oid, struct dn_id *end)
+{
+    char buf[160];	/* pending buffer */
+    buf[0] = '\0';
 
-		if (SLIST_NEXT(fs, next) != (struct dn_flow_set *)DN_IS_QUEUE)
-			break;
-		l = sizeof(*fs) + fs->rq_elements * sizeof(*q);
-		next = (char *)fs + l;
-		nbytes -= l;
+    for (; oid != end; oid = O_NEXT(oid, oid->len)) {
+	if (oid->len < sizeof(*oid))
+		errx(1, "invalid oid len %d\n", oid->len);
+
+	switch (oid->type) {
+	default:
+	    flush_buf(buf);
+	    printf("unrecognized object %d size %d\n", oid->type, oid->len);
+	    break;
+	case DN_TEXT: /* list of attached flowsets */
+	    {
+		int i, l;
+		struct {
+			struct dn_id id;
+			uint32_t p[0];
+		} *d = (void *)oid;
+		l = (oid->len - sizeof(*oid))/sizeof(d->p[0]);
+		if (l == 0)
+		    break;
+		printf("   Children flowsets: ");
+		for (i = 0; i < l; i++)
+			printf("%u ", d->p[i]);
+		printf("\n");
+		break;
+	    }
+	case DN_CMD_GET:
+	    if (co.verbose)
+		printf("answer for cmd %d, len %d\n", oid->type, oid->id);
+	    break;
+	case DN_SCH: {
+	    struct dn_sch *s = (struct dn_sch *)oid;
+	    flush_buf(buf);
+	    printf(" sched %d type %s flags 0x%x %d buckets %d active\n",
+			s->sched_nr,
+			s->name, s->flags, s->buckets, s->oid.id);
+	    if (s->flags & DN_HAVE_MASK)
+		print_mask(&s->sched_mask);
+	    }
+	    break;
 
-		if (rulenum != 0 && ((rulenum != fs->fs_nr && co.do_pipe == 2) ||
-		    (rulenum != fs->parent_nr && co.do_pipe == 1))) {
-			continue;
-		}
+	case DN_FLOW:
+	    list_flow((struct dn_flow *)oid);
+	    break;
+
+	case DN_LINK: {
+	    struct dn_link *p = (struct dn_link *)oid;
+	    double b = p->bandwidth;
+	    char bwbuf[30];
+	    char burst[5 + 7];
+
+	    /* This starts a new object so flush buffer */
+	    flush_buf(buf);
+	    /* data rate */
+	    if (b == 0)
+		sprintf(bwbuf, "unlimited     ");
+	    else if (b >= 1000000)
+		sprintf(bwbuf, "%7.3f Mbit/s", b/1000000);
+	    else if (b >= 1000)
+		sprintf(bwbuf, "%7.3f Kbit/s", b/1000);
+	    else
+		sprintf(bwbuf, "%7.3f bit/s ", b);
+
+	    if (humanize_number(burst, sizeof(burst), p->burst,
+		    "", HN_AUTOSCALE, 0) < 0 || co.verbose)
+		sprintf(burst, "%d", (int)p->burst);
+	    sprintf(buf, "%05d: %s %4d ms burst %s",
+		p->link_nr % DN_MAX_ID, bwbuf, p->delay, burst);
+	    }
+	    break;
 
-		q = (struct dn_flow_queue *)(fs+1);
-		sprintf(prefix, "q%05d: weight %d pipe %d ",
-		    fs->fs_nr, fs->weight, fs->parent_nr);
-		print_flowset_parms(fs, prefix);
-		list_queues(fs, q);
+	case DN_FS:
+	    print_flowset_parms((struct dn_fs *)oid, buf);
+	    break;
+	case DN_PROFILE:
+	    flush_buf(buf);
+	    print_extra_delay_parms((struct dn_profile *)oid);
 	}
+	flush_buf(buf); // XXX does it really go here ?
+    }
 }
 
 /*
- * Delete pipe or queue i
+ * Delete pipe, queue or scheduler i
  */
 int
-ipfw_delete_pipe(int pipe_or_queue, int i)
+ipfw_delete_pipe(int do_pipe, int i)
 {
-	struct dn_pipe p;
-
-	memset(&p, 0, sizeof p);
-	if (pipe_or_queue == 1)
-		p.pipe_nr = i;		/* pipe */
-	else
-		p.fs.fs_nr = i;		/* queue */
-	i = do_cmd(IP_DUMMYNET_DEL, &p, sizeof p);
+	struct {
+		struct dn_id oid;
+		uintptr_t a[1];	/* add more if we want a list */
+	} cmd;
+	oid_fill((void *)&cmd, sizeof(cmd), DN_CMD_DELETE, DN_API_VERSION);
+	cmd.oid.subtype = (do_pipe == 1) ? DN_LINK :
+		( (do_pipe == 2) ? DN_FS : DN_SCH);
+	cmd.a[0] = i;
+	i = do_cmd(IP_DUMMYNET3, &cmd, cmd.oid.len);
 	if (i) {
 		i = 1;
 		warn("rule %u: setsockopt(IP_DUMMYNET_DEL)", i);
@@ -400,7 +423,7 @@ ipfw_delete_pipe(int pipe_or_queue, int 
  * The empirical curve may have both vertical and horizontal lines.
  * Vertical lines represent constant delay for a range of
  * probabilities; horizontal lines correspond to a discontinuty
- * in the delay distribution: the pipe will use the largest delay
+ * in the delay distribution: the link will use the largest delay
  * for a given probability.
  * 
  * To pass the curve to dummynet, we must store the parameters
@@ -490,9 +513,12 @@ static void
 read_bandwidth(char *arg, int *bandwidth, char *if_name, int namelen)
 {
 	if (*bandwidth != -1)
-		warn("duplicate token, override bandwidth value!");
+		warnx("duplicate token, override bandwidth value!");
 
 	if (arg[0] >= 'a' && arg[0] <= 'z') {
+		if (!if_name) {
+			errx(1, "no if support");
+		}
 		if (namelen >= IFNAMSIZ)
 			warn("interface name truncated");
 		namelen--;
@@ -521,7 +547,8 @@ read_bandwidth(char *arg, int *bandwidth
 			errx(EX_DATAERR, "bandwidth too large");
 
 		*bandwidth = bw;
-		if_name[0] = '\0';
+		if (if_name)
+			if_name[0] = '\0';
 	}
 }
 
@@ -551,7 +578,8 @@ compare_points(const void *vp1, const vo
 #define ED_EFMT(s) EX_DATAERR,"error in %s at line %d: "#s,filename,lineno
 
 static void
-load_extra_delays(const char *filename, struct dn_pipe *p)
+load_extra_delays(const char *filename, struct dn_profile *p,
+	struct dn_link *link)
 {
 	char    line[ED_MAX_LINE_LEN];
 	FILE    *f;
@@ -566,6 +594,9 @@ load_extra_delays(const char *filename, 
 	struct point    points[ED_MAX_SAMPLES_NO];
 	int     points_no = 0;
 
+	/* XXX link never NULL? */
+	p->link_nr = link->link_nr;
+
 	profile_name[0] = '\0';
 	f = fopen(filename, "r");
 	if (f == NULL)
@@ -606,7 +637,8 @@ load_extra_delays(const char *filename, 
 				ED_MAX_SAMPLES_NO);
 		    do_points = 0;
 		} else if (!strcasecmp(name, ED_TOK_BW)) {
-		    read_bandwidth(arg, &p->bandwidth, p->if_name, sizeof(p->if_name));
+		    char buf[IFNAMSIZ];
+		    read_bandwidth(arg, &link->bandwidth, buf, sizeof(buf));
 		} else if (!strcasecmp(name, ED_TOK_LOSS)) {
 		    if (loss != -1.0)
 			errx(ED_EFMT("duplicated token: %s"), name);
@@ -676,17 +708,17 @@ load_extra_delays(const char *filename, 
 	    double y2 = points[i+1].prob * samples;
 	    double x2 = points[i+1].delay;
 
-	    int index = y1;
+	    int ix = y1;
 	    int stop = y2;
 
 	    if (x1 == x2) {
-		for (; indexsamples[index] = x1;
+		for (; ixsamples[ix] = x1;
 	    } else {
 		double m = (y2-y1)/(x2-x1);
 		double c = y1 - m*x1;
-		for (; indexsamples[index] = (index - c)/m;
+		for (; ixsamples[ix] = (ix - c)/m;
 	    }
 	}
 	p->samples_no = samples;
@@ -694,27 +726,120 @@ load_extra_delays(const char *filename, 
 	strncpy(p->name, profile_name, sizeof(p->name));
 }
 
+/*
+ * configuration of pipes, schedulers, flowsets.
+ * When we configure a new scheduler, an empty pipe is created, so:
+ * 
+ * do_pipe = 1 -> "pipe N config ..." only for backward compatibility
+ *	sched N+Delta type fifo sched_mask ...
+ *	pipe N+Delta 
+ *	flowset N+Delta pipe N+Delta (no parameters)
+ *	sched N type wf2q+ sched_mask ...
+ *	pipe N 
+ *
+ * do_pipe = 2 -> flowset N config
+ *	flowset N parameters
+ *
+ * do_pipe = 3 -> sched N config
+ *	sched N parameters (default no pipe)
+ *	optional Pipe N config ...
+ * pipe ==>
+ */
 void
 ipfw_config_pipe(int ac, char **av)
 {
-	int samples[ED_MAX_SAMPLES_NO];
-	struct dn_pipe p;
-	int i;
+	int i, j;
 	char *end;
 	void *par = NULL;
-
-	memset(&p, 0, sizeof p);
-	p.bandwidth = -1;
+	struct dn_id *buf, *base;
+	struct dn_sch *sch = NULL;
+	struct dn_link *p = NULL;
+	struct dn_fs *fs = NULL;
+	struct dn_profile *pf = NULL;
+	struct ipfw_flow_id *mask = NULL;
+	int lmax;
+	uint32_t _foo = 0, *flags = &_foo , *buckets = &_foo;
+
+	/*
+	 * allocate space for 1 header,
+	 * 1 scheduler, 1 link, 1 flowset, 1 profile
+	 */
+	lmax = sizeof(struct dn_id);	/* command header */
+	lmax += sizeof(struct dn_sch) + sizeof(struct dn_link) +
+		sizeof(struct dn_fs) + sizeof(struct dn_profile);
 
 	av++; ac--;
 	/* Pipe number */
 	if (ac && isdigit(**av)) {
 		i = atoi(*av); av++; ac--;
-		if (co.do_pipe == 1)
-			p.pipe_nr = i;
-		else
-			p.fs.fs_nr = i;
+	} else
+		i = -1;
+	if (i <= 0)
+		errx(EX_USAGE, "need a pipe/flowset/sched number");
+	base = buf = safe_calloc(1, lmax);
+	/* all commands start with a 'CONFIGURE' and a version */
+	o_next(&buf, sizeof(struct dn_id), DN_CMD_CONFIG);
+	base->id = DN_API_VERSION;
+
+	switch (co.do_pipe) {
+	case 1: /* "pipe N config ..." */
+		/* Allocate space for the WF2Q+ scheduler, its link
+		 * and the FIFO flowset. Set the number, but leave
+		 * the scheduler subtype and other parameters to 0
+		 * so the kernel will use appropriate defaults.
+		 * XXX todo: add a flag to record if a parameter
+		 * is actually configured.
+		 * If we do a 'pipe config' mask -> sched_mask.
+		 * The FIFO scheduler and link are derived from the
+		 * WF2Q+ one in the kernel.
+		 */
+		sch = o_next(&buf, sizeof(*sch), DN_SCH);
+		p = o_next(&buf, sizeof(*p), DN_LINK);
+		fs = o_next(&buf, sizeof(*fs), DN_FS);
+
+		sch->sched_nr = i;
+		sch->oid.subtype = 0;	/* defaults to WF2Q+ */
+		mask = &sch->sched_mask;
+		flags = &sch->flags;
+		buckets = &sch->buckets;
+		*flags |= DN_PIPE_CMD;
+
+		p->link_nr = i;
+
+		/* This flowset is only for the FIFO scheduler */
+		fs->fs_nr = i + 2*DN_MAX_ID;
+		fs->sched_nr = i + DN_MAX_ID;
+		break;
+
+	case 2: /* "queue N config ... " */
+		fs = o_next(&buf, sizeof(*fs), DN_FS);
+		fs->fs_nr = i;
+		mask = &fs->flow_mask;
+		flags = &fs->flags;
+		buckets = &fs->buckets;
+		break;
+
+	case 3: /* "sched N config ..." */
+		sch = o_next(&buf, sizeof(*sch), DN_SCH);
+		fs = o_next(&buf, sizeof(*fs), DN_FS);
+		sch->sched_nr = i;
+		mask = &sch->sched_mask;
+		flags = &sch->flags;
+		buckets = &sch->buckets;
+		/* fs is used only with !MULTIQUEUE schedulers */
+		fs->fs_nr = i + DN_MAX_ID;
+		fs->sched_nr = i;
+		break;
 	}
+	/* set to -1 those fields for which we want to reuse existing
+	 * values from the kernel.
+	 * Also, *_nr and subtype = 0 mean reuse the value from the kernel.
+	 * XXX todo: support reuse of the mask.
+	 */
+	if (p)
+		p->bandwidth = -1;
+	for (j = 0; j < sizeof(fs->par)/sizeof(fs->par[0]); j++)
+		fs->par[j] = -1;
 	while (ac > 0) {
 		double d;
 		int tok = match_token(dummynet_params, *av);
@@ -722,41 +847,48 @@ ipfw_config_pipe(int ac, char **av)
 
 		switch(tok) {
 		case TOK_NOERROR:
-			p.fs.flags_fs |= DN_NOERROR;
+			NEED(fs, "noerror is only for pipes");
+			fs->flags |= DN_NOERROR;
 			break;
 
 		case TOK_PLR:
+			NEED(fs, "plr is only for pipes");
 			NEED1("plr needs argument 0..1\n");
 			d = strtod(av[0], NULL);
 			if (d > 1)
 				d = 1;
 			else if (d < 0)
 				d = 0;
-			p.fs.plr = (int)(d*0x7fffffff);
+			fs->plr = (int)(d*0x7fffffff);
 			ac--; av++;
 			break;
 
 		case TOK_QUEUE:
+			NEED(fs, "queue is only for pipes or flowsets");
 			NEED1("queue needs queue size\n");
 			end = NULL;
-			p.fs.qsize = strtoul(av[0], &end, 0);
+			fs->qsize = strtoul(av[0], &end, 0);
 			if (*end == 'K' || *end == 'k') {
-				p.fs.flags_fs |= DN_QSIZE_IS_BYTES;
-				p.fs.qsize *= 1024;
+				fs->flags |= DN_QSIZE_BYTES;
+				fs->qsize *= 1024;
 			} else if (*end == 'B' ||
 			    _substrcmp2(end, "by", "bytes") == 0) {
-				p.fs.flags_fs |= DN_QSIZE_IS_BYTES;
+				fs->flags |= DN_QSIZE_BYTES;
 			}
 			ac--; av++;
 			break;
 
 		case TOK_BUCKETS:
+			NEED(fs, "buckets is only for pipes or flowsets");
 			NEED1("buckets needs argument\n");
-			p.fs.rq_size = strtoul(av[0], NULL, 0);
+			*buckets = strtoul(av[0], NULL, 0);
 			ac--; av++;
 			break;
 
+		case TOK_FLOW_MASK:
+		case TOK_SCHED_MASK:
 		case TOK_MASK:
+			NEED(mask, "tok_mask");
 			NEED1("mask needs mask specifier\n");
 			/*
 			 * per-flow queue, mask is dst_ip, dst_port,
@@ -764,7 +896,7 @@ ipfw_config_pipe(int ac, char **av)
 			 */
 			par = NULL;
 
-			bzero(&p.fs.flow_mask, sizeof(p.fs.flow_mask));
+			bzero(mask, sizeof(*mask));
 			end = NULL;
 
 			while (ac >= 1) {
@@ -781,43 +913,48 @@ ipfw_config_pipe(int ac, char **av)
 				    /*
 				     * special case, all bits significant
 				     */
-				    p.fs.flow_mask.dst_ip = ~0;
-				    p.fs.flow_mask.src_ip = ~0;
-				    p.fs.flow_mask.dst_port = ~0;
-				    p.fs.flow_mask.src_port = ~0;
-				    p.fs.flow_mask.proto = ~0;
-				    n2mask(&(p.fs.flow_mask.dst_ip6), 128);
-				    n2mask(&(p.fs.flow_mask.src_ip6), 128);
-				    p.fs.flow_mask.flow_id6 = ~0;
-				    p.fs.flags_fs |= DN_HAVE_FLOW_MASK;
+				    mask->dst_ip = ~0;
+				    mask->src_ip = ~0;
+				    mask->dst_port = ~0;
+				    mask->src_port = ~0;
+				    mask->proto = ~0;
+				    n2mask(&mask->dst_ip6, 128);
+				    n2mask(&mask->src_ip6, 128);
+				    mask->flow_id6 = ~0;
+				    *flags |= DN_HAVE_MASK;
 				    goto end_mask;
 
 			    case TOK_DSTIP:
-				    p32 = &p.fs.flow_mask.dst_ip;
+				    mask->addr_type = 4;
+				    p32 = &mask->dst_ip;
 				    break;
 
 			    case TOK_SRCIP:
-				    p32 = &p.fs.flow_mask.src_ip;
+				    mask->addr_type = 4;
+				    p32 = &mask->src_ip;
 				    break;
 
 			    case TOK_DSTIP6:
-				    pa6 = &(p.fs.flow_mask.dst_ip6);
+				    mask->addr_type = 6;
+				    pa6 = &mask->dst_ip6;
 				    break;
 			    
 			    case TOK_SRCIP6:
-				    pa6 = &(p.fs.flow_mask.src_ip6);
+				    mask->addr_type = 6;
+				    pa6 = &mask->src_ip6;
 				    break;
 
 			    case TOK_FLOWID:
-				    p20 = &p.fs.flow_mask.flow_id6;
+				    mask->addr_type = 6;
+				    p20 = &mask->flow_id6;
 				    break;
 
 			    case TOK_DSTPORT:
-				    p16 = &p.fs.flow_mask.dst_port;
+				    p16 = &mask->dst_port;
 				    break;
 
 			    case TOK_SRCPORT:
-				    p16 = &p.fs.flow_mask.src_port;
+				    p16 = &mask->src_port;
 				    break;
 
 			    case TOK_PROTO:
@@ -857,10 +994,10 @@ ipfw_config_pipe(int ac, char **av)
 				    if (a > 0xFF)
 					    errx(EX_DATAERR,
 						"proto mask must be 8 bit");
-				    p.fs.flow_mask.proto = (uint8_t)a;
+				    fs->flow_mask.proto = (uint8_t)a;
 			    }
 			    if (a != 0)
-				    p.fs.flags_fs |= DN_HAVE_FLOW_MASK;
+				    *flags |= DN_HAVE_MASK;
 			    ac--; av++;
 			} /* end while, config masks */
 end_mask:
@@ -869,9 +1006,9 @@ end_mask:
 		case TOK_RED:
 		case TOK_GRED:
 			NEED1("red/gred needs w_q/min_th/max_th/max_p\n");
-			p.fs.flags_fs |= DN_IS_RED;
+			fs->flags |= DN_IS_RED;
 			if (tok == TOK_GRED)
-				p.fs.flags_fs |= DN_IS_GENTLE_RED;
+				fs->flags |= DN_IS_GENTLE_RED;
 			/*
 			 * the format for parameters is w_q/min_th/max_th/max_p
 			 */
@@ -879,82 +1016,108 @@ end_mask:
 			    double w_q = strtod(end, NULL);
 			    if (w_q > 1 || w_q <= 0)
 				errx(EX_DATAERR, "0 < w_q <= 1");
-			    p.fs.w_q = (int) (w_q * (1 << SCALE_RED));
+			    fs->w_q = (int) (w_q * (1 << SCALE_RED));
 			}
 			if ((end = strsep(&av[0], "/"))) {
-			    p.fs.min_th = strtoul(end, &end, 0);
+			    fs->min_th = strtoul(end, &end, 0);
 			    if (*end == 'K' || *end == 'k')
-				p.fs.min_th *= 1024;
+				fs->min_th *= 1024;
 			}
 			if ((end = strsep(&av[0], "/"))) {
-			    p.fs.max_th = strtoul(end, &end, 0);
+			    fs->max_th = strtoul(end, &end, 0);
 			    if (*end == 'K' || *end == 'k')
-				p.fs.max_th *= 1024;
+				fs->max_th *= 1024;
 			}
 			if ((end = strsep(&av[0], "/"))) {
 			    double max_p = strtod(end, NULL);
 			    if (max_p > 1 || max_p <= 0)
 				errx(EX_DATAERR, "0 < max_p <= 1");
-			    p.fs.max_p = (int)(max_p * (1 << SCALE_RED));
+			    fs->max_p = (int)(max_p * (1 << SCALE_RED));
 			}
 			ac--; av++;
 			break;
 
 		case TOK_DROPTAIL:
-			p.fs.flags_fs &= ~(DN_IS_RED|DN_IS_GENTLE_RED);
+			NEED(fs, "droptail is only for flowsets");
+			fs->flags &= ~(DN_IS_RED|DN_IS_GENTLE_RED);
 			break;
 
 		case TOK_BW:
+			NEED(p, "bw is only for links");
 			NEED1("bw needs bandwidth or interface\n");
-			if (co.do_pipe != 1)
-			    errx(EX_DATAERR, "bandwidth only valid for pipes");
-			read_bandwidth(av[0], &p.bandwidth, p.if_name, sizeof(p.if_name));
+			read_bandwidth(av[0], &p->bandwidth, NULL, 0);
 			ac--; av++;
 			break;
 
 		case TOK_DELAY:
-			if (co.do_pipe != 1)
-				errx(EX_DATAERR, "delay only valid for pipes");
+			NEED(p, "delay is only for links");
 			NEED1("delay needs argument 0..10000ms\n");
-			p.delay = strtoul(av[0], NULL, 0);
+			p->delay = strtoul(av[0], NULL, 0);
+			ac--; av++;
+			break;
+
+		case TOK_TYPE: {
+			int l;
+			NEED(sch, "type is only for schedulers");
+			NEED1("type needs a string");
+			l = strlen(av[0]);
+			if (l == 0 || l > 15)
+				errx(1, "type %s too long\n", av[0]);
+			strcpy(sch->name, av[0]);
+			sch->oid.subtype = 0; /* use string */
 			ac--; av++;
 			break;
+		    }
 
 		case TOK_WEIGHT:
-			if (co.do_pipe == 1)
-				errx(EX_DATAERR,"weight only valid for queues");
-			NEED1("weight needs argument 0..100\n");
-			p.fs.weight = strtoul(av[0], &end, 0);
+			NEED(fs, "weight is only for flowsets");
+			NEED1("weight needs argument\n");

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 17:50:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A4B15106564A;
	Tue,  2 Mar 2010 17:50:39 +0000 (UTC)
	(envelope-from bright@elvis.mu.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by mx1.freebsd.org (Postfix) with ESMTP id 925878FC1E;
	Tue,  2 Mar 2010 17:50:39 +0000 (UTC)
Received: by elvis.mu.org (Postfix, from userid 1192)
	id 48A041A3CC6; Tue,  2 Mar 2010 09:50:34 -0800 (PST)
Date: Tue, 2 Mar 2010 09:50:34 -0800
From: Alfred Perlstein 
To: Niclas Zeising 
Message-ID: <20100302175034.GR55658@elvis.mu.org>
References: <201003020658.o226wwB2051156@svn.freebsd.org>
	<4B8CE954.3080503@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4B8CE954.3080503@gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 17:50:39 -0000

* Niclas Zeising  [100302 02:52] wrote:
> On 2010-03-02 07:58, Alfred Perlstein wrote:
> >Author: alfred
> >Date: Tue Mar  2 06:58:58 2010
> >New Revision: 204552
> >URL: http://svn.freebsd.org/changeset/base/204552
> >
> >Log:
> >   Merge projects/enhanced_coredumps (r204346) into HEAD:
> >
> >     Enhanced process coredump routines.
> >
> >     This brings in the following features:
> >     1) Limit number of cores per process via the %I coredump formatter.
> >     Example:
> >       if corefilename is set to %N.%I.core AND num_cores = 3, then
> >       if a process "rpd" cores, then the corefile will be named
> >       "rpd.0.core", however if it cores again, then the kernel will
> >       generate "rpd.1.core" until we hit the limit of "num_cores".
> >
> >       this is useful to get several corefiles, but also prevent filling
> >       the machine with corefiles.
> >
> >     2) Encode machine hostname in core dump name via %H.
> >
> >     3) Compress coredumps, useful for embedded platforms with limited 
> >     space.
> >       A sysctl kern.compress_user_cores is made available if turned on.
> >
> >       To enable compressed coredumps, the following config options need 
> >       to be set:
> >       options COMPRESS_USER_CORES
> >       device zlib   # brings in the zlib requirements.
> >       device gzio   # brings in the kernel vnode gzip output module.
> >
> >     4) Eventhandlers are fired to indicate coredumps in progress.
> >
> >     5) The imgact sv_coredump routine has grown a flag to pass in more
> >     state, currently this is used only for passing a flag down to compress
> >     the coredump or not.
> >
> >     Note that the gzio facility can be used for generic output of gzip'd
> >     streams via vnodes.
> >
> >   Obtained from: Juniper Networks
> >   Reviewed by: kan
> >
> 
> [SNIP diff]
> 
> Nice work!
> Can you please document the gernel options and devices in NOTES and 
> where to change the core filename format somewhere so it doesn't get lost.
> 
> Thanks!
> //Niclas

on it.

-- 
- Alfred Perlstein
.- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250
.- FreeBSD committer

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 17:50:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 64D4B106576C;
	Tue,  2 Mar 2010 17:50:45 +0000 (UTC)
	(envelope-from bright@elvis.mu.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by mx1.freebsd.org (Postfix) with ESMTP id 739E88FC1F;
	Tue,  2 Mar 2010 17:50:45 +0000 (UTC)
Received: by elvis.mu.org (Postfix, from userid 1192)
	id 5BAF21A3CCB; Tue,  2 Mar 2010 09:50:40 -0800 (PST)
Date: Tue, 2 Mar 2010 09:50:40 -0800
From: Alfred Perlstein 
To: John Baldwin 
Message-ID: <20100302175040.GS55658@elvis.mu.org>
References: <201003020658.o226wwB2051156@svn.freebsd.org>
	<201003020756.48609.jhb@freebsd.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201003020756.48609.jhb@freebsd.org>
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 17:50:46 -0000

* John Baldwin  [100302 05:30] wrote:
> On Tuesday 02 March 2010 1:58:58 am Alfred Perlstein wrote:
> > Author: alfred
> > Date: Tue Mar  2 06:58:58 2010
> > New Revision: 204552
> > URL: http://svn.freebsd.org/changeset/base/204552
> > 
> > Log:
> >   Merge projects/enhanced_coredumps (r204346) into HEAD:
> >   
> >     Enhanced process coredump routines.
> >   
> >     This brings in the following features:
> >     1) Limit number of cores per process via the %I coredump formatter.
> >     Example:
> >       if corefilename is set to %N.%I.core AND num_cores = 3, then
> >       if a process "rpd" cores, then the corefile will be named
> >       "rpd.0.core", however if it cores again, then the kernel will
> >       generate "rpd.1.core" until we hit the limit of "num_cores".
> >   
> >       this is useful to get several corefiles, but also prevent filling
> >       the machine with corefiles.
> >   
> >     2) Encode machine hostname in core dump name via %H.
> >   
> >     3) Compress coredumps, useful for embedded platforms with limited space.
> >       A sysctl kern.compress_user_cores is made available if turned on.
> >   
> >       To enable compressed coredumps, the following config options need to be set:
> >       options COMPRESS_USER_CORES
> >       device zlib   # brings in the zlib requirements.
> >       device gzio   # brings in the kernel vnode gzip output module.
> >   
> >     4) Eventhandlers are fired to indicate coredumps in progress.
> >   
> >     5) The imgact sv_coredump routine has grown a flag to pass in more
> >     state, currently this is used only for passing a flag down to compress
> >     the coredump or not.
> >   
> >     Note that the gzio facility can be used for generic output of gzip'd
> >     streams via vnodes.
> >   
> >   Obtained from: Juniper Networks
> >   Reviewed by: kan
> > 
> > Added:
> >   head/sys/kern/kern_gzio.c   (contents, props changed)
> >   head/sys/net/zutil.h   (contents, props changed)
> > Modified:
> >   head/sys/conf/files
> >   head/sys/conf/options
> >   head/sys/kern/imgact_elf.c
> >   head/sys/kern/kern_sig.c
> >   head/sys/net/zlib.h
> >   head/sys/sys/eventhandler.h
> >   head/sys/sys/imgact.h
> >   head/sys/sys/imgact_aout.h
> >   head/sys/sys/imgact_elf.h
> >   head/sys/sys/sysent.h
> > 
> > Modified: head/sys/conf/files
> > ==============================================================================
> > --- head/sys/conf/files	Tue Mar  2 06:54:15 2010	(r204551)
> > +++ head/sys/conf/files	Tue Mar  2 06:58:58 2010	(r204552)
> > @@ -2053,6 +2053,7 @@ kern/kern_exec.c		standard
> >  kern/kern_exit.c		standard
> >  kern/kern_fail.c		standard
> >  kern/kern_fork.c		standard
> > +kern/kern_gzio.c		optional gzio
> >  kern/kern_idle.c		standard
> >  kern/kern_intr.c		standard
> >  kern/kern_jail.c		standard
> > @@ -2344,7 +2345,7 @@ net/slcompress.c		optional netgraph_vjc 
> >  net/vnet.c			optional vimage
> >  net/zlib.c			optional crypto | geom_uzip | ipsec | \
> >  					 mxge | netgraph_deflate | \
> > -					 ddb_ctf
> > +					 ddb_ctf | zlib
> >  net80211/ieee80211.c		optional wlan
> >  net80211/ieee80211_acl.c	optional wlan wlan_acl
> >  net80211/ieee80211_action.c	optional wlan
> 
> Did you consider just making net/zlib.c be included if 'gzio' was defined?
> Then you would just need to add 'device gzio'.  This would appear to be more
> consistent with the rest of the zlib-using kernel components as they all do
> that rather than requiring a separate 'device zlib' line.
> 
> -- 
> John Baldwin

testing this now.

-- 
- Alfred Perlstein
.- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250
.- FreeBSD committer

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 17:51:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2F43A1065696;
	Tue,  2 Mar 2010 17:51:05 +0000 (UTC)
	(envelope-from bright@elvis.mu.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by mx1.freebsd.org (Postfix) with ESMTP id 19A4D8FC20;
	Tue,  2 Mar 2010 17:51:05 +0000 (UTC)
Received: by elvis.mu.org (Postfix, from userid 1192)
	id 0B4191A3CCB; Tue,  2 Mar 2010 09:51:05 -0800 (PST)
Date: Tue, 2 Mar 2010 09:51:05 -0800
From: Alfred Perlstein 
To: Ed Maste 
Message-ID: <20100302175104.GT55658@elvis.mu.org>
References: <201003020658.o226wwB2051156@svn.freebsd.org>
	<20100302131143.GA85090@sandvine.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100302131143.GA85090@sandvine.com>
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 17:51:05 -0000

* Ed Maste  [100302 05:11] wrote:
> On Tue, Mar 02, 2010 at 06:58:58AM +0000, Alfred Perlstein wrote:
> 
> >     1) Limit number of cores per process via the %I coredump formatter.
> 
> >     2) Encode machine hostname in core dump name via %H.
> 
> You should update core(5) with these too.

I'm giving a core(5) a good shakeup now. :)

Should have something in the next few hours.

-- 
- Alfred Perlstein
.- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250
.- FreeBSD committer

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 18:41:21 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 42989106566B;
	Tue,  2 Mar 2010 18:41:21 +0000 (UTC)
	(envelope-from alfred@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 31D428FC1B;
	Tue,  2 Mar 2010 18:41:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22IfLZ4010735;
	Tue, 2 Mar 2010 18:41:21 GMT (envelope-from alfred@svn.freebsd.org)
Received: (from alfred@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22IfLlg010733;
	Tue, 2 Mar 2010 18:41:21 GMT (envelope-from alfred@svn.freebsd.org)
Message-Id: <201003021841.o22IfLlg010733@svn.freebsd.org>
From: Alfred Perlstein 
Date: Tue, 2 Mar 2010 18:41:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204593 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 18:41:21 -0000

Author: alfred
Date: Tue Mar  2 18:41:20 2010
New Revision: 204593
URL: http://svn.freebsd.org/changeset/base/204593

Log:
  put inclusion of net/zlib.c under "device gzio" instead of "zlib" since right
  now there is no reason to only include "zlib".
  
  Requested by: jhb

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Tue Mar  2 18:38:00 2010	(r204592)
+++ head/sys/conf/files	Tue Mar  2 18:41:20 2010	(r204593)
@@ -2345,7 +2345,7 @@ net/slcompress.c		optional netgraph_vjc 
 net/vnet.c			optional vimage
 net/zlib.c			optional crypto | geom_uzip | ipsec | \
 					 mxge | netgraph_deflate | \
-					 ddb_ctf | zlib
+					 ddb_ctf | gzio
 net80211/ieee80211.c		optional wlan
 net80211/ieee80211_acl.c	optional wlan wlan_acl
 net80211/ieee80211_action.c	optional wlan

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 18:42:30 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5422C106566C;
	Tue,  2 Mar 2010 18:42:30 +0000 (UTC)
	(envelope-from alfred@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 438E18FC1D;
	Tue,  2 Mar 2010 18:42:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22IgUpI011045;
	Tue, 2 Mar 2010 18:42:30 GMT (envelope-from alfred@svn.freebsd.org)
Received: (from alfred@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22IgUau011043;
	Tue, 2 Mar 2010 18:42:30 GMT (envelope-from alfred@svn.freebsd.org)
Message-Id: <201003021842.o22IgUau011043@svn.freebsd.org>
From: Alfred Perlstein 
Date: Tue, 2 Mar 2010 18:42:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204594 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 18:42:30 -0000

Author: alfred
Date: Tue Mar  2 18:42:29 2010
New Revision: 204594
URL: http://svn.freebsd.org/changeset/base/204594

Log:
  include COMPRESS_USER_CORES and gzio in NOTES.
  
  Requested by: Niclas Zeising

Modified:
  head/sys/conf/NOTES

Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES	Tue Mar  2 18:41:20 2010	(r204593)
+++ head/sys/conf/NOTES	Tue Mar  2 18:42:29 2010	(r204594)
@@ -2816,6 +2816,11 @@ options 	SHMMNI=33
 # a single process at one time.
 options 	SHMSEG=9
 
+# Compress user core dumps.
+options		COMPRESS_USER_CORES
+# required to compress file output from kernel for COMPRESS_USER_CORES.
+device		gzio	    
+
 # Set the amount of time (in seconds) the system will wait before
 # rebooting automatically when a kernel panic occurs.  If set to (-1),
 # the system will wait indefinitely until a key is pressed on the

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 18:43:12 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DDF3F106568C;
	Tue,  2 Mar 2010 18:43:12 +0000 (UTC)
	(envelope-from alfred@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B2BDD8FC15;
	Tue,  2 Mar 2010 18:43:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22IhCXm011244;
	Tue, 2 Mar 2010 18:43:12 GMT (envelope-from alfred@svn.freebsd.org)
Received: (from alfred@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22IhCOb011242;
	Tue, 2 Mar 2010 18:43:12 GMT (envelope-from alfred@svn.freebsd.org)
Message-Id: <201003021843.o22IhCOb011242@svn.freebsd.org>
From: Alfred Perlstein 
Date: Tue, 2 Mar 2010 18:43:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204595 - head/share/man/man5
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 18:43:13 -0000

Author: alfred
Date: Tue Mar  2 18:43:12 2010
New Revision: 204595
URL: http://svn.freebsd.org/changeset/base/204595

Log:
  Document COMPRESS_USER_CORES, and the new %I and %H core formatters.

Modified:
  head/share/man/man5/core.5

Modified: head/share/man/man5/core.5
==============================================================================
--- head/share/man/man5/core.5	Tue Mar  2 18:42:29 2010	(r204594)
+++ head/share/man/man5/core.5	Tue Mar  2 18:43:12 2010	(r204595)
@@ -68,13 +68,27 @@ the core image to.
 This filename can be absolute, or relative (which
 will resolve to the current working directory of the program
 generating it).
-Any sequence of
-.Em \&%N
-in this filename template will be replaced by the process name,
-.Em \&%P
-by the processes PID, and
-.Em \&%U
-by the UID.
+.Pp
+The following format specifiers may be used in the
+.Va kern.corefile
+sysctl to insert additional information into the resulting core file
+name:
+.Bl -tag -width "1234567890" -compact -offset "12345"
+.It Em \&%H
+Machine hostname.
+.It Em \&%I
+An index starting at zero until the sysctl
+.Em debug.num_cores
+is reached.  This can be useful for limiting the number of corefiles
+generated by a particular process.
+.It Em \&%N
+process name.
+.It Em \&%P
+processes PID.
+.It Em \&%U
+process UID.
+.El
+.Pp
 The name defaults to
 .Em \&%N.core ,
 yielding the traditional
@@ -89,6 +103,26 @@ changed to generate a core dump by setti
 variable
 .Va kern.sugid_coredump
 to 1.
+.Pp
+Corefiles can be compressed by the kernel if the following items
+are included in the kernel configuration file:
+.Bl -tag -width "1234567890" -compact -offset "12345"
+.It options
+COMPRESS_USER_CORES
+.It devices
+gzio
+.El
+.Pp
+When COMPRESS_USER_CORES is included the following sysctls can control
+if core files will be compressed:
+.Bl -tag -width "kern.compress_user_cores_gzlevel" -compact -offset "12345"
+.It Em kern.compress_user_cores_gzlevel
+Gzip compression level.  Defaults to -1.
+.It Em kern.compress_user_cores
+Actually compress user cores.  Core files will have the suffix
+.Em .gz
+appended to them.
+.El
 .Sh EXAMPLES
 In order to store all core images in per-user private areas under
 .Pa /var/coredumps ,

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 18:44:08 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 75A8F106566C;
	Tue,  2 Mar 2010 18:44:08 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6274F8FC19;
	Tue,  2 Mar 2010 18:44:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22Ii8Ut011505;
	Tue, 2 Mar 2010 18:44:08 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22Ii8VZ011495;
	Tue, 2 Mar 2010 18:44:08 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201003021844.o22Ii8VZ011495@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Tue, 2 Mar 2010 18:44:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204596 - in head: lib/libalias lib/libalias/libalias
	lib/libarchive/test lib/libpam lib/libpam/modules
	sbin/hastctl sbin/hastd usr.sbin/bluetooth/bthidd
	usr.sbin/bsnmpd/modules
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 18:44:08 -0000

Author: uqs
Date: Tue Mar  2 18:44:08 2010
New Revision: 204596
URL: http://svn.freebsd.org/changeset/base/204596

Log:
  Remove redundant WARNS?=6 overrides and inherit the WARNS setting from
  the toplevel directory.
  
  This does not change any WARNS level and survives a make universe.
  
  Approved by:        ed (co-mentor)

Added:
  head/lib/libalias/Makefile.inc   (contents, props changed)
Modified:
  head/lib/libalias/libalias/Makefile
  head/lib/libarchive/test/Makefile
  head/lib/libpam/Makefile.inc
  head/lib/libpam/modules/Makefile.inc
  head/sbin/hastctl/Makefile
  head/sbin/hastd/Makefile
  head/usr.sbin/bluetooth/bthidd/Makefile
  head/usr.sbin/bsnmpd/modules/Makefile.inc

Added: head/lib/libalias/Makefile.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libalias/Makefile.inc	Tue Mar  2 18:44:08 2010	(r204596)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+.include "../Makefile.inc"

Modified: head/lib/libalias/libalias/Makefile
==============================================================================
--- head/lib/libalias/libalias/Makefile	Tue Mar  2 18:43:12 2010	(r204595)
+++ head/lib/libalias/libalias/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
@@ -8,7 +8,6 @@ SHLIB_MAJOR= 7
 MAN=	libalias.3
 SRCS=	alias.c alias_db.c alias_proxy.c alias_util.c alias_mod.c
 INCS=	alias.h
-WARNS?=	6
 NO_WERROR=
 
 .include 

Modified: head/lib/libarchive/test/Makefile
==============================================================================
--- head/lib/libarchive/test/Makefile	Tue Mar  2 18:43:12 2010	(r204595)
+++ head/lib/libarchive/test/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
@@ -137,7 +137,6 @@ CFLAGS+= -I${LA_SRCDIR} -I.
 # Uncomment to link against dmalloc
 #LDADD+= -L/usr/local/lib -ldmalloc
 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
-#WARNS=6
 
 # Build libarchive_test and run it.
 check test: libarchive_test

Modified: head/lib/libpam/Makefile.inc
==============================================================================
--- head/lib/libpam/Makefile.inc	Tue Mar  2 18:43:12 2010	(r204595)
+++ head/lib/libpam/Makefile.inc	Tue Mar  2 18:44:08 2010	(r204596)
@@ -30,3 +30,5 @@ DEBUG_FLAGS+=	-DDEBUG
 
 SHLIB_MAJOR=	5
 PAM_MOD_DIR=	${LIBDIR}
+
+.include "../Makefile.inc"

Modified: head/lib/libpam/modules/Makefile.inc
==============================================================================
--- head/lib/libpam/modules/Makefile.inc	Tue Mar  2 18:43:12 2010	(r204595)
+++ head/lib/libpam/modules/Makefile.inc	Tue Mar  2 18:44:08 2010	(r204596)
@@ -6,7 +6,6 @@ NO_INSTALLLIB=
 NO_PROFILE=
 
 CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam
-WARNS?=	6
 
 # This is nasty.
 # For the static case, libpam.a depends on the modules.

Modified: head/sbin/hastctl/Makefile
==============================================================================
--- head/sbin/hastctl/Makefile	Tue Mar  2 18:43:12 2010	(r204595)
+++ head/sbin/hastctl/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
@@ -15,7 +15,6 @@ SRCS+=	proto.c proto_common.c proto_tcp4
 SRCS+=	token.l
 SRCS+=	subr.c
 SRCS+=	y.tab.h
-WARNS?=	6
 MAN=	hastctl.8
 
 CFLAGS+=-I${.CURDIR}/../hastd

Modified: head/sbin/hastd/Makefile
==============================================================================
--- head/sbin/hastd/Makefile	Tue Mar  2 18:43:12 2010	(r204595)
+++ head/sbin/hastd/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
@@ -16,7 +16,6 @@ SRCS+=	rangelock.c
 SRCS+=	subr.c
 SRCS+=	token.l
 SRCS+=	y.tab.h
-WARNS?=	6
 MAN=	hastd.8 hast.conf.5
 
 CFLAGS+=-I${.CURDIR}

Modified: head/usr.sbin/bluetooth/bthidd/Makefile
==============================================================================
--- head/usr.sbin/bluetooth/bthidd/Makefile	Tue Mar  2 18:43:12 2010	(r204595)
+++ head/usr.sbin/bluetooth/bthidd/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
@@ -8,7 +8,6 @@ SRCS=		bthidd.c client.c hid.c kbd.c lex
 		session.c
 
 CFLAGS+=	-I${.CURDIR}
-WARNS?=		6
 DEBUG_FLAGS=	-g
 
 DPADD=          ${LIBBLUETOOTH} ${LIBUSBHID}

Modified: head/usr.sbin/bsnmpd/modules/Makefile.inc
==============================================================================
--- head/usr.sbin/bsnmpd/modules/Makefile.inc	Tue Mar  2 18:43:12 2010	(r204595)
+++ head/usr.sbin/bsnmpd/modules/Makefile.inc	Tue Mar  2 18:44:08 2010	(r204596)
@@ -1,8 +1,9 @@
 # $FreeBSD$
 
 SHLIB_MAJOR=	6
-WARNS?=		6
 
 MANFILTER=	sed -e 's%@MODPATH@%${LIBDIR}/%g'		\
 		    -e 's%@DEFPATH@%${DEFSDIR}/%g'		\
 		    -e 's%@MIBSPATH@%${BMIBSDIR}/%g'
+
+.include "../Makefile.inc"

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 18:49:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F0D42106564A;
	Tue,  2 Mar 2010 18:49:46 +0000 (UTC)
	(envelope-from bright@elvis.mu.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by mx1.freebsd.org (Postfix) with ESMTP id DDB928FC14;
	Tue,  2 Mar 2010 18:49:46 +0000 (UTC)
Received: by elvis.mu.org (Postfix, from userid 1192)
	id A7AB51A3C76; Tue,  2 Mar 2010 10:49:41 -0800 (PST)
Date: Tue, 2 Mar 2010 10:49:41 -0800
From: Alfred Perlstein 
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
Message-ID: <20100302184941.GU55658@elvis.mu.org>
References: <201003021843.o22IhCOb011242@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201003021843.o22IhCOb011242@svn.freebsd.org>
User-Agent: Mutt/1.4.2.3i
Cc: Ed Maste 
Subject: Re: svn commit: r204595 - head/share/man/man5
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 18:49:47 -0000

No snub intended to Ed Maste, prematurely hit :x in vi.

this was suggested by: emaste

-Alfred

* Alfred Perlstein  [100302 10:43] wrote:
> Author: alfred
> Date: Tue Mar  2 18:43:12 2010
> New Revision: 204595
> URL: http://svn.freebsd.org/changeset/base/204595
> 
> Log:
>   Document COMPRESS_USER_CORES, and the new %I and %H core formatters.
> 
> Modified:
>   head/share/man/man5/core.5
> 
> Modified: head/share/man/man5/core.5
> ==============================================================================
> --- head/share/man/man5/core.5	Tue Mar  2 18:42:29 2010	(r204594)
> +++ head/share/man/man5/core.5	Tue Mar  2 18:43:12 2010	(r204595)
> @@ -68,13 +68,27 @@ the core image to.
>  This filename can be absolute, or relative (which
>  will resolve to the current working directory of the program
>  generating it).
> -Any sequence of
> -.Em \&%N
> -in this filename template will be replaced by the process name,
> -.Em \&%P
> -by the processes PID, and
> -.Em \&%U
> -by the UID.
> +.Pp
> +The following format specifiers may be used in the
> +.Va kern.corefile
> +sysctl to insert additional information into the resulting core file
> +name:
> +.Bl -tag -width "1234567890" -compact -offset "12345"
> +.It Em \&%H
> +Machine hostname.
> +.It Em \&%I
> +An index starting at zero until the sysctl
> +.Em debug.num_cores
> +is reached.  This can be useful for limiting the number of corefiles
> +generated by a particular process.
> +.It Em \&%N
> +process name.
> +.It Em \&%P
> +processes PID.
> +.It Em \&%U
> +process UID.
> +.El
> +.Pp
>  The name defaults to
>  .Em \&%N.core ,
>  yielding the traditional
> @@ -89,6 +103,26 @@ changed to generate a core dump by setti
>  variable
>  .Va kern.sugid_coredump
>  to 1.
> +.Pp
> +Corefiles can be compressed by the kernel if the following items
> +are included in the kernel configuration file:
> +.Bl -tag -width "1234567890" -compact -offset "12345"
> +.It options
> +COMPRESS_USER_CORES
> +.It devices
> +gzio
> +.El
> +.Pp
> +When COMPRESS_USER_CORES is included the following sysctls can control
> +if core files will be compressed:
> +.Bl -tag -width "kern.compress_user_cores_gzlevel" -compact -offset "12345"
> +.It Em kern.compress_user_cores_gzlevel
> +Gzip compression level.  Defaults to -1.
> +.It Em kern.compress_user_cores
> +Actually compress user cores.  Core files will have the suffix
> +.Em .gz
> +appended to them.
> +.El
>  .Sh EXAMPLES
>  In order to store all core images in per-user private areas under
>  .Pa /var/coredumps ,

-- 
- Alfred Perlstein
.- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250
.- FreeBSD committer

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 18:52:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 97D12106566C;
	Tue,  2 Mar 2010 18:52:05 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200])
	by mx1.freebsd.org (Postfix) with ESMTP id 1B54A8FC18;
	Tue,  2 Mar 2010 18:52:04 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o22IpUYT018288
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 2 Mar 2010 20:51:30 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id
	o22IpUCa036971; Tue, 2 Mar 2010 20:51:30 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o22IpUx7036970; 
	Tue, 2 Mar 2010 20:51:30 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Tue, 2 Mar 2010 20:51:30 +0200
From: Kostik Belousov 
To: Luigi Rizzo 
Message-ID: <20100302185130.GC2489@deviant.kiev.zoral.com.ua>
References: <201003021740.o22HemPA096942@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="tauoZ0QFNrdllat7"
Content-Disposition: inline
In-Reply-To: <201003021740.o22HemPA096942@svn.freebsd.org>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204591 - in head: sbin/ipfw sys/conf sys/net
	sys/netinet sys/netinet/ipfw sys/netinet/ipfw/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 18:52:05 -0000


--tauoZ0QFNrdllat7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 02, 2010 at 05:40:48PM +0000, Luigi Rizzo wrote:
> Author: luigi
> Date: Tue Mar  2 17:40:48 2010
> New Revision: 204591
> URL: http://svn.freebsd.org/changeset/base/204591
>=20
> Log:
>   Bring in the most recent version of ipfw and dummynet, developed
>   and tested over the past two months in the ipfw3-head branch.  This
>   also happens to be the same code available in the Linux and Windows
>   ports of ipfw and dummynet.
>  =20
>   The major enhancement is a completely restructured version of
>   dummynet, with support for different packet scheduling algorithms
>   (loadable at runtime), faster queue/pipe lookup, and a much cleaner
>   internal architecture and kernel/userland ABI which simplifies
>   future extensions.
>  =20
>   In addition to the existing schedulers (FIFO and WF2Q+), we include
>   a Deficit Round Robin (DRR or RR for brevity) scheduler, and a new,
>   very fast version of WF2Q+ called QFQ.
>  =20
>   Some test code is also present (in sys/netinet/ipfw/test) that
>   lets you build and test schedulers in userland.
>  =20
>   Also, we have added a compatibility layer that understands requests
>   from the RELENG_7 and RELENG_8 versions of the /sbin/ipfw binaries,
>   and replies correctly (at least, it does its best; sometimes you
>   just cannot tell who sent the request and how to answer).
>   The compatibility layer should make it possible to MFC this code in a
>   relatively short time.
>  =20
>   Some minor glitches (e.g. handling of ipfw set enable/disable,
>   and a workaround for a bug in RELENG_7's /sbin/ipfw) will be
>   fixed with separate commits.
>  =20
>   CREDITS:
>   This work has been partly supported by the ONELAB2 project, and
>   mostly developed by Riccardo Panicucci and myself.
>   The code for the qfq scheduler is mostly from Fabio Checconi,
>   and Marta Carbone and Francesco Magno have helped with testing,
>   debugging and some bug fixes.
>=20
> Added:
>   head/sys/netinet/ipfw/dn_heap.c   (contents, props changed)
>   head/sys/netinet/ipfw/dn_heap.h   (contents, props changed)
>   head/sys/netinet/ipfw/dn_sched.h   (contents, props changed)
>   head/sys/netinet/ipfw/dn_sched_fifo.c   (contents, props changed)
>   head/sys/netinet/ipfw/dn_sched_qfq.c   (contents, props changed)
>   head/sys/netinet/ipfw/dn_sched_rr.c   (contents, props changed)
>   head/sys/netinet/ipfw/dn_sched_wf2q.c   (contents, props changed)
>   head/sys/netinet/ipfw/dummynet.txt   (contents, props changed)
>   head/sys/netinet/ipfw/ip_dn_glue.c   (contents, props changed)
>   head/sys/netinet/ipfw/ip_dn_io.c   (contents, props changed)
>   head/sys/netinet/ipfw/ip_dn_private.h   (contents, props changed)
>   head/sys/netinet/ipfw/test/
>   head/sys/netinet/ipfw/test/Makefile   (contents, props changed)
>   head/sys/netinet/ipfw/test/dn_test.h   (contents, props changed)
>   head/sys/netinet/ipfw/test/main.c   (contents, props changed)
>   head/sys/netinet/ipfw/test/mylist.h   (contents, props changed)
>   head/sys/netinet/ipfw/test/test_dn_heap.c   (contents, props changed)
>   head/sys/netinet/ipfw/test/test_dn_sched.c   (contents, props changed)
> Modified:
>   head/sbin/ipfw/Makefile
>   head/sbin/ipfw/altq.c
>   head/sbin/ipfw/dummynet.c
>   head/sbin/ipfw/ipfw.8
>   head/sbin/ipfw/ipfw2.c
>   head/sbin/ipfw/ipfw2.h
>   head/sbin/ipfw/main.c
>   head/sys/conf/files
>   head/sys/net/if_bridge.c
>   head/sys/net/if_ethersubr.c
>   head/sys/netinet/ip_dummynet.h
>   head/sys/netinet/ip_fw.h
>   head/sys/netinet/ipfw/ip_dummynet.c
>   head/sys/netinet/ipfw/ip_fw2.c
>   head/sys/netinet/ipfw/ip_fw_dynamic.c
>   head/sys/netinet/ipfw/ip_fw_log.c
>   head/sys/netinet/ipfw/ip_fw_pfil.c
>   head/sys/netinet/ipfw/ip_fw_private.h
>   head/sys/netinet/ipfw/ip_fw_sockopt.c
>   head/sys/netinet/ipfw/ip_fw_table.c
>=20
> Modified: head/sbin/ipfw/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sbin/ipfw/Makefile	Tue Mar  2 17:34:11 2010	(r204590)
> +++ head/sbin/ipfw/Makefile	Tue Mar  2 17:40:48 2010	(r204591)
> @@ -3,7 +3,6 @@
>  PROG=3D	ipfw
>  SRCS=3D	ipfw2.c dummynet.c ipv6.c main.c nat.c altq.c
>  WARNS?=3D	2
> -DPADD=3D	${LIBUTIL}
>  LDADD=3D	-lutil
>  MAN=3D	ipfw.8
Removal of DPADD is most likely regression ?

--tauoZ0QFNrdllat7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkuNXjEACgkQC3+MBN1Mb4jZBgCgp7m5KaRtYu6D1GlkAHvafS/o
QvAAnjgQjzC8b4RO3IMtaY5THVLfIaYC
=Xz78
-----END PGP SIGNATURE-----

--tauoZ0QFNrdllat7--

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 18:54:23 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 538611065675;
	Tue,  2 Mar 2010 18:54:23 +0000 (UTC)
	(envelope-from luigi@onelab2.iet.unipi.it)
Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238])
	by mx1.freebsd.org (Postfix) with ESMTP id 133ED8FC25;
	Tue,  2 Mar 2010 18:54:22 +0000 (UTC)
Received: by onelab2.iet.unipi.it (Postfix, from userid 275)
	id 56D4B7310A; Tue,  2 Mar 2010 20:03:44 +0100 (CET)
Date: Tue, 2 Mar 2010 20:03:44 +0100
From: Luigi Rizzo 
To: Kostik Belousov 
Message-ID: <20100302190344.GA5490@onelab2.iet.unipi.it>
References: <201003021740.o22HemPA096942@svn.freebsd.org>
	<20100302185130.GC2489@deviant.kiev.zoral.com.ua>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100302185130.GC2489@deviant.kiev.zoral.com.ua>
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-head@freebsd.org, Luigi Rizzo ,
	src-committers@freebsd.org, svn-src-all@freebsd.org
Subject: Re: svn commit: r204591 - in head: sbin/ipfw sys/conf sys/net
	sys/netinet sys/netinet/ipfw sys/netinet/ipfw/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 18:54:23 -0000

On Tue, Mar 02, 2010 at 08:51:30PM +0200, Kostik Belousov wrote:
...
> > --- head/sbin/ipfw/Makefile	Tue Mar  2 17:34:11 2010	(r204590)
> > +++ head/sbin/ipfw/Makefile	Tue Mar  2 17:40:48 2010	(r204591)
> > @@ -3,7 +3,6 @@
> >  PROG=	ipfw
> >  SRCS=	ipfw2.c dummynet.c ipv6.c main.c nat.c altq.c
> >  WARNS?=	2
> > -DPADD=	${LIBUTIL}
> >  LDADD=	-lutil
> >  MAN=	ipfw.8
> Removal of DPADD is most likely regression ?

possibly.
i couldn't figure out why it was there in the
first place, can you clarify what it was for ?

cheers
luigi

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 19:04:07 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 86F65106566B;
	Tue,  2 Mar 2010 19:04:07 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 727B58FC18;
	Tue,  2 Mar 2010 19:04:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22J47qw015975;
	Tue, 2 Mar 2010 19:04:07 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22J47dv015953;
	Tue, 2 Mar 2010 19:04:07 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201003021904.o22J47dv015953@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Tue, 2 Mar 2010 19:04:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204597 - in head/cddl: . lib/drti lib/libavl
	lib/libctf lib/libdtrace lib/libnvpair lib/libumem
	lib/libuutil lib/libzfs lib/libzpool sbin/zfs sbin/zpool
	usr.bin/ctfconvert usr.bin/ctfd...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 19:04:07 -0000

Author: uqs
Date: Tue Mar  2 19:04:07 2010
New Revision: 204597
URL: http://svn.freebsd.org/changeset/base/204597

Log:
  Remove manual .includes in cddl Makefiles
  
  - Break the dependency on ../Makefile.inc for .PATH, and include
    ../Makefile.inc implicitly. This is required to ...
  - Set WARNS?=6 in top-level Makefile.inc
  - Remove now redundant WARNS settings, add WARNS?=0 where appropriate
  - Remove redundant SHLIB_MAJOR overrides
  - Use NO_MAN, not MK_MAN=no
  - Remove redundant inclusion of bsd.own.mk
  - Order Makefiles more according to style.Makefile(9)
  - Reduce diff of cddl Makefiles against each other
  
  No objection:	pjd
  Approved by:	ed (co-mentor)

Modified:
  head/cddl/Makefile.inc
  head/cddl/lib/drti/Makefile
  head/cddl/lib/libavl/Makefile
  head/cddl/lib/libctf/Makefile
  head/cddl/lib/libdtrace/Makefile
  head/cddl/lib/libnvpair/Makefile
  head/cddl/lib/libumem/Makefile
  head/cddl/lib/libuutil/Makefile
  head/cddl/lib/libzfs/Makefile
  head/cddl/lib/libzpool/Makefile
  head/cddl/sbin/zfs/Makefile
  head/cddl/sbin/zpool/Makefile
  head/cddl/usr.bin/ctfconvert/Makefile
  head/cddl/usr.bin/ctfdump/Makefile
  head/cddl/usr.bin/ctfmerge/Makefile
  head/cddl/usr.bin/sgsmsg/Makefile
  head/cddl/usr.bin/zinject/Makefile
  head/cddl/usr.bin/ztest/Makefile
  head/cddl/usr.sbin/dtrace/Makefile
  head/cddl/usr.sbin/lockstat/Makefile
  head/cddl/usr.sbin/zdb/Makefile

Modified: head/cddl/Makefile.inc
==============================================================================
--- head/cddl/Makefile.inc	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/Makefile.inc	Tue Mar  2 19:04:07 2010	(r204597)
@@ -7,4 +7,5 @@ IGNORE_PRAGMA=	YES
 
 CFLAGS+=	-DNEED_SOLARIS_BOOLEAN
 
+WARNS?=		6
 CSTD?=		gnu89

Modified: head/cddl/lib/drti/Makefile
==============================================================================
--- head/cddl/lib/drti/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/lib/drti/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -1,8 +1,6 @@
 # $FreeBSD$
 
-.include	"../../Makefile.inc"
-
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common
+.PATH:		${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/common
 
 SRCS=		drti.c
 FILES=		${SRCS:R:S/$/.o/g}
@@ -10,7 +8,6 @@ FILESOWN=	${LIBOWN}
 FILESGRP=	${LIBGRP}
 FILESMODE=	${LIBMODE}
 FILESDIR=	${LIBDIR}/dtrace
-WARNS?=		6
 CLEANFILES=	${FILES}
 
 CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \

Modified: head/cddl/lib/libavl/Makefile
==============================================================================
--- head/cddl/lib/libavl/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/lib/libavl/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -4,6 +4,7 @@
 
 LIB=	avl
 SRCS=	avl.c
+WARNS?=	0
 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common
 

Modified: head/cddl/lib/libctf/Makefile
==============================================================================
--- head/cddl/lib/libctf/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/lib/libctf/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -1,10 +1,10 @@
 # $FreeBSD$
 
-.include	"../../Makefile.inc"
+.PATH:		${.CURDIR}/../../../cddl/contrib/opensolaris/common/ctf
+.PATH:		${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libctf/common
+.PATH:		${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/ctf
 
 LIB=		ctf
-SHLIB_MAJOR=	2
-
 SRCS=		ctf_create.c \
 		ctf_decl.c \
 		ctf_error.c \
@@ -17,10 +17,7 @@ SRCS=		ctf_create.c \
 		ctf_types.c \
 		ctf_util.c
 
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/common/ctf
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common
-.PATH:		${OPENSOLARIS_SYS_DISTDIR}/common/ctf
-
+WARNS?=		0
 CFLAGS+=	-DCTF_OLD_VERSIONS
 
 CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \

Modified: head/cddl/lib/libdtrace/Makefile
==============================================================================
--- head/cddl/lib/libdtrace/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/lib/libdtrace/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -1,12 +1,9 @@
 # $FreeBSD$
 
-.include	"../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libgen/common
 
 LIB=		dtrace
-SHLIB_MAJOR=	2
-
-WARNS=		1
-
 SRCS=		dt_aggregate.c \
 		dt_as.c \
 		dt_buf.c \
@@ -51,8 +48,7 @@ DSRCS=		errno.d			\
 		signal.d		\
 		unistd.d
 
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/lib/libgen/common
+WARNS?=		1
 
 CFLAGS+=	-I${.OBJDIR} \
 		-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \

Modified: head/cddl/lib/libnvpair/Makefile
==============================================================================
--- head/cddl/lib/libnvpair/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/lib/libnvpair/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -10,6 +10,7 @@ SRCS=	libnvpair.c \
 	nvpair_alloc_fixed.c \
 	nvpair.c
 
+WARNS?=	0
 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common

Modified: head/cddl/lib/libumem/Makefile
==============================================================================
--- head/cddl/lib/libumem/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/lib/libumem/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -4,6 +4,7 @@
 
 LIB=	umem
 SRCS=	umem.c
+WARNS?=	0
 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
 
 .include 

Modified: head/cddl/lib/libuutil/Makefile
==============================================================================
--- head/cddl/lib/libuutil/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/lib/libuutil/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -15,6 +15,7 @@ SRCS=	avl.c \
 	uu_pname.c \
 	uu_strtoint.c
 
+WARNS?=	0
 CFLAGS+= -DNATIVE_BUILD
 CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris

Modified: head/cddl/lib/libzfs/Makefile
==============================================================================
--- head/cddl/lib/libzfs/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/lib/libzfs/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -32,6 +32,7 @@ SRCS+=	zfs_deleg.c \
 	libzfs_sendrecv.c \
 	libzfs_status.c
 
+WARNS?=	0
 CFLAGS+= -DZFS_NO_ACL
 CFLAGS+= -I${.CURDIR}/../../../sbin/mount
 CFLAGS+= -I${.CURDIR}/../../../cddl/lib/libumem

Modified: head/cddl/lib/libzpool/Makefile
==============================================================================
--- head/cddl/lib/libzpool/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/lib/libzpool/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -33,6 +33,7 @@ SRCS=		${ZFS_COMMON_SRCS} ${ZFS_SHARED_S
 		${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS} \
 		${UNICODE_SRCS}
 
+WARNS?=		0
 CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/compat/opensolaris
 CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris/include
 CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem

Modified: head/cddl/sbin/zfs/Makefile
==============================================================================
--- head/cddl/sbin/zfs/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/sbin/zfs/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -6,6 +6,7 @@ PROG=	zfs
 MAN=	zfs.8
 SRCS=	zfs_main.c zfs_iter.c
 
+WARNS?=	0
 CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem

Modified: head/cddl/sbin/zpool/Makefile
==============================================================================
--- head/cddl/sbin/zpool/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/sbin/zpool/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -7,6 +7,7 @@ PROG=	zpool
 MAN=	zpool.8
 SRCS=	zpool_main.c zpool_vdev.c zpool_iter.c zpool_util.c zfs_comutil.c
 
+WARNS?=	0
 CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem

Modified: head/cddl/usr.bin/ctfconvert/Makefile
==============================================================================
--- head/cddl/usr.bin/ctfconvert/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/usr.bin/ctfconvert/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -1,13 +1,12 @@
 # $FreeBSD$
 
-.include 
-
-.include	"../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt
 
 DEBUG_FLAGS=	-g
 
 PROG=		ctfconvert
-
+NO_MAN=
 SRCS=		alist.c \
 		ctf.c \
 		ctfconvert.c \
@@ -29,8 +28,6 @@ SRCS=		alist.c \
 		traverse.c \
 		util.c
 
-WARNS?=		6
-
 CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
 		-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
 		-I${OPENSOLARIS_USR_DISTDIR} \
@@ -43,10 +40,4 @@ CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/
 DPADD=		${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD}
 LDADD=		-lctf -ldwarf -lelf -lz -lpthread
 
-.PATH:		${.CURDIR}
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt
-
-MK_MAN=		no
-
 .include 

Modified: head/cddl/usr.bin/ctfdump/Makefile
==============================================================================
--- head/cddl/usr.bin/ctfdump/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/usr.bin/ctfdump/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -1,15 +1,14 @@
 # $FreeBSD$
 
-.include	"../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/dump
 
 PROG=		ctfdump
-
+NO_MAN=
 SRCS=		dump.c \
 		symbol.c \
 		utils.c
 
-WARNS?=		6
-
 CFLAGS+=	-I${OPENSOLARIS_USR_DISTDIR} \
 		-I${OPENSOLARIS_SYS_DISTDIR} \
 		-I${OPENSOLARIS_USR_DISTDIR}/head \
@@ -22,9 +21,4 @@ CFLAGS+=	-I${OPENSOLARIS_USR_DISTDIR} \
 DPADD=		${LIBPTHREAD} ${LIBELF} ${LIBZ}
 LDADD=		-lpthread -lelf -lz
 
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/tools/ctf/dump
-
-NO_MAN=
-
 .include 

Modified: head/cddl/usr.bin/ctfmerge/Makefile
==============================================================================
--- head/cddl/usr.bin/ctfmerge/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/usr.bin/ctfmerge/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -1,13 +1,10 @@
 # $FreeBSD$
 
-.include 
-
-.include	"../../Makefile.inc"
-
-WARNS=		1
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt
 
 PROG=		ctfmerge
-
+NO_MAN=
 SRCS=		alist.c \
 		barrier.c \
 		ctf.c \
@@ -26,7 +23,7 @@ SRCS=		alist.c \
 		traverse.c \
 		util.c
 
-WARNS?=		6
+WARNS?=		1
 
 CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
 		-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
@@ -40,9 +37,4 @@ CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/
 DPADD=		${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD}
 LDADD=		-lctf -ldwarf -lelf -lz -lpthread
 
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt
-
-MK_MAN=		no
-
 .include 

Modified: head/cddl/usr.bin/sgsmsg/Makefile
==============================================================================
--- head/cddl/usr.bin/sgsmsg/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/usr.bin/sgsmsg/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -1,20 +1,17 @@
 # $FreeBSD$
 
-.include	"../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/sgs/tools/common
+.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/avl
 
 # This program is required as a bootstrap tool for 'make buildworld'
 PROG=		sgsmsg
-
+NO_MAN=
 SRCS=		avl.c sgsmsg.c string_table.c findprime.c
 
+WARNS?=		0
 CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
 		-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
 		-I${OPENSOLARIS_USR_DISTDIR}/cmd/sgs/include \
 		-I${OPENSOLARIS_SYS_DISTDIR}/uts/common
 
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/cmd/sgs/tools/common
-.PATH:		${OPENSOLARIS_SYS_DISTDIR}/common/avl
-
-NO_MAN=
-
 .include 

Modified: head/cddl/usr.bin/zinject/Makefile
==============================================================================
--- head/cddl/usr.bin/zinject/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/usr.bin/zinject/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -6,6 +6,7 @@ PROG=	zinject
 SRCS=	zinject.c translate.c
 NO_MAN=
 
+WARNS?=	0
 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
 CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
 CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem

Modified: head/cddl/usr.bin/ztest/Makefile
==============================================================================
--- head/cddl/usr.bin/ztest/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/usr.bin/ztest/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -5,6 +5,7 @@
 PROG=	ztest
 NO_MAN=
 
+WARNS?=	0
 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
 CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
 CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem

Modified: head/cddl/usr.sbin/dtrace/Makefile
==============================================================================
--- head/cddl/usr.sbin/dtrace/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/usr.sbin/dtrace/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -1,14 +1,12 @@
 # $FreeBSD$
 
-.include	"../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/dtrace
 
 PROG=		dtrace
-
-BINDIR?=	/usr/sbin
-
 SRCS=		dtrace.c
+BINDIR?=	/usr/sbin
 
-WARNS=		1
+WARNS?=		1
 
 CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
 		-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
@@ -18,8 +16,6 @@ CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/
 		-I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
 		-I${OPENSOLARIS_SYS_DISTDIR}/compat
 
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/cmd/dtrace
-
 # Optional debugging stuff...
 #CFLAGS+=	-DNEED_ERRLOC
 #YFLAGS+=	-d

Modified: head/cddl/usr.sbin/lockstat/Makefile
==============================================================================
--- head/cddl/usr.sbin/lockstat/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/usr.sbin/lockstat/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -1,14 +1,13 @@
 # $FreeBSD$
 
-.include	"../../Makefile.inc"
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/lockstat
 
 PROG=		lockstat
-
-BINDIR?=	/usr/sbin
-
+NO_MAN=
 SRCS=		lockstat.c sym.c
+BINDIR?=	/usr/sbin
 
-WARNS=		1
+WARNS?=		1
 
 CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
 		-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
@@ -19,8 +18,6 @@ CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/
 		-I${OPENSOLARIS_SYS_DISTDIR}/compat \
 		-I${.CURDIR}/../../../sys
 
-.PATH:		${OPENSOLARIS_USR_DISTDIR}/cmd/lockstat
-
 CFLAGS+=	-DNEED_ERRLOC -g
 
 #YFLAGS+=	-d
@@ -28,6 +25,4 @@ CFLAGS+=	-DNEED_ERRLOC -g
 DPADD=		${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} ${LIBCTF} ${LIBELF} ${LIBZ} ${LIBRT}
 LDADD=		-lpthread -ldtrace -ly -ll -lproc -lctf -lelf -lz -lrt
 
-NO_MAN=
-
 .include 

Modified: head/cddl/usr.sbin/zdb/Makefile
==============================================================================
--- head/cddl/usr.sbin/zdb/Makefile	Tue Mar  2 18:44:08 2010	(r204596)
+++ head/cddl/usr.sbin/zdb/Makefile	Tue Mar  2 19:04:07 2010	(r204597)
@@ -6,6 +6,9 @@ PROG=	zdb
 MAN=	zdb.8
 SRCS=	zdb.c zdb_il.c
 
+WARNS?=	0
+CSTD=	c99
+
 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
@@ -23,6 +26,5 @@ DPADD=	${LIBAVL} ${LIBGEOM} ${LIBM} ${LI
 	${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL}
 LDADD=	-lavl -lgeom -lm -lnvpair -lpthread -lumem -luutil -lz -lzfs -lzpool
 
-CSTD=	c99
 
 .include 

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 19:22:19 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 264D91065673;
	Tue,  2 Mar 2010 19:22:19 +0000 (UTC)
	(envelope-from juli@clockworksquid.com)
Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com
	[209.85.219.226])
	by mx1.freebsd.org (Postfix) with ESMTP id 421F28FC1C;
	Tue,  2 Mar 2010 19:22:17 +0000 (UTC)
Received: by ewy26 with SMTP id 26so452923ewy.3
	for ; Tue, 02 Mar 2010 11:22:11 -0800 (PST)
MIME-Version: 1.0
Sender: juli@clockworksquid.com
Received: by 10.103.125.37 with SMTP id c37mr5262067mun.3.1267557731172; Tue, 
	02 Mar 2010 11:22:11 -0800 (PST)
In-Reply-To: <20100302190344.GA5490@onelab2.iet.unipi.it>
References: <201003021740.o22HemPA096942@svn.freebsd.org>
	<20100302185130.GC2489@deviant.kiev.zoral.com.ua> 
	<20100302190344.GA5490@onelab2.iet.unipi.it>
From: Juli Mallett 
Date: Tue, 2 Mar 2010 11:21:51 -0800
X-Google-Sender-Auth: 2dac017363940d87
Message-ID: 
To: Luigi Rizzo 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Kostik Belousov , svn-src-head@freebsd.org,
	Luigi Rizzo , src-committers@freebsd.org,
	svn-src-all@freebsd.org
Subject: Re: svn commit: r204591 - in head: sbin/ipfw sys/conf sys/net 
	sys/netinet sys/netinet/ipfw sys/netinet/ipfw/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 19:22:19 -0000

On Tue, Mar 2, 2010 at 11:03, Luigi Rizzo  wrote:
> On Tue, Mar 02, 2010 at 08:51:30PM +0200, Kostik Belousov wrote:
>> > --- head/sbin/ipfw/Makefile Tue Mar =A02 17:34:11 2010 =A0 =A0 =A0 =A0=
(r204590)
>> > +++ head/sbin/ipfw/Makefile Tue Mar =A02 17:40:48 2010 =A0 =A0 =A0 =A0=
(r204591)
>> > @@ -3,7 +3,6 @@
>> > =A0PROG=3D =A0 =A0 =A0ipfw
>> > =A0SRCS=3D =A0 =A0 =A0ipfw2.c dummynet.c ipv6.c main.c nat.c altq.c
>> > =A0WARNS?=3D =A0 =A02
>> > -DPADD=3D =A0 =A0 ${LIBUTIL}
>> > =A0LDADD=3D =A0 =A0 -lutil
>> > =A0MAN=3D =A0 =A0 =A0 ipfw.8
>> Removal of DPADD is most likely regression ?
>
> possibly.
> i couldn't figure out why it was there in the
> first place, can you clarify what it was for ?

It allows "make depend" to set the proper dependency on the libraries
you're linking in.

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 19:28:50 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8B995106566C;
	Tue,  2 Mar 2010 19:28:50 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200])
	by mx1.freebsd.org (Postfix) with ESMTP id ED7AE8FC19;
	Tue,  2 Mar 2010 19:28:49 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o22JSjjX021029
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 2 Mar 2010 21:28:45 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id
	o22JSjmI037218; Tue, 2 Mar 2010 21:28:45 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o22JSjkP037217; 
	Tue, 2 Mar 2010 21:28:45 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Tue, 2 Mar 2010 21:28:45 +0200
From: Kostik Belousov 
To: Luigi Rizzo 
Message-ID: <20100302192845.GD2489@deviant.kiev.zoral.com.ua>
References: <201003021740.o22HemPA096942@svn.freebsd.org>
	<20100302185130.GC2489@deviant.kiev.zoral.com.ua>
	<20100302190344.GA5490@onelab2.iet.unipi.it>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="lBPdJKrYqo3eKYSb"
Content-Disposition: inline
In-Reply-To: <20100302190344.GA5490@onelab2.iet.unipi.it>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204591 - in head: sbin/ipfw sys/conf sys/net
	sys/netinet sys/netinet/ipfw sys/netinet/ipfw/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 19:28:50 -0000


--lBPdJKrYqo3eKYSb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 02, 2010 at 08:03:44PM +0100, Luigi Rizzo wrote:
> On Tue, Mar 02, 2010 at 08:51:30PM +0200, Kostik Belousov wrote:
> ...
> > > --- head/sbin/ipfw/Makefile	Tue Mar  2 17:34:11 2010	(r204590)
> > > +++ head/sbin/ipfw/Makefile	Tue Mar  2 17:40:48 2010	(r204591)
> > > @@ -3,7 +3,6 @@
> > >  PROG=3D	ipfw
> > >  SRCS=3D	ipfw2.c dummynet.c ipv6.c main.c nat.c altq.c
> > >  WARNS?=3D	2
> > > -DPADD=3D	${LIBUTIL}
> > >  LDADD=3D	-lutil
> > >  MAN=3D	ipfw.8
> > Removal of DPADD is most likely regression ?
>=20
> possibly.
> i couldn't figure out why it was there in the
> first place, can you clarify what it was for ?
To depend on the libutil, so that ipfw is reloaded when libutil.a is
changed.

The question I do not know answer for, is why do we need LDADD.

--lBPdJKrYqo3eKYSb
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkuNZu0ACgkQC3+MBN1Mb4iwVwCgmQVXIqVCCkjI8ETIDAjIZ6os
wXAAn3WU9A5T/0F4LJ2pK0jZkFSPk9xn
=qBep
-----END PGP SIGNATURE-----

--lBPdJKrYqo3eKYSb--

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 19:58:10 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 36354106566B;
	Tue,  2 Mar 2010 19:58:10 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
	by mx1.freebsd.org (Postfix) with ESMTP id E765B8FC15;
	Tue,  2 Mar 2010 19:58:09 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id 039751FFC22;
	Tue,  2 Mar 2010 19:58:08 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id CB24B844E7; Tue,  2 Mar 2010 20:58:08 +0100 (CET)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: Kostik Belousov 
References: <201003021740.o22HemPA096942@svn.freebsd.org>
	<20100302185130.GC2489@deviant.kiev.zoral.com.ua>
	<20100302190344.GA5490@onelab2.iet.unipi.it>
	<20100302192845.GD2489@deviant.kiev.zoral.com.ua>
Date: Tue, 02 Mar 2010 20:58:08 +0100
In-Reply-To: <20100302192845.GD2489@deviant.kiev.zoral.com.ua> (Kostik
	Belousov's message of "Tue, 2 Mar 2010 21:28:45 +0200")
Message-ID: <861vg2a433.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Luigi Rizzo 
Subject: Re: svn commit: r204591 - in head: sbin/ipfw sys/conf sys/net
	sys/netinet sys/netinet/ipfw sys/netinet/ipfw/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 19:58:10 -0000

Kostik Belousov  writes:
> The question I do not know answer for, is why do we need LDADD.

LDADD tells the linker to link ipfw with libutil.

DPADD tells make to relink ipfw if libutil changes.

You can do without DPADD, but incremental builds (i.e. "make buildworld
-DNO_CLEAN" or simply "make") won't work properly.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 20:01:21 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DB658106566C;
	Tue,  2 Mar 2010 20:01:21 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200])
	by mx1.freebsd.org (Postfix) with ESMTP id 484848FC15;
	Tue,  2 Mar 2010 20:01:20 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o22K1DGq023280
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 2 Mar 2010 22:01:13 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id
	o22K1DUa037515; Tue, 2 Mar 2010 22:01:13 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o22K1Dca037514; 
	Tue, 2 Mar 2010 22:01:13 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Tue, 2 Mar 2010 22:01:13 +0200
From: Kostik Belousov 
To: Dag-Erling Sm??rgrav 
Message-ID: <20100302200113.GF2489@deviant.kiev.zoral.com.ua>
References: <201003021740.o22HemPA096942@svn.freebsd.org>
	<20100302185130.GC2489@deviant.kiev.zoral.com.ua>
	<20100302190344.GA5490@onelab2.iet.unipi.it>
	<20100302192845.GD2489@deviant.kiev.zoral.com.ua>
	<861vg2a433.fsf@ds4.des.no>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="YYM4jLJxzFJ63wjS"
Content-Disposition: inline
In-Reply-To: <861vg2a433.fsf@ds4.des.no>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Luigi Rizzo 
Subject: Re: svn commit: r204591 - in head: sbin/ipfw sys/conf sys/net
	sys/netinet sys/netinet/ipfw sys/netinet/ipfw/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 20:01:22 -0000


--YYM4jLJxzFJ63wjS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 02, 2010 at 08:58:08PM +0100, Dag-Erling Sm??rgrav wrote:
> Kostik Belousov  writes:
> > The question I do not know answer for, is why do we need LDADD.
>=20
> LDADD tells the linker to link ipfw with libutil.
>=20
> DPADD tells make to relink ipfw if libutil changes.
>=20
> You can do without DPADD, but incremental builds (i.e. "make buildworld
> -DNO_CLEAN" or simply "make") won't work properly.

I know this, but I do not understand why bsd.mk cannot deduce LDADD
value from DPADD automatically.

--YYM4jLJxzFJ63wjS
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkuNbokACgkQC3+MBN1Mb4ioWACg46zRNDv2wA4yGggkMEIcFx4v
gUgAoKfvYt2oTtVNmrzJ8Wj1dTaZGXOp
=uSi4
-----END PGP SIGNATURE-----

--YYM4jLJxzFJ63wjS--

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 20:29:48 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 700B71065670;
	Tue,  2 Mar 2010 20:29:48 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 2B6978FC0C;
	Tue,  2 Mar 2010 20:29:48 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o22KJ0JM068117;
	Tue, 2 Mar 2010 13:19:00 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Tue, 02 Mar 2010 13:19:12 -0700 (MST)
Message-Id: <20100302.131912.119882392285757630.imp@bsdimp.com>
To: kostikbel@gmail.com
From: "M. Warner Losh" 
In-Reply-To: <20100302192845.GD2489@deviant.kiev.zoral.com.ua>
References: <20100302185130.GC2489@deviant.kiev.zoral.com.ua>
	<20100302190344.GA5490@onelab2.iet.unipi.it>
	<20100302192845.GD2489@deviant.kiev.zoral.com.ua>
X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, rizzo@iet.unipi.it
Subject: Re: svn commit: r204591 - in head: sbin/ipfw sys/conf sys/net
 sys/netinet sys/netinet/ipfw sys/netinet/ipfw/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 20:29:48 -0000

In message: <20100302192845.GD2489@deviant.kiev.zoral.com.ua>
            Kostik Belousov  writes:
: On Tue, Mar 02, 2010 at 08:03:44PM +0100, Luigi Rizzo wrote:
: > On Tue, Mar 02, 2010 at 08:51:30PM +0200, Kostik Belousov wrote:
: > ...
: > > > --- head/sbin/ipfw/Makefile	Tue Mar  2 17:34:11 2010	(r204590)
: > > > +++ head/sbin/ipfw/Makefile	Tue Mar  2 17:40:48 2010	(r204591)
: > > > @@ -3,7 +3,6 @@
: > > >  PROG=	ipfw
: > > >  SRCS=	ipfw2.c dummynet.c ipv6.c main.c nat.c altq.c
: > > >  WARNS?=	2
: > > > -DPADD=	${LIBUTIL}
: > > >  LDADD=	-lutil
: > > >  MAN=	ipfw.8
: > > Removal of DPADD is most likely regression ?
: > 
: > possibly.
: > i couldn't figure out why it was there in the
: > first place, can you clarify what it was for ?
: To depend on the libutil, so that ipfw is reloaded when libutil.a is
: changed.
: 
: The question I do not know answer for, is why do we need LDADD.

DPADD is used to add the static file (/usr/lib/libutil.a).  LDADD is
used to add the library to the command line (-lutil).  IIRC, it isn't
always possible to map one to the other, but I've never explored why...

Warner

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 20:34:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D0BCE106566B;
	Tue,  2 Mar 2010 20:34:02 +0000 (UTC)
	(envelope-from juli@clockworksquid.com)
Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com
	[209.85.218.216])
	by mx1.freebsd.org (Postfix) with ESMTP id 050318FC08;
	Tue,  2 Mar 2010 20:34:01 +0000 (UTC)
Received: by bwz8 with SMTP id 8so615831bwz.3
	for ; Tue, 02 Mar 2010 12:33:54 -0800 (PST)
MIME-Version: 1.0
Sender: juli@clockworksquid.com
Received: by 10.102.183.40 with SMTP id g40mr5277109muf.85.1267562033333; Tue, 
	02 Mar 2010 12:33:53 -0800 (PST)
In-Reply-To: <20100302.131912.119882392285757630.imp@bsdimp.com>
References: <20100302185130.GC2489@deviant.kiev.zoral.com.ua> 
	<20100302190344.GA5490@onelab2.iet.unipi.it>
	<20100302192845.GD2489@deviant.kiev.zoral.com.ua> 
	<20100302.131912.119882392285757630.imp@bsdimp.com>
From: Juli Mallett 
Date: Tue, 2 Mar 2010 12:33:32 -0800
X-Google-Sender-Auth: 00fd33cfce3cb6f0
Message-ID: 
To: "M. Warner Losh" 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: kostikbel@gmail.com, svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, rizzo@iet.unipi.it
Subject: Re: svn commit: r204591 - in head: sbin/ipfw sys/conf sys/net 
	sys/netinet sys/netinet/ipfw sys/netinet/ipfw/test
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 20:34:02 -0000

On Tue, Mar 2, 2010 at 12:19, M. Warner Losh  wrote:
> : The question I do not know answer for, is why do we need LDADD.
>
> DPADD is used to add the static file (/usr/lib/libutil.a). =A0LDADD is
> used to add the library to the command line (-lutil). =A0IIRC, it isn't
> always possible to map one to the other, but I've never explored why...

We could easily do something like "USE_LIBS=3D util bsdxml m z" and then
in bsd.prog.mk and related

.for _lib in ${USE_LIBS}
.if !defined(LIB${_lib:U})
.error "${_lib} is not a valid library."
.endif
DPADD+=3D${LIB${_lib:U}}
LDADD+=3D-l${_lib}
.endfor

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 21:10:44 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E18AB1065677;
	Tue,  2 Mar 2010 21:10:44 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D08E88FC12;
	Tue,  2 Mar 2010 21:10:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22LAiVQ044374;
	Tue, 2 Mar 2010 21:10:44 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22LAiOo044372;
	Tue, 2 Mar 2010 21:10:44 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201003022110.o22LAiOo044372@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Tue, 2 Mar 2010 21:10:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204602 - head/share/man/man9
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 21:10:45 -0000

Author: glebius
Date: Tue Mar  2 21:10:44 2010
New Revision: 204602
URL: http://svn.freebsd.org/changeset/base/204602

Log:
  - Add missing includes to make example "compilable".
  - Use C99 initializer just in case if driver_t may change in future.
  - Use NULL for pointer arguments instead of 0.

Modified:
  head/share/man/man9/driver.9

Modified: head/share/man/man9/driver.9
==============================================================================
--- head/share/man/man9/driver.9	Tue Mar  2 20:20:53 2010	(r204601)
+++ head/share/man/man9/driver.9	Tue Mar  2 21:10:44 2010	(r204602)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 16, 1998
+.Dd March 3, 2010
 .Dt DRIVER 9
 .Os
 .Sh NAME
@@ -37,7 +37,9 @@
 .Sh SYNOPSIS
 .Bd -literal
 #include 
+#include 
 #include 
+#include 
 
 static int foo_probe(device_t);
 static int foo_attach(device_t);
@@ -59,15 +61,15 @@ static device_method_t foo_methods[] = {
 	{ 0, 0 }
 };
 
-static driver_t foo_driver {
-	"foo",
-	foo_methods,
-	sizeof(struct foo_softc)
+static driver_t foo_driver = {
+	.name = "foo",
+	.methods = foo_methods,
+	.size = sizeof(struct foo_softc)
 };
 
 static devclass_t foo_devclass;
 
-DRIVER_MODULE(foo, bogo, foo_driver, foo_devclass, 0, 0);
+DRIVER_MODULE(foo, bogo, foo_driver, foo_devclass, NULL, NULL);
 .Ed
 .Sh DESCRIPTION
 Each driver in the kernel is described by a

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 21:50:37 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E7624106566C;
	Tue,  2 Mar 2010 21:50:36 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C39DF8FC12;
	Tue,  2 Mar 2010 21:50:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22LoajK053276;
	Tue, 2 Mar 2010 21:50:36 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22Loa8i053268;
	Tue, 2 Mar 2010 21:50:36 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201003022150.o22Loa8i053268@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 2 Mar 2010 21:50:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204604 - head/share/man/man9
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 21:50:37 -0000

Author: joel (doc committer)
Date: Tue Mar  2 21:50:36 2010
New Revision: 204604
URL: http://svn.freebsd.org/changeset/base/204604

Log:
  The NetBSD Foundation has granted permission to remove clause 3 and 4 from
  their software.
  
  Obtained from:	NetBSD

Modified:
  head/share/man/man9/kernacc.9
  head/share/man/man9/malloc.9
  head/share/man/man9/mi_switch.9
  head/share/man/man9/physio.9
  head/share/man/man9/psignal.9
  head/share/man/man9/timeout.9
  head/share/man/man9/vslock.9

Modified: head/share/man/man9/kernacc.9
==============================================================================
--- head/share/man/man9/kernacc.9	Tue Mar  2 21:12:06 2010	(r204603)
+++ head/share/man/man9/kernacc.9	Tue Mar  2 21:50:36 2010	(r204604)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man9/malloc.9
==============================================================================
--- head/share/man/man9/malloc.9	Tue Mar  2 21:12:06 2010	(r204603)
+++ head/share/man/man9/malloc.9	Tue Mar  2 21:50:36 2010	(r204604)
@@ -13,13 +13,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man9/mi_switch.9
==============================================================================
--- head/share/man/man9/mi_switch.9	Tue Mar  2 21:12:06 2010	(r204603)
+++ head/share/man/man9/mi_switch.9	Tue Mar  2 21:50:36 2010	(r204604)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man9/physio.9
==============================================================================
--- head/share/man/man9/physio.9	Tue Mar  2 21:12:06 2010	(r204603)
+++ head/share/man/man9/physio.9	Tue Mar  2 21:50:36 2010	(r204604)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man9/psignal.9
==============================================================================
--- head/share/man/man9/psignal.9	Tue Mar  2 21:12:06 2010	(r204603)
+++ head/share/man/man9/psignal.9	Tue Mar  2 21:50:36 2010	(r204604)
@@ -12,13 +12,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man9/timeout.9
==============================================================================
--- head/share/man/man9/timeout.9	Tue Mar  2 21:12:06 2010	(r204603)
+++ head/share/man/man9/timeout.9	Tue Mar  2 21:50:36 2010	(r204604)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man9/vslock.9
==============================================================================
--- head/share/man/man9/vslock.9	Tue Mar  2 21:12:06 2010	(r204603)
+++ head/share/man/man9/vslock.9	Tue Mar  2 21:50:36 2010	(r204604)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 21:59:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 47B021065674;
	Tue,  2 Mar 2010 21:59:05 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 349CE8FC1F;
	Tue,  2 Mar 2010 21:59:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22Lx57L055233;
	Tue, 2 Mar 2010 21:59:05 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22Lx4ji055219;
	Tue, 2 Mar 2010 21:59:04 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201003022159.o22Lx4ji055219@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 2 Mar 2010 21:59:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204605 - in head/share/man/man4: . man4.sparc64
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 21:59:05 -0000

Author: joel (doc committer)
Date: Tue Mar  2 21:59:03 2010
New Revision: 204605
URL: http://svn.freebsd.org/changeset/base/204605

Log:
  The NetBSD Foundation has granted permission to remove clause 3 and 4 from
  their software.
  
  Obtained from:	NetBSD

Modified:
  head/share/man/man4/ehci.4
  head/share/man/man4/gem.4
  head/share/man/man4/gre.4
  head/share/man/man4/hme.4
  head/share/man/man4/man4.sparc64/sbus.4
  head/share/man/man4/snd_uaudio.4
  head/share/man/man4/stge.4
  head/share/man/man4/ubsa.4
  head/share/man/man4/ucom.4
  head/share/man/man4/uftdi.4
  head/share/man/man4/ugen.4
  head/share/man/man4/uhid.4
  head/share/man/man4/ulpt.4
  head/share/man/man4/umodem.4
  head/share/man/man4/uplcom.4
  head/share/man/man4/uvisor.4
  head/share/man/man4/uvscom.4

Modified: head/share/man/man4/ehci.4
==============================================================================
--- head/share/man/man4/ehci.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/ehci.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/gem.4
==============================================================================
--- head/share/man/man4/gem.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/gem.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -11,13 +11,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/gre.4
==============================================================================
--- head/share/man/man4/gre.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/gre.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"     This product includes software developed by the NetBSD
-.\"	Foundation, Inc. and its contributors.
-.\" 4. Neither the name of the The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/hme.4
==============================================================================
--- head/share/man/man4/hme.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/hme.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/man4.sparc64/sbus.4
==============================================================================
--- head/share/man/man4/man4.sparc64/sbus.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/man4.sparc64/sbus.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -13,13 +13,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/snd_uaudio.4
==============================================================================
--- head/share/man/man4/snd_uaudio.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/snd_uaudio.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/stge.4
==============================================================================
--- head/share/man/man4/stge.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/stge.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/ubsa.4
==============================================================================
--- head/share/man/man4/ubsa.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/ubsa.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -13,13 +13,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgment:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/ucom.4
==============================================================================
--- head/share/man/man4/ucom.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/ucom.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgment:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/uftdi.4
==============================================================================
--- head/share/man/man4/uftdi.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/uftdi.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/ugen.4
==============================================================================
--- head/share/man/man4/ugen.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/ugen.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/uhid.4
==============================================================================
--- head/share/man/man4/uhid.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/uhid.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgment:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/ulpt.4
==============================================================================
--- head/share/man/man4/ulpt.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/ulpt.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgment:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/umodem.4
==============================================================================
--- head/share/man/man4/umodem.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/umodem.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgment:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/uplcom.4
==============================================================================
--- head/share/man/man4/uplcom.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/uplcom.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgment:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/uvisor.4
==============================================================================
--- head/share/man/man4/uvisor.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/uvisor.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgment:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/share/man/man4/uvscom.4
==============================================================================
--- head/share/man/man4/uvscom.4	Tue Mar  2 21:50:36 2010	(r204604)
+++ head/share/man/man4/uvscom.4	Tue Mar  2 21:59:03 2010	(r204605)
@@ -14,13 +14,6 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgment:
-.\"        This product includes software developed by the NetBSD
-.\"        Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 21:59:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CCEFC1065789;
	Tue,  2 Mar 2010 21:59:15 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 381268FC28;
	Tue,  2 Mar 2010 21:59:15 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id F17FE46B6C;
	Tue,  2 Mar 2010 16:59:13 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 222A98A01F;
	Tue,  2 Mar 2010 16:59:13 -0500 (EST)
From: John Baldwin 
To: Gleb Smirnoff 
Date: Tue, 2 Mar 2010 16:56:03 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; )
References: <201003022110.o22LAiOo044372@svn.freebsd.org>
In-Reply-To: <201003022110.o22LAiOo044372@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201003021656.03725.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Tue, 02 Mar 2010 16:59:13 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204602 - head/share/man/man9
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 21:59:15 -0000

On Tuesday 02 March 2010 4:10:44 pm Gleb Smirnoff wrote:
> Author: glebius
> Date: Tue Mar  2 21:10:44 2010
> New Revision: 204602
> URL: http://svn.freebsd.org/changeset/base/204602
> 
> Log:
>   - Add missing includes to make example "compilable".
>   - Use C99 initializer just in case if driver_t may change in future.

Actually, this is not done anywhere else in the tree for driver_t (though it 
is common for cdevsw).  If you'd rather not use the old style, then use 
DEFINE_CLASS_0 instead.  That is:

DEFINE_CLASS_0(foo, foo_driver, foo_methods, sizeof(struct foo_softc));

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 22:11:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2200D106564A;
	Tue,  2 Mar 2010 22:11:15 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1088B8FC18;
	Tue,  2 Mar 2010 22:11:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22MBEjs058048;
	Tue, 2 Mar 2010 22:11:14 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22MBEw3058046;
	Tue, 2 Mar 2010 22:11:14 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201003022211.o22MBEw3058046@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 2 Mar 2010 22:11:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204606 - head/lib/libc/powerpc/gen
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 22:11:15 -0000

Author: joel (doc committer)
Date: Tue Mar  2 22:11:14 2010
New Revision: 204606
URL: http://svn.freebsd.org/changeset/base/204606

Log:
  The NetBSD Foundation has granted permission to remove clause 3 and 4 from
  their software.
  
  Obtained from:	NetBSD

Modified:
  head/lib/libc/powerpc/gen/fpgetmask.c
  head/lib/libc/powerpc/gen/fpgetround.c
  head/lib/libc/powerpc/gen/fpgetsticky.c
  head/lib/libc/powerpc/gen/fpsetmask.c
  head/lib/libc/powerpc/gen/fpsetround.c

Modified: head/lib/libc/powerpc/gen/fpgetmask.c
==============================================================================
--- head/lib/libc/powerpc/gen/fpgetmask.c	Tue Mar  2 21:59:03 2010	(r204605)
+++ head/lib/libc/powerpc/gen/fpgetmask.c	Tue Mar  2 22:11:14 2010	(r204606)
@@ -15,13 +15,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/powerpc/gen/fpgetround.c
==============================================================================
--- head/lib/libc/powerpc/gen/fpgetround.c	Tue Mar  2 21:59:03 2010	(r204605)
+++ head/lib/libc/powerpc/gen/fpgetround.c	Tue Mar  2 22:11:14 2010	(r204606)
@@ -15,13 +15,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/powerpc/gen/fpgetsticky.c
==============================================================================
--- head/lib/libc/powerpc/gen/fpgetsticky.c	Tue Mar  2 21:59:03 2010	(r204605)
+++ head/lib/libc/powerpc/gen/fpgetsticky.c	Tue Mar  2 22:11:14 2010	(r204606)
@@ -15,13 +15,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  * 
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/powerpc/gen/fpsetmask.c
==============================================================================
--- head/lib/libc/powerpc/gen/fpsetmask.c	Tue Mar  2 21:59:03 2010	(r204605)
+++ head/lib/libc/powerpc/gen/fpsetmask.c	Tue Mar  2 22:11:14 2010	(r204606)
@@ -15,13 +15,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/powerpc/gen/fpsetround.c
==============================================================================
--- head/lib/libc/powerpc/gen/fpsetround.c	Tue Mar  2 21:59:03 2010	(r204605)
+++ head/lib/libc/powerpc/gen/fpsetround.c	Tue Mar  2 22:11:14 2010	(r204606)
@@ -15,13 +15,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 22:16:40 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A4EC9106566C;
	Tue,  2 Mar 2010 22:16:40 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 936978FC0C;
	Tue,  2 Mar 2010 22:16:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22MGeMM059289;
	Tue, 2 Mar 2010 22:16:40 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22MGedB059284;
	Tue, 2 Mar 2010 22:16:40 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201003022216.o22MGedB059284@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 2 Mar 2010 22:16:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204607 - in head/lib/libc/arm: gen string
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 22:16:40 -0000

Author: joel (doc committer)
Date: Tue Mar  2 22:16:40 2010
New Revision: 204607
URL: http://svn.freebsd.org/changeset/base/204607

Log:
  The NetBSD Foundation has granted permission to remove clause 3 and 4 from
  their software.
  
  Obtained from:	NetBSD

Modified:
  head/lib/libc/arm/gen/makecontext.c
  head/lib/libc/arm/string/bzero.S
  head/lib/libc/arm/string/memcpy_arm.S
  head/lib/libc/arm/string/memmove.S

Modified: head/lib/libc/arm/gen/makecontext.c
==============================================================================
--- head/lib/libc/arm/gen/makecontext.c	Tue Mar  2 22:11:14 2010	(r204606)
+++ head/lib/libc/arm/gen/makecontext.c	Tue Mar  2 22:16:40 2010	(r204607)
@@ -15,13 +15,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *        This product includes software developed by the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/arm/string/bzero.S
==============================================================================
--- head/lib/libc/arm/string/bzero.S	Tue Mar  2 22:11:14 2010	(r204606)
+++ head/lib/libc/arm/string/bzero.S	Tue Mar  2 22:16:40 2010	(r204607)
@@ -15,13 +15,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/arm/string/memcpy_arm.S
==============================================================================
--- head/lib/libc/arm/string/memcpy_arm.S	Tue Mar  2 22:11:14 2010	(r204606)
+++ head/lib/libc/arm/string/memcpy_arm.S	Tue Mar  2 22:16:40 2010	(r204607)
@@ -15,13 +15,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *        This product includes software developed by the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/lib/libc/arm/string/memmove.S
==============================================================================
--- head/lib/libc/arm/string/memmove.S	Tue Mar  2 22:11:14 2010	(r204606)
+++ head/lib/libc/arm/string/memmove.S	Tue Mar  2 22:16:40 2010	(r204607)
@@ -15,13 +15,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 22:25:51 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 735D51065670;
	Tue,  2 Mar 2010 22:25:51 +0000 (UTC)
	(envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 60FF88FC23;
	Tue,  2 Mar 2010 22:25:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22MPpK0061358;
	Tue, 2 Mar 2010 22:25:51 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22MPpd2061333;
	Tue, 2 Mar 2010 22:25:51 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201003022225.o22MPpd2061333@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 2 Mar 2010 22:25:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204608 - head/tools/regression/tmpfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 22:25:51 -0000

Author: joel (doc committer)
Date: Tue Mar  2 22:25:50 2010
New Revision: 204608
URL: http://svn.freebsd.org/changeset/base/204608

Log:
  The NetBSD Foundation has granted permission to remove clause 3 and 4 from
  their software.
  
  Obtained from:	NetBSD

Modified:
  head/tools/regression/tmpfs/h_funcs.subr
  head/tools/regression/tmpfs/h_tools.c
  head/tools/regression/tmpfs/t_create
  head/tools/regression/tmpfs/t_dots
  head/tools/regression/tmpfs/t_exec
  head/tools/regression/tmpfs/t_link
  head/tools/regression/tmpfs/t_mkdir
  head/tools/regression/tmpfs/t_mount
  head/tools/regression/tmpfs/t_pipes
  head/tools/regression/tmpfs/t_read_write
  head/tools/regression/tmpfs/t_readdir
  head/tools/regression/tmpfs/t_remove
  head/tools/regression/tmpfs/t_rename
  head/tools/regression/tmpfs/t_rmdir
  head/tools/regression/tmpfs/t_setattr
  head/tools/regression/tmpfs/t_sizes
  head/tools/regression/tmpfs/t_sockets
  head/tools/regression/tmpfs/t_statvfs
  head/tools/regression/tmpfs/t_symlink
  head/tools/regression/tmpfs/t_times
  head/tools/regression/tmpfs/t_trail_slash
  head/tools/regression/tmpfs/t_truncate
  head/tools/regression/tmpfs/t_vnd
  head/tools/regression/tmpfs/t_vnode_leak

Modified: head/tools/regression/tmpfs/h_funcs.subr
==============================================================================
--- head/tools/regression/tmpfs/h_funcs.subr	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/h_funcs.subr	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/h_tools.c
==============================================================================
--- head/tools/regression/tmpfs/h_tools.c	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/h_tools.c	Tue Mar  2 22:25:50 2010	(r204608)
@@ -16,13 +16,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *        This product includes software developed by the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_create
==============================================================================
--- head/tools/regression/tmpfs/t_create	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_create	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_dots
==============================================================================
--- head/tools/regression/tmpfs/t_dots	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_dots	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_exec
==============================================================================
--- head/tools/regression/tmpfs/t_exec	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_exec	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_link
==============================================================================
--- head/tools/regression/tmpfs/t_link	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_link	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_mkdir
==============================================================================
--- head/tools/regression/tmpfs/t_mkdir	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_mkdir	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_mount
==============================================================================
--- head/tools/regression/tmpfs/t_mount	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_mount	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_pipes
==============================================================================
--- head/tools/regression/tmpfs/t_pipes	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_pipes	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_read_write
==============================================================================
--- head/tools/regression/tmpfs/t_read_write	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_read_write	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_readdir
==============================================================================
--- head/tools/regression/tmpfs/t_readdir	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_readdir	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_remove
==============================================================================
--- head/tools/regression/tmpfs/t_remove	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_remove	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_rename
==============================================================================
--- head/tools/regression/tmpfs/t_rename	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_rename	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_rmdir
==============================================================================
--- head/tools/regression/tmpfs/t_rmdir	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_rmdir	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_setattr
==============================================================================
--- head/tools/regression/tmpfs/t_setattr	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_setattr	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_sizes
==============================================================================
--- head/tools/regression/tmpfs/t_sizes	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_sizes	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_sockets
==============================================================================
--- head/tools/regression/tmpfs/t_sockets	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_sockets	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_statvfs
==============================================================================
--- head/tools/regression/tmpfs/t_statvfs	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_statvfs	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_symlink
==============================================================================
--- head/tools/regression/tmpfs/t_symlink	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_symlink	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_times
==============================================================================
--- head/tools/regression/tmpfs/t_times	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_times	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_trail_slash
==============================================================================
--- head/tools/regression/tmpfs/t_trail_slash	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_trail_slash	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_truncate
==============================================================================
--- head/tools/regression/tmpfs/t_truncate	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_truncate	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_vnd
==============================================================================
--- head/tools/regression/tmpfs/t_vnd	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_vnd	Tue Mar  2 22:25:50 2010	(r204608)
@@ -16,13 +16,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: head/tools/regression/tmpfs/t_vnode_leak
==============================================================================
--- head/tools/regression/tmpfs/t_vnode_leak	Tue Mar  2 22:16:40 2010	(r204607)
+++ head/tools/regression/tmpfs/t_vnode_leak	Tue Mar  2 22:25:50 2010	(r204608)
@@ -17,13 +17,6 @@
 # 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.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  2 23:57:42 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6F05E1065672;
	Tue,  2 Mar 2010 23:57:42 +0000 (UTC)
	(envelope-from ivoras@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5E80E8FC12;
	Tue,  2 Mar 2010 23:57:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22NvgCI081710;
	Tue, 2 Mar 2010 23:57:42 GMT (envelope-from ivoras@svn.freebsd.org)
Received: (from ivoras@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22NvgII081707;
	Tue, 2 Mar 2010 23:57:42 GMT (envelope-from ivoras@svn.freebsd.org)
Message-Id: <201003022357.o22NvgII081707@svn.freebsd.org>
From: Ivan Voras 
Date: Tue, 2 Mar 2010 23:57:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204611 - in head/sys: kern sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 02 Mar 2010 23:57:42 -0000

Author: ivoras
Date: Tue Mar  2 23:57:42 2010
New Revision: 204611
URL: http://svn.freebsd.org/changeset/base/204611

Log:
  Document the VM detection type and sysctl a bit better.

Modified:
  head/sys/kern/subr_param.c
  head/sys/sys/systm.h

Modified: head/sys/kern/subr_param.c
==============================================================================
--- head/sys/kern/subr_param.c	Tue Mar  2 23:53:38 2010	(r204610)
+++ head/sys/kern/subr_param.c	Tue Mar  2 23:57:42 2010	(r204611)
@@ -124,7 +124,7 @@ SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, 
     "Amount to grow stack on a stack fault");
 SYSCTL_PROC(_kern, OID_AUTO, vm_guest, CTLFLAG_RD | CTLTYPE_STRING,
     NULL, 0, sysctl_kern_vm_guest, "A",
-    "Virtual machine detected? (none|generic|xen)");
+    "Virtual machine guest detected? (none|generic|xen)");
 
 /*
  * These have to be allocated somewhere; allocating

Modified: head/sys/sys/systm.h
==============================================================================
--- head/sys/sys/systm.h	Tue Mar  2 23:53:38 2010	(r204610)
+++ head/sys/sys/systm.h	Tue Mar  2 23:57:42 2010	(r204611)
@@ -65,6 +65,9 @@ extern int maxusers;		/* system tune hin
 extern int ngroups_max;		/* max # of supplemental groups */
 extern int vm_guest;		/* Running as virtual machine guest? */
 
+/* Detected virtual machine guest types. The intention is to expand
+ * and/or add to the VM_GUEST_VM type if specific VM functionality is
+ * ever implemented (e.g. vendor-specific paravirtualization features). */
 enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN };
 
 #ifdef	INVARIANTS		/* The option is always available */

From owner-svn-src-head@FreeBSD.ORG  Wed Mar  3 02:05:10 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 461CA106566C;
	Wed,  3 Mar 2010 02:05:10 +0000 (UTC)
	(envelope-from sobomax@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 349F98FC08;
	Wed,  3 Mar 2010 02:05:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2325AxQ010091;
	Wed, 3 Mar 2010 02:05:10 GMT (envelope-from sobomax@svn.freebsd.org)
Received: (from sobomax@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2325AMY010089;
	Wed, 3 Mar 2010 02:05:10 GMT (envelope-from sobomax@svn.freebsd.org)
Message-Id: <201003030205.o2325AMY010089@svn.freebsd.org>
From: Maxim Sobolev 
Date: Wed, 3 Mar 2010 02:05:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204615 - head/sbin/newfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 03 Mar 2010 02:05:10 -0000

Author: sobomax
Date: Wed Mar  3 02:05:09 2010
New Revision: 204615
URL: http://svn.freebsd.org/changeset/base/204615

Log:
  Teach newfs(8) to understand size modifiers for all options taking
  size or size-like argument. I.e. "-s 32k" instead of "-s 32768".
  Size parsing function has been shamelessly stolen from the truncate(1).
  I'm sure many sysadmins out there will appreciate this small
  improvement.
  
  MFC after:	1 week

Modified:
  head/sbin/newfs/newfs.c

Modified: head/sbin/newfs/newfs.c
==============================================================================
--- head/sbin/newfs/newfs.c	Wed Mar  3 01:12:16 2010	(r204614)
+++ head/sbin/newfs/newfs.c	Wed Mar  3 02:05:09 2010	(r204615)
@@ -117,6 +117,7 @@ static void getfssize(intmax_t *, const 
 static struct disklabel *getdisklabel(char *s);
 static void rewritelabel(char *s, struct disklabel *lp);
 static void usage(void);
+static int parselength(const char *ls, int *sz);
 
 ufs2_daddr_t part_ofs; /* partition offset in blocks, used with files */
 
@@ -129,7 +130,7 @@ main(int argc, char *argv[])
 	struct stat st;
 	char *cp, *special;
 	intmax_t reserved;
-	int ch, i;
+	int ch, i, rval;
 	off_t mediasize;
 	char part_name;		/* partition name, default to full disk */
 
@@ -169,7 +170,8 @@ main(int argc, char *argv[])
 			Rflag = 1;
 			break;
 		case 'S':
-			if ((sectorsize = atoi(optarg)) <= 0)
+			rval = parselength(optarg, §orsize);
+			if (rval < 0 || sectorsize <= 0)
 				errx(1, "%s: bad sector size", optarg);
 			break;
 		case 'T':
@@ -182,12 +184,17 @@ main(int argc, char *argv[])
 			Xflag++;
 			break;
 		case 'a':
-			if ((maxcontig = atoi(optarg)) <= 0)
+			rval = parselength(optarg, &maxcontig);
+			if (rval < 0 || maxcontig <= 0)
 				errx(1, "%s: bad maximum contiguous blocks",
 				    optarg);
 			break;
 		case 'b':
-			if ((bsize = atoi(optarg)) < MINBSIZE)
+			rval = parselength(optarg, &bsize);
+			if (rval < 0)
+				 errx(1, "%s: bad block size",
+                                    optarg);
+			if (bsize < MINBSIZE)
 				errx(1, "%s: block size too small, min is %d",
 				    optarg, MINBSIZE);
 			if (bsize > MAXBSIZE)
@@ -195,33 +202,40 @@ main(int argc, char *argv[])
 				    optarg, MAXBSIZE);
 			break;
 		case 'c':
-			if ((maxblkspercg = atoi(optarg)) <= 0)
+			rval = parselength(optarg, &maxblkspercg);
+			if (rval < 0 || maxblkspercg <= 0)
 				errx(1, "%s: bad blocks per cylinder group",
 				    optarg);
 			break;
 		case 'd':
-			if ((maxbsize = atoi(optarg)) < MINBSIZE)
+			rval = parselength(optarg, &maxbsize);
+			if (rval < 0 || maxbsize < MINBSIZE)
 				errx(1, "%s: bad extent block size", optarg);
 			break;
 		case 'e':
-			if ((maxbpg = atoi(optarg)) <= 0)
+			rval = parselength(optarg, &maxbpg);
+			if (rval < 0 || maxbpg <= 0)
 			  errx(1, "%s: bad blocks per file in a cylinder group",
 				    optarg);
 			break;
 		case 'f':
-			if ((fsize = atoi(optarg)) <= 0)
+			rval = parselength(optarg, &fsize);
+			if (rval < 0 || fsize <= 0)
 				errx(1, "%s: bad fragment size", optarg);
 			break;
 		case 'g':
-			if ((avgfilesize = atoi(optarg)) <= 0)
+			rval = parselength(optarg, &avgfilesize);
+			if (rval < 0 || avgfilesize <= 0)
 				errx(1, "%s: bad average file size", optarg);
 			break;
 		case 'h':
-			if ((avgfilesperdir = atoi(optarg)) <= 0)
+			rval = parselength(optarg, &avgfilesperdir);
+			if (rval < 0 || avgfilesperdir <= 0)
 			       errx(1, "%s: bad average files per dir", optarg);
 			break;
 		case 'i':
-			if ((density = atoi(optarg)) <= 0)
+			rval = parselength(optarg, &density);
+			if (rval < 0 || density <= 0)
 				errx(1, "%s: bad bytes per inode", optarg);
 			break;
 		case 'l':
@@ -481,3 +495,62 @@ usage()
 	fprintf(stderr, "\t-s file system size (sectors)\n");
 	exit(1);
 }
+
+/*
+ * Return the numeric value of a string given in the form [+-][0-9]+[GMKT]
+ * or -1 on format error or overflow.
+ */
+static int
+parselength(const char *ls, int *sz)
+{
+	off_t length, oflow;
+	int lsign;
+
+	length = 0;
+	lsign = 1;
+
+	switch (*ls) {
+	case '-':
+		lsign = -1;
+	case '+':
+		ls++;
+	}
+
+#define ASSIGN_CHK_OFLOW(x, y)  if (x < y) return -1; y = x
+	/*
+	 * Calculate the value of the decimal digit string, failing
+	 * on overflow.
+	 */
+	while (isdigit(*ls)) {
+		oflow = length * 10 + *ls++ - '0';
+		ASSIGN_CHK_OFLOW(oflow, length);
+	}
+
+	switch (*ls) {
+	case 'T':
+	case 't':
+		oflow = length * 1024;
+		ASSIGN_CHK_OFLOW(oflow, length);
+	case 'G':
+	case 'g':
+		oflow = length * 1024;
+		ASSIGN_CHK_OFLOW(oflow, length);
+	case 'M':
+	case 'm':
+		oflow = length * 1024;
+		ASSIGN_CHK_OFLOW(oflow, length);
+	case 'K':
+	case 'k':
+		if (ls[1] != '\0')
+			return -1;
+		oflow = length * 1024;
+		ASSIGN_CHK_OFLOW(oflow, length);
+	case '\0':
+		break;
+	default:
+		return -1;
+	}
+
+	*sz = length * lsign;
+	return 0;
+}

From owner-svn-src-head@FreeBSD.ORG  Wed Mar  3 02:08:50 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 31B66106564A;
	Wed,  3 Mar 2010 02:08:50 +0000 (UTC)
	(envelope-from delphij@gmail.com)
Received: from mail-pz0-f182.google.com (mail-pz0-f182.google.com
	[209.85.222.182])
	by mx1.freebsd.org (Postfix) with ESMTP id E631E8FC1A;
	Wed,  3 Mar 2010 02:08:49 +0000 (UTC)
Received: by pzk12 with SMTP id 12so731706pzk.14
	for ; Tue, 02 Mar 2010 18:08:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=xnM583OASZDInKfVqvt98QM1EioTgfiFUStu1ZO+GeY=;
	b=c/pzql3f8Qc4xTNyZdrLnG62Mggxhye3NHepMsw7Vx51Lmb9UvXgDtOQwg6SBlQk11
	3N8qrop+ID5UfwiOxmP9q0C6dxkpHZ9a+OjAQodCBgjvZ4ZuBFpIlSMf1qlvdEMyMRk1
	7FHY8uldJ9+SQjNrfe9R0i91m10MR5OhdYh9A=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=SPzTA7k2LHFkTiKUTlgwqfMzSLWqIy01FMKCYm+zOlTl9bx88kEpYZc0tH15CoAPp1
	WIl9FrsNK6mXMF8sdC6HWr/V7RtGh473Di0JZkkwvRNvM/F66WJK8deU5EyVnaWcL3wj
	VQhOX7bwdUOk4NK9zXtYjF+pH2WuHnQsDkxpY=
MIME-Version: 1.0
Received: by 10.114.248.7 with SMTP id v7mr588213wah.36.1267582127021; Tue, 02 
	Mar 2010 18:08:47 -0800 (PST)
In-Reply-To: <201003030205.o2325AMY010089@svn.freebsd.org>
References: <201003030205.o2325AMY010089@svn.freebsd.org>
Date: Tue, 2 Mar 2010 18:08:46 -0800
Message-ID: 
From: Xin LI 
To: Maxim Sobolev 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204615 - head/sbin/newfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 03 Mar 2010 02:08:50 -0000

On Tue, Mar 2, 2010 at 6:05 PM, Maxim Sobolev  wrote:
> Author: sobomax
> Date: Wed Mar =C2=A03 02:05:09 2010
> New Revision: 204615
> URL: http://svn.freebsd.org/changeset/base/204615
>
> Log:
> =C2=A0Teach newfs(8) to understand size modifiers for all options taking
> =C2=A0size or size-like argument. I.e. "-s 32k" instead of "-s 32768".
> =C2=A0Size parsing function has been shamelessly stolen from the truncate=
(1).
> =C2=A0I'm sure many sysadmins out there will appreciate this small
> =C2=A0improvement.

Bikeshed: why not expand_number()?

--=20
Xin LI  http://www.delphij.net

From owner-svn-src-head@FreeBSD.ORG  Wed Mar  3 02:44:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B52C3106564A;
	Wed,  3 Mar 2010 02:44:20 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 89FB68FC17;
	Wed,  3 Mar 2010 02:44:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o232iKeY018655;
	Wed, 3 Mar 2010 02:44:20 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o232iKhT018653;
	Wed, 3 Mar 2010 02:44:20 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201003030244.o232iKhT018653@svn.freebsd.org>
From: Warner Losh 
Date: Wed, 3 Mar 2010 02:44:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204616 - head/contrib/gcc/config/mips
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 03 Mar 2010 02:44:20 -0000

Author: imp
Date: Wed Mar  3 02:44:20 2010
New Revision: 204616
URL: http://svn.freebsd.org/changeset/base/204616

Log:
  Also define _MIPS_ISA here.
  
  Submitted by:	jmallet@

Modified:
  head/contrib/gcc/config/mips/freebsd.h

Modified: head/contrib/gcc/config/mips/freebsd.h
==============================================================================
--- head/contrib/gcc/config/mips/freebsd.h	Wed Mar  3 02:05:09 2010	(r204615)
+++ head/contrib/gcc/config/mips/freebsd.h	Wed Mar  3 02:44:20 2010	(r204616)
@@ -187,31 +187,47 @@ Boston, MA 02110-1301, USA.  */
       MIPS_CPP_SET_PROCESSOR ("_MIPS_TUNE", mips_tune_info);	\
 								\
       if (ISA_MIPS1)                                            \
-        builtin_define ("__mips=1");                            \
+        {                                                       \
+          builtin_define ("__mips=1");                          \
+          builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS1");         \
+	}							\
       else if (ISA_MIPS2)                                       \
-        builtin_define ("__mips=2");                            \
+        {                                                       \
+          builtin_define ("__mips=2");                          \
+          builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS2");         \
+	}							\
       else if (ISA_MIPS3)					\
-	builtin_define ("__mips=3");				\
+        {                                                       \
+          builtin_define ("__mips=3");                          \
+          builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS3");         \
+	}							\
       else if (ISA_MIPS4)					\
-	builtin_define ("__mips=4");				\
+        {                                                       \
+          builtin_define ("__mips=4");                          \
+          builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS4");         \
+	}							\
       else if (ISA_MIPS32)					\
 	{							\
 	  builtin_define ("__mips=32");				\
+          builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS32");        \
 	  builtin_define ("__mips_isa_rev=1");			\
 	}							\
       else if (ISA_MIPS32R2)					\
 	{							\
 	  builtin_define ("__mips=32");				\
+          builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS32");        \
 	  builtin_define ("__mips_isa_rev=2");			\
 	}							\
       else if (ISA_MIPS64)					\
 	{							\
 	  builtin_define ("__mips=64");				\
+          builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS64");        \
 	  builtin_define ("__mips_isa_rev=1");			\
 	}							\
 /*      else if (ISA_MIPS64R2)					\
 	{							\
 	  builtin_define ("__mips=64");				\
+          builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS64");        \
 	  builtin_define ("__mips_isa_rev=2");			\
 	}							\
 */								\

From owner-svn-src-head@FreeBSD.ORG  Wed Mar  3 02:46:36 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9604C106566B;
	Wed,  3 Mar 2010 02:46:36 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6AA018FC1C;
	Wed,  3 Mar 2010 02:46:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o232karY019183;
	Wed, 3 Mar 2010 02:46:36 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o232ka12019179;
	Wed, 3 Mar 2010 02:46:36 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201003030246.o232ka12019179@svn.freebsd.org>
From: Warner Losh 
Date: Wed, 3 Mar 2010 02:46:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204617 - head/sys/mips/mips
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 03 Mar 2010 02:46:36 -0000

Author: imp
Date: Wed Mar  3 02:46:36 2010
New Revision: 204617
URL: http://svn.freebsd.org/changeset/base/204617

Log:
  Spell START_FRAME CALLFRAME_SIZ now.

Modified:
  head/sys/mips/mips/exception.S
  head/sys/mips/mips/locore.S
  head/sys/mips/mips/mpboot.S

Modified: head/sys/mips/mips/exception.S
==============================================================================
--- head/sys/mips/mips/exception.S	Wed Mar  3 02:44:20 2010	(r204616)
+++ head/sys/mips/mips/exception.S	Wed Mar  3 02:46:36 2010	(r204617)
@@ -1058,7 +1058,7 @@ sys_stk_chk:
 	nop
 
 # stack overflow
-	PTR_LA	a0, _C_LABEL(_start) - START_FRAME - 8  # set sp to a valid place
+	PTR_LA	a0, _C_LABEL(_start) - CALLFRAME_SIZ - 8  # set sp to a valid place
 	sw	sp, 24(a0)
 	move	sp, a0
 	PTR_LA	a0, 1f
@@ -1072,7 +1072,7 @@ sys_stk_chk:
 	jalr	k0
 	mfc0	a3, COP_0_BAD_VADDR
 
-	PTR_LA	sp, _C_LABEL(_start) - START_FRAME  # set sp to a valid place
+	PTR_LA	sp, _C_LABEL(_start) - CALLFRAME_SIZ  # set sp to a valid place
 
 #if !defined(SMP) && defined(DDB)
 	PTR_LA	a0, 2f

Modified: head/sys/mips/mips/locore.S
==============================================================================
--- head/sys/mips/mips/locore.S	Wed Mar  3 02:44:20 2010	(r204616)
+++ head/sys/mips/mips/locore.S	Wed Mar  3 02:46:36 2010	(r204617)
@@ -166,10 +166,10 @@ VECTOR(_locore, unknown)
 	 * Initialize stack and call machine startup.
 	 */
 	PTR_LA	sp, _C_LABEL(pcpu_space)
-	addiu	sp, (NBPG * 2) - START_FRAME
+	addiu	sp, (NBPG * 2) - CALLFRAME_SIZ
 
-	sw	zero, START_FRAME - 4(sp)	# Zero out old ra for debugger
-	sw	zero, START_FRAME - 8(sp)	# Zero out old fp for debugger
+	sw	zero, CALLFRAME_SIZ - 4(sp)	# Zero out old ra for debugger
+	sw	zero, CALLFRAME_SIZ - 8(sp)	# Zero out old fp for debugger
 
 	PTR_LA	gp, _C_LABEL(_gp)
 
@@ -181,10 +181,10 @@ VECTOR(_locore, unknown)
 	lw      a0, TD_PCB(sp)
 	li	t0, ~7
 	and	a0, a0, t0
-	subu    sp, a0, START_FRAME
+	subu    sp, a0, CALLFRAME_SIZ
 
 	jal	_C_LABEL(mi_startup)		# mi_startup(frame)
-	sw	zero, START_FRAME - 8(sp)	# Zero out old fp for debugger
+	sw	zero, CALLFRAME_SIZ - 8(sp)	# Zero out old fp for debugger
 
 	PANIC("Startup failed!")
 

Modified: head/sys/mips/mips/mpboot.S
==============================================================================
--- head/sys/mips/mips/mpboot.S	Wed Mar  3 02:44:20 2010	(r204616)
+++ head/sys/mips/mips/mpboot.S	Wed Mar  3 02:46:36 2010	(r204617)
@@ -53,13 +53,13 @@ GLOBAL(mpentry)
 	 * Initialize stack and call machine startup
 	 */
 	PTR_LA	sp, _C_LABEL(pcpu_space)
-	addiu	sp, (NBPG * 2) - START_FRAME
+	addiu	sp, (NBPG * 2) - CALLFRAME_SIZ
 	sll	t0, s0, PAGE_SHIFT + 1
 	addu	sp, sp, t0
 
 	/* Zero out old ra and old fp for debugger */
-	sw      zero, START_FRAME - 4(sp)
-	sw      zero, START_FRAME - 8(sp)
+	sw      zero, CALLFRAME_SIZ - 4(sp)
+	sw      zero, CALLFRAME_SIZ - 8(sp)
 
 	PTR_LA	gp, _C_LABEL(_gp)
 

From owner-svn-src-head@FreeBSD.ORG  Wed Mar  3 03:19:38 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DCA99106564A;
	Wed,  3 Mar 2010 03:19:38 +0000 (UTC)
	(envelope-from sobomax@FreeBSD.org)
Received: from sippysoft.com (gk1.360sip.com [72.236.70.240])
	by mx1.freebsd.org (Postfix) with ESMTP id A24FB8FC08;
	Wed,  3 Mar 2010 03:19:38 +0000 (UTC)
Received: from [192.168.1.38] (S0106005004e13421.vs.shawcable.net
	[70.71.175.212]) (authenticated bits=0)
	by sippysoft.com (8.14.3/8.14.3) with ESMTP id o233Jaea051296
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 2 Mar 2010 19:19:37 -0800 (PST)
	(envelope-from sobomax@FreeBSD.org)
Message-ID: <4B8DD54F.6060302@FreeBSD.org>
Date: Tue, 02 Mar 2010 19:19:43 -0800
From: Maxim Sobolev 
Organization: Sippy Software, Inc.
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: Xin LI 
References: <201003030205.o2325AMY010089@svn.freebsd.org>
	
In-Reply-To: 
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204615 - head/sbin/newfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 03 Mar 2010 03:19:39 -0000

Xin LI wrote:
> On Tue, Mar 2, 2010 at 6:05 PM, Maxim Sobolev  wrote:
>> Author: sobomax
>> Date: Wed Mar  3 02:05:09 2010
>> New Revision: 204615
>> URL: http://svn.freebsd.org/changeset/base/204615
>>
>> Log:
>>  Teach newfs(8) to understand size modifiers for all options taking
>>  size or size-like argument. I.e. "-s 32k" instead of "-s 32768".
>>  Size parsing function has been shamelessly stolen from the truncate(1).
>>  I'm sure many sysadmins out there will appreciate this small
>>  improvement.
> 
> Bikeshed: why not expand_number()?

I did not know that function existed, but even if I did, I am really not 
sure if adding dependency on external library just to save 200 bytes of 
code worth it. Considering that newfs(8) is often embedded into various 
space-tight/custom things, adding dependency could cause more harm than 
good. In any case, I do not feel strongly about that, so I can change it 
to use libutil if people feel like it.

-Maxim

From owner-svn-src-head@FreeBSD.ORG  Wed Mar  3 05:45:25 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6F9EF1065672;
	Wed,  3 Mar 2010 05:45:25 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5A2568FC08;
	Wed,  3 Mar 2010 05:45:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o235jPX8058974;
	Wed, 3 Mar 2010 05:45:25 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o235jPKv058963;
	Wed, 3 Mar 2010 05:45:25 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201003030545.o235jPKv058963@svn.freebsd.org>
From: Doug Barton 
Date: Wed, 3 Mar 2010 05:45:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204619 - in head: contrib/bind9
	contrib/bind9/bin/check contrib/bind9/bin/dig
	contrib/bind9/bin/dnssec contrib/bind9/bin/named
	contrib/bind9/bin/named/include/named contrib/bind9/bin/n...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 03 Mar 2010 05:45:25 -0000

Author: dougb
Date: Wed Mar  3 05:45:24 2010
New Revision: 204619
URL: http://svn.freebsd.org/changeset/base/204619

Log:
  Upgrade to version 9.6.2. This version includes all previously released
  security patches to the 9.6.1 version, as well as many other bug fixes.
  
  This version also incorporates a different fix for the problem we had
  patched in contrib/bind9/bin/dig/dighost.c, so that file is now back
  to being the same as the vendor version.
  
  Due to the fact that the DNSSEC algorithm that will be used to sign the
  root zone is only included in this version and in 9.7.x those who wish
  to do validation MUST upgrade to one of these prior to July 2010.

Modified:
  head/contrib/bind9/CHANGES
  head/contrib/bind9/COPYRIGHT
  head/contrib/bind9/FAQ
  head/contrib/bind9/FAQ.xml
  head/contrib/bind9/NSEC3-NOTES
  head/contrib/bind9/README
  head/contrib/bind9/bin/check/named-checkconf.8
  head/contrib/bind9/bin/check/named-checkconf.html
  head/contrib/bind9/bin/check/named-checkzone.8
  head/contrib/bind9/bin/check/named-checkzone.c
  head/contrib/bind9/bin/check/named-checkzone.docbook
  head/contrib/bind9/bin/check/named-checkzone.html
  head/contrib/bind9/bin/dig/dig.1
  head/contrib/bind9/bin/dig/dig.html
  head/contrib/bind9/bin/dig/dighost.c
  head/contrib/bind9/bin/dig/host.1
  head/contrib/bind9/bin/dig/host.c
  head/contrib/bind9/bin/dig/host.html
  head/contrib/bind9/bin/dig/nslookup.1
  head/contrib/bind9/bin/dig/nslookup.c
  head/contrib/bind9/bin/dig/nslookup.html
  head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c
  head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8
  head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c
  head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook
  head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html
  head/contrib/bind9/bin/dnssec/dnssec-keygen.8
  head/contrib/bind9/bin/dnssec/dnssec-keygen.c
  head/contrib/bind9/bin/dnssec/dnssec-keygen.docbook
  head/contrib/bind9/bin/dnssec/dnssec-keygen.html
  head/contrib/bind9/bin/dnssec/dnssec-signzone.8
  head/contrib/bind9/bin/dnssec/dnssec-signzone.c
  head/contrib/bind9/bin/dnssec/dnssec-signzone.docbook
  head/contrib/bind9/bin/dnssec/dnssec-signzone.html
  head/contrib/bind9/bin/dnssec/dnssectool.c
  head/contrib/bind9/bin/dnssec/dnssectool.h
  head/contrib/bind9/bin/named/control.c
  head/contrib/bind9/bin/named/include/named/server.h
  head/contrib/bind9/bin/named/lwresd.8
  head/contrib/bind9/bin/named/lwresd.html
  head/contrib/bind9/bin/named/named.8
  head/contrib/bind9/bin/named/named.conf.5
  head/contrib/bind9/bin/named/named.conf.html
  head/contrib/bind9/bin/named/named.docbook
  head/contrib/bind9/bin/named/named.html
  head/contrib/bind9/bin/named/query.c
  head/contrib/bind9/bin/named/server.c
  head/contrib/bind9/bin/named/statschannel.c
  head/contrib/bind9/bin/named/update.c
  head/contrib/bind9/bin/nsupdate/nsupdate.1
  head/contrib/bind9/bin/nsupdate/nsupdate.html
  head/contrib/bind9/bin/rndc/rndc-confgen.8
  head/contrib/bind9/bin/rndc/rndc-confgen.html
  head/contrib/bind9/bin/rndc/rndc.8
  head/contrib/bind9/bin/rndc/rndc.conf.5
  head/contrib/bind9/bin/rndc/rndc.conf.html
  head/contrib/bind9/bin/rndc/rndc.html
  head/contrib/bind9/config.h.in
  head/contrib/bind9/configure.in
  head/contrib/bind9/doc/arm/Bv9ARM-book.xml
  head/contrib/bind9/doc/arm/Bv9ARM.ch01.html
  head/contrib/bind9/doc/arm/Bv9ARM.ch02.html
  head/contrib/bind9/doc/arm/Bv9ARM.ch03.html
  head/contrib/bind9/doc/arm/Bv9ARM.ch04.html
  head/contrib/bind9/doc/arm/Bv9ARM.ch05.html
  head/contrib/bind9/doc/arm/Bv9ARM.ch06.html
  head/contrib/bind9/doc/arm/Bv9ARM.ch07.html
  head/contrib/bind9/doc/arm/Bv9ARM.ch08.html
  head/contrib/bind9/doc/arm/Bv9ARM.ch09.html
  head/contrib/bind9/doc/arm/Bv9ARM.ch10.html
  head/contrib/bind9/doc/arm/Bv9ARM.html
  head/contrib/bind9/doc/arm/Bv9ARM.pdf
  head/contrib/bind9/doc/arm/man.dig.html
  head/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html
  head/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html
  head/contrib/bind9/doc/arm/man.dnssec-keygen.html
  head/contrib/bind9/doc/arm/man.dnssec-signzone.html
  head/contrib/bind9/doc/arm/man.host.html
  head/contrib/bind9/doc/arm/man.named-checkconf.html
  head/contrib/bind9/doc/arm/man.named-checkzone.html
  head/contrib/bind9/doc/arm/man.named.html
  head/contrib/bind9/doc/arm/man.nsupdate.html
  head/contrib/bind9/doc/arm/man.rndc-confgen.html
  head/contrib/bind9/doc/arm/man.rndc.conf.html
  head/contrib/bind9/doc/arm/man.rndc.html
  head/contrib/bind9/doc/misc/Makefile.in
  head/contrib/bind9/lib/dns/api
  head/contrib/bind9/lib/dns/db.c
  head/contrib/bind9/lib/dns/dispatch.c
  head/contrib/bind9/lib/dns/dnssec.c
  head/contrib/bind9/lib/dns/dst_api.c
  head/contrib/bind9/lib/dns/dst_internal.h
  head/contrib/bind9/lib/dns/dst_parse.c
  head/contrib/bind9/lib/dns/include/dns/db.h
  head/contrib/bind9/lib/dns/include/dns/dnssec.h
  head/contrib/bind9/lib/dns/include/dns/journal.h
  head/contrib/bind9/lib/dns/include/dns/keyvalues.h
  head/contrib/bind9/lib/dns/include/dns/name.h
  head/contrib/bind9/lib/dns/include/dns/ncache.h
  head/contrib/bind9/lib/dns/include/dns/nsec3.h
  head/contrib/bind9/lib/dns/include/dns/rbt.h
  head/contrib/bind9/lib/dns/include/dns/types.h
  head/contrib/bind9/lib/dns/include/dns/zone.h
  head/contrib/bind9/lib/dns/include/dst/dst.h
  head/contrib/bind9/lib/dns/journal.c
  head/contrib/bind9/lib/dns/masterdump.c
  head/contrib/bind9/lib/dns/message.c
  head/contrib/bind9/lib/dns/nsec3.c
  head/contrib/bind9/lib/dns/opensslrsa_link.c
  head/contrib/bind9/lib/dns/rbt.c
  head/contrib/bind9/lib/dns/rbtdb.c
  head/contrib/bind9/lib/dns/rcode.c
  head/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.c
  head/contrib/bind9/lib/dns/resolver.c
  head/contrib/bind9/lib/dns/sdb.c
  head/contrib/bind9/lib/dns/sdlz.c
  head/contrib/bind9/lib/dns/spnego.c
  head/contrib/bind9/lib/dns/validator.c
  head/contrib/bind9/lib/dns/view.c
  head/contrib/bind9/lib/dns/zone.c
  head/contrib/bind9/lib/isc/api
  head/contrib/bind9/lib/isc/base32.c
  head/contrib/bind9/lib/isc/base64.c
  head/contrib/bind9/lib/isc/heap.c
  head/contrib/bind9/lib/isc/httpd.c
  head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h
  head/contrib/bind9/lib/isc/include/isc/entropy.h
  head/contrib/bind9/lib/isc/include/isc/netscope.h
  head/contrib/bind9/lib/isc/include/isc/portset.h
  head/contrib/bind9/lib/isc/include/isc/sha2.h
  head/contrib/bind9/lib/isc/include/isc/util.h
  head/contrib/bind9/lib/isc/inet_ntop.c
  head/contrib/bind9/lib/isc/powerpc/include/isc/atomic.h
  head/contrib/bind9/lib/isc/random.c
  head/contrib/bind9/lib/isc/sha2.c
  head/contrib/bind9/lib/isc/unix/ifiter_getifaddrs.c
  head/contrib/bind9/lib/isc/unix/socket.c
  head/contrib/bind9/lib/isccc/api
  head/contrib/bind9/lib/isccfg/aclconf.c
  head/contrib/bind9/lib/isccfg/api
  head/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h
  head/contrib/bind9/lib/lwres/api
  head/contrib/bind9/lib/lwres/context.c
  head/contrib/bind9/lib/lwres/getipnode.c
  head/contrib/bind9/lib/lwres/man/lwres.3
  head/contrib/bind9/lib/lwres/man/lwres.html
  head/contrib/bind9/lib/lwres/man/lwres_buffer.3
  head/contrib/bind9/lib/lwres/man/lwres_buffer.html
  head/contrib/bind9/lib/lwres/man/lwres_config.3
  head/contrib/bind9/lib/lwres/man/lwres_config.html
  head/contrib/bind9/lib/lwres/man/lwres_context.3
  head/contrib/bind9/lib/lwres/man/lwres_context.html
  head/contrib/bind9/lib/lwres/man/lwres_gabn.3
  head/contrib/bind9/lib/lwres/man/lwres_gabn.html
  head/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3
  head/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html
  head/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3
  head/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html
  head/contrib/bind9/lib/lwres/man/lwres_gethostent.3
  head/contrib/bind9/lib/lwres/man/lwres_gethostent.html
  head/contrib/bind9/lib/lwres/man/lwres_getipnode.3
  head/contrib/bind9/lib/lwres/man/lwres_getipnode.html
  head/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3
  head/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html
  head/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3
  head/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html
  head/contrib/bind9/lib/lwres/man/lwres_gnba.3
  head/contrib/bind9/lib/lwres/man/lwres_gnba.html
  head/contrib/bind9/lib/lwres/man/lwres_hstrerror.3
  head/contrib/bind9/lib/lwres/man/lwres_hstrerror.html
  head/contrib/bind9/lib/lwres/man/lwres_inetntop.3
  head/contrib/bind9/lib/lwres/man/lwres_inetntop.html
  head/contrib/bind9/lib/lwres/man/lwres_noop.3
  head/contrib/bind9/lib/lwres/man/lwres_noop.html
  head/contrib/bind9/lib/lwres/man/lwres_packet.3
  head/contrib/bind9/lib/lwres/man/lwres_packet.html
  head/contrib/bind9/lib/lwres/man/lwres_resutil.3
  head/contrib/bind9/lib/lwres/man/lwres_resutil.html
  head/contrib/bind9/version
  head/lib/bind/config.h
Directory Properties:
  head/contrib/bind9/   (props changed)

Modified: head/contrib/bind9/CHANGES
==============================================================================
--- head/contrib/bind9/CHANGES	Wed Mar  3 05:14:59 2010	(r204618)
+++ head/contrib/bind9/CHANGES	Wed Mar  3 05:45:24 2010	(r204619)
@@ -1,4 +1,27 @@
-	--- 9.6.1-P3 released ---
+
+	--- 9.6.2 released ---
+
+2850.	[bug]		If isc_heap_insert() failed due to memory shortage
+			the heap would have corrupted entries. [RT #20951]
+
+2849.	[bug]		Don't treat errors from the xml2 library as fatal.
+			[RT #20945]
+
+2846.	[bug]		EOF on unix domain sockets was not being handled
+			correctly. [RT #20731]
+
+2844.	[doc]		notify-delay default in ARM was wrong.  It should have
+			been five (5) seconds.
+
+	--- 9.6.2rc1 released ---
+
+2838.	[func]		Backport support for SHA-2 DNSSEC algorithms,
+			RSASHA256 and RSASHA512, from BIND 9.7.  (This
+			incorporates changes 2726 and 2738 from that
+			release branch.) [RT #20871]
+
+2837.	[port]		Prevent Linux spurious warnings about fwrite().
+			[RT #20812]
 
 2831.	[security]	Do not attempt to validate or cache
 			out-of-bailiwick data returned with a secure
@@ -10,21 +33,286 @@
 
 2827.	[security]	Bogus NXDOMAIN could be cached as if valid. [RT #20712]
 
-	--- 9.6.1-P2 released ---
+2825.	[bug]		Changing the setting of OPTOUT in a NSEC3 chain that
+			was in the process of being created was not properly
+			recorded in the zone. [RT #20786]
+
+2823.	[bug]		rbtdb.c:getsigningtime() was missing locks. [RT #20781]
+
+2819.	[cleanup]	Removed unnecessary DNS_POINTER_MAXHOPS define
+			[RT #20771]
+
+2818.	[cleanup]	rndc could return an incorrect error code 
+			when a zone was not found. [RT #20767]
+
+2815.	[bug]		Exclusively lock the task when freezing a zone.
+			[RT #19838]
+
+2814.	[func]		Provide a definitive error message when a master
+			zone is not loaded. [RT #20757]
+
+	--- 9.6.2b1 released ---
+
+2797.	[bug]		Don't decrement the dispatch manager's maxbuffers.
+			[RT #20613]
+
+2790.	[bug]		Handle DS queries to stub zones. [RT #20440]
+
+2789.   [bug]           Fixed an INSIST in dispatch.c [RT #20576]
+
+2786.	[bug]		Additional could be promoted to answer. [RT #20663]
+
+2784.	[bug]		TC was not always being set when required glue was
+			dropped. [RT #20655]
+
+2783.	[func]		Return minimal responses to EDNS/UDP queries with a UDP
+			buffer size of 512 or less.  [RT #20654]
+
+2782.	[port]		win32: use getaddrinfo() for hostname lookups.
+			[RT #20650]
+
+2777.	[contrib]	DLZ MYSQL auto reconnect support discovery was wrong.
 
 2772.	[security]	When validating, track whether pending data was from
 			the additional section or not and only return it if
 			validates as secure. [RT #20438]
 
-	--- 9.6.1-P1 released ---
+2765.	[bug]		Skip masters for which the TSIG key cannot be found.
+			[RT #20595]
+
+2760.	[cleanup]	Corrected named-compilezone usage summary. [RT #20533]
+
+2759.	[doc]		Add information about .jbk/.jnw files to
+			the ARM. [RT #20303]
+
+2758.	[bug]		win32: Added a workaround for a windows 2008 bug
+			that could cause the UDP client handler to shut
+			down. [RT #19176]
+
+2757.	[bug]		dig: assertion failure could occur in connect
+			timeout. [RT #20599]
+
+2755.	[doc]		Clarify documentation of keyset- files in
+			dnssec-signzone man page. [RT #19810]
+
+2754.	[bug]		Secure-to-insecure transitions failed when zone
+			was signed with NSEC3. [RT #20587]
+
+2750.	[bug]		dig: assertion failure could occur when a server
+			didn't have an address. [RT #20579]
+
+2749.	[bug]		ixfr-from-differences generated a non-minimal ixfr
+			for NSEC3 signed zones. [RT #20452]
+
+2747.	[bug]		Journal roll forwards failed to set the re-signing
+			time of RRSIGs correctly. [RT #20541]
+
+2743.	[bug]		RRSIG could be incorrectly set in the NSEC3 record
+			for a insecure delegation.
+
+2729.	[func]		When constructing a CNAME from a DNAME use the DNAME
+			TTL. [RT #20451]
+
+2723.	[bug]		isc_base32_totext(), isc_base32hex_totext(), and
+			isc_base64_totext(), didn't always mark regions of
+			memory as fully consumed after conversion.  [RT #20445]
+
+2722.	[bug]		Ensure that the memory associated with the name of
+			a node in a rbt tree is not altered during the life
+			of the node. [RT #20431]
+
+2721.	[port]		Have dst__entropy_status() prime the random number
+			generator. [RT #20369]
+
+2718.	[bug]		The space calculations in opensslrsa_todns() were
+			incorrect. [RT #20394]
+
+2716.	[bug]		nslookup debug mode didn't return the ttl. [RT #20414]
+
+2715.	[bug]		Require OpenSSL support to be explicitly disabled.
+			[RT #20288]
+
+2714.	[port]		aix/powerpc: 'asm("ics");' needs non standard assembler
+			flags.
+
+2713.	[bug]		powerpc: atomic operations missing asm("ics") /
+			__isync() calls.
+
+2706.	[bug]		Loading a zone with a very large NSEC3 salt could
+			trigger an assert. [RT #20368]
+
+2705.	[bug]		Reconcile the XML stats version number with a later
+                        BIND9 release, by adding a "name" attribute to
+                        "cache" elements and increasing the version number
+                        to 2.2.  (This is a minor version change, but may
+                        affect XML parsers if they assume the cache element
+                        doesn't take an attribute.)
+
+2704.	[bug]		Serial of dynamic and stub zones could be inconsistent
+			with their SOA serial.  [RT #19387]
+
+2701.	[doc]		Correction to ARM: hmac-md5 is no longer the only
+			supported TSIG key algorithm. [RT #18046]
+
+2700.	[doc]		The match-mapped-addresses option is discouraged.
+			[RT #12252]
+
+2699.	[bug]		Missing lock in rbtdb.c. [RT #20037]
+
+2697.	[port]		win32: ensure that S_IFMT, S_IFDIR, S_IFCHR and
+			S_IFREG are defined after including .
+			[RT #20309]
+
+2696.	[bug]		named failed to successfully process some valid
+			acl constructs. [RT #20308]
+
+2692.	[port]		win32: 32/64 bit cleanups. [RT #20335]
+
+2690.	[bug]		win32: fix isc_thread_key_getspecific() prototype.
+			[RT #20315]
+
+2689.	[bug]		Correctly handle snprintf result. [RT #20306]
+
+2688.	[bug]		Use INTERFACE_F_POINTTOPOINT, not IFF_POINTOPOINT,
+			to decide to fetch the destination address. [RT #20305]
+
+2686.	[bug]		dnssec-signzone should clean the old NSEC chain when
+			signing with NSEC3 and vice versa. [RT #20301]
+
+2683.	[bug]		dnssec-signzone should clean out old NSEC3 chains when
+			the NSEC3 parameters used to sign the zone change.
+			[RT #20246]
+
+2681.	[bug]		IPSECKEY RR of gateway type 3 was not correctly
+			decoded. [RT #20269]
+
+2678.	[func]		Treat DS queries as if "minimal-response yes;"
+			was set. [RT #20258]
+
+2672.	[bug]		Don't enable searching in 'host' when doing reverse
+			lookups. [RT #20218]
+
+2670.	[bug]		Unexpected connect failures failed to log enough
+			information to be useful. [RT #20205]
+
+2663.	[func]		win32:  allow named to run as a service using
+			"NT AUTHORITY\LocalService" as the account. [RT #19977]
+
+2662.	[bug]		lwres_getipnodebyname() and lwres_getipnodebyaddr()
+			returned a misleading error code when lwresd was
+			down. [RT #20028]
+
+2661.	[bug]		Check whether socket fd exceeds FD_SETSIZE when
+			creating lwres context. [RT #20029]
+
+2659.	[doc]		Clarify dnssec-keygen doc: key name must match zone
+			name for DNSSEC keys. [RT #19938]
+
+2656.	[func]		win32: add a "tools only" check box to the installer
+			which causes it to only install dig, host, nslookup,
+			nsupdate and relevant DLLs.  [RT #19998]
+
+2655.	[doc]		Document that key-directory does not affect
+			rndc.key.  [RT #20155]
+
+2653.	[bug]		Treat ENGINE_load_private_key() failures as key
+			not found rather than out of memory.  [RT #18033]
+
+2649.	[bug]		Set the domain for forward only zones. [RT #19944]
+
+2648.	[port]		win32: isc_time_seconds() was broken. [RT #19900]
+
+2647.	[bug]		Remove unnecessary SOA updates when a new KSK is
+			added. [RT #19913]
+
+2646.	[bug]		Incorrect cleanup on error in socket.c. [RT #19987]
+
+2645.	[port]		"gcc -m32" didn't work on amd64 and x86_64 platforms
+			which default to 64 bits. [RT #19927]
+
+2643.	[bug]		Stub zones interacted badly with NSEC3 support.
+			[RT #19777]
+
+2642.	[bug]		nsupdate could dump core on solaris when reading
+			improperly formatted key files.  [RT #20015]
 
 2640.	[security]	A specially crafted update packet will cause named
 			to exit. [RT #20000]
 
+2639.	[bug]		Silence compiler warnings in gssapi code. [RT #19954]
+
+2637.	[func]		Rationalize dnssec-signzone's signwithkey() calling.
+			[RT #19959]
+
+2635.	[bug]		isc_inet_ntop() incorrectly handled 0.0/16 addresses.
+			[RT #19716]
+
+2633.	[bug]		Handle 15 bit rand() functions. [RT #19783]
+
+2632.	[func]		util/kit.sh: warn if documentation appears to be out of
+			date.  [RT #19922]
+
+2625.	[bug]		Missing UNLOCK in rbtdb.c. [RT #19865]
+
+2623.	[bug]		Named started seaches for DS non-optimally. [RT #19915]
+
+2621.	[doc]		Made copyright boilterplate consistent.  [RT #19833]
+
+2920.	[bug]		Delay thawing the zone until the reload of it has
+			completed successfully.  [RT #19750]
+
+2618.	[bug]		The sdb and sdlz db_interator_seek() methods could
+			loop infinitely. [RT #19847]
+
+2617.	[bug]		ifconfig.sh failed to emit an error message when
+			run from the wrong location. [RT #19375]
+
+2616.	[bug]		'host' used the nameservers from resolv.conf even
+			when a explicit nameserver was specified. [RT #19852]
+
+2615.	[bug]		"__attribute__((unused))" was in the wrong place
+			for ia64 gcc builds. [RT #19854]
+
+2614.	[port]		win32: 'named -v' should automatically be executed
+			in the foreground. [RT #19844]
+
+2613.	[bug]		Option argument validation was missing for
+			dnssec-dsfromkey. [RT #19828]
+
+2610.	[port]		sunos: Change #2363 was not complete. [RT #19796]
+
+2608.	[func]		Perform post signing verification checks in
+			dnssec-signzone.  These can be disabled with -P.
+
+			The post sign verification test ensures that for each
+			algorithm in use there is at least one non revoked
+			self signed KSK key.  That all revoked KSK keys are
+			self signed.  That all records in the zone are signed
+			by the algorithm.  [RT #19653]
+
+2601.	[doc]		Mention file creation mode mask in the
+			named manual page.
+
+2593.	[bug]		Improve a corner source of SERVFAILs [RT #19632]
+
+2589.	[bug]		dns_db_unregister() failed to clear '*dbimp'.
+			[RT #19626]
+
+2581.	[contrib]	dlz/mysql set MYSQL_OPT_RECONNECT option on connection.
+			Requires MySQL 5.0.19 or later. [RT #19084]
+
+2580.	[bug]		UpdateRej statistics counter could be incremented twice
+			for one rejection. [RT #19476]
+
+2533.	[doc]		ARM: document @ (at-sign). [RT #17144]
+
+2500.	[contrib]	contrib/sdb/pgsql/zonetodb.c called non-existent
+			function. [RT #18582]
+
 	--- 9.6.1 released ---
 
 2607.	[bug]		named could incorrectly delete NSEC3 records for
-			empty nodes when processing a update request.  
+			empty nodes when processing a update request.
 			[RT #19749]
 
 2606.	[bug]		"delegation-only" was not being accepted in
@@ -78,7 +366,7 @@
 			date to the version string, -DNO_VERSION_DATE.
 
 2582.	[bug]		Don't emit warning log message when we attempt to
-			remove non-existant journal. [RT #19516]
+			remove non-existent journal. [RT #19516]
 
 2579.	[bug]		DNSSEC lookaside validation failed to handle unknown
 			algorithms. [RT #19479]
@@ -136,7 +424,7 @@
 2556.	[port]		Solaris: mkdir(2) on tmpfs filesystems does not do the
 			error checks in the correct order resulting in the
 			wrong error code sometimes being returned. [RT #19249]
-			
+
 2554.	[bug]		Validation of uppercase queries from NSEC3 zones could
 			fail. [RT #19297]
 
@@ -185,7 +473,7 @@
 2536.	[cleanup]	Silence some warnings when -Werror=format-security is
 			specified. [RT #19083]
 
-2535.	[bug]		dig +showsearh and +trace interacted badly. [RT #19091]
+2535.	[bug]		dig +showsearch and +trace interacted badly. [RT #19091]
 
 2532.	[bug]		dig: check the question section of the response to
 			see if it matches the asked question. [RT #18495]
@@ -198,8 +486,8 @@
 2529.	[cleanup]	Upgrade libtool to silence complaints from recent
 			version of autoconf. [RT #18657]
 
-2528.   [cleanup]       Silence spurious configure warning about
-                        --datarootdir [RT #19096]
+2528.   [cleanup]	Silence spurious configure warning about
+			--datarootdir [RT #19096]
 
 2527.	[bug]		named could reuse cache on reload with
 			enabling/disabling validation. [RT #19119]
@@ -222,7 +510,7 @@
 			preceded in resolv.conf. [RT #19081]
 
 2517.	[bug]		dig +trace with -4 or -6 failed when it chose a
-			nameserver address of the excluded address.
+			nameserver address of the excluded address type.
 			[RT #18843]
 
 2516.	[bug]		glue sort for responses was performed even when not
@@ -235,7 +523,7 @@
 2511.	[cleanup]	dns_rdata_tofmttext() add const to linebreak.
 			[RT #18885]
 
-2506.	[port]		solaris: Check at configure time if 
+2506.	[port]		solaris: Check at configure time if
 			hack_shutup_pthreadonceinit is needed. [RT #19037]
 
 2505.	[port]		Treat amd64 similarly to x86_64 when determining
@@ -258,7 +546,7 @@
 2515.	[port]		win32: build dnssec-dsfromkey and dnssec-keyfromlabel.
 			[RT #19063]
 
-2513	[bug]		Fix windows cli build. [RT #19062]
+2513.	[bug]		Fix windows cli build. [RT #19062]
 
 2510.	[bug]		"dig +sigchase" could trigger REQUIRE failures.
 			[RT #19033]
@@ -343,7 +631,7 @@
 
 2478.	[bug]		'addresses' could be used uninitialized in
 			configure_forward(). [RT #18800]
-	
+
 2477.	[bug]		dig: the global option to print the command line is
 			+cmd not print_cmd.  Update the output to reflect
 			this. [RT #17008]
@@ -359,7 +647,7 @@
 
 2473.	[port]		linux: raise the limit on open files to the possible
 			maximum value before spawning threads; 'files'
-		        specified in named.conf doesn't seem to work with
+			specified in named.conf doesn't seem to work with
 			threads as expected. [RT #18784]
 
 2472.	[port]		linux: check the number of available cpu's before
@@ -388,7 +676,7 @@
 2464.	[port]		linux: check that a capability is present before
 			trying to set it. [RT #18135]
 
-2463.   [port]          linux: POSIX doesn't include the IPv6 Advanced Socket
+2463.	[port]		linux: POSIX doesn't include the IPv6 Advanced Socket
 			API and glibc hides parts of the IPv6 Advanced Socket
 			API as a result.  This is stupid as it breaks how the
 			two halves (Basic and Advanced) of the IPv6 Socket API
@@ -418,7 +706,7 @@
 2456.	[bug]		In ACLs, ::/0 and 0.0.0.0/0 would both match any
 			address, regardless of family.  They now correctly
 			distinguish IPv4 from IPv6.  [RT #18559]
-                        
+
 2455.	[bug]		Stop metadata being transferred via axfr/ixfr.
 			[RT #18639]
 
@@ -458,7 +746,7 @@
 
 2442.	[bug]		A lock could be destroyed twice. [RT# 18626]
 
-2441.   [bug]           isc_radix_insert() could copy radix tree nodes
+2441.	[bug]		isc_radix_insert() could copy radix tree nodes
 			incompletely. [RT #18573]
 
 2440.   [bug]		named-checkconf used an incorrect test to determine
@@ -515,7 +803,7 @@
 			implementation.  Allow the use of kqueue,
 			epoll and /dev/poll to be selected at compile
 			time. [RT #18277]
-			
+
 2423.   [security]	Randomize server selection on queries, so as to
                         make forgery a little more difficult.  Instead of
                         always preferring the server with the lowest RTT,
@@ -583,9 +871,9 @@
 
 2406.	[placeholder]
 
-2405.   [cleanup]       The default value for dnssec-validation was changed to
-                        "yes" in 9.5.0-P1 and all subsequent releases; this
-                        was inadvertently omitted from CHANGES at the time.
+2405.	[cleanup]	The default value for dnssec-validation was changed to
+			"yes" in 9.5.0-P1 and all subsequent releases; this
+			was inadvertently omitted from CHANGES at the time.
 
 2404.	[port]		hpux: files unlimited support.
 
@@ -661,7 +949,7 @@
 2380.	[bug]		dns_view_find() was not returning NXDOMAIN/NXRRSET
 			proofs which, in turn, caused validation failures
 			for insecure zones immediately below a secure zone
-			the server was authoritative for. [RT #18112] 
+			the server was authoritative for. [RT #18112]
 
 2379.	[contrib]	queryperf/gen-data-queryperf.py: removed redundant
 			TLDs and supported RRs with TTLs [RT #17972]
@@ -709,7 +997,7 @@
 2363.	[port]		sunos: pre-set "lt_cv_sys_max_cmd_len=4096;".
 			[RT #17513]
 
-2362.   [cleanup]	Make "rrset-order fixed" a compile-time option.
+2362.	[cleanup]	Make "rrset-order fixed" a compile-time option.
 			settable by "./configure --enable-fixed-rrset".
 			Disabled by default. [RT #17977]
 
@@ -792,12 +1080,12 @@
 			interfaces if there are not listen-on-v6 clauses in
 			named.conf.  [RT #17581]
 
-2335.	[port]		sunos:  libbind and *printf() support for long long. 
+2335.	[port]		sunos:  libbind and *printf() support for long long.
 			[RT #17513]
 
 2334.	[bug]		Bad REQUIRES in fromstruct_in_naptr(),  off by one
 			bug in fromstruct_txt(). [RT #17609]
-			
+
 2333.	[bug]		Fix off by one error in isc_time_nowplusinterval().
 			[RT #17608]
 
@@ -842,7 +1130,7 @@
 2320.	[func]		Make statistics counters thread-safe for platforms
 			that support certain atomic operations. [RT #17466]
 
-2319.	[bug]		Silence Coverity warnings in 
+2319.	[bug]		Silence Coverity warnings in
 			lib/dns/rdata/in_1/apl_42.c. [RT #17469]
 
 2318.	[port]		sunos fixes for libbind.  [RT #17514]
@@ -894,7 +1182,7 @@
 2301.	[bug]		Remove resource leak and fix error messages in
 			bin/tests/system/lwresd/lwtest.c. [RT #17474]
 
-2300.	[bug]		Fixed failure to close open file in 
+2300.	[bug]		Fixed failure to close open file in
 			bin/tests/names/t_names.c. [RT #17473]
 
 2299.	[bug]		Remove unnecessary NULL check in
@@ -1017,7 +1305,7 @@
 2261.   [bug]           Fix memory leak with "any" and "none" ACLs [RT #17272]
 
 2260.	[bug]		Reported wrong clients-per-query when increasing the
-                        value. [RT #17236]
+			value. [RT #17236]
 
 2259.	[placeholder]
 
@@ -1039,10 +1327,10 @@
 			intermediate values as timer->idle was reset by
 			isc_timer_touch(). [RT #17243]
 
-2253.	[func]	 	"max-cache-size" defaults to 32M.
+2253.	[func]		"max-cache-size" defaults to 32M.
 			"max-acache-size" defaults to 16M.
 
-2252.   [bug]           Fixed errors in sortlist code [RT #17216]
+2252.	[bug]		Fixed errors in sortlist code [RT #17216]
 
 2251.	[placeholder]
 
@@ -1050,11 +1338,11 @@
 			memory statistics file should be written or not.
 			Additionally named's -m option will cause the
 			statistics file to be written. [RT #17113]
-			
-2249.   [bug]           Only set Authentic Data bit if client requested
-                        DNSSEC, per RFC 3655 [RT #17175]
 
-2248.   [cleanup]       Fix several errors reported by Coverity. [RT #17160]
+2249.	[bug]		Only set Authentic Data bit if client requested
+			DNSSEC, per RFC 3655 [RT #17175]
+
+2248.	[cleanup]	Fix several errors reported by Coverity. [RT #17160]
 
 2247.	[doc]		Sort doc/misc/options. [RT #17067]
 
@@ -1095,11 +1383,11 @@
 
 2235.	[bug]		 was not being installed. [RT #17135]
 
-2234.   [port]          Correct some compiler warnings on SCO OSr5 [RT #17134]
-  
-2233.   [func]          Add support for O(1) ACL processing, based on
-                        radix tree code originally written by Kevin
-                        Brintnall. [RT #16288]
+2234.	[port]		Correct some compiler warnings on SCO OSr5 [RT #17134]
+
+2233.	[func]		Add support for O(1) ACL processing, based on
+			radix tree code originally written by Kevin
+			Brintnall. [RT #16288]
 
 2232.	[bug]		dns_adb_findaddrinfo() could fail and return
 			ISC_R_SUCCESS. [RT #17137]
@@ -1120,7 +1408,7 @@
 2226.	[placeholder]
 
 2225.	[bug]		More support for systems with no IPv4 addresses.
-		        [RT #17111]
+			[RT #17111]
 
 2224.	[bug]		Defer journal compaction if a xfrin is in progress.
 			[RT #17119]
@@ -1128,7 +1416,7 @@
 2223.	[bug]		Make a new journal when compacting. [RT #17119]
 
 2222.	[func]		named-checkconf now checks server key references.
-		        [RT #17097]
+			[RT #17097]
 
 2221.	[bug]		Set the event result code to reflect the actual
 			record turned to caller when a cache update is
@@ -1137,7 +1425,7 @@
 
 2220.	[bug]		win32: Address a race condition in final shutdown of
 			the Windows socket code. [RT #17028]
-			
+
 2219.	[bug]		Apply zone consistency checks to additions, not
 			removals, when updating. [RT #17049]
 
@@ -1147,7 +1435,7 @@
 2217.	[func]		Adjust update log levels. [RT #17092]
 
 2216.	[cleanup]	Fix a number of errors reported by Coverity.
-		        [RT #17094]
+			[RT #17094]
 
 2215.	[bug]		Bad REQUIRE check isc_hmacsha1_verify(). [RT #17094]
 
@@ -1193,7 +1481,7 @@
 			localhost;) is used.
 
 			[RT #16987]
-	
+
 2205.	[bug]		libbind: change #2119 broke thread support. [RT #16982]
 
 2204.	[bug]		"rndc flushanme name unknown-view" caused named
@@ -1332,7 +1620,7 @@
 			allow-query-on, allow-recursion-on and
 			allow-query-cache-on. [RT #16291]
 
-2164.	[bug]		The code to determine how named-checkzone / 
+2164.	[bug]		The code to determine how named-checkzone /
 			named-compilezone was called failed under windows.
 			[RT #16764]
 
@@ -1539,14 +1827,14 @@
 
 2095.	[port]		libbind: alway prototype inet_cidr_ntop_ipv6() and
 			net_cidr_ntop_ipv6(). [RT #16388]
- 
+
 2094.	[contrib]	Update named-bootconf.  [RT# 16404]
 
 2093.	[bug]		named-checkzone -s was broken.
 
 2092.	[bug]		win32: dig, host, nslookup.  Use registry config
 			if resolv.conf does not exist or no nameservers
-			listed. [RT #15877] 
+			listed. [RT #15877]
 
 2091.	[port]		dighost.c: race condition on cleanup. [RT #16417]
 
@@ -1950,7 +2238,7 @@
 
 1964.	[func]		Separate out MX and SRV to CNAME checks. [RT #15723]
 
-1963.	[port]		Tru64 4.0E doesn't support send() and recv(). 
+1963.	[port]		Tru64 4.0E doesn't support send() and recv().
 			[RT #15586]
 
 1962.	[bug]		Named failed to clear old update-policy when it
@@ -1993,7 +2281,7 @@
 1951.	[security]	Drop queries from particular well known ports.
 			Don't return FORMERR to queries from particular
 			well known ports.  [RT #15636]
-			
+
 1950.	[port]		Solaris 2.5.1 and earlier cannot bind() then connect()
 			a TCP socket. This prevents the source address being
 			set for TCP connections. [RT #15628]
@@ -2015,7 +2303,7 @@
 1945.	[cleanup]	dnssec-keygen: RSA (RSAMD5) is no longer recommended.
 			To generate a RSAMD5 key you must explicitly request
 			RSAMD5. [RT #13780]
-			
+
 1944.	[cleanup]	isc_hash_create() does not need a read/write lock.
 			[RT #15522]
 
@@ -2127,7 +2415,7 @@
 			[RT #15034]
 
 1905.	[bug]		Strings returned from cfg_obj_asstring() should be
-			treated as read-only.  The prototype for 
+			treated as read-only.  The prototype for
 			cfg_obj_asstring() has been updated to reflect this.
 			[RT #15256]
 
@@ -2259,10 +2547,10 @@
 1863.	[bug]		rrset-order "fixed" error messages not complete.
 
 1862.	[func]		Add additional zone data constancy checks.
-			named-checkzone has extended checking of NS, MX and 
+			named-checkzone has extended checking of NS, MX and
 			SRV record and the hosts they reference.
 			named has extended post zone load checks.
-			New zone options: check-mx and integrity-check. 
+			New zone options: check-mx and integrity-check.
 			[RT #4940]
 
 1861.	[bug]		dig could trigger a INSIST on certain malformed
@@ -2305,9 +2593,9 @@
 1848.	[bug]		Improve SMF integration. [RT #13238]
 
 1847.	[bug]		isc_ondestroy_init() is called too late in
-			dns_rbtdb_create()/dns_rbtdb64_create(). 
+			dns_rbtdb_create()/dns_rbtdb64_create().
 			[RT #13661]
-			
+
 1846.	[contrib]	query-loc-0.3.0 from Stephane Bortzmeyer
 			.
 
@@ -2599,7 +2887,7 @@
 			[RT #12866]
 
 1748.	[func]		dig now returns the byte count for axfr/ixfr.
-			
+
 1747.	[bug]		BIND 8 compatibility: named/named-checkconf failed
 			to parse "host-statistics-max" in named.conf.
 
@@ -2617,7 +2905,7 @@
 			requested number of worker threads then destruction
 			of the manager would trigger an INSIST() failure.
 			[RT #12790]
-			
+
 1742.	[bug]		Deleting all records at a node then adding a
 			previously existing record, in a single UPDATE
 			transaction, failed to leave / regenerate the
@@ -2628,7 +2916,7 @@
 
 1740.	[bug]		Replace rbt's hash algorithm as it performed badly
 			with certain zones. [RT #12729]
-			
+
 			NOTE: a hash context now needs to be established
 			via isc_hash_create() if the application was not
 			already doing this.
@@ -2643,7 +2931,7 @@
 
 1736.	[bug]		dst_key_fromnamedfile() could fail to read a
 			public key. [RT #12687]
-			
+
 1735.	[bug]		'dig +sigtrace' could die with a REQUIRE failure.
 			[RE #12688]
 
@@ -2820,7 +3108,7 @@
 
 1675.	[bug]		named would sometimes add extra NSEC records to
 			the authority section.
-			
+
 1674.	[port]		linux: increase buffer size used to scan
 			/proc/net/if_inet6.
 
@@ -2894,7 +3182,7 @@
 
 1648.	[func]		Update dnssec-lookaside named.conf syntax to support
 			multiple dnssec-lookaside namespaces (not yet
-			implemented).  
+			implemented).
 
 1647.	[bug]		It was possible trigger a INSIST when chasing a DS
 			record that required walking back over a empty node.
@@ -2924,7 +3212,7 @@
 
 1638.	[bug]		"ixfr-from-differences" could generate a REQUIRE
 			failure if the journal open failed. [RT #11347]
-			
+
 1637.	[bug]		Node reference leak on error in addnoqname().
 
 1636.	[bug]		The dump done callback could get ISC_R_SUCCESS even if
@@ -3018,21 +3306,21 @@
 1607.	[bug]		dig, host and nslookup were still using random()
 			to generate query ids. [RT# 11013]
 
-1606.	[bug]	 	DLV insecurity proof was failing.
+1606.	[bug]		DLV insecurity proof was failing.
 
 1605.	[func]		New dns_db_find() option DNS_DBFIND_COVERINGNSEC.
 
 1604.	[bug]		A xfrout_ctx_create() failure would result in
 			xfrout_ctx_destroy() being called with a
 			partially initialized structure.
-			
+
 1603.	[bug]		nsupdate: set interactive based on isatty().
 			[RT# 10929]
 
 1602.	[bug]		Logging to a file failed unless a size was specified.
 			[RT# 10925]
 
-1601.	[bug]		Silence spurious warning 'both "recursion no;" and 
+1601.	[bug]		Silence spurious warning 'both "recursion no;" and
 			"allow-recursion" active' warning from view "_bind".
 			[RT# 10920]
 

Modified: head/contrib/bind9/COPYRIGHT
==============================================================================
--- head/contrib/bind9/COPYRIGHT	Wed Mar  3 05:14:59 2010	(r204618)
+++ head/contrib/bind9/COPYRIGHT	Wed Mar  3 05:45:24 2010	(r204619)
@@ -1,4 +1,4 @@
-Copyright (C) 2004-2009  Internet Systems Consortium, Inc. ("ISC")
+Copyright (C) 2004-2010  Internet Systems Consortium, Inc. ("ISC")
 Copyright (C) 1996-2003  Internet Software Consortium.
 
 Permission to use, copy, modify, and/or distribute this software for any
@@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN
 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 PERFORMANCE OF THIS SOFTWARE.
 
-$Id: COPYRIGHT,v 1.14.176.1 2009/01/05 23:47:22 tbox Exp $
+$Id: COPYRIGHT,v 1.14.176.2 2010/01/07 23:47:36 tbox Exp $
 
 Portions Copyright (C) 1996-2001  Nominum, Inc.
 

Modified: head/contrib/bind9/FAQ
==============================================================================
--- head/contrib/bind9/FAQ	Wed Mar  3 05:14:59 2010	(r204618)
+++ head/contrib/bind9/FAQ	Wed Mar  3 05:45:24 2010	(r204619)
@@ -1,6 +1,6 @@
 Frequently Asked Questions about BIND 9
 
-Copyright © 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+Copyright © 2004-2010 Internet Systems Consortium, Inc. ("ISC")
 
 Copyright © 2000-2003 Internet Software Consortium.
 
@@ -784,6 +784,22 @@ A: Red Hat Security Enhanced Linux (SELi
    See these man-pages for more information : selinux(8), named_selinux
    (8), chcon(1), setsebool(8)
 
+Q: I'm running BIND on Ubuntu -
+
+   Why can't named update slave zone database files?
+
+   Why can't named create DDNS journal files or update the master zones
+   from journals?
+
+   Why can't named create custom log files?
+
+A: Ubuntu uses AppArmor  in
+   addition to normal file system permissions to protect the system.
+
+   Adjust the paths to use those specified in /etc/apparmor.d/
+   usr.sbin.named or adjust /etc/apparmor.d/usr.sbin.named to allow named
+   to write at the location specified in named.conf.
+
 Q: Listening on individual IPv6 interfaces does not work.
 
 A: This is usually due to "/proc/net/if_inet6" not being available in the

Modified: head/contrib/bind9/FAQ.xml
==============================================================================
--- head/contrib/bind9/FAQ.xml	Wed Mar  3 05:14:59 2010	(r204618)
+++ head/contrib/bind9/FAQ.xml	Wed Mar  3 05:45:24 2010	(r204619)
@@ -1,7 +1,7 @@
 
 
 
-
+
 
 
Frequently Asked Questions about BIND 9 @@ -29,6 +29,7 @@ 2007 2008 2009 + 2010 Internet Systems Consortium, Inc. ("ISC") @@ -1385,6 +1386,36 @@ named_cache_t: for files modifiable by n + I'm running BIND on Ubuntu - + + + Why can't named update slave zone database files? + + + Why can't named create DDNS journal files or update + the master zones from journals? + + + Why can't named create custom log files? + + + + + Ubuntu uses AppArmor + <http://en.wikipedia.org/wiki/AppArmor> in + addition to normal file system permissions to protect the system. + + + Adjust the paths to use those specified in /etc/apparmor.d/usr.sbin.named + or adjust /etc/apparmor.d/usr.sbin.named to allow named to write at the + location specified in named.conf. + + + + + + + Listening on individual IPv6 interfaces does not work. Modified: head/contrib/bind9/NSEC3-NOTES ============================================================================== --- head/contrib/bind9/NSEC3-NOTES Wed Mar 3 05:14:59 2010 (r204618) +++ head/contrib/bind9/NSEC3-NOTES Wed Mar 3 05:45:24 2010 (r204619) @@ -35,7 +35,7 @@ will not be completely signed until name zone and generate the NSEC and RRSIG records. Initially the NSEC record at the zone apex will have the OPT bit set. When the NSEC chain is complete the OPT bit will be cleared. Additionally when -the zone is fully signed the private type (default TYPE65535) records +the zone is fully signed the private type (default TYPE65534) records will have a non zero value for the final octet. The private type record has 5 octets. @@ -45,7 +45,7 @@ The private type record has 5 octets. complete flag (octet 5) If you wish to go straight to a secure zone using NSEC3 you should -also add a NSECPARAM record to the update request with the flags +also add a NSEC3PARAM record to the update request with the flags field set to indicate whether the NSEC3 chain will have the OPTOUT bit set or not. Modified: head/contrib/bind9/README ============================================================================== --- head/contrib/bind9/README Wed Mar 3 05:14:59 2010 (r204618) +++ head/contrib/bind9/README Wed Mar 3 05:45:24 2010 (r204619) @@ -42,6 +42,29 @@ BIND 9 Stichting NLnet - NLnet Foundation Nominum, Inc. +BIND 9.6.2 + + BIND 9.6.2 is a maintenance release, fixing bugs in 9.6.1. + It also introduces support for the SHA-2 DNSSEC algorithms, + RSASHA256 and RSASHA512. + + Known issues in this release: + + - A validating resolver that has been incorrectly configured with + an invalid trust anchor will be unable to resolve names covered + by that trust anchor. In all current versions of BIND 9, such a + resolver will also generate significant unnecessary DNS traffic + while trying to validate. The latter problem will be addressed + in future BIND 9 releases. In the meantime, to avoid these + problems, exercise caution when configuring "trusted-keys": + make sure all keys are correct and current when you add them, + and update your configuration in a timely manner when keys + roll over. + +BIND 9.6.1 + + BIND 9.6.1 is a maintenance release, fixing bugs in 9.6.0. + BIND 9.6.0 BIND 9.6.0 includes a number of changes from BIND 9.5 and earlier Modified: head/contrib/bind9/bin/check/named-checkconf.8 ============================================================================== --- head/contrib/bind9/bin/check/named-checkconf.8 Wed Mar 3 05:14:59 2010 (r204618) +++ head/contrib/bind9/bin/check/named-checkconf.8 Wed Mar 3 05:45:24 2010 (r204619) @@ -1,7 +1,7 @@ .\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" -.\" Permission to use, copy, modify, and distribute this software for any +.\" Permission to use, copy, modify, and/or distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkconf.8,v 1.30 2007/06/20 02:27:32 marka Exp $ +.\" $Id: named-checkconf.8,v 1.30.334.1 2009/07/11 01:55:20 tbox Exp $ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/check/named-checkconf.html ============================================================================== --- head/contrib/bind9/bin/check/named-checkconf.html Wed Mar 3 05:14:59 2010 (r204618) +++ head/contrib/bind9/bin/check/named-checkconf.html Wed Mar 3 05:45:24 2010 (r204619) @@ -2,7 +2,7 @@ - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002 Internet Software Consortium. - - - Permission to use, copy, modify, and distribute this software for any + - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: head/contrib/bind9/bin/check/named-checkzone.8 ============================================================================== --- head/contrib/bind9/bin/check/named-checkzone.8 Wed Mar 3 05:14:59 2010 (r204618) +++ head/contrib/bind9/bin/check/named-checkzone.8 Wed Mar 3 05:45:24 2010 (r204619) @@ -1,7 +1,7 @@ .\" Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" -.\" Permission to use, copy, modify, and distribute this software for any +.\" Permission to use, copy, modify, and/or distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 06:00:05 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16136106566B; Wed, 3 Mar 2010 06:00:05 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 912008FC0A; Wed, 3 Mar 2010 06:00:04 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id 89F607E87D; Wed, 3 Mar 2010 17:00:02 +1100 (EST) Message-ID: <4B8DFAE1.8000908@freebsd.org> Date: Wed, 03 Mar 2010 17:00:01 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.5) Gecko/20100105 Thunderbird/3.0 MIME-Version: 1.0 To: Ulf Lilleengen References: <201003020726.o227Q8Nq057288@svn.freebsd.org> In-Reply-To: <201003020726.o227Q8Nq057288@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r204556 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 06:00:05 -0000 On 03/02/10 18:26, Ulf Lilleengen wrote: > Author: lulf > Date: Tue Mar 2 07:26:07 2010 > New Revision: 204556 > URL: http://svn.freebsd.org/changeset/base/204556 > > Log: > - Move csup away from contrib/ and into usr.bin/. Software is no longer > contributed, and main development is happening in the FreeBSD repo. > > Suggested by: joel Not sure if this commit is at fault, but I'm unable to "make installworld" ######################################## ===> usr.bin/csup (install) install -s -o root -g wheel -m 555 csup /work/pxebase/tcp_ffcaia2008_head/usr/local/bin install -o root -g wheel -m 555 /work/svn/freebsd_mirror/projects/tcp_ffcaia2008_head/usr.bin/csup/cpasswd.sh /work/pxebase/tcp_ffcaia2008_head/usr/local/bin/cpasswd install: /work/pxebase/tcp_ffcaia2008_head/usr/local/bin/cpasswd: Not a directory *** Error code 71 Stop in /work/svn/freebsd_mirror/projects/tcp_ffcaia2008_head/usr.bin/csup. *** Error code 1 Stop in /work/svn/freebsd_mirror/projects/tcp_ffcaia2008_head/usr.bin. *** Error code 1 Stop in /work/svn/freebsd_mirror/projects/tcp_ffcaia2008_head. *** Error code 1 Stop in /work/svn/freebsd_mirror/projects/tcp_ffcaia2008_head. *** Error code 1 Stop in /work/svn/freebsd_mirror/projects/tcp_ffcaia2008_head. *** Error code 1 Stop in /work/svn/freebsd_mirror/projects/tcp_ffcaia2008_head. ######################################## It looks like the csup Makefile is trying to install files under /usr/local/* which doesn't sound right to me given that mtree doesn't populate /usr/local with any directories as part of an installworld. Perhaps there's no need to explicitly set PREFIX and other vars in the csup Makefile as is currently done? Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 07:38:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0CFB1065673; Wed, 3 Mar 2010 07:38:12 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F56F8FC17; Wed, 3 Mar 2010 07:38:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o237cC6x084165; Wed, 3 Mar 2010 07:38:12 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o237cCqL084161; Wed, 3 Mar 2010 07:38:12 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003030738.o237cCqL084161@svn.freebsd.org> From: Joel Dahl Date: Wed, 3 Mar 2010 07:38:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204627 - in head/tools/regression: lib/libc/resolv sysvmsg sysvshm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 07:38:12 -0000 Author: joel (doc committer) Date: Wed Mar 3 07:38:12 2010 New Revision: 204627 URL: http://svn.freebsd.org/changeset/base/204627 Log: The NetBSD Foundation has granted permission to remove clause 3 and 4 from their software. Obtained from: NetBSD Modified: head/tools/regression/lib/libc/resolv/resolv.c head/tools/regression/sysvmsg/msgtest.c head/tools/regression/sysvshm/shmtest.c Modified: head/tools/regression/lib/libc/resolv/resolv.c ============================================================================== --- head/tools/regression/lib/libc/resolv/resolv.c Wed Mar 3 07:19:26 2010 (r204626) +++ head/tools/regression/lib/libc/resolv/resolv.c Wed Mar 3 07:38:12 2010 (r204627) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/tools/regression/sysvmsg/msgtest.c ============================================================================== --- head/tools/regression/sysvmsg/msgtest.c Wed Mar 3 07:19:26 2010 (r204626) +++ head/tools/regression/sysvmsg/msgtest.c Wed Mar 3 07:38:12 2010 (r204627) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/tools/regression/sysvshm/shmtest.c ============================================================================== --- head/tools/regression/sysvshm/shmtest.c Wed Mar 3 07:19:26 2010 (r204626) +++ head/tools/regression/sysvshm/shmtest.c Wed Mar 3 07:38:12 2010 (r204627) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 08:23:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2741D106566B; Wed, 3 Mar 2010 08:23:21 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 168FD8FC15; Wed, 3 Mar 2010 08:23:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o238NJsb094226; Wed, 3 Mar 2010 08:23:19 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o238NJ4O094224; Wed, 3 Mar 2010 08:23:19 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201003030823.o238NJ4O094224@svn.freebsd.org> From: Ulf Lilleengen Date: Wed, 3 Mar 2010 08:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204628 - head/usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 08:23:21 -0000 Author: lulf Date: Wed Mar 3 08:23:19 2010 New Revision: 204628 URL: http://svn.freebsd.org/changeset/base/204628 Log: - Revert Makefile to revision r203368, as the svn mv from contrib/csup replaced the Makefile with a broken version. Modified: head/usr.bin/csup/Makefile Modified: head/usr.bin/csup/Makefile ============================================================================== --- head/usr.bin/csup/Makefile Wed Mar 3 07:38:12 2010 (r204627) +++ head/usr.bin/csup/Makefile Wed Mar 3 08:23:19 2010 (r204628) @@ -1,22 +1,40 @@ # $FreeBSD$ -PREFIX?= /usr/local -BINDIR?= ${PREFIX}/bin -MANDIR?= ${PREFIX}/man/man - -UNAME!= /usr/bin/uname -s - PROG= csup -SRCS= attrstack.c auth.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ - globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \ - pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \ - rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c - -CFLAGS+= -I. -I${.CURDIR} -g -pthread -DHAVE_FFLAGS -DNDEBUG -WARNS?= 1 +SRCS= attrstack.c \ + auth.c \ + config.c \ + detailer.c \ + diff.c \ + fattr.c \ + fixups.c \ + fnmatch.c \ + globtree.c \ + idcache.c \ + keyword.c \ + lex.rcs.c \ + lister.c \ + main.c \ + misc.c \ + mux.c \ + parse.y \ + pathcomp.c \ + proto.c \ + rcsfile.c \ + rcsparse.c \ + rsyncfile.c \ + status.c \ + stream.c \ + threads.c \ + token.l \ + updater.c + +CFLAGS+= -I. -I${.CURDIR}/../../contrib/csup +CFLAGS+= -DHAVE_FFLAGS -DNDEBUG +WARNS?= 1 -DPADD= ${LIBCRYPTO} ${LIBZ} -LDADD= -lcrypto -lz +DPADD= ${LIBCRYPTO} ${LIBZ} ${LIBPTHREAD} +LDADD= -lcrypto -lz -lpthread SCRIPTS= cpasswd.sh MAN= csup.1 cpasswd.1 From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 08:24:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 039571065686; Wed, 3 Mar 2010 08:24:16 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD8468FC1B; Wed, 3 Mar 2010 08:24:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o238OFNB094457; Wed, 3 Mar 2010 08:24:15 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o238OFLD094455; Wed, 3 Mar 2010 08:24:15 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201003030824.o238OFLD094455@svn.freebsd.org> From: Ulf Lilleengen Date: Wed, 3 Mar 2010 08:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204629 - head/usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 08:24:16 -0000 Author: lulf Date: Wed Mar 3 08:24:15 2010 New Revision: 204629 URL: http://svn.freebsd.org/changeset/base/204629 Log: - Remove unused include path. Modified: head/usr.bin/csup/Makefile Modified: head/usr.bin/csup/Makefile ============================================================================== --- head/usr.bin/csup/Makefile Wed Mar 3 08:23:19 2010 (r204628) +++ head/usr.bin/csup/Makefile Wed Mar 3 08:24:15 2010 (r204629) @@ -29,7 +29,7 @@ SRCS= attrstack.c \ token.l \ updater.c -CFLAGS+= -I. -I${.CURDIR}/../../contrib/csup +CFLAGS+= -I. CFLAGS+= -DHAVE_FFLAGS -DNDEBUG WARNS?= 1 From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 08:30:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C35901065672; Wed, 3 Mar 2010 08:30:02 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id 7959D8FC22; Wed, 3 Mar 2010 08:30:02 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 8785FE3F087; Wed, 3 Mar 2010 09:30:01 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BwnULKqUh3MB; Wed, 3 Mar 2010 09:29:59 +0100 (CET) Received: by mail.vnode.se (Postfix, from userid 1004) id 0049DE3F085; Wed, 3 Mar 2010 09:29:58 +0100 (CET) Date: Wed, 3 Mar 2010 09:29:58 +0100 From: Joel Dahl To: Ulf Lilleengen Message-ID: <20100303082958.GB73193@mail.vnode.se> References: <201003020726.o227Q8Nq057288@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003020726.o227Q8Nq057288@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204556 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 08:30:02 -0000 On 7:26 02-03-10, Ulf Lilleengen wrote: > Author: lulf > Date: Tue Mar 2 07:26:07 2010 > New Revision: 204556 > URL: http://svn.freebsd.org/changeset/base/204556 > > Log: > - Move csup away from contrib/ and into usr.bin/. Software is no longer > contributed, and main development is happening in the FreeBSD repo. Thanks! -- Joel From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 10:18:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 399781065670; Wed, 3 Mar 2010 10:18:04 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26EF08FC0C; Wed, 3 Mar 2010 10:18:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23AI4Mp019710; Wed, 3 Mar 2010 10:18:04 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23AI3bI019689; Wed, 3 Mar 2010 10:18:03 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003031018.o23AI3bI019689@svn.freebsd.org> From: Joel Dahl Date: Wed, 3 Mar 2010 10:18:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204632 - in head/sys/dev/usb: . controller input serial X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 10:18:04 -0000 Author: joel (doc committer) Date: Wed Mar 3 10:18:03 2010 New Revision: 204632 URL: http://svn.freebsd.org/changeset/base/204632 Log: The NetBSD Foundation has granted permission to remove clause 3 and 4 from their software. Obtained from: NetBSD Modified: head/sys/dev/usb/controller/ehci.h head/sys/dev/usb/controller/ehci_pci.c head/sys/dev/usb/controller/ehcireg.h head/sys/dev/usb/controller/ohci.h head/sys/dev/usb/controller/ohci_pci.c head/sys/dev/usb/controller/ohcireg.h head/sys/dev/usb/controller/uhci.h head/sys/dev/usb/controller/uhci_pci.c head/sys/dev/usb/controller/uhcireg.h head/sys/dev/usb/input/uhid.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/input/ums.c head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/serial/ugensa.c head/sys/dev/usb/serial/uipaq.c head/sys/dev/usb/serial/ulpt.c head/sys/dev/usb/serial/uvisor.c head/sys/dev/usb/usb_cdc.h head/sys/dev/usb/usb_hid.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/controller/ehci.h ============================================================================== --- head/sys/dev/usb/controller/ehci.h Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/controller/ehci.h Wed Mar 3 10:18:03 2010 (r204632) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/controller/ehci_pci.c Wed Mar 3 10:18:03 2010 (r204632) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/controller/ehcireg.h ============================================================================== --- head/sys/dev/usb/controller/ehcireg.h Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/controller/ehcireg.h Wed Mar 3 10:18:03 2010 (r204632) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/controller/ohci.h ============================================================================== --- head/sys/dev/usb/controller/ohci.h Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/controller/ohci.h Wed Mar 3 10:18:03 2010 (r204632) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ohci_pci.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/controller/ohci_pci.c Wed Mar 3 10:18:03 2010 (r204632) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/controller/ohcireg.h ============================================================================== --- head/sys/dev/usb/controller/ohcireg.h Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/controller/ohcireg.h Wed Mar 3 10:18:03 2010 (r204632) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/controller/uhci.h ============================================================================== --- head/sys/dev/usb/controller/uhci.h Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/controller/uhci.h Wed Mar 3 10:18:03 2010 (r204632) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/uhci_pci.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/controller/uhci_pci.c Wed Mar 3 10:18:03 2010 (r204632) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/controller/uhcireg.h ============================================================================== --- head/sys/dev/usb/controller/uhcireg.h Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/controller/uhcireg.h Wed Mar 3 10:18:03 2010 (r204632) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/input/uhid.c Wed Mar 3 10:18:03 2010 (r204632) @@ -23,13 +23,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/input/ukbd.c Wed Mar 3 10:18:03 2010 (r204632) @@ -18,13 +18,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/input/ums.c Wed Mar 3 10:18:03 2010 (r204632) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/serial/uftdi.c Wed Mar 3 10:18:03 2010 (r204632) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/serial/ugensa.c ============================================================================== --- head/sys/dev/usb/serial/ugensa.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/serial/ugensa.c Wed Mar 3 10:18:03 2010 (r204632) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/serial/uipaq.c ============================================================================== --- head/sys/dev/usb/serial/uipaq.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/serial/uipaq.c Wed Mar 3 10:18:03 2010 (r204632) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/serial/ulpt.c ============================================================================== --- head/sys/dev/usb/serial/ulpt.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/serial/ulpt.c Wed Mar 3 10:18:03 2010 (r204632) @@ -19,13 +19,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/serial/uvisor.c ============================================================================== --- head/sys/dev/usb/serial/uvisor.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/serial/uvisor.c Wed Mar 3 10:18:03 2010 (r204632) @@ -29,13 +29,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/usb_cdc.h ============================================================================== --- head/sys/dev/usb/usb_cdc.h Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/usb_cdc.h Wed Mar 3 10:18:03 2010 (r204632) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/usb_hid.c ============================================================================== --- head/sys/dev/usb/usb_hid.c Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/usb_hid.c Wed Mar 3 10:18:03 2010 (r204632) @@ -19,13 +19,6 @@ __FBSDID("$FreeBSD$"); * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Mar 3 09:29:12 2010 (r204631) +++ head/sys/dev/usb/usbdevs Wed Mar 3 10:18:03 2010 (r204632) @@ -17,13 +17,6 @@ $FreeBSD$ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 13:22:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE4951065676; Wed, 3 Mar 2010 13:22:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AE5C48FC1A; Wed, 3 Mar 2010 13:22:31 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5DFD046B52; Wed, 3 Mar 2010 08:22:31 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 72ABF8A01F; Wed, 3 Mar 2010 08:22:30 -0500 (EST) From: John Baldwin To: Maxim Sobolev Date: Wed, 3 Mar 2010 07:49:18 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003030205.o2325AMY010089@svn.freebsd.org> <4B8DD54F.6060302@FreeBSD.org> In-Reply-To: <4B8DD54F.6060302@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003030749.18429.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 03 Mar 2010 08:22:30 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r204615 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 13:22:32 -0000 On Tuesday 02 March 2010 10:19:43 pm Maxim Sobolev wrote: > Xin LI wrote: > > On Tue, Mar 2, 2010 at 6:05 PM, Maxim Sobolev wrote: > >> Author: sobomax > >> Date: Wed Mar 3 02:05:09 2010 > >> New Revision: 204615 > >> URL: http://svn.freebsd.org/changeset/base/204615 > >> > >> Log: > >> Teach newfs(8) to understand size modifiers for all options taking > >> size or size-like argument. I.e. "-s 32k" instead of "-s 32768". > >> Size parsing function has been shamelessly stolen from the truncate(1). > >> I'm sure many sysadmins out there will appreciate this small > >> improvement. > > > > Bikeshed: why not expand_number()? > > I did not know that function existed, but even if I did, I am really not > sure if adding dependency on external library just to save 200 bytes of > code worth it. Considering that newfs(8) is often embedded into various > space-tight/custom things, adding dependency could cause more harm than > good. In any case, I do not feel strongly about that, so I can change it > to use libutil if people feel like it. Reducing code duplication and enforcing consistency is a reason to use the version from the library. Folks worried about space can always link libutil statically as well. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 13:29:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8115E1065670; Wed, 3 Mar 2010 13:29:39 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70B738FC19; Wed, 3 Mar 2010 13:29:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23DTdXO062940; Wed, 3 Mar 2010 13:29:39 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23DTdde062938; Wed, 3 Mar 2010 13:29:39 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201003031329.o23DTdde062938@svn.freebsd.org> From: Ivan Voras Date: Wed, 3 Mar 2010 13:29:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204633 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 13:29:39 -0000 Author: ivoras Date: Wed Mar 3 13:29:39 2010 New Revision: 204633 URL: http://svn.freebsd.org/changeset/base/204633 Log: Make the comment follow style(9) format. Spotted by: jhb Modified: head/sys/sys/systm.h Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Wed Mar 3 10:18:03 2010 (r204632) +++ head/sys/sys/systm.h Wed Mar 3 13:29:39 2010 (r204633) @@ -65,9 +65,11 @@ extern int maxusers; /* system tune hin extern int ngroups_max; /* max # of supplemental groups */ extern int vm_guest; /* Running as virtual machine guest? */ -/* Detected virtual machine guest types. The intention is to expand +/* + * Detected virtual machine guest types. The intention is to expand * and/or add to the VM_GUEST_VM type if specific VM functionality is - * ever implemented (e.g. vendor-specific paravirtualization features). */ + * ever implemented (e.g. vendor-specific paravirtualization features). + */ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN }; #ifdef INVARIANTS /* The option is always available */ From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 15:05:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA153106564A; Wed, 3 Mar 2010 15:05:58 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6E198FC29; Wed, 3 Mar 2010 15:05:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23F5wbc084260; Wed, 3 Mar 2010 15:05:58 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23F5wtc084253; Wed, 3 Mar 2010 15:05:58 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201003031505.o23F5wtc084253@svn.freebsd.org> From: "George V. Neville-Neil" Date: Wed, 3 Mar 2010 15:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204635 - in head: lib/libpmc sys/conf sys/dev/hwpmc sys/mips/include sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 15:05:59 -0000 Author: gnn Date: Wed Mar 3 15:05:58 2010 New Revision: 204635 URL: http://svn.freebsd.org/changeset/base/204635 Log: Add support for hwpmc(4) on the MIPS 24K, 32 bit, embedded processor. Add macros for properly accessing coprocessor 0 registers that support performance counters. Reviewed by: jkoshy rpaulo fabien imp MFC after: 1 month Added: head/lib/libpmc/pmc.mips.3 (contents, props changed) head/sys/dev/hwpmc/hwpmc_mips.c (contents, props changed) head/sys/dev/hwpmc/hwpmc_mips24k.c (contents, props changed) head/sys/dev/hwpmc/hwpmc_mips24k.h (contents, props changed) Modified: head/lib/libpmc/libpmc.c head/sys/conf/files.mips head/sys/dev/hwpmc/pmc_events.h head/sys/mips/include/cpufunc.h head/sys/mips/include/pmc_mdep.h head/sys/sys/pmc.h Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Wed Mar 3 14:48:08 2010 (r204634) +++ head/lib/libpmc/libpmc.c Wed Mar 3 15:05:58 2010 (r204635) @@ -74,6 +74,12 @@ static int xscale_allocate_pmc(enum pmc_ struct pmc_op_pmcallocate *_pmc_config); #endif +#if defined(__mips__) +static int mips24k_allocate_pmc(enum pmc_event _pe, char* ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +#endif /* __mips__ */ + + #define PMC_CALL(cmd, params) \ syscall(pmc_syscall, PMC_OP_##cmd, (params)) @@ -137,6 +143,7 @@ PMC_CLASSDEP_TABLE(p4, P4); PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); PMC_CLASSDEP_TABLE(xscale, XSCALE); +PMC_CLASSDEP_TABLE(mips24k, MIPS24K); #undef __PMC_EV_ALIAS #define __PMC_EV_ALIAS(N,CODE) { N, PMC_EV_##CODE }, @@ -182,6 +189,7 @@ PMC_MDEP_TABLE(p4, P4, PMC_CLASS_TSC); PMC_MDEP_TABLE(p5, P5, PMC_CLASS_TSC); PMC_MDEP_TABLE(p6, P6, PMC_CLASS_TSC); PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_XSCALE); +PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_MIPS24K); static const struct pmc_event_descr tsc_event_table[] = { @@ -226,6 +234,10 @@ PMC_CLASS_TABLE_DESC(tsc, TSC, tsc, tsc) PMC_CLASS_TABLE_DESC(xscale, XSCALE, xscale, xscale); #endif +#if defined(__mips__) +PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips24k); +#endif /* __mips__ */ + #undef PMC_CLASS_TABLE_DESC static const struct pmc_class_descr **pmc_class_table; @@ -2040,6 +2052,45 @@ xscale_allocate_pmc(enum pmc_event pe, c } #endif +#if defined(__mips__) + +static struct pmc_event_alias mips24k_aliases[] = { + EV_ALIAS("instructions", "INSTR_EXECUTED"), + EV_ALIAS("branches", "BRANCH_COMPLETED"), + EV_ALIAS("branch-mispredicts", "BRANCH_MISPRED"), + EV_ALIAS(NULL, NULL) +}; + +#define MIPS24K_KW_OS "os" +#define MIPS24K_KW_USR "usr" +#define MIPS24K_KW_ANYTHREAD "anythread" + +static int +mips24k_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, + struct pmc_op_pmcallocate *pmc_config __unused) +{ + char *p; + + (void) pe; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + + while ((p = strsep(&ctrspec, ",")) != NULL) { + if (KWMATCH(p, MIPS24K_KW_OS)) + pmc_config->pm_caps |= PMC_CAP_SYSTEM; + else if (KWMATCH(p, MIPS24K_KW_USR)) + pmc_config->pm_caps |= PMC_CAP_USER; + else if (KWMATCH(p, MIPS24K_KW_ANYTHREAD)) + pmc_config->pm_caps |= (PMC_CAP_USER | PMC_CAP_SYSTEM); + else + return (-1); + } + + return (0); +} +#endif /* __mips__ */ + + /* * Match an event name `name' with its canonical form. * @@ -2371,6 +2422,10 @@ pmc_event_names_of_class(enum pmc_class ev = xscale_event_table; count = PMC_EVENT_TABLE_SIZE(xscale); break; + case PMC_CLASS_MIPS24K: + ev = mips24k_event_table; + count = PMC_EVENT_TABLE_SIZE(mips24k); + break; default: errno = EINVAL; return (-1); @@ -2563,8 +2618,12 @@ pmc_init(void) pmc_class_table[n] = &xscale_class_table_descr; break; #endif - - +#if defined(__mips__) + case PMC_CPU_MIPS_24K: + PMC_MDEP_INIT(mips24k); + pmc_class_table[n] = &mips24k_class_table_descr; + break; +#endif /* __mips__ */ default: /* * Some kind of CPU this version of the library knows nothing @@ -2681,6 +2740,10 @@ _pmc_name_of_event(enum pmc_event pe, en } else if (pe >= PMC_EV_XSCALE_FIRST && pe <= PMC_EV_XSCALE_LAST) { ev = xscale_event_table; evfence = xscale_event_table + PMC_EVENT_TABLE_SIZE(xscale); + } else if (pe >= PMC_EV_MIPS24K_FIRST && pe <= PMC_EV_MIPS24K_LAST) { + ev = mips24k_event_table; + evfence = mips24k_event_table + PMC_EVENT_TABLE_SIZE(mips24k +); } else if (pe == PMC_EV_TSC_TSC) { ev = tsc_event_table; evfence = tsc_event_table + PMC_EVENT_TABLE_SIZE(tsc); Added: head/lib/libpmc/pmc.mips.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmc/pmc.mips.3 Wed Mar 3 15:05:58 2010 (r204635) @@ -0,0 +1,410 @@ +.\" Copyright (c) 2010 George Neville-Neil. 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 ``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 George Neville-Neil 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. +.\" +.\" $FreeBSD$ +.\" +.Dd February 11, 2010 +.Os +.Dt PMC.MIPS 3 +.Sh NAME +.Nm pmc.mips +.Nd measurement events for +.Tn MIPS +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +MIPS PMCs are present in MIPS +.Tn "24k" +and other processors in the MIPS family. +.Pp +There are two counters supported by the hardware and each is 32 bits +wide. +.Pp +MIPS PMCs are documented in +.Rs +.%B "MIPS32 24K Processor Core Family Software User's Manual" +.%D December 2008 +.%Q "MIPS Technologies Inc." +.Re +.Ss Event Specifiers (Programmable PMCs) +MIPS programmable PMCs support the following events: +.Bl -tag -width indent +.It Li CYCLE +.Pq Event 0, Counter 0/1 +Total number of cycles. +The performance counters are clocked by the +top-level gated clock. +If the core is built with that clock gater +present, none of the counters will increment while the clock is +stopped - due to a WAIT instruction. +.It Li INSTR_EXECUTED +.Pq Event 1, Counter 0/1 +Total number of instructions completed. +.It Li BRANCH_COMPLETED +.Pq Event 2, Counter 0 +Total number of branch instructions completed. +.It Li BRANCH_MISPRED +.Pq Event 2, Counter 1 +Counts all branch instructions which completed, but were mispredicted. +.It Li RETURN +.Pq Event 3, Counter 0 +Counts all JR R31 instructions completed. +.It Li RETURN_MISPRED +.Pq Event 3, Counter 1 +Counts all JR $31 instructions which completed, used the RPS for a prediction, but were mispredicted. +.It Li RETURN_NOT_31 +.Pq Event 4, Counter 0 +Counts all JR $xx (not $31) and JALR instructions (indirect jumps). +.It Li RETURN_NOTPRED +.Pq Event 4, Counter 1 +If RPS use is disabled, JR $31 will not be predicted. +.It Li ITLB_ACCESS +.Pq Event 5, Counter 0 +Counts ITLB accesses that are due to fetches showing up in the +instruction fetch stage of the pipeline and which do not use a fixed +mapping or are not in unmapped space. +If an address is fetched twice from the pipe (as in the case of a +cache miss), that instruction willcount as 2 ITLB accesses. +Since each fetch gets us 2 instructions,there is one access marked per double +word. +.It Li ITLB_MISS +.Pq Event 5, Counter 1 +Counts all misses in the ITLB except ones that are on the back of another +miss. +We cannot process back to back misses and thus those are +ignored. +They are also ignored if there is some form of address error. +.It Li DTLB_ACCESS +.Pq Event 6, Counter 0 +Counts DTLB access including those in unmapped address spaces. +.It Li DTLB_MISS +.Pq Event 6, Counter 1 +Counts DTLB misses. Back to back misses that result in only one DTLB +entry getting refilled are counted as a single miss. +.It Li JTLB_IACCESS +.Pq Event 7, Counter 0 +Instruction JTLB accesses are counted exactly the same as ITLB misses. +.It Li JTLB_IMISS +.Pq Event 7, Counter 1 +Counts instruction JTLB accesses that result in no match or a match on +an invalid translation. +.It Li JTLB_DACCESS +.Pq Event 8, Counter 0 +Data JTLB accesses. +.It Li JTLB_DMISS +.Pq Event 8, Counter 1 +Counts data JTLB accesses that result in no match or a match on an invalid translation. +.It Li IC_FETCH +.Pq Event 9, Counter 0 +Counts every time the instruction cache is accessed. All replays, +wasted fetches etc. are counted. +For example, following a branch, even though the prediction is taken, +the fall through access is counted. + +.It Li IC_MISS +.Pq Event 9, Counter 1 +Counts all instruction cache misses that result in a bus request. +.It Li DC_LOADSTORE +.Pq Event 10, Counter 0 +Counts cached loads and stores. +.It Li DC_WRITEBACK +.Pq Event 10, Counter 1 +Counts cache lines written back to memory due to replacement or cacheops. +.It Li DC_MISS +.Pq Event 11, Counter 0/1 +Counts loads and stores that miss in the cache +.It Li LOAD_MISS +.Pq Event 13, Counter 0 +Counts number of cacheable loads that miss in the cache. +.It Li STORE_MISS +.Pq Event 13, Counter 1 +Counts number of cacheable stores that miss in the cache. +.It Li INTEGER_COMPLETED +.Pq Event 14, Counter 0 +Non-floating point, non-Coprocessor 2 instructions. +.It Li FP_COMPLETED +.Pq Event 14, Counter 1 +Floating point instructions completed. +.It Li LOAD_COMPLETED +.Pq Event 15, Counter 0 +Integer and co-processor loads completed. +.It Li STORE_COMPLETED +.Pq Event 15, Counter 1 +Integer and co-porocessor stores completed. +.It Li BARRIER_COMPLETED +.Pq Event 16, Counter 0 +Direct jump (and link) instructions completed. +.It Li MIPS16_COMPLETED +.Pq Event 16, Counter 1 +MIPS16c instructions completed. +.It Li NOP_COMPLETED +.Pq Event 17, Counter 0 +NOPs completed. +This includes all instructions that normally write to a general +purpose register, but where the destination register was set to r0. +.It Li INTEGER_MULDIV_COMPLETED +.Pq Event 17, Counter 1 +Integer multipy and divide instructions completed. (MULxx, DIVx, MADDx, MSUBx). +.It Li RF_STALL +.Pq Event 18, Counter 0 +Counts the total number of cycles where no instructions are issued +from the IFU to ALU (the RF stage does not advance) which includes +both of the previous two events. +The RT_STALL is different than the sum of them though because cycles +when both stalls are active will only be counted once. +.It Li INSTR_REFETCH +.Pq Event 18, Counter 1 +replay traps (other than uTLB) +.It Li STORE_COND_COMPLETED +.Pq Event 19, Counter 0 +Conditional stores completed. Counts all events, including failed stores. +.It Li STORE_COND_FAILED +.Pq Event 19, Counter 1 +Conditional store instruction that did not update memory. +Note: While this event and the SC instruction count event can be configured to +count in specific operating modes, the timing of the events is much +different and the observed operating mode could change between them, +causing some inaccuracy in the measured ratio. +.It Li ICACHE_REQUESTS +.Pq Event 20, Counter 0 +Note that this only counts PREFs that are actually attempted. +PREFs to uncached addresses or ones with translation errors are not counted +.It Li ICACHE_HIT +.Pq Event 20, Counter 1 +Counts PREF instructions that hit in the cache +.It Li L2_WRITEBACK +.Pq Event 21, Counter 0 +Counts cache lines written back to memory due to replacement or cacheops. +.It Li L2_ACCESS +.Pq Event 21, Counter 1 +Number of accesses to L2 Cache. +.It Li L2_MISS +.Pq Event 22, Counter 0 +Number of accesses that missed in the L2 cache. +.It Li L2_ERR_CORRECTED +.Pq Event 22, Counter 1 +Single bit errors in L2 Cache that were detected and corrected. +.It Li EXCEPTIONS +.Pq Event 23, Counter 0 +Any type of exception taken. +.It Li RF_CYCLES_STALLED +.Pq Event 24, Counter 0 +Counts cycles where the LSU is in fixup and cannot accept a new +instruction from the ALU. +Fixups are replays within the LSU that occur when an instruction needs +to re-access the cache or the DTLB. +.It Li IFU_CYCLES_STALLED +.Pq Event 25, Counter 0 +Counts the number of cycles where the fetch unit is not providing a +valid instruction to the ALU. +.It Li ALU_CYCLES_STALLED +.Pq Event 25, Counter 1 +Counts the number of cycles where the ALU pipeline cannot advance. +.It Li UNCACHED_LOAD +.Pq Event 33, Counter 0 +Counts uncached and uncached acclerated loads. +.It Li UNCACHED_STORE +.Pq Event 33, Counter 1 +Counts uncached and uncached acclerated stores. +.It Li CP2_REG_TO_REG_COMPLETED +.Pq Event 35, Counter 0 +Co-processor 2 register to register instructions completed. +.It Li MFTC_COMPLETED +.Pq Event 35, Counter 1 +Co-processor 2 move to and from instructions as well as loads and stores. +.It Li IC_BLOCKED_CYCLES +.Pq Event 37, Counter 0 +Cycles when IFU stalls because an instruction miss caused the IFU not +to have any runnable instructions. +Ignores the stalls due to ITLB misses as well as the 4 cycles +following a redirect. +.It Li DC_BLOCKED_CYCLES +.Pq Event 37, Counter 1 +Counts all cycles where integer pipeline waits on Load return data due +to a D-cache miss. +The LSU can signal a "long stall" on a D-cache misses, in which case +the waiting TC might be rescheduled so other TCs can execute +instructions till the data returns. +.It Li L2_IMISS_STALL_CYCLES +.Pq Event 38, Counter 0 +Cycles where the main pipeline is stalled waiting for a SYNC to complete. +.It Li L2_DMISS_STALL_CYCLES +.Pq Event 38, Counter 1 +Cycles where the main pipeline is stalled because of an index conflict +in the Fill Store Buffer. +.It Li DMISS_CYCLES +.Pq Event 39, Counter 0 +Data miss is outstanding, but not necessarily stalling the pipeline. +The difference between this and D$ miss stall cycles can show the gain +from non-blocking cache misses. +.It Li L2_MISS_CYCLES +.Pq Event 39, Counter 1 +L2 miss is outstanding, but not necessarily stalling the pipeline. +.It Li UNCACHED_BLOCK_CYCLES +.Pq Event 40, Counter 0 +Cycles where the processor is stalled on an uncached fetch, load, or store. +.It Li MDU_STALL_CYCLES +.Pq Event 41, Counter 0 +Cycles where the processor is stalled on an uncached fetch, load, or store. +.It Li FPU_STALL_CYCLES +.Pq Event 41, Counter 1 +Counts all cycles where integer pipeline waits on FPU return data. +.It Li CP2_STALL_CYCLES +.Pq Event 42, Counter 0 +Counts all cycles where integer pipeline waits on CP2 return data. +.It Li COREXTEND_STALL_CYCLES +.Pq Event 42, Counter 1 +Counts all cycles where integer pipeline waits on CorExtend return data. +.It Li ISPRAM_STALL_CYCLES +.Pq Event 43, Counter 0 +Count all pipeline bubbles that are a result of multicycle ISPRAM +access. +Pipeline bubbles are defined as all cycles that IFU doesn't present an +instruction to ALU. The four cycles after a redirect are not counted. +.It Li DSPRAM_STALL_CYCLES +.Pq Event 43, Counter 1 +Counts stall cycles created by an instruction waiting for access to DSPRAM. +.It Li CACHE_STALL_CYCLES +.Pq Event 44, Counter 0 +Counts all cycles the where pipeline is stalled due to CACHE +instructions. +Includes cycles where CACHE instructions themselves are +stalled in the ALU, and cycles where CACHE instructions cause +subsequent instructions to be stalled. +.It Li LOAD_TO_USE_STALLS +.Pq Event 45, Counter 0 +Counts all cycles where integer pipeline waits on Load return data. +.It Li BASE_MISPRED_STALLS +.Pq Event 45, Counter 1 +Counts stall cycles due to skewed ALU where the bypass to the address +generation takes an extra cycle. +.It Li CPO_READ_STALLS +.Pq Event 46, Counter 0 +Counts all cycles where integer pipeline waits on return data from +MFC0, RDHWR instructions. +.It Li BRANCH_MISPRED_CYCLES +.Pq Event 46, Counter 1 +This counts the number of cycles from a mispredicted branch until the +next non-delay slot instruction executes. +.It Li IFETCH_BUFFER_FULL +.Pq Event 48, Counter 0 +Counts the number of times an instruction cache miss was detected, but +both fill buffers were already allocated. +.It Li FETCH_BUFFER_ALLOCATED +.Pq Event 48, Counter 1 +Number of cycles where at least one of the IFU fill buffers is +allocated (miss pending). +.It Li EJTAG_ITRIGGER +.Pq Event 49, Counter 0 +Number of times an EJTAG Instruction Trigger Point condition matched. +.It Li EJTAG_DTRIGGER +.Pq Event 49, Counter 1 +Number of times an EJTAG Data Trigger Point condition matched. +.It Li FSB_LT_QUARTER +.Pq Event 50, Counter 0 +Fill store buffer less than one quarter full. +.It Li FSB_QUARTER_TO_HALF +.Pq Event 50, Counter 1 +Fill store buffer between one quarter and one half full. +.It Li FSB_GT_HALF +.Pq Event 51, Counter 0 +Fill store buffer more than half full. +.It Li FSB_FULL_PIPELINE_STALLS +.Pq Event 51, Counter 1 +Cycles where the pipeline is stalled because the Fill-Store Buffer in LSU is full. +.It Li LDQ_LT_QUARTER +.Pq Event 52, Counter 0 +Load data queue less than one quarter full. +.It Li LDQ_QUARTER_TO_HALF +.Pq Event 52, Counter 1 +Load data queue between one quarter and one half full. +.It Li LDQ_GT_HALF +.Pq Event 53, Counter 0 +Load data queue more than one half full. +.It Li LDQ_FULL_PIPELINE_STALLS +.Pq Event 53, Counter 1 +Cycles where the pipeline is stalled because the Load Data Queue in the LSU is full. +.It Li WBB_LT_QUARTER +.Pq Event 54, Counter 0 +Write back buffer less than one quarter full. +.It Li WBB_QUARTER_TO_HALF +.Pq Event 54, Counter 1 +Write back buffer between one quarter and one half full. +.It Li WBB_GT_HALF +.Pq Event 55, Counter 0 +Write back buffer more than one half full. +.It Li WBB_FULL_PIPELINE_STALLS +.Pq Event 55 Counter 1 +Cycles where the pipeline is stalled because the Load Data Queue in the LSU is full. +.It Li REQUEST_LATENCY +.Pq Event 61, Counter 0 +Measures latency from miss detection until critical dword of response +is returned, Only counts for cacheable reads. +.It Li REQUEST_COUNT +.Pq Event 61, Counter 1 +Counts number of cacheable read requests used for previous latency counter. +.El +.Ss Event Name Aliases +The following table shows the mapping between the PMC-independent +aliases supported by +.Lb libpmc +and the underlying hardware events used. +.Bl -column "branch-mispredicts" "cpu_clk_unhalted.core_p" +.It Em Alias Ta Em Event Ta +.It Li instructions Ta Li INSTR_EXECUTED Ta +.It Li branches Ta Li BRANCH_COMPLETED Ta +.It Li branch-mispredicts Ta Li BRANCH_MISPRED Ta +.El +.Sh SEE ALSO +.Xr pmc 3 , +.Xr pmc.atom 3 , +.Xr pmc.core 3 , +.Xr pmc.iaf 3 , +.Xr pmc.k7 3 , +.Xr pmc.k8 3 , +.Xr pmc.p4 3 , +.Xr pmc.p5 3 , +.Xr pmc.p6 3 , +.Xr pmc.tsc 3 , +.Xr pmc_cpuinfo 3 , +.Xr pmclog 3 , +.Xr hwpmc 4 +.Sh CAVEATS +The MIPS code does not yet support sampling. +.Sh HISTORY +The +.Nm pmc +library first appeared in +.Fx 6.0 . +.Sh AUTHORS +The +.Lb libpmc +library was written by +.An "Joseph Koshy" +.Aq jkoshy@FreeBSD.org . +MIPS support was added by +.An "George Neville-Neil" +.Aq gnn@FreeBSD.org . Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Wed Mar 3 14:48:08 2010 (r204634) +++ head/sys/conf/files.mips Wed Mar 3 15:05:58 2010 (r204635) @@ -101,3 +101,6 @@ dev/siba/siba_cc.c optional siba dev/siba/siba_core.c optional siba dev/siba/siba_pcib.c optional siba pci #mips/sentry5/siba_mips.c optional siba # not yet + +dev/hwpmc/hwpmc_mips.c optional hwpmc +dev/hwpmc/hwpmc_mips24k.c optional hwpmc Added: head/sys/dev/hwpmc/hwpmc_mips.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hwpmc/hwpmc_mips.c Wed Mar 3 15:05:58 2010 (r204635) @@ -0,0 +1,75 @@ +/*- + * Copyright (c) 2010, George V. Neville-Neil + * 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 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 AUTHOR 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include + +struct pmc_mdep * +pmc_md_initialize() +{ + /* if (cpu_class == CPU_CLASS_MIPS24K)*/ + return pmc_mips24k_initialize(); + /* else + return NULL;*/ +} + +void +pmc_md_finalize(struct pmc_mdep *md) +{ + /* if (cpu_class == CPU_CLASS_MIPS24K) */ + pmc_mips24k_finalize(md); + /* else + KASSERT(0, ("[mips,%d] Unknown CPU Class 0x%x", __LINE__, + cpu_class));*/ +} + +int +pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, + struct trapframe *tf) +{ + (void) cc; + (void) maxsamples; + (void) tf; + return (0); +} + +int +pmc_save_user_callchain(uintptr_t *cc, int maxsamples, + struct trapframe *tf) +{ + (void) cc; + (void) maxsamples; + (void) tf; + return (0); +} Added: head/sys/dev/hwpmc/hwpmc_mips24k.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hwpmc/hwpmc_mips24k.c Wed Mar 3 15:05:58 2010 (r204635) @@ -0,0 +1,570 @@ +/*- + * Copyright (c) 2010 George V. Neville-Neil + * 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 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 AUTHOR 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include +#include + +/* + * Support for MIPS CPUs + * + */ +static int mips24k_npmcs; + +struct mips24k_event_code_map { + enum pmc_event pe_ev; /* enum value */ + uint8_t pe_counter; /* Which counter this can be counted in. */ + uint8_t pe_code; /* numeric code */ +}; + +/* + * MIPS event codes are encoded with a select bit. The + * select bit is used when writing to CP0 so that we + * can select either counter 0/2 or 1/3. The cycle + * and instruction counters are special in that they + * can be counted on either 0/2 or 1/3. + */ + +#define MIPS24K_ALL 255 /* Count events in any counter. */ +#define MIPS24K_CTR_0 0 /* Counter 0 Event */ +#define MIPS24K_CTR_1 1 /* Counter 1 Event */ + +const struct mips24k_event_code_map mips24k_event_codes[] = { + { PMC_EV_MIPS24K_CYCLE, MIPS24K_ALL, 0}, + { PMC_EV_MIPS24K_INSTR_EXECUTED, MIPS24K_ALL, 1}, + { PMC_EV_MIPS24K_BRANCH_COMPLETED, MIPS24K_CTR_0, 2}, + { PMC_EV_MIPS24K_BRANCH_MISPRED, MIPS24K_CTR_1, 2}, + { PMC_EV_MIPS24K_RETURN, MIPS24K_CTR_0, 3}, + { PMC_EV_MIPS24K_RETURN_MISPRED, MIPS24K_CTR_1, 3}, + { PMC_EV_MIPS24K_RETURN_NOT_31, MIPS24K_CTR_0, 4}, + { PMC_EV_MIPS24K_RETURN_NOTPRED, MIPS24K_CTR_1, 4}, + { PMC_EV_MIPS24K_ITLB_ACCESS, MIPS24K_CTR_0, 5}, + { PMC_EV_MIPS24K_ITLB_MISS, MIPS24K_CTR_1, 5}, + { PMC_EV_MIPS24K_DTLB_ACCESS, MIPS24K_CTR_0, 6}, + { PMC_EV_MIPS24K_DTLB_MISS, MIPS24K_CTR_1, 6}, + { PMC_EV_MIPS24K_JTLB_IACCESS, MIPS24K_CTR_0, 7}, + { PMC_EV_MIPS24K_JTLB_IMISS, MIPS24K_CTR_1, 7}, + { PMC_EV_MIPS24K_JTLB_DACCESS, MIPS24K_CTR_0, 8}, + { PMC_EV_MIPS24K_JTLB_DMISS, MIPS24K_CTR_1, 8}, + { PMC_EV_MIPS24K_IC_FETCH, MIPS24K_CTR_0, 9}, + { PMC_EV_MIPS24K_IC_MISS, MIPS24K_CTR_1, 9}, + { PMC_EV_MIPS24K_DC_LOADSTORE, MIPS24K_CTR_0, 10}, + { PMC_EV_MIPS24K_DC_WRITEBACK, MIPS24K_CTR_1, 10}, + { PMC_EV_MIPS24K_DC_MISS, MIPS24K_ALL, 11}, + /* 12 reserved */ + { PMC_EV_MIPS24K_STORE_MISS, MIPS24K_CTR_0, 13}, + { PMC_EV_MIPS24K_LOAD_MISS, MIPS24K_CTR_1, 13}, + { PMC_EV_MIPS24K_INTEGER_COMPLETED, MIPS24K_CTR_0, 14}, + { PMC_EV_MIPS24K_FP_COMPLETED, MIPS24K_CTR_1, 14}, + { PMC_EV_MIPS24K_LOAD_COMPLETED, MIPS24K_CTR_0, 15}, + { PMC_EV_MIPS24K_STORE_COMPLETED, MIPS24K_CTR_1, 15}, + { PMC_EV_MIPS24K_BARRIER_COMPLETED, MIPS24K_CTR_0, 16}, + { PMC_EV_MIPS24K_MIPS16_COMPLETED, MIPS24K_CTR_1, 16}, + { PMC_EV_MIPS24K_NOP_COMPLETED, MIPS24K_CTR_0, 17}, + { PMC_EV_MIPS24K_INTEGER_MULDIV_COMPLETED, MIPS24K_CTR_1, 17}, + { PMC_EV_MIPS24K_RF_STALL, MIPS24K_CTR_0, 18}, + { PMC_EV_MIPS24K_INSTR_REFETCH, MIPS24K_CTR_1, 18}, + { PMC_EV_MIPS24K_STORE_COND_COMPLETED, MIPS24K_CTR_0, 19}, + { PMC_EV_MIPS24K_STORE_COND_FAILED, MIPS24K_CTR_1, 19}, + { PMC_EV_MIPS24K_ICACHE_REQUESTS, MIPS24K_CTR_0, 20}, + { PMC_EV_MIPS24K_ICACHE_HIT, MIPS24K_CTR_1, 20}, + { PMC_EV_MIPS24K_L2_WRITEBACK, MIPS24K_CTR_0, 21}, + { PMC_EV_MIPS24K_L2_ACCESS, MIPS24K_CTR_1, 21}, + { PMC_EV_MIPS24K_L2_MISS, MIPS24K_CTR_0, 22}, + { PMC_EV_MIPS24K_L2_ERR_CORRECTED, MIPS24K_CTR_1, 22}, + { PMC_EV_MIPS24K_EXCEPTIONS, MIPS24K_CTR_0, 23}, + /* Event 23 on COP0 1/3 is undefined */ + { PMC_EV_MIPS24K_RF_CYCLES_STALLED, MIPS24K_CTR_0, 24}, + { PMC_EV_MIPS24K_IFU_CYCLES_STALLED, MIPS24K_CTR_0, 25}, + { PMC_EV_MIPS24K_ALU_CYCLES_STALLED, MIPS24K_CTR_1, 25}, + /* Events 26 through 32 undefined or reserved to customers */ + { PMC_EV_MIPS24K_UNCACHED_LOAD, MIPS24K_CTR_0, 33}, + { PMC_EV_MIPS24K_UNCACHED_STORE, MIPS24K_CTR_1, 33}, + { PMC_EV_MIPS24K_CP2_REG_TO_REG_COMPLETED, MIPS24K_CTR_0, 35}, + { PMC_EV_MIPS24K_MFTC_COMPLETED, MIPS24K_CTR_1, 35}, + /* Event 36 reserved */ + { PMC_EV_MIPS24K_IC_BLOCKED_CYCLES, MIPS24K_CTR_0, 37}, + { PMC_EV_MIPS24K_DC_BLOCKED_CYCLES, MIPS24K_CTR_1, 37}, + { PMC_EV_MIPS24K_L2_IMISS_STALL_CYCLES, MIPS24K_CTR_0, 38}, + { PMC_EV_MIPS24K_L2_DMISS_STALL_CYCLES, MIPS24K_CTR_1, 38}, + { PMC_EV_MIPS24K_DMISS_CYCLES, MIPS24K_CTR_0, 39}, + { PMC_EV_MIPS24K_L2_MISS_CYCLES, MIPS24K_CTR_1, 39}, + { PMC_EV_MIPS24K_UNCACHED_BLOCK_CYCLES, MIPS24K_CTR_0, 40}, + { PMC_EV_MIPS24K_MDU_STALL_CYCLES, MIPS24K_CTR_0, 41}, + { PMC_EV_MIPS24K_FPU_STALL_CYCLES, MIPS24K_CTR_1, 41}, + { PMC_EV_MIPS24K_CP2_STALL_CYCLES, MIPS24K_CTR_0, 42}, + { PMC_EV_MIPS24K_COREXTEND_STALL_CYCLES, MIPS24K_CTR_1, 42}, + { PMC_EV_MIPS24K_ISPRAM_STALL_CYCLES, MIPS24K_CTR_0, 43}, + { PMC_EV_MIPS24K_DSPRAM_STALL_CYCLES, MIPS24K_CTR_1, 43}, + { PMC_EV_MIPS24K_CACHE_STALL_CYCLES, MIPS24K_CTR_0, 44}, + /* Event 44 undefined on 1/3 */ + { PMC_EV_MIPS24K_LOAD_TO_USE_STALLS, MIPS24K_CTR_0, 45}, + { PMC_EV_MIPS24K_BASE_MISPRED_STALLS, MIPS24K_CTR_1, 45}, + { PMC_EV_MIPS24K_CPO_READ_STALLS, MIPS24K_CTR_0, 46}, + { PMC_EV_MIPS24K_BRANCH_MISPRED_CYCLES, MIPS24K_CTR_1, 46}, + /* Event 47 reserved */ + { PMC_EV_MIPS24K_IFETCH_BUFFER_FULL, MIPS24K_CTR_0, 48}, + { PMC_EV_MIPS24K_FETCH_BUFFER_ALLOCATED, MIPS24K_CTR_1, 48}, + { PMC_EV_MIPS24K_EJTAG_ITRIGGER, MIPS24K_CTR_0, 49}, + { PMC_EV_MIPS24K_EJTAG_DTRIGGER, MIPS24K_CTR_1, 49}, + { PMC_EV_MIPS24K_FSB_LT_QUARTER, MIPS24K_CTR_0, 50}, + { PMC_EV_MIPS24K_FSB_QUARTER_TO_HALF, MIPS24K_CTR_1, 50}, + { PMC_EV_MIPS24K_FSB_GT_HALF, MIPS24K_CTR_0, 51}, + { PMC_EV_MIPS24K_FSB_FULL_PIPELINE_STALLS, MIPS24K_CTR_1, 51}, + { PMC_EV_MIPS24K_LDQ_LT_QUARTER, MIPS24K_CTR_0, 52}, + { PMC_EV_MIPS24K_LDQ_QUARTER_TO_HALF, MIPS24K_CTR_1, 52}, + { PMC_EV_MIPS24K_LDQ_GT_HALF, MIPS24K_CTR_0, 53}, + { PMC_EV_MIPS24K_LDQ_FULL_PIPELINE_STALLS, MIPS24K_CTR_1, 53}, + { PMC_EV_MIPS24K_WBB_LT_QUARTER, MIPS24K_CTR_0, 54}, + { PMC_EV_MIPS24K_WBB_QUARTER_TO_HALF, MIPS24K_CTR_1, 54}, + { PMC_EV_MIPS24K_WBB_GT_HALF, MIPS24K_CTR_0, 55}, + { PMC_EV_MIPS24K_WBB_FULL_PIPELINE_STALLS, MIPS24K_CTR_1, 55}, + /* Events 56-63 reserved */ + { PMC_EV_MIPS24K_REQUEST_LATENCY, MIPS24K_CTR_0, 61}, + { PMC_EV_MIPS24K_REQUEST_COUNT, MIPS24K_CTR_1, 61} + +}; + +const int mips24k_event_codes_size = + sizeof(mips24k_event_codes) / sizeof(mips24k_event_codes[0]); + +/* + * Per-processor information. + */ +struct mips24k_cpu { + struct pmc_hw *pc_mipspmcs; +}; + +static struct mips24k_cpu **mips24k_pcpu; + +/* + * Performance Count Register N + */ +static uint32_t +mips24k_pmcn_read(unsigned int pmc) +{ + uint32_t reg = 0; + + KASSERT(pmc < mips24k_npmcs, ("[mips,%d] illegal PMC number %d", + __LINE__, pmc)); + + /* The counter value is the next value after the control register. */ + switch (pmc) { + case 0: + reg = mips_rd_perfcnt1(); + break; + case 1: + reg = mips_rd_perfcnt3(); + break; + default: + return 0; + } + return (reg); +} + +static uint32_t +mips24k_pmcn_write(unsigned int pmc, uint32_t reg) +{ + + KASSERT(pmc < mips24k_npmcs, ("[mips,%d] illegal PMC number %d", + __LINE__, pmc)); + + switch (pmc) { + case 0: + mips_wr_perfcnt1(reg); + break; + case 1: + mips_wr_perfcnt3(reg); + break; + default: + return 0; + } + return (reg); +} + +static int +mips24k_allocate_pmc(int cpu, int ri, struct pmc *pm, + const struct pmc_op_pmcallocate *a) +{ + enum pmc_event pe; + uint32_t caps, config, counter; + int i; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[mips,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < mips24k_npmcs, + ("[mips,%d] illegal row index %d", __LINE__, ri)); + + caps = a->pm_caps; + if (a->pm_class != PMC_CLASS_MIPS24K) + return (EINVAL); + pe = a->pm_ev; + for (i = 0; i < mips24k_event_codes_size; i++) { + if (mips24k_event_codes[i].pe_ev == pe) { + config = mips24k_event_codes[i].pe_code; + counter = mips24k_event_codes[i].pe_counter; + break; + } + } + if (i == mips24k_event_codes_size) + return (EINVAL); + + if ((counter != MIPS24K_ALL) && (counter != ri)) + return (EINVAL); + + config <<= MIPS24K_PMC_SELECT; + + if (caps & PMC_CAP_SYSTEM) + config |= (MIPS24K_PMC_SUPER_ENABLE | + MIPS24K_PMC_KERNEL_ENABLE); + if (caps & PMC_CAP_USER) + config |= MIPS24K_PMC_USER_ENABLE; + if ((caps & (PMC_CAP_USER | PMC_CAP_SYSTEM)) == 0) + config |= MIPS24K_PMC_ENABLE; + + pm->pm_md.pm_mips24k.pm_mips24k_evsel = config; + + PMCDBG(MDP,ALL,2,"mips-allocate ri=%d -> config=0x%x", ri, config); + + return 0; +} + + +static int +mips24k_read_pmc(int cpu, int ri, pmc_value_t *v) +{ + struct pmc *pm; + pmc_value_t tmp; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[mips,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < mips24k_npmcs, + ("[mips,%d] illegal row index %d", __LINE__, ri)); + + pm = mips24k_pcpu[cpu]->pc_mipspmcs[ri].phw_pmc; + tmp = mips24k_pmcn_read(ri); + PMCDBG(MDP,REA,2,"mips-read id=%d -> %jd", ri, tmp); + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + *v = MIPS24K_PERFCTR_VALUE_TO_RELOAD_COUNT(tmp); + else + *v = tmp; + + return 0; +} + +static int +mips24k_write_pmc(int cpu, int ri, pmc_value_t v) +{ + struct pmc *pm; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[mips,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < mips24k_npmcs, + ("[mips,%d] illegal row-index %d", __LINE__, ri)); + + pm = mips24k_pcpu[cpu]->pc_mipspmcs[ri].phw_pmc; + + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + v = MIPS24K_RELOAD_COUNT_TO_PERFCTR_VALUE(v); + + PMCDBG(MDP,WRI,1,"mips-write cpu=%d ri=%d v=%jx", cpu, ri, v); + + mips24k_pmcn_write(ri, v); + + return 0; +} + +static int +mips24k_config_pmc(int cpu, int ri, struct pmc *pm) +{ + struct pmc_hw *phw; + + PMCDBG(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[mips,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < mips24k_npmcs, + ("[mips,%d] illegal row-index %d", __LINE__, ri)); + + phw = &mips24k_pcpu[cpu]->pc_mipspmcs[ri]; + + KASSERT(pm == NULL || phw->phw_pmc == NULL, + ("[mips,%d] pm=%p phw->pm=%p hwpmc not unconfigured", + __LINE__, pm, phw->phw_pmc)); + + phw->phw_pmc = pm; + + return 0; +} + +static int +mips24k_start_pmc(int cpu, int ri) +{ + uint32_t config; + struct pmc *pm; + struct pmc_hw *phw; + + phw = &mips24k_pcpu[cpu]->pc_mipspmcs[ri]; + pm = phw->phw_pmc; + config = pm->pm_md.pm_mips24k.pm_mips24k_evsel; + + /* Enable the PMC. */ + switch (ri) { + case 0: + mips_wr_perfcnt0(config); + break; + case 1: + mips_wr_perfcnt2(config); + break; + default: + break; + } + + return 0; +} + +static int +mips24k_stop_pmc(int cpu, int ri) +{ + struct pmc *pm; + struct pmc_hw *phw; + + phw = &mips24k_pcpu[cpu]->pc_mipspmcs[ri]; + pm = phw->phw_pmc; + + /* + * Disable the PMCs. + * + * Clearing the entire register turns the counter off as well + * as removes the previously sampled event. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 15:43:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42163106566B; Wed, 3 Mar 2010 15:43:27 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31B408FC15; Wed, 3 Mar 2010 15:43:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23FhRdH092565; Wed, 3 Mar 2010 15:43:27 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23FhRia092563; Wed, 3 Mar 2010 15:43:27 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201003031543.o23FhRia092563@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 3 Mar 2010 15:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204636 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 15:43:27 -0000 Author: jh Date: Wed Mar 3 15:43:26 2010 New Revision: 204636 URL: http://svn.freebsd.org/changeset/base/204636 Log: In reallocf(3), free the memory only when size != 0. Otherwise, when the System V compatibility option (malloc "V" flag) is in effect a zero sized reallocf() could cause a double free. PR: bin/141753 Submitted by: Dan Lukes Modified: head/lib/libc/stdlib/reallocf.c Modified: head/lib/libc/stdlib/reallocf.c ============================================================================== --- head/lib/libc/stdlib/reallocf.c Wed Mar 3 15:05:58 2010 (r204635) +++ head/lib/libc/stdlib/reallocf.c Wed Mar 3 15:43:26 2010 (r204636) @@ -35,7 +35,14 @@ reallocf(void *ptr, size_t size) void *nptr; nptr = realloc(ptr, size); - if (!nptr && ptr) + + /* + * When the System V compatibility option (malloc "V" flag) is + * in effect, realloc(ptr, 0) frees the memory and returns NULL. + * So, to avoid double free, call free() only when size != 0. + * realloc(ptr, 0) can't fail when ptr != NULL. + */ + if (!nptr && ptr && size != 0) free(ptr); return (nptr); } From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 16:18:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A8891065674; Wed, 3 Mar 2010 16:18:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A38E8FC1C; Wed, 3 Mar 2010 16:18:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23GI58x000440; Wed, 3 Mar 2010 16:18:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23GI5Pr000438; Wed, 3 Mar 2010 16:18:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003031618.o23GI5Pr000438@svn.freebsd.org> From: John Baldwin Date: Wed, 3 Mar 2010 16:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204638 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 16:18:05 -0000 Author: jhb Date: Wed Mar 3 16:18:04 2010 New Revision: 204638 URL: http://svn.freebsd.org/changeset/base/204638 Log: Allow lseek(SEEK_END) to work on disk devices by using the DIOCGMEDIASIZE to determine the media size. Submitted by: nox MFC after: 1 week Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Wed Mar 3 16:06:43 2010 (r204637) +++ head/sys/kern/vfs_syscalls.c Wed Mar 3 16:18:04 2010 (r204638) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1920,7 +1921,7 @@ lseek(td, uap) struct file *fp; struct vnode *vp; struct vattr vattr; - off_t offset; + off_t offset, size; int error, noneg; int vfslocked; @@ -1951,6 +1952,15 @@ lseek(td, uap) VOP_UNLOCK(vp, 0); if (error) break; + + /* + * If the file references a disk device, then fetch + * the media size and use that to determine the ending + * offset. + */ + if (vattr.va_size == 0 && vp->v_type == VCHR && + fo_ioctl(fp, DIOCGMEDIASIZE, &size, cred, td) == 0) + vattr.va_size = size; if (noneg && (vattr.va_size > OFF_MAX || (offset > 0 && vattr.va_size > OFF_MAX - offset))) { From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 16:45:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13C701065670; Wed, 3 Mar 2010 16:45:59 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD3398FC20; Wed, 3 Mar 2010 16:45:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23GjwpZ006685; Wed, 3 Mar 2010 16:45:58 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23GjwZY006683; Wed, 3 Mar 2010 16:45:58 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201003031645.o23GjwZY006683@svn.freebsd.org> From: Ulf Lilleengen Date: Wed, 3 Mar 2010 16:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204639 - head/usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 16:45:59 -0000 Author: lulf Date: Wed Mar 3 16:45:58 2010 New Revision: 204639 URL: http://svn.freebsd.org/changeset/base/204639 Log: - Include CURDIR in case the makefile is not run from the same directory. Modified: head/usr.bin/csup/Makefile Modified: head/usr.bin/csup/Makefile ============================================================================== --- head/usr.bin/csup/Makefile Wed Mar 3 16:18:04 2010 (r204638) +++ head/usr.bin/csup/Makefile Wed Mar 3 16:45:58 2010 (r204639) @@ -29,7 +29,7 @@ SRCS= attrstack.c \ token.l \ updater.c -CFLAGS+= -I. +CFLAGS+= -I. -I${.CURDIR} CFLAGS+= -DHAVE_FFLAGS -DNDEBUG WARNS?= 1 From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 16:59:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46B2C1065673; Wed, 3 Mar 2010 16:59:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 193338FC2F; Wed, 3 Mar 2010 16:59:13 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C0F3246B0D; Wed, 3 Mar 2010 11:59:12 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 5D3B38A021; Wed, 3 Mar 2010 11:59:11 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Date: Wed, 3 Mar 2010 11:58:35 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003031618.o23GI5Pr000438@svn.freebsd.org> In-Reply-To: <201003031618.o23GI5Pr000438@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003031158.35080.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 03 Mar 2010 11:59:11 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204638 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 16:59:13 -0000 On Wednesday 03 March 2010 11:18:05 am John Baldwin wrote: > Author: jhb > Date: Wed Mar 3 16:18:04 2010 > New Revision: 204638 > URL: http://svn.freebsd.org/changeset/base/204638 > > Log: > Allow lseek(SEEK_END) to work on disk devices by using the DIOCGMEDIASIZE > to determine the media size. I tried changing devfs_getattr() to return the media size in va_size at Bruce's suggestion, but that ended up not being safe. Specifically, one can only issue DIOCGMEDIASIZE safely if one has an open file handle on a device, and a plain stat(2) (vs fstat(2) or lseek(2)) invokes VOP_GETATTR() without having the file open. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 17:07:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C11B1065672; Wed, 3 Mar 2010 17:07:03 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39BF98FC25; Wed, 3 Mar 2010 17:07:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23H73ao011446; Wed, 3 Mar 2010 17:07:03 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23H73bf011440; Wed, 3 Mar 2010 17:07:03 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003031707.o23H73bf011440@svn.freebsd.org> From: Joel Dahl Date: Wed, 3 Mar 2010 17:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204640 - in head: lib/libc/sparc64/fpu sys/powerpc/aim sys/powerpc/fpu sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 17:07:03 -0000 Author: joel (doc committer) Date: Wed Mar 3 17:07:02 2010 New Revision: 204640 URL: http://svn.freebsd.org/changeset/base/204640 Log: The NetBSD Foundation has granted permission to remove clause 3 and 4 from their software. Obtained from: NetBSD Modified: head/lib/libc/sparc64/fpu/fpu_extern.h head/sys/powerpc/aim/ofwmagic.S head/sys/powerpc/fpu/fpu_extern.h head/sys/powerpc/include/intr.h head/sys/powerpc/include/spr.h Modified: head/lib/libc/sparc64/fpu/fpu_extern.h ============================================================================== --- head/lib/libc/sparc64/fpu/fpu_extern.h Wed Mar 3 16:45:58 2010 (r204639) +++ head/lib/libc/sparc64/fpu/fpu_extern.h Wed Mar 3 17:07:02 2010 (r204640) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/powerpc/aim/ofwmagic.S ============================================================================== --- head/sys/powerpc/aim/ofwmagic.S Wed Mar 3 16:45:58 2010 (r204639) +++ head/sys/powerpc/aim/ofwmagic.S Wed Mar 3 17:07:02 2010 (r204640) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/powerpc/fpu/fpu_extern.h ============================================================================== --- head/sys/powerpc/fpu/fpu_extern.h Wed Mar 3 16:45:58 2010 (r204639) +++ head/sys/powerpc/fpu/fpu_extern.h Wed Mar 3 17:07:02 2010 (r204640) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/powerpc/include/intr.h ============================================================================== --- head/sys/powerpc/include/intr.h Wed Mar 3 16:45:58 2010 (r204639) +++ head/sys/powerpc/include/intr.h Wed Mar 3 17:07:02 2010 (r204640) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Wed Mar 3 16:45:58 2010 (r204639) +++ head/sys/powerpc/include/spr.h Wed Mar 3 17:07:02 2010 (r204640) @@ -10,13 +10,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 17:13:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16D4B106566C; Wed, 3 Mar 2010 17:13:30 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 045258FC0A; Wed, 3 Mar 2010 17:13:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23HDTnq012915; Wed, 3 Mar 2010 17:13:29 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23HDTSA012909; Wed, 3 Mar 2010 17:13:29 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201003031713.o23HDTSA012909@svn.freebsd.org> From: Attilio Rao Date: Wed, 3 Mar 2010 17:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204641 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/isa X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 17:13:30 -0000 Author: attilio Date: Wed Mar 3 17:13:29 2010 New Revision: 204641 URL: http://svn.freebsd.org/changeset/base/204641 Log: Improving the clocks auto-tunning by firstly checking if the atrtc may be correctly initialized and just then assign to softclock/profclock. Right now, some atrtc seems reporting strange diagnostic error* making the current pattern bogus. In order to do that cleanly, lapic_setup_clock(), on both ia32 and amd64, now accepts as arguments the desired sources to handle, and returns the actual ones (LAPIC_CLOCK_NONE is forbidden because otherwise there is no meaning in calling such function). This allows to bring out into commont x86 code the handling part for machdep.lapic_allclocks tunable, which is retained. Sponsored by: Sandvine Incorporated Tested by: yongari, Richard Todd MFC: 3 weeks X-MFC: r202387, 204309 Modified: head/sys/amd64/amd64/local_apic.c head/sys/amd64/include/apicvar.h head/sys/i386/i386/local_apic.c head/sys/i386/include/apicvar.h head/sys/x86/isa/clock.c Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Wed Mar 3 17:07:02 2010 (r204640) +++ head/sys/amd64/amd64/local_apic.c Wed Mar 3 17:13:29 2010 (r204641) @@ -149,6 +149,7 @@ extern inthand_t IDTVEC(rsvd); volatile lapic_t *lapic; vm_paddr_t lapic_paddr; static u_long lapic_timer_divisor, lapic_timer_period, lapic_timer_hz; +static enum lapic_clock clockcoverage; static void lapic_enable(void); static void lapic_resume(struct pic *pic); @@ -160,9 +161,6 @@ static uint32_t lvt_mode(struct lapic *l struct pic lapic_pic = { .pic_resume = lapic_resume }; -static int lapic_allclocks; -TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); - static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value) { @@ -423,17 +421,20 @@ lapic_disable_pmc(void) * local APIC only for the hardclock and 0 if none of them can be handled. */ enum lapic_clock -lapic_setup_clock(void) +lapic_setup_clock(enum lapic_clock srcsdes) { u_long value; int i; - /* Can't drive the timer without a local APIC. */ - if (lapic == NULL) - return (LAPIC_CLOCK_NONE); + /* lapic_setup_clock() should not be called with LAPIC_CLOCK_NONE. */ + MPASS(srcsdes != LAPIC_CLOCK_NONE); - if (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0) - return (LAPIC_CLOCK_NONE); + /* Can't drive the timer without a local APIC. */ + if (lapic == NULL || + (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0)) { + clockcoverage = LAPIC_CLOCK_NONE; + return (clockcoverage); + } /* Start off with a divisor of 2 (power on reset default). */ lapic_timer_divisor = 2; @@ -469,7 +470,7 @@ lapic_setup_clock(void) * Please note that stathz and profhz are set only if all the * clocks are handled through the local APIC. */ - if (lapic_allclocks != 0) { + if (srcsdes == LAPIC_CLOCK_ALL) { if (hz >= 1500) lapic_timer_hz = hz; else if (hz >= 750) @@ -479,7 +480,7 @@ lapic_setup_clock(void) } else lapic_timer_hz = hz; lapic_timer_period = value / lapic_timer_hz; - if (lapic_allclocks != 0) { + if (srcsdes == LAPIC_CLOCK_ALL) { if (lapic_timer_hz < 128) stathz = lapic_timer_hz; else @@ -493,7 +494,8 @@ lapic_setup_clock(void) */ lapic_timer_periodic(lapic_timer_period); lapic_timer_enable_intr(); - return (lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL); + clockcoverage = srcsdes; + return (srcsdes); } void @@ -796,7 +798,7 @@ lapic_handle_timer(struct trapframe *fra else hardclock_cpu(TRAPF_USERMODE(frame)); } - if (lapic_allclocks != 0) { + if (clockcoverage == LAPIC_CLOCK_ALL) { /* Fire statclock at stathz. */ la->la_stat_ticks += stathz; Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Wed Mar 3 17:07:02 2010 (r204640) +++ head/sys/amd64/include/apicvar.h Wed Mar 3 17:13:29 2010 (r204641) @@ -230,7 +230,7 @@ int lapic_set_lvt_triggermode(u_int apic enum intr_trigger trigger); void lapic_set_tpr(u_int vector); void lapic_setup(int boot); -enum lapic_clock lapic_setup_clock(void); +enum lapic_clock lapic_setup_clock(enum lapic_clock srcsdes); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Wed Mar 3 17:07:02 2010 (r204640) +++ head/sys/i386/i386/local_apic.c Wed Mar 3 17:13:29 2010 (r204641) @@ -150,6 +150,7 @@ extern inthand_t IDTVEC(rsvd); volatile lapic_t *lapic; vm_paddr_t lapic_paddr; static u_long lapic_timer_divisor, lapic_timer_period, lapic_timer_hz; +static enum lapic_clock clockcoverage; static void lapic_enable(void); static void lapic_resume(struct pic *pic); @@ -161,17 +162,6 @@ static uint32_t lvt_mode(struct lapic *l struct pic lapic_pic = { .pic_resume = lapic_resume }; -/* - * The atrtc device is compiled in only if atpic is present. - * If it is not, force lapic to take care of all the clocks. - */ -#ifdef DEV_ATPIC -static int lapic_allclocks; -TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); -#else -static int lapic_allclocks = 1; -#endif - static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value) { @@ -431,17 +421,20 @@ lapic_disable_pmc(void) * that it can drive hardclock, statclock, and profclock. */ enum lapic_clock -lapic_setup_clock(void) +lapic_setup_clock(enum lapic_clock srcsdes) { u_long value; int i; - /* Can't drive the timer without a local APIC. */ - if (lapic == NULL) - return (LAPIC_CLOCK_NONE); + /* lapic_setup_clock() should not be called with LAPIC_CLOCK_NONE. */ + MPASS(srcsdes != LAPIC_CLOCK_NONE); - if (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0) - return (LAPIC_CLOCK_NONE); + /* Can't drive the timer without a local APIC. */ + if (lapic == NULL || + (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0)) { + clockcoverage = LAPIC_CLOCK_NONE; + return (clockcoverage); + } /* Start off with a divisor of 2 (power on reset default). */ lapic_timer_divisor = 2; @@ -477,7 +470,7 @@ lapic_setup_clock(void) * Please note that stathz and profhz are set only if all the * clocks are handled through the local APIC. */ - if (lapic_allclocks != 0) { + if (srcsdes == LAPIC_CLOCK_ALL) { if (hz >= 1500) lapic_timer_hz = hz; else if (hz >= 750) @@ -487,7 +480,7 @@ lapic_setup_clock(void) } else lapic_timer_hz = hz; lapic_timer_period = value / lapic_timer_hz; - if (lapic_allclocks != 0) { + if (srcsdes == LAPIC_CLOCK_ALL) { if (lapic_timer_hz < 128) stathz = lapic_timer_hz; else @@ -501,7 +494,8 @@ lapic_setup_clock(void) */ lapic_timer_periodic(lapic_timer_period); lapic_timer_enable_intr(); - return (lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL); + clockcoverage = srcsdes; + return (srcsdes); } void @@ -804,7 +798,7 @@ lapic_handle_timer(struct trapframe *fra else hardclock_cpu(TRAPF_USERMODE(frame)); } - if (lapic_allclocks != 0) { + if (clockcoverage == LAPIC_CLOCK_ALL) { /* Fire statclock at stathz. */ la->la_stat_ticks += stathz; Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Wed Mar 3 17:07:02 2010 (r204640) +++ head/sys/i386/include/apicvar.h Wed Mar 3 17:13:29 2010 (r204641) @@ -259,7 +259,7 @@ int lapic_set_lvt_triggermode(u_int apic enum intr_trigger trigger); void lapic_set_tpr(u_int vector); void lapic_setup(int boot); -enum lapic_clock lapic_setup_clock(void); +enum lapic_clock lapic_setup_clock(enum lapic_clock srcsdes); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Wed Mar 3 17:07:02 2010 (r204640) +++ head/sys/x86/isa/clock.c Wed Mar 3 17:13:29 2010 (r204641) @@ -97,6 +97,9 @@ TUNABLE_INT("hw.i8254.freq", &i8254_freq int i8254_max_count; static int i8254_real_max_count; +static int lapic_allclocks; +TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); + struct mtx clock_lock; static struct intsrc *i8254_intsrc; static u_int32_t i8254_lastcount; @@ -526,9 +529,24 @@ startrtclock() void cpu_initclocks() { +#if defined(__amd64__) || defined(DEV_APIC) + enum lapic_clock tlsca; +#endif + int tasc; + + /* Initialize RTC. */ + atrtc_start(); + tasc = atrtc_setup_clock(); + /* + * If the atrtc successfully initialized and the users didn't force + * otherwise use the LAPIC in order to cater hardclock only, otherwise + * take in charge all the clock sources. + */ #if defined(__amd64__) || defined(DEV_APIC) - using_lapic_timer = lapic_setup_clock(); + tlsca = (lapic_allclocks == 0 && tasc != 0) ? LAPIC_CLOCK_HARDCLOCK : + LAPIC_CLOCK_ALL; + using_lapic_timer = lapic_setup_clock(tlsca); #endif /* * If we aren't using the local APIC timer to drive the kernel @@ -550,9 +568,6 @@ cpu_initclocks() set_i8254_freq(i8254_freq, hz); } - /* Initialize RTC. */ - atrtc_start(); - /* * If the separate statistics clock hasn't been explicility disabled * and we aren't already using the local APIC timer to drive the @@ -560,7 +575,7 @@ cpu_initclocks() * drive statclock() and profclock(). */ if (using_lapic_timer != LAPIC_CLOCK_ALL) { - using_atrtc_timer = atrtc_setup_clock(); + using_atrtc_timer = tasc; if (using_atrtc_timer) { /* Enable periodic interrupts from the RTC. */ intr_add_handler("rtc", 8, From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 17:32:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72EDC106564A; Wed, 3 Mar 2010 17:32:33 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FB408FC1E; Wed, 3 Mar 2010 17:32:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23HWXGJ017244; Wed, 3 Mar 2010 17:32:33 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23HWXWj017206; Wed, 3 Mar 2010 17:32:33 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003031732.o23HWXWj017206@svn.freebsd.org> From: Rui Paulo Date: Wed, 3 Mar 2010 17:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204644 - in head/sys/dev/ath/ath_hal: . ar5210 ar5211 ar5212 ar5312 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 17:32:33 -0000 Author: rpaulo Date: Wed Mar 3 17:32:32 2010 New Revision: 204644 URL: http://svn.freebsd.org/changeset/base/204644 Log: Replace Id keyword with FreeBSD keyword and set the svn props correctly. No functional change. Modified: head/sys/dev/ath/ath_hal/ah_debug.h (contents, props changed) head/sys/dev/ath/ath_hal/ah_decode.h (contents, props changed) head/sys/dev/ath/ath_hal/ah_devid.h (contents, props changed) head/sys/dev/ath/ath_hal/ah_eeprom.h (contents, props changed) head/sys/dev/ath/ath_hal/ah_eeprom_v1.c (contents, props changed) head/sys/dev/ath/ath_hal/ah_eeprom_v1.h (contents, props changed) head/sys/dev/ath/ath_hal/ah_eeprom_v3.h (contents, props changed) head/sys/dev/ath/ath_hal/ah_soc.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5210/ar5210phy.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5210/ar5k_0007.ini (contents, props changed) head/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5211/ar5211_power.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5211/ar5211desc.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5211/ar5211phy.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5211/boss.ini (contents, props changed) head/sys/dev/ath/ath_hal/ar5212/ar5212.ini (contents, props changed) head/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5212/ar5212desc.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5212/ar5212phy.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5212/ar5311reg.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5312/ar5312_power.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5312/ar5312phy.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5312/ar5312reg.h (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_debug.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ah_debug.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_debug.h,v 1.1 2008/10/12 16:44:34 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AH_DEBUG_H_ #define _ATH_AH_DEBUG_H_ Modified: head/sys/dev/ath/ath_hal/ah_decode.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_decode.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ah_decode.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_decode.h,v 1.4 2008/11/10 04:08:00 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AH_DECODE_H_ #define _ATH_AH_DECODE_H_ Modified: head/sys/dev/ath/ath_hal/ah_devid.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_devid.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ah_devid.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_devid.h,v 1.4 2008/10/06 18:32:46 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_DEVID_H_ Modified: head/sys/dev/ath/ath_hal/ah_eeprom.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ah_eeprom.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_eeprom.h,v 1.11 2008/11/27 22:32:48 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AH_EEPROM_H_ #define _ATH_AH_EEPROM_H_ Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v1.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v1.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v1.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_eeprom_v1.c,v 1.1 2008/11/11 02:40:11 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v1.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v1.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v1.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_eeprom_v1.h,v 1.1 2008/11/11 02:40:11 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AH_EEPROM_V1_H_ #define _ATH_AH_EEPROM_V1_H_ Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v3.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v3.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v3.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_eeprom_v3.h,v 1.2 2008/11/10 04:08:00 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AH_EEPROM_V3_H_ #define _ATH_AH_EEPROM_V3_H_ Modified: head/sys/dev/ath/ath_hal/ah_soc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_soc.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ah_soc.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_soc.h,v 1.4 2008/11/10 04:08:00 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AH_SOC_H_ #define _ATH_AH_SOC_H_ Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5210_beacon.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5210_keycache.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5210_power.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5210_recv.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5210desc.h,v 1.5 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5210DESC_H #define _DEV_ATH_AR5210DESC_H Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210phy.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210phy.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210phy.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5210phy.h,v 1.4 2008/11/10 01:19:37 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5210PHY_H #define _DEV_ATH_AR5210PHY_H Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5210reg.h,v 1.4 2008/11/10 01:19:37 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5210REG_H #define _DEV_ATH_AR5210REG_H Modified: head/sys/dev/ath/ath_hal/ar5210/ar5k_0007.ini ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5k_0007.ini Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5210/ar5k_0007.ini Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5k_0007.ini,v 1.2 2008/11/10 01:19:37 sam Exp $ + * $FreeBSD$ */ /* crete register init */ Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5211_beacon.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5211_keycache.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_power.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_power.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_power.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5211_power.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5211_recv.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211desc.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211desc.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5211desc.h,v 1.5 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5211DESC_H #define _DEV_ATH_AR5211DESC_H Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211phy.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211phy.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211phy.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5211phy.h,v 1.4 2008/11/10 01:19:38 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5211PHY_H #define _DEV_ATH_AR5211PHY_H Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5211reg.h,v 1.4 2008/11/10 01:19:38 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5211REG_H #define _DEV_ATH_AR5211REG_H Modified: head/sys/dev/ath/ath_hal/ar5211/boss.ini ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/boss.ini Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5211/boss.ini Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: boss.ini,v 1.3 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD$ */ /* Auto Generated PCI Register Writes. Created: 09/12/02 */ Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.ini ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.ini Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.ini Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5212.ini,v 1.3 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD$ */ /* Auto Generated PCI Register Writes. Created: 09/01/04 */ Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5212_beacon.c,v 1.6 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5212_eeprom.c,v 1.6 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5212_keycache.c,v 1.4 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5212desc.h,v 1.4 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AR5212_DESC_H_ #define _ATH_AR5212_DESC_H_ Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212phy.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212phy.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212phy.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5212phy.h,v 1.7 2008/11/19 21:23:01 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5212PHY_H_ #define _DEV_ATH_AR5212PHY_H_ Modified: head/sys/dev/ath/ath_hal/ar5212/ar5311reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5311reg.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5212/ar5311reg.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5311reg.h,v 1.3 2008/10/06 18:32:50 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5311REG_H_ #define _DEV_ATH_AR5311REG_H_ Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5312_eeprom.c,v 1.4 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5312_interrupts.c,v 1.2 2008/11/10 01:19:39 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5312_misc.c,v 1.4 2008/11/22 07:40:15 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312_power.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5312/ar5312_power.c Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5312/ar5312_power.c Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5312_power.c,v 1.4 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312phy.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5312/ar5312phy.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5312/ar5312phy.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5312phy.h,v 1.3 2008/10/06 18:32:50 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5312PHY_H_ #define _DEV_ATH_AR5312PHY_H_ Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5312/ar5312reg.h Wed Mar 3 17:28:16 2010 (r204643) +++ head/sys/dev/ath/ath_hal/ar5312/ar5312reg.h Wed Mar 3 17:32:32 2010 (r204644) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5312reg.h,v 1.4 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5312REG_H_ #define _DEV_ATH_AR5312REG_H_ From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 17:42:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3E891065670; Wed, 3 Mar 2010 17:42:39 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2AF88FC1C; Wed, 3 Mar 2010 17:42:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23HgdF1019532; Wed, 3 Mar 2010 17:42:39 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23Hgdal019529; Wed, 3 Mar 2010 17:42:39 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003031742.o23Hgdal019529@svn.freebsd.org> From: Rui Paulo Date: Wed, 3 Mar 2010 17:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204645 - in head/sys/dev/ath/ath_hal: . ar5212 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 17:42:39 -0000 Author: rpaulo Date: Wed Mar 3 17:42:39 2010 New Revision: 204645 URL: http://svn.freebsd.org/changeset/base/204645 Log: Introduce ath_hal_setInterrupts(), a macro for ah_setInterrupts(). Pointed out by: sam Modified: head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Wed Mar 3 17:32:32 2010 (r204644) +++ head/sys/dev/ath/ath_hal/ah_internal.h Wed Mar 3 17:42:39 2010 (r204645) @@ -334,6 +334,8 @@ struct ath_hal_private { (_ah)->ah_configPCIE(_ah, _reset) #define ath_hal_disablePCIE(_ah) \ (_ah)->ah_disablePCIE(_ah) +#define ath_hal_setInterrupts(_ah, _mask) \ + (_ah)->ah_setInterrupts(_ah, _mask) #define ath_hal_eepromDetach(_ah) do { \ if (AH_PRIVATE(_ah)->ah_eepromDetach != AH_NULL) \ Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Wed Mar 3 17:32:32 2010 (r204644) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Wed Mar 3 17:42:39 2010 (r204645) @@ -54,7 +54,7 @@ ar5212UpdateTxTrigLevel(struct ath_hal * /* * Disable interrupts while futzing with the fifo level. */ - omask = ah->ah_setInterrupts(ah, ahp->ah_maskReg &~ HAL_INT_GLOBAL); + omask = ath_hal_setInterrupts(ah, ahp->ah_maskReg &~ HAL_INT_GLOBAL); txcfg = OS_REG_READ(ah, AR_TXCFG); curLevel = MS(txcfg, AR_FTRIG); @@ -72,7 +72,7 @@ ar5212UpdateTxTrigLevel(struct ath_hal * ahp->ah_txTrigLev = newLevel; /* re-enable chip interrupts */ - ah->ah_setInterrupts(ah, omask); + ath_hal_setInterrupts(ah, omask); return (newLevel != curLevel); } From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 17:55:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42008106564A; Wed, 3 Mar 2010 17:55:52 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CED38FC23; Wed, 3 Mar 2010 17:55:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23HtqYg022490; Wed, 3 Mar 2010 17:55:52 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23Htp9l022456; Wed, 3 Mar 2010 17:55:51 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003031755.o23Htp9l022456@svn.freebsd.org> From: Joel Dahl Date: Wed, 3 Mar 2010 17:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204646 - in head/sys: amd64/include dev/hme dev/le dev/mii i386/include ia64/include mips/include mips/malta mips/rmi powerpc/include sparc64/include sparc64/sbus sun4v/include sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 17:55:52 -0000 Author: joel (doc committer) Date: Wed Mar 3 17:55:51 2010 New Revision: 204646 URL: http://svn.freebsd.org/changeset/base/204646 Log: The NetBSD Foundation has granted permission to remove clause 3 and 4 from the software. Obtained from: NetBSD Modified: head/sys/amd64/include/_inttypes.h head/sys/dev/hme/if_hme_sbus.c head/sys/dev/hme/if_hmereg.h head/sys/dev/hme/if_hmevar.h head/sys/dev/le/am79900var.h head/sys/dev/le/am7990var.h head/sys/dev/le/if_le_ledma.c head/sys/dev/le/lancevar.h head/sys/dev/mii/bmtphyreg.h head/sys/dev/mii/icsphyreg.h head/sys/dev/mii/lxtphyreg.h head/sys/dev/mii/mii.c head/sys/dev/mii/mii_physubr.c head/sys/dev/mii/miidevs head/sys/dev/mii/miivar.h head/sys/dev/mii/nsphyreg.h head/sys/dev/mii/nsphyterreg.h head/sys/dev/mii/qsphyreg.h head/sys/dev/mii/ukphy_subr.c head/sys/i386/include/_inttypes.h head/sys/ia64/include/_inttypes.h head/sys/mips/include/_inttypes.h head/sys/mips/malta/gtreg.h head/sys/mips/rmi/ehcireg.h head/sys/mips/rmi/ehcivar.h head/sys/mips/rmi/xls_ehci.c head/sys/powerpc/include/_inttypes.h head/sys/sparc64/include/_inttypes.h head/sys/sparc64/sbus/lsi64854reg.h head/sys/sparc64/sbus/lsi64854var.h head/sys/sparc64/sbus/ofw_sbus.h head/sys/sun4v/include/_inttypes.h head/sys/sys/clock.h Modified: head/sys/amd64/include/_inttypes.h ============================================================================== --- head/sys/amd64/include/_inttypes.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/amd64/include/_inttypes.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/hme/if_hme_sbus.c ============================================================================== --- head/sys/dev/hme/if_hme_sbus.c Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/hme/if_hme_sbus.c Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/hme/if_hmereg.h ============================================================================== --- head/sys/dev/hme/if_hmereg.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/hme/if_hmereg.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/hme/if_hmevar.h ============================================================================== --- head/sys/dev/hme/if_hmevar.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/hme/if_hmevar.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/le/am79900var.h ============================================================================== --- head/sys/dev/le/am79900var.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/le/am79900var.h Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/le/am7990var.h ============================================================================== --- head/sys/dev/le/am7990var.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/le/am7990var.h Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/le/if_le_ledma.c ============================================================================== --- head/sys/dev/le/if_le_ledma.c Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/le/if_le_ledma.c Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/le/lancevar.h ============================================================================== --- head/sys/dev/le/lancevar.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/le/lancevar.h Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/bmtphyreg.h ============================================================================== --- head/sys/dev/mii/bmtphyreg.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/bmtphyreg.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/icsphyreg.h ============================================================================== --- head/sys/dev/mii/icsphyreg.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/icsphyreg.h Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/lxtphyreg.h ============================================================================== --- head/sys/dev/mii/lxtphyreg.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/lxtphyreg.h Wed Mar 3 17:55:51 2010 (r204646) @@ -18,13 +18,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/mii.c Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/mii_physubr.c ============================================================================== --- head/sys/dev/mii/mii_physubr.c Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/mii_physubr.c Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/miidevs Wed Mar 3 17:55:51 2010 (r204646) @@ -17,13 +17,6 @@ $FreeBSD$ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/miivar.h ============================================================================== --- head/sys/dev/mii/miivar.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/miivar.h Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/nsphyreg.h ============================================================================== --- head/sys/dev/mii/nsphyreg.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/nsphyreg.h Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/nsphyterreg.h ============================================================================== --- head/sys/dev/mii/nsphyterreg.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/nsphyterreg.h Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/qsphyreg.h ============================================================================== --- head/sys/dev/mii/qsphyreg.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/qsphyreg.h Wed Mar 3 17:55:51 2010 (r204646) @@ -18,13 +18,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/mii/ukphy_subr.c ============================================================================== --- head/sys/dev/mii/ukphy_subr.c Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/dev/mii/ukphy_subr.c Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/i386/include/_inttypes.h ============================================================================== --- head/sys/i386/include/_inttypes.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/i386/include/_inttypes.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/ia64/include/_inttypes.h ============================================================================== --- head/sys/ia64/include/_inttypes.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/ia64/include/_inttypes.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/mips/include/_inttypes.h ============================================================================== --- head/sys/mips/include/_inttypes.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/mips/include/_inttypes.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/mips/malta/gtreg.h ============================================================================== --- head/sys/mips/malta/gtreg.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/mips/malta/gtreg.h Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/mips/rmi/ehcireg.h ============================================================================== --- head/sys/mips/rmi/ehcireg.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/mips/rmi/ehcireg.h Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/mips/rmi/ehcivar.h ============================================================================== --- head/sys/mips/rmi/ehcivar.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/mips/rmi/ehcivar.h Wed Mar 3 17:55:51 2010 (r204646) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/mips/rmi/xls_ehci.c ============================================================================== --- head/sys/mips/rmi/xls_ehci.c Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/mips/rmi/xls_ehci.c Wed Mar 3 17:55:51 2010 (r204646) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/powerpc/include/_inttypes.h ============================================================================== --- head/sys/powerpc/include/_inttypes.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/powerpc/include/_inttypes.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/sparc64/include/_inttypes.h ============================================================================== --- head/sys/sparc64/include/_inttypes.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/sparc64/include/_inttypes.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/sparc64/sbus/lsi64854reg.h ============================================================================== --- head/sys/sparc64/sbus/lsi64854reg.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/sparc64/sbus/lsi64854reg.h Wed Mar 3 17:55:51 2010 (r204646) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/sparc64/sbus/lsi64854var.h ============================================================================== --- head/sys/sparc64/sbus/lsi64854var.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/sparc64/sbus/lsi64854var.h Wed Mar 3 17:55:51 2010 (r204646) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/sparc64/sbus/ofw_sbus.h ============================================================================== --- head/sys/sparc64/sbus/ofw_sbus.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/sparc64/sbus/ofw_sbus.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/sun4v/include/_inttypes.h ============================================================================== --- head/sys/sun4v/include/_inttypes.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/sun4v/include/_inttypes.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/sys/clock.h ============================================================================== --- head/sys/sys/clock.h Wed Mar 3 17:42:39 2010 (r204645) +++ head/sys/sys/clock.h Wed Mar 3 17:55:51 2010 (r204646) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 17:56:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FE391065675; Wed, 3 Mar 2010 17:56:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F71F8FC20; Wed, 3 Mar 2010 17:56:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23HuqeT022760; Wed, 3 Mar 2010 17:56:52 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23Huq7q022758; Wed, 3 Mar 2010 17:56:52 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003031756.o23Huq7q022758@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 3 Mar 2010 17:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204647 - head/sys/dev/mii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 17:56:52 -0000 Author: yongari Date: Wed Mar 3 17:56:52 2010 New Revision: 204647 URL: http://svn.freebsd.org/changeset/base/204647 Log: Remove programming LED register and enable 25MHz TX clock for 88E1149 PHY. This will fix intermittent watchdog timeouts as well as very slow network performance on 88E8072 Yukon Extreme. PR: kern/144148 MFC after: 1 week Modified: head/sys/dev/mii/e1000phy.c Modified: head/sys/dev/mii/e1000phy.c ============================================================================== --- head/sys/dev/mii/e1000phy.c Wed Mar 3 17:55:51 2010 (r204646) +++ head/sys/dev/mii/e1000phy.c Wed Mar 3 17:56:52 2010 (r204647) @@ -276,7 +276,6 @@ e1000phy_reset(struct mii_softc *sc) case MII_MODEL_MARVELL_E1118: break; case MII_MODEL_MARVELL_E1116: - case MII_MODEL_MARVELL_E1149: page = PHY_READ(sc, E1000_EADR); /* Select page 3, LED control register. */ PHY_WRITE(sc, E1000_EADR, 3); From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 17:58:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88EFB106566C; Wed, 3 Mar 2010 17:58:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7848F8FC32; Wed, 3 Mar 2010 17:58:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23HwfEs023197; Wed, 3 Mar 2010 17:58:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23HwfnD023194; Wed, 3 Mar 2010 17:58:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003031758.o23HwfnD023194@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Mar 2010 17:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204648 - head/sys/dev/ciss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 17:58:41 -0000 Author: mav Date: Wed Mar 3 17:58:41 2010 New Revision: 204648 URL: http://svn.freebsd.org/changeset/base/204648 Log: Several changes to fix livelock under high load, introduced by r203489: - change the way in which command queue overflow is handled; - do not expose to CAM two command slots, used for driver's internal purposes; - allow driver to use up to 1024 command slots, instead of 256 before. Modified: head/sys/dev/ciss/ciss.c head/sys/dev/ciss/cissvar.h Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Wed Mar 3 17:56:52 2010 (r204647) +++ head/sys/dev/ciss/ciss.c Wed Mar 3 17:58:41 2010 (r204648) @@ -1353,7 +1353,7 @@ ciss_init_logical(struct ciss_softc *sc) /* sanity-check reply */ ndrives = (ntohl(cll->list_size) / sizeof(union ciss_device_address)); - if ((ndrives < 0) || (ndrives >= CISS_MAX_LOGICAL)) { + if ((ndrives < 0) || (ndrives > CISS_MAX_LOGICAL)) { ciss_printf(sc, "adapter claims to report absurd number of logical drives (%d > %d)\n", ndrives, CISS_MAX_LOGICAL); error = ENXIO; @@ -2791,7 +2791,7 @@ ciss_cam_init(struct ciss_softc *sc) * Allocate a devq. We can reuse this for the masked physical * devices if we decide to export these as well. */ - if ((sc->ciss_cam_devq = cam_simq_alloc(sc->ciss_max_requests)) == NULL) { + if ((sc->ciss_cam_devq = cam_simq_alloc(sc->ciss_max_requests - 2)) == NULL) { ciss_printf(sc, "can't allocate CAM SIM queue\n"); return(ENOMEM); } @@ -3065,7 +3065,7 @@ ciss_cam_action_io(struct cam_sim *sim, */ if ((error = ciss_get_request(sc, &cr)) != 0) { xpt_freeze_simq(sim, 1); - csio->ccb_h.status |= CAM_RELEASE_SIMQ; + sc->ciss_flags |= CISS_FLAG_BUSY; csio->ccb_h.status |= CAM_REQUEUE_REQ; return(error); } @@ -3275,6 +3275,13 @@ ciss_cam_complete(struct ciss_request *c ciss_cam_complete_fixup(sc, csio); ciss_release_request(cr); + if (sc->ciss_flags & CISS_FLAG_BUSY) { + sc->ciss_flags &= ~CISS_FLAG_BUSY; + if (csio->ccb_h.status & CAM_RELEASE_SIMQ) + xpt_release_simq(xpt_path_sim(csio->ccb_h.path), 0); + else + csio->ccb_h.status |= CAM_RELEASE_SIMQ; + } xpt_done((union ccb *)csio); } Modified: head/sys/dev/ciss/cissvar.h ============================================================================== --- head/sys/dev/ciss/cissvar.h Wed Mar 3 17:56:52 2010 (r204647) +++ head/sys/dev/ciss/cissvar.h Wed Mar 3 17:58:41 2010 (r204648) @@ -41,7 +41,7 @@ typedef STAILQ_HEAD(, ciss_request) cr_q * commands an adapter may claim to support. Cap it at a reasonable * value. */ -#define CISS_MAX_REQUESTS 256 +#define CISS_MAX_REQUESTS 1024 /* * Maximum number of logical drives we support. @@ -251,6 +251,7 @@ struct ciss_softc #define CISS_FLAG_CONTROL_OPEN (1<<1) /* control device is open */ #define CISS_FLAG_ABORTING (1<<2) /* driver is going away */ #define CISS_FLAG_RUNNING (1<<3) /* driver is running (interrupts usable) */ +#define CISS_FLAG_BUSY (1<<4) /* no free commands */ #define CISS_FLAG_FAKE_SYNCH (1<<16) /* needs SYNCHRONISE_CACHE faked */ #define CISS_FLAG_BMIC_ABORT (1<<17) /* use BMIC command to abort Notify on Event */ From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 18:30:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB66F1065674; Wed, 3 Mar 2010 18:30:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB0B28FC1E; Wed, 3 Mar 2010 18:30:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23IUA7p030236; Wed, 3 Mar 2010 18:30:10 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23IUAGu030233; Wed, 3 Mar 2010 18:30:10 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003031830.o23IUAGu030233@svn.freebsd.org> From: Ed Schouten Date: Wed, 3 Mar 2010 18:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204649 - in head: . include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 18:30:10 -0000 Author: ed Date: Wed Mar 3 18:30:10 2010 New Revision: 204649 URL: http://svn.freebsd.org/changeset/base/204649 Log: Remove last traces of . Deleted: head/include/utmp.h Modified: head/ObsoleteFiles.inc head/include/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Mar 3 17:58:41 2010 (r204648) +++ head/ObsoleteFiles.inc Wed Mar 3 18:30:10 2010 (r204649) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100303: actual removal of utmp.h +OLD_FILES+=usr/include/utmp.h # 20100227: [ia64] removed and .if ${TARGET_ARCH} == "ia64" OLD_FILES+=usr/include/machine/sapicreg.h Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Wed Mar 3 17:58:41 2010 (r204648) +++ head/include/Makefile Wed Mar 3 18:30:10 2010 (r204649) @@ -23,7 +23,7 @@ INCS= a.out.h ar.h assert.h bitstring.h stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \ strings.h sysexits.h tar.h termios.h tgmath.h \ time.h timeconv.h timers.h ttyent.h \ - ulimit.h unistd.h utime.h utmp.h utmpx.h uuid.h varargs.h vis.h \ + ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h vis.h \ wchar.h wctype.h wordexp.h MHDRS= float.h floatingpoint.h stdarg.h From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 18:49:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C90561065703; Wed, 3 Mar 2010 18:49:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B82018FC1B; Wed, 3 Mar 2010 18:49:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23InFa5034486; Wed, 3 Mar 2010 18:49:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23InFJU034484; Wed, 3 Mar 2010 18:49:15 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201003031849.o23InFJU034484@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 3 Mar 2010 18:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204650 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 18:49:15 -0000 Author: glebius Date: Wed Mar 3 18:49:15 2010 New Revision: 204650 URL: http://svn.freebsd.org/changeset/base/204650 Log: Remove C99 initializer, since dominant style is to use non-C99 initializers. Requested by: jhb Modified: head/share/man/man9/driver.9 Modified: head/share/man/man9/driver.9 ============================================================================== --- head/share/man/man9/driver.9 Wed Mar 3 18:30:10 2010 (r204649) +++ head/share/man/man9/driver.9 Wed Mar 3 18:49:15 2010 (r204650) @@ -62,9 +62,9 @@ static device_method_t foo_methods[] = { }; static driver_t foo_driver = { - .name = "foo", - .methods = foo_methods, - .size = sizeof(struct foo_softc) + "foo", + foo_methods, + sizeof(struct foo_softc) }; static devclass_t foo_devclass; From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 19:05:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFFA41065673; Wed, 3 Mar 2010 19:05:53 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 5415E8FC1E; Wed, 3 Mar 2010 19:05:52 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 098031D087; Wed, 3 Mar 2010 20:05:52 +0100 (CET) Date: Wed, 3 Mar 2010 20:05:52 +0100 From: Ed Schouten To: Gleb Smirnoff Message-ID: <20100303190551.GJ8200@hoeg.nl> References: <201003031849.o23InFJU034484@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M1jPr1d2iyh/kS1h" Content-Disposition: inline In-Reply-To: <201003031849.o23InFJU034484@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204650 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 19:05:53 -0000 --M1jPr1d2iyh/kS1h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Gleb Smirnoff wrote: > Log: > Remove C99 initializer, since dominant style is to use non-C99 initiali= zers. > =20 > Requested by: jhb Maybe I'm flogging a dead horse, but this is 2010. Whether or not a compiler supports C99 is no longer an issue. We're already far beyond the point of going back to C89. --=20 Ed Schouten WWW: http://80386.nl/ --M1jPr1d2iyh/kS1h Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuOsw8ACgkQ52SDGA2eCwVWtwCbBHZrTY1mUpNwbf4QS/Dh1J44 lKYAmwZoJ72toKDz+R0I7fAOijleNEbQ =/ee5 -----END PGP SIGNATURE----- --M1jPr1d2iyh/kS1h-- From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 19:13:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45F001065670; Wed, 3 Mar 2010 19:13:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 169F38FC1E; Wed, 3 Mar 2010 19:13:27 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id A6C6C46B0D; Wed, 3 Mar 2010 14:13:26 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 17F778A01F; Wed, 3 Mar 2010 14:13:26 -0500 (EST) From: John Baldwin To: Ed Schouten Date: Wed, 3 Mar 2010 14:13:20 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003031849.o23InFJU034484@svn.freebsd.org> <20100303190551.GJ8200@hoeg.nl> In-Reply-To: <20100303190551.GJ8200@hoeg.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003031413.20685.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 03 Mar 2010 14:13:26 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r204650 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 19:13:27 -0000 On Wednesday 03 March 2010 2:05:52 pm Ed Schouten wrote: > * Gleb Smirnoff wrote: > > Log: > > Remove C99 initializer, since dominant style is to use non-C99 initializers. > > > > Requested by: jhb > > Maybe I'm flogging a dead horse, but this is 2010. Whether or not a > compiler supports C99 is no longer an issue. We're already far beyond > the point of going back to C89. The point is that if you look at almost all of the new-bus drivers in the tree, they do not use C99 initializers to initialize their KOBJ class. Given that, I do not see a reason to make driver(9) document a style that almost no drivers use. If we did want to do something different, we should use the DEFINE_CLASS_0() macro that can be used to declare a KOBJ class. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 19:25:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F7FB1065672; Wed, 3 Mar 2010 19:25:29 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D9CD8FC12; Wed, 3 Mar 2010 19:25:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23JPTZk042810; Wed, 3 Mar 2010 19:25:29 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23JPTnW042804; Wed, 3 Mar 2010 19:25:29 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201003031925.o23JPTnW042804@svn.freebsd.org> From: Maxim Sobolev Date: Wed, 3 Mar 2010 19:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204654 - in head: sbin/newfs usr.bin/truncate X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 19:25:29 -0000 Author: sobomax Date: Wed Mar 3 19:25:28 2010 New Revision: 204654 URL: http://svn.freebsd.org/changeset/base/204654 Log: Use expand_number(3) from libutil instead of home-grown function to parse human-friendly power-of-two numbers (i.e. 2k, 5M etc). Suggested by: many MFC after: 1 week Modified: head/sbin/newfs/Makefile head/sbin/newfs/newfs.c head/sbin/newfs/newfs.h head/usr.bin/truncate/Makefile head/usr.bin/truncate/truncate.c Modified: head/sbin/newfs/Makefile ============================================================================== --- head/sbin/newfs/Makefile Wed Mar 3 19:14:05 2010 (r204653) +++ head/sbin/newfs/Makefile Wed Mar 3 19:25:28 2010 (r204654) @@ -4,8 +4,8 @@ .PATH: ${.CURDIR}/../../sys/geom PROG= newfs -DPADD= ${LIBUFS} -LDADD= -lufs +DPADD= ${LIBUFS} ${LIBUTIL} +LDADD= -lufs -lutil SRCS= newfs.c mkfs.c geom_bsd_enc.c WARNS?= 3 Modified: head/sbin/newfs/newfs.c ============================================================================== --- head/sbin/newfs/newfs.c Wed Mar 3 19:14:05 2010 (r204653) +++ head/sbin/newfs/newfs.c Wed Mar 3 19:25:28 2010 (r204654) @@ -77,6 +77,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "newfs.h" int Eflag; /* Erase previous disk contents */ @@ -90,19 +92,19 @@ int Jflag; /* enable gjournal for file int lflag; /* enable multilabel for file system */ int nflag; /* do not create .snap directory */ intmax_t fssize; /* file system size */ -int sectorsize; /* bytes/sector */ +int64_t sectorsize; /* bytes/sector */ int realsectorsize; /* bytes/sector in hardware */ -int fsize = 0; /* fragment size */ -int bsize = 0; /* block size */ -int maxbsize = 0; /* maximum clustering */ -int maxblkspercg = MAXBLKSPERCG; /* maximum blocks per cylinder group */ +int64_t fsize = 0; /* fragment size */ +int64_t bsize = 0; /* block size */ +int64_t maxbsize = 0; /* maximum clustering */ +int64_t maxblkspercg = MAXBLKSPERCG; /* maximum blocks per cylinder group */ int minfree = MINFREE; /* free space threshold */ int opt = DEFAULTOPT; /* optimization preference (space or time) */ -int density; /* number of bytes per inode */ -int maxcontig = 0; /* max contiguous blocks to allocate */ -int maxbpg; /* maximum blocks per file in a cyl group */ -int avgfilesize = AVFILESIZ;/* expected average file size */ -int avgfilesperdir = AFPDIR;/* expected number of files per directory */ +int64_t density; /* number of bytes per inode */ +int64_t maxcontig = 0; /* max contiguous blocks to allocate */ +int64_t maxbpg; /* maximum blocks per file in a cyl group */ +int64_t avgfilesize = AVFILESIZ;/* expected average file size */ +int64_t avgfilesperdir = AFPDIR;/* expected number of files per directory */ u_char *volumelabel = NULL; /* volume label for filesystem */ struct uufsd disk; /* libufs disk structure */ @@ -117,7 +119,6 @@ static void getfssize(intmax_t *, const static struct disklabel *getdisklabel(char *s); static void rewritelabel(char *s, struct disklabel *lp); static void usage(void); -static int parselength(const char *ls, int *sz); ufs2_daddr_t part_ofs; /* partition offset in blocks, used with files */ @@ -170,7 +171,7 @@ main(int argc, char *argv[]) Rflag = 1; break; case 'S': - rval = parselength(optarg, §orsize); + rval = expand_number(optarg, §orsize); if (rval < 0 || sectorsize <= 0) errx(1, "%s: bad sector size", optarg); break; @@ -184,13 +185,13 @@ main(int argc, char *argv[]) Xflag++; break; case 'a': - rval = parselength(optarg, &maxcontig); + rval = expand_number(optarg, &maxcontig); if (rval < 0 || maxcontig <= 0) errx(1, "%s: bad maximum contiguous blocks", optarg); break; case 'b': - rval = parselength(optarg, &bsize); + rval = expand_number(optarg, &bsize); if (rval < 0) errx(1, "%s: bad block size", optarg); @@ -202,39 +203,39 @@ main(int argc, char *argv[]) optarg, MAXBSIZE); break; case 'c': - rval = parselength(optarg, &maxblkspercg); + rval = expand_number(optarg, &maxblkspercg); if (rval < 0 || maxblkspercg <= 0) errx(1, "%s: bad blocks per cylinder group", optarg); break; case 'd': - rval = parselength(optarg, &maxbsize); + rval = expand_number(optarg, &maxbsize); if (rval < 0 || maxbsize < MINBSIZE) errx(1, "%s: bad extent block size", optarg); break; case 'e': - rval = parselength(optarg, &maxbpg); + rval = expand_number(optarg, &maxbpg); if (rval < 0 || maxbpg <= 0) errx(1, "%s: bad blocks per file in a cylinder group", optarg); break; case 'f': - rval = parselength(optarg, &fsize); + rval = expand_number(optarg, &fsize); if (rval < 0 || fsize <= 0) errx(1, "%s: bad fragment size", optarg); break; case 'g': - rval = parselength(optarg, &avgfilesize); + rval = expand_number(optarg, &avgfilesize); if (rval < 0 || avgfilesize <= 0) errx(1, "%s: bad average file size", optarg); break; case 'h': - rval = parselength(optarg, &avgfilesperdir); + rval = expand_number(optarg, &avgfilesperdir); if (rval < 0 || avgfilesperdir <= 0) errx(1, "%s: bad average files per dir", optarg); break; case 'i': - rval = parselength(optarg, &density); + rval = expand_number(optarg, &density); if (rval < 0 || density <= 0) errx(1, "%s: bad bytes per inode", optarg); break; @@ -495,62 +496,3 @@ usage() fprintf(stderr, "\t-s file system size (sectors)\n"); exit(1); } - -/* - * Return the numeric value of a string given in the form [+-][0-9]+[GMKT] - * or -1 on format error or overflow. - */ -static int -parselength(const char *ls, int *sz) -{ - off_t length, oflow; - int lsign; - - length = 0; - lsign = 1; - - switch (*ls) { - case '-': - lsign = -1; - case '+': - ls++; - } - -#define ASSIGN_CHK_OFLOW(x, y) if (x < y) return -1; y = x - /* - * Calculate the value of the decimal digit string, failing - * on overflow. - */ - while (isdigit(*ls)) { - oflow = length * 10 + *ls++ - '0'; - ASSIGN_CHK_OFLOW(oflow, length); - } - - switch (*ls) { - case 'T': - case 't': - oflow = length * 1024; - ASSIGN_CHK_OFLOW(oflow, length); - case 'G': - case 'g': - oflow = length * 1024; - ASSIGN_CHK_OFLOW(oflow, length); - case 'M': - case 'm': - oflow = length * 1024; - ASSIGN_CHK_OFLOW(oflow, length); - case 'K': - case 'k': - if (ls[1] != '\0') - return -1; - oflow = length * 1024; - ASSIGN_CHK_OFLOW(oflow, length); - case '\0': - break; - default: - return -1; - } - - *sz = length * lsign; - return 0; -} Modified: head/sbin/newfs/newfs.h ============================================================================== --- head/sbin/newfs/newfs.h Wed Mar 3 19:14:05 2010 (r204653) +++ head/sbin/newfs/newfs.h Wed Mar 3 19:25:28 2010 (r204654) @@ -86,19 +86,19 @@ extern int Jflag; /* enable gjournal fo extern int lflag; /* enable multilabel MAC for file system */ extern int nflag; /* do not create .snap directory */ extern intmax_t fssize; /* file system size */ -extern int sectorsize; /* bytes/sector */ +extern int64_t sectorsize; /* bytes/sector */ extern int realsectorsize; /* bytes/sector in hardware*/ -extern int fsize; /* fragment size */ -extern int bsize; /* block size */ -extern int maxbsize; /* maximum clustering */ -extern int maxblkspercg; /* maximum blocks per cylinder group */ +extern int64_t fsize; /* fragment size */ +extern int64_t bsize; /* block size */ +extern int64_t maxbsize; /* maximum clustering */ +extern int64_t maxblkspercg; /* maximum blocks per cylinder group */ extern int minfree; /* free space threshold */ extern int opt; /* optimization preference (space or time) */ -extern int density; /* number of bytes per inode */ -extern int maxcontig; /* max contiguous blocks to allocate */ -extern int maxbpg; /* maximum blocks per file in a cyl group */ -extern int avgfilesize; /* expected average file size */ -extern int avgfilesperdir; /* expected number of files per directory */ +extern int64_t density; /* number of bytes per inode */ +extern int64_t maxcontig; /* max contiguous blocks to allocate */ +extern int64_t maxbpg; /* maximum blocks per file in a cyl group */ +extern int64_t avgfilesize; /* expected average file size */ +extern int64_t avgfilesperdir; /* expected number of files per directory */ extern u_char *volumelabel; /* volume label for filesystem */ extern struct uufsd disk; /* libufs disk structure */ Modified: head/usr.bin/truncate/Makefile ============================================================================== --- head/usr.bin/truncate/Makefile Wed Mar 3 19:14:05 2010 (r204653) +++ head/usr.bin/truncate/Makefile Wed Mar 3 19:25:28 2010 (r204654) @@ -1,5 +1,7 @@ # $FreeBSD$ PROG= truncate +DPADD= ${LIBUTIL} +LDADD= -lutil .include Modified: head/usr.bin/truncate/truncate.c ============================================================================== --- head/usr.bin/truncate/truncate.c Wed Mar 3 19:14:05 2010 (r204653) +++ head/usr.bin/truncate/truncate.c Wed Mar 3 19:25:28 2010 (r204654) @@ -40,7 +40,8 @@ static const char rcsid[] = #include #include -static int parselength(char *, off_t *); +#include + static void usage(void); static int no_create; @@ -53,7 +54,8 @@ main(int argc, char **argv) { struct stat sb; mode_t omode; - off_t oflow, rsize, sz, tsize; + off_t oflow, rsize, tsize; + int64_t sz; int ch, error, fd, oflags; char *fname, *rname; @@ -71,7 +73,7 @@ main(int argc, char **argv) rname = optarg; break; case 's': - if (parselength(optarg, &sz) == -1) + if (expand_number(optarg, &sz) == -1) errx(EXIT_FAILURE, "invalid size argument `%s'", optarg); if (*optarg == '+' || *optarg == '-') @@ -148,65 +150,6 @@ main(int argc, char **argv) return error ? EXIT_FAILURE : EXIT_SUCCESS; } -/* - * Return the numeric value of a string given in the form [+-][0-9]+[GMKT] - * or -1 on format error or overflow. - */ -static int -parselength(char *ls, off_t *sz) -{ - off_t length, oflow; - int lsign; - - length = 0; - lsign = 1; - - switch (*ls) { - case '-': - lsign = -1; - case '+': - ls++; - } - -#define ASSIGN_CHK_OFLOW(x, y) if (x < y) return -1; y = x - /* - * Calculate the value of the decimal digit string, failing - * on overflow. - */ - while (isdigit(*ls)) { - oflow = length * 10 + *ls++ - '0'; - ASSIGN_CHK_OFLOW(oflow, length); - } - - switch (*ls) { - case 'T': - case 't': - oflow = length * 1024; - ASSIGN_CHK_OFLOW(oflow, length); - case 'G': - case 'g': - oflow = length * 1024; - ASSIGN_CHK_OFLOW(oflow, length); - case 'M': - case 'm': - oflow = length * 1024; - ASSIGN_CHK_OFLOW(oflow, length); - case 'K': - case 'k': - if (ls[1] != '\0') - return -1; - oflow = length * 1024; - ASSIGN_CHK_OFLOW(oflow, length); - case '\0': - break; - default: - return -1; - } - - *sz = length * lsign; - return 0; -} - static void usage(void) { From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 19:44:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BA64106566B; Wed, 3 Mar 2010 19:44:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60A128FC13; Wed, 3 Mar 2010 19:44:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23Jihf4047200; Wed, 3 Mar 2010 19:44:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23JihOw047198; Wed, 3 Mar 2010 19:44:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003031944.o23JihOw047198@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Mar 2010 19:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204655 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 19:44:43 -0000 Author: mav Date: Wed Mar 3 19:44:43 2010 New Revision: 204655 URL: http://svn.freebsd.org/changeset/base/204655 Log: Add some more supported controllers. Crosslink with CAM ATA man pages. Modified: head/share/man/man4/ata.4 Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Wed Mar 3 19:25:28 2010 (r204654) +++ head/share/man/man4/ata.4 Wed Mar 3 19:44:43 2010 (r204655) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 23, 2009 +.Dd March 3, 2010 .Dt ATA 4 .Os .Sh NAME @@ -81,6 +81,13 @@ To support ATAPI floppy drives: To support ATAPI tape drives: .Cd device atapist .Pp +To turn +.Xr ata 4 +subsystem controller drivers into cam(4) interface modules (disables all native +.Xr ata 4 +APIs and periperal drivers): +.Cd options ATA_CAM +.Pp The following tunables are settable from the loader: .Bl -ohang .It Va hw.ata.ata_dma @@ -125,7 +132,7 @@ The currently supported ATA/SATA control .It Acard: ATP850P, ATP860A, ATP860R, ATP865A, ATP865R. .It ALI: -M5229, M5281, M5287, M5288, M5289. +M5228, M5229, M5281, M5283, M5287, M5288, M5289. .It AMD: AMD756, AMD766, AMD768, AMD8111, CS5536. .It ATI: @@ -139,7 +146,8 @@ Cyrix 5530. .It HighPoint: HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374. .It Intel: -6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, ICH6, ICH7, ICH8, ICH9, ICH10. +6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, +ICH6, ICH7, ICH8, ICH9, ICH10, SCH, PCH. .It ITE: IT8211F, IT8212F, IT8213F. .It JMicron: @@ -163,7 +171,9 @@ SiI0680, SiI3112, SiI3114, SiI3124, SiI3 .It SiS: SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630, SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962, SIS963, SIS964, SIS965. .It VIA: -VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237, VT8237A, VT8237S, VT8251. +VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, +VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237, +VT8237A, VT8237S, VT8251, CX700, VX800, VX855. .El .Pp Unknown ATA chipsets are supported in PIO modes, and if the standard @@ -246,9 +256,12 @@ and not depend on attach order. .Pp Native Command Queuing (NCQ) on SATA drives is not yet supported. .Sh SEE ALSO +.Xr ahci 4 , +.Xr cam 4 , .Xr ataraid 4 , .Xr atacontrol 8 , -.Xr burncd 8 +.Xr burncd 8 , +.Xr siis 4 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 19:48:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3FFD1065674; Wed, 3 Mar 2010 19:48:18 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 7A03D8FC0A; Wed, 3 Mar 2010 19:48:18 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id DFC5C1CD73; Wed, 3 Mar 2010 20:48:17 +0100 (CET) Date: Wed, 3 Mar 2010 20:48:17 +0100 From: Ed Schouten To: John Baldwin Message-ID: <20100303194817.GK8200@hoeg.nl> References: <201003031849.o23InFJU034484@svn.freebsd.org> <20100303190551.GJ8200@hoeg.nl> <201003031413.20685.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9RHkgBN4Ly9iZsmR" Content-Disposition: inline In-Reply-To: <201003031413.20685.jhb@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r204650 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 19:48:18 -0000 --9RHkgBN4Ly9iZsmR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * John Baldwin wrote: > > Maybe I'm flogging a dead horse, but this is 2010. Whether or not a > > compiler supports C99 is no longer an issue. We're already far beyond > > the point of going back to C89. >=20 > The point is that if you look at almost all of the new-bus drivers in the= =20 > tree, they do not use C99 initializers to initialize their KOBJ class. > Given that, I do not see a reason to make driver(9) document a style that > almost no drivers use. If we did want to do something different, we > should use the DEFINE_CLASS_0() macro that can be used to declare a KOBJ > class. That sounds like a good argument. Thanks for explaining! --=20 Ed Schouten WWW: http://80386.nl/ --9RHkgBN4Ly9iZsmR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuOvQEACgkQ52SDGA2eCwVKigCeNHLcm18kzFrxtjU9lpsZrEII kdUAnj7nTh+1KI4NGXC11CymHCOSqzl3 =STNf -----END PGP SIGNATURE----- --9RHkgBN4Ly9iZsmR-- From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 20:01:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 358B21065673; Wed, 3 Mar 2010 20:01:32 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2524C8FC12; Wed, 3 Mar 2010 20:01:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23K1Wmj050950; Wed, 3 Mar 2010 20:01:32 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23K1WrI050948; Wed, 3 Mar 2010 20:01:32 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003032001.o23K1WrI050948@svn.freebsd.org> From: Rui Paulo Date: Wed, 3 Mar 2010 20:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204656 - head/sys/modules/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 20:01:32 -0000 Author: rpaulo Date: Wed Mar 3 20:01:31 2010 New Revision: 204656 URL: http://svn.freebsd.org/changeset/base/204656 Log: Add a missing ar9285_reset.c file. Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Wed Mar 3 19:44:43 2010 (r204655) +++ head/sys/modules/ath/Makefile Wed Mar 3 20:01:31 2010 (r204656) @@ -92,7 +92,7 @@ SRCS+= ar9160_attach.c SRCS+= ar9280.c ar9280_attach.c # RF backend for 5416 and 9160 SRCS+= ar2133.c -SRCS+= ar9285.c ar9285_attach.c +SRCS+= ar9285.c ar9285_reset.c ar9285_attach.c # NB: rate control is bound to the driver by symbol names so only pick one .if ${ATH_RATE} == "sample" From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 20:06:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D7E7106564A; Wed, 3 Mar 2010 20:06:10 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E53F88FC0A; Wed, 3 Mar 2010 20:06:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23K69Sb052036; Wed, 3 Mar 2010 20:06:09 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23K69Hr052032; Wed, 3 Mar 2010 20:06:09 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201003032006.o23K69Hr052032@svn.freebsd.org> From: Weongyo Jeong Date: Wed, 3 Mar 2010 20:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204657 - in head/sys/dev: bwn siba X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 20:06:10 -0000 Author: weongyo Date: Wed Mar 3 20:06:09 2010 New Revision: 204657 URL: http://svn.freebsd.org/changeset/base/204657 Log: fixes an attached-at-boot issue that bwn(4) using device_identify interface didn't be attached automatically at boot time so changes a approach to attach children based on leveraging some newbus niceties. Submitted by: nwhitehorn Modified: head/sys/dev/bwn/if_bwn.c head/sys/dev/siba/siba_bwn.c head/sys/dev/siba/siba_core.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Wed Mar 3 20:01:31 2010 (r204656) +++ head/sys/dev/bwn/if_bwn.c Wed Mar 3 20:06:09 2010 (r204657) @@ -14312,16 +14312,8 @@ bwn_sysctl_node(struct bwn_softc *sc) #endif } -static void -bwn_identify(driver_t *driver, device_t parent) -{ - - BUS_ADD_CHILD(parent, 0, "bwn", -1); -} - static device_method_t bwn_methods[] = { /* Device interface */ - DEVMETHOD(device_identify, bwn_identify), DEVMETHOD(device_probe, bwn_probe), DEVMETHOD(device_attach, bwn_attach), DEVMETHOD(device_detach, bwn_detach), Modified: head/sys/dev/siba/siba_bwn.c ============================================================================== --- head/sys/dev/siba/siba_bwn.c Wed Mar 3 20:01:31 2010 (r204656) +++ head/sys/dev/siba/siba_bwn.c Wed Mar 3 20:06:09 2010 (r204657) @@ -97,8 +97,6 @@ static const struct siba_dev { { PCI_VENDOR_BROADCOM, 0x432b, "Unknown" } }; -device_t siba_add_child(device_t, struct siba_softc *, int, const char *, - int); int siba_core_attach(struct siba_softc *); int siba_core_detach(struct siba_softc *); int siba_core_suspend(struct siba_softc *); @@ -238,15 +236,6 @@ siba_bwn_resume(device_t dev) return (0); } -static device_t -siba_bwn_add_child(device_t dev, int order, const char *name, int unit) -{ - struct siba_bwn_softc *ssc = device_get_softc(dev); - struct siba_softc *siba = &ssc->ssc_siba; - - return (siba_add_child(dev, siba, order, name, unit)); -} - /* proxying to the parent */ static struct resource * siba_bwn_alloc_resource(device_t dev, device_t child, int type, int *rid, @@ -342,7 +331,6 @@ static device_method_t siba_bwn_methods[ DEVMETHOD(device_resume, siba_bwn_resume), /* Bus interface */ - DEVMETHOD(bus_add_child, siba_bwn_add_child), DEVMETHOD(bus_alloc_resource, siba_bwn_alloc_resource), DEVMETHOD(bus_release_resource, siba_bwn_release_resource), DEVMETHOD(bus_setup_intr, siba_bwn_setup_intr), Modified: head/sys/dev/siba/siba_core.c ============================================================================== --- head/sys/dev/siba/siba_core.c Wed Mar 3 20:01:31 2010 (r204656) +++ head/sys/dev/siba/siba_core.c Wed Mar 3 20:06:09 2010 (r204657) @@ -133,8 +133,6 @@ static void siba_pci_write_multi_4(struc size_t, uint16_t); static const char *siba_core_name(uint16_t); static void siba_pcicore_init(struct siba_pci *); -device_t siba_add_child(device_t, struct siba_softc *, int, const char *, - int); int siba_core_attach(struct siba_softc *); int siba_core_detach(struct siba_softc *); int siba_core_suspend(struct siba_softc *); @@ -206,8 +204,10 @@ siba_core_attach(struct siba_softc *siba return (error); } + siba_pcicore_init(&siba->siba_pci); siba_powerdown(siba); - return (0); + + return (bus_generic_attach(siba->siba_dev)); } int @@ -277,6 +277,7 @@ siba_scan(struct siba_softc *siba) { struct siba_dev_softc *sd; uint32_t idhi, tmp; + device_t child; int base, dev_i = 0, error, i, is_pcie, n_80211 = 0, n_cc = 0, n_pci = 0; @@ -387,6 +388,14 @@ siba_scan(struct siba_softc *siba) break; } dev_i++; + + child = device_add_child(siba->siba_dev, NULL, -1); + if (child == NULL) { + device_printf(siba->siba_dev, "child attach failed\n"); + continue; + } + + device_set_ivars(child, sd); } siba->siba_ndevs = dev_i; } @@ -1964,52 +1973,6 @@ siba_barrier(struct siba_dev_softc *sd, SIBA_BARRIER(siba, flags); } -/* - * Attach it as child. - */ -device_t -siba_add_child(device_t dev, struct siba_softc *siba, int order, - const char *name, int unit) -{ - struct siba_dev_softc *sd; - device_t child; - int idx = 0, i; - - child = device_add_child(dev, name, unit); - if (child == NULL) - return (NULL); - - siba_powerup(siba, 0); - siba_pcicore_init(&siba->siba_pci); - siba_powerdown(siba); - - for (i = 0; i < siba->siba_ndevs; i++) { - sd = &(siba->siba_devs[i]); - - if (sd->sd_id.sd_device != SIBA_DEVID_80211) { - DPRINTF(siba, SIBA_DEBUG_CORE, - "skip to register coreid %#x (%s)\n", - sd->sd_id.sd_device, - siba_core_name(sd->sd_id.sd_device)); - continue; - } - - DPRINTF(siba, SIBA_DEBUG_CORE, - "siba: attaching coreid %#x (%s) idx %d\n", - sd->sd_id.sd_device, - siba_core_name(sd->sd_id.sd_device), idx); - - KASSERT(sd->sd_id.sd_device == SIBA_DEVID_80211, - ("%s:%d: SIBA_DEVID_80211 is only supportted currently.", - __func__, __LINE__)); - - device_set_ivars(child, sd); - device_probe_and_attach(child); - idx++; - } - return (child); -} - static void siba_cc_suspend(struct siba_cc *scc) { From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 20:43:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 215F7106566B; Wed, 3 Mar 2010 20:43:25 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com [209.85.220.223]) by mx1.freebsd.org (Postfix) with ESMTP id 580138FC08; Wed, 3 Mar 2010 20:43:23 +0000 (UTC) Received: by fxm23 with SMTP id 23so480427fxm.3 for ; Wed, 03 Mar 2010 12:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=/mmEB7mDX+bi90Kwkq3CCo0D25iasausdtDs4MVzw6s=; b=ceyYKSmGpQ6DGdo7BU+rksrKR3yGXwa7UYBQL/0d1J41B+xXI+vedwdwcZjq+fGYNt OwuW0W3o5VOj5bW8Jc/f1TEX6A5jMzX9Cv5+eTX9tHJZkULSvPs7fkp67VpaKcERl0y4 5Fz4b4wkhyLrxnlP7GpPVC/fmS7YzDyOWbdEE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=ViYVwEJVPszwpiD8l5OZTxVZ2O3YDRXr/yhdifT4ueCrc85oKTs4ZvPhV4KGmofbMd yyT30SlnmLDXlL3VBZcXDN7PX2B2RCSXIW8sIe+z7FlweuidOPbDkpjxnWZU7oQU2qaY oK+9LMOkIZbmGnZgjpBt00b/KCQdNIs3BUIcw= Received: by 10.223.5.212 with SMTP id 20mr8947948faw.19.1267648996721; Wed, 03 Mar 2010 12:43:16 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 13sm3917727fxm.6.2010.03.03.12.43.15 (version=SSLv3 cipher=RC4-MD5); Wed, 03 Mar 2010 12:43:15 -0800 (PST) Sender: Alexander Motin Message-ID: <4B8EC9E0.6050703@FreeBSD.org> Date: Wed, 03 Mar 2010 22:43:12 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Attila Nagy References: <201003031758.o23HwfnD023194@svn.freebsd.org> <4B8EC54E.4050705@fsn.hu> In-Reply-To: <4B8EC54E.4050705@fsn.hu> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204648 - head/sys/dev/ciss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 20:43:25 -0000 Attila Nagy wrote: > Alexander Motin wrote: >> Author: mav >> Date: Wed Mar 3 17:58:41 2010 >> New Revision: 204648 >> URL: http://svn.freebsd.org/changeset/base/204648 >> >> Log: >> Several changes to fix livelock under high load, introduced by r203489: >> - change the way in which command queue overflow is handled; >> - do not expose to CAM two command slots, used for driver's internal purposes; >> - allow driver to use up to 1024 command slots, instead of 256 before. >> > Thank you for hunting this bug down. Do you plan to increase the maximum > logical device limit as well? Not sure. I just have no idea why this limitation was enforced. Even if I personally don't see problems from increasing it, it would be nice if somebody more aware of this driver tell whether it is correct for all supported hardware. I just don't have any. Thank you for provided access. If nobody responds, we may try our luck in CURRENT. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:00:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E89E7106566B for ; Wed, 3 Mar 2010 21:00:34 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id A101D8FC12 for ; Wed, 3 Mar 2010 21:00:34 +0000 (UTC) Received: by people.fsn.hu (Postfix, from userid 1001) id 4AF3C2263BE; Wed, 3 Mar 2010 21:23:44 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 15.9735] X-CRM114-CacheID: sfid-20100303_21234_72B3268B X-CRM114-Status: Good ( pR: 15.9735 ) Message-ID: <4B8EC54E.4050705@fsn.hu> Date: Wed, 03 Mar 2010 21:23:42 +0100 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Alexander Motin References: <201003031758.o23HwfnD023194@svn.freebsd.org> In-Reply-To: <201003031758.o23HwfnD023194@svn.freebsd.org> X-Stationery: 0.4.10 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (people.fsn.hu); Wed, 03 Mar 2010 21:23:43 +0100 (CET) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204648 - head/sys/dev/ciss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:00:35 -0000 Alexander Motin wrote: > Author: mav > Date: Wed Mar 3 17:58:41 2010 > New Revision: 204648 > URL: http://svn.freebsd.org/changeset/base/204648 > > Log: > Several changes to fix livelock under high load, introduced by r203489: > - change the way in which command queue overflow is handled; > - do not expose to CAM two command slots, used for driver's internal purposes; > - allow driver to use up to 1024 command slots, instead of 256 before. > Thank you for hunting this bug down. Do you plan to increase the maximum logical device limit as well? From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:08:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AF731065676; Wed, 3 Mar 2010 21:08:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AEC78FC23; Wed, 3 Mar 2010 21:08:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23L8jlb066036; Wed, 3 Mar 2010 21:08:45 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23L8jpo066034; Wed, 3 Mar 2010 21:08:45 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003032108.o23L8jpo066034@svn.freebsd.org> From: Warner Losh Date: Wed, 3 Mar 2010 21:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204661 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:08:45 -0000 Author: imp Date: Wed Mar 3 21:08:44 2010 New Revision: 204661 URL: http://svn.freebsd.org/changeset/base/204661 Log: Give make kernel-toolchain a one-liner here. Although documented in build(7), many people look here for a quick reminder... Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Wed Mar 3 20:28:35 2010 (r204660) +++ head/Makefile Wed Mar 3 21:08:44 2010 (r204661) @@ -15,6 +15,7 @@ # reinstallkernel - Reinstall the kernel and the kernel-modules. # reinstallkernel.debug # kernel - buildkernel + installkernel. +# kernel-toolchain - Builds the subset of world necessary to build a kernel # doxygen - Build API documentation of the kernel, needs doxygen. # update - Convenient way to update your source tree (cvs). # check-old - List obsolete directories/files/libraries. From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:10:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABF041065670; Wed, 3 Mar 2010 21:10:13 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B70A8FC0A; Wed, 3 Mar 2010 21:10:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23LADKd066400; Wed, 3 Mar 2010 21:10:13 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23LADgb066398; Wed, 3 Mar 2010 21:10:13 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201003032110.o23LADgb066398@svn.freebsd.org> From: Weongyo Jeong Date: Wed, 3 Mar 2010 21:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204662 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:10:13 -0000 Author: weongyo Date: Wed Mar 3 21:10:13 2010 New Revision: 204662 URL: http://svn.freebsd.org/changeset/base/204662 Log: Hook up the bwn driver. Pointed by: nwhitehorn Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Mar 3 21:08:44 2010 (r204661) +++ head/sys/conf/files Wed Mar 3 21:10:13 2010 (r204662) @@ -771,6 +771,7 @@ dev/bwi/bwiphy.c optional bwi dev/bwi/bwirf.c optional bwi dev/bwi/if_bwi.c optional bwi dev/bwi/if_bwi_pci.c optional bwi pci +dev/bwn/if_bwn.c optional bwn siba_bwn dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/cardbus/cardbus_device.c optional cardbus @@ -1492,6 +1493,8 @@ dev/si/si3_t225.c optional si dev/si/si_eisa.c optional si eisa dev/si/si_isa.c optional si isa dev/si/si_pci.c optional si pci +dev/siba/siba_bwn.c optional siba_bwn pci +dev/siba/siba_core.c optional siba_bwn pci dev/siis/siis.c optional siis pci dev/sis/if_sis.c optional sis pci dev/sk/if_sk.c optional sk pci inet From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:15:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68EE01065676; Wed, 3 Mar 2010 21:15:36 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id 4DED18FC0A; Wed, 3 Mar 2010 21:15:34 +0000 (UTC) Received: by people.fsn.hu (Postfix, from userid 1001) id 724602265B7; Wed, 3 Mar 2010 22:08:07 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 19.6456] X-CRM114-CacheID: sfid-20100303_22080_88285453 X-CRM114-Status: Good ( pR: 19.6456 ) Message-ID: <4B8ECFB5.3040902@fsn.hu> Date: Wed, 03 Mar 2010 22:08:05 +0100 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Alexander Motin References: <201003031758.o23HwfnD023194@svn.freebsd.org> <4B8EC54E.4050705@fsn.hu> <4B8EC9E0.6050703@FreeBSD.org> In-Reply-To: <4B8EC9E0.6050703@FreeBSD.org> X-Stationery: 0.4.10 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (people.fsn.hu); Wed, 03 Mar 2010 22:08:06 +0100 (CET) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204648 - head/sys/dev/ciss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:15:36 -0000 Alexander Motin wrote: > Attila Nagy wrote: > >> Alexander Motin wrote: >> >>> Author: mav >>> Date: Wed Mar 3 17:58:41 2010 >>> New Revision: 204648 >>> URL: http://svn.freebsd.org/changeset/base/204648 >>> >>> Log: >>> Several changes to fix livelock under high load, introduced by r203489: >>> - change the way in which command queue overflow is handled; >>> - do not expose to CAM two command slots, used for driver's internal purposes; >>> - allow driver to use up to 1024 command slots, instead of 256 before. >>> >>> >> Thank you for hunting this bug down. Do you plan to increase the maximum >> logical device limit as well? >> > > Not sure. I just have no idea why this limitation was enforced. Even if > I personally don't see problems from increasing it, it would be nice if > somebody more aware of this driver tell whether it is correct for all > supported hardware. I just don't have any. Thank you for provided > access. If nobody responds, we may try our luck in CURRENT. > >From the VCS history it seems this limit is there from the very first revision, which was made for the Compaq SmartRAID 5* line. Those were parallel SCSI controllers, so 15 was a sane value there (you couldn't attach more than 15 devices to the bus). The change came with the new SAS controllers, which can have external connectors, so a lot of drives (and logical drives) can be attached to them. I use SAS (P800) controllers with increased limit without any ill effects, but can try older ones (SCSI: 5i, 6i) too if needed. From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:22:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C3551065673; Wed, 3 Mar 2010 21:22:53 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BCC48FC14; Wed, 3 Mar 2010 21:22:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23LMr6s069364; Wed, 3 Mar 2010 21:22:53 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23LMrOR069362; Wed, 3 Mar 2010 21:22:53 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201003032122.o23LMrOR069362@svn.freebsd.org> From: Ulf Lilleengen Date: Wed, 3 Mar 2010 21:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204664 - head/usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:22:53 -0000 Author: lulf Date: Wed Mar 3 21:22:53 2010 New Revision: 204664 URL: http://svn.freebsd.org/changeset/base/204664 Log: - Fix spelling. Pointed out by: Pawel Worach , b. f. Modified: head/usr.bin/csup/auth.c Modified: head/usr.bin/csup/auth.c ============================================================================== --- head/usr.bin/csup/auth.c Wed Mar 3 21:14:12 2010 (r204663) +++ head/usr.bin/csup/auth.c Wed Mar 3 21:22:53 2010 (r204664) @@ -147,7 +147,7 @@ auth_domd5auth(struct config *config) lprintf(-1, "Server failed to authenticate itself to client\n"); return (STATUS_FAILURE); } - lprintf(2, "MD5 authentication successfull\n"); + lprintf(2, "MD5 authentication successful\n"); return (STATUS_SUCCESS); } if (strcmp(cmd, "!") == 0) { From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:27:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 899C9106566B; Wed, 3 Mar 2010 21:27:54 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78BFD8FC14; Wed, 3 Mar 2010 21:27:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23LRsFH070498; Wed, 3 Mar 2010 21:27:54 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23LRsYC070496; Wed, 3 Mar 2010 21:27:54 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201003032127.o23LRsYC070496@svn.freebsd.org> From: Ulf Lilleengen Date: Wed, 3 Mar 2010 21:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204665 - head/sbin/gvinum X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:27:54 -0000 Author: lulf Date: Wed Mar 3 21:27:54 2010 New Revision: 204665 URL: http://svn.freebsd.org/changeset/base/204665 Log: - Make function of finding an available drive name a macro. - Move check of /dev/ prefix and copy into a function to save code duplication. This also fixes a bug where the /dev/ prefix could not be used when creating volumes on the command line. Tested by: Niclas Zeising Modified: head/sbin/gvinum/gvinum.c Modified: head/sbin/gvinum/gvinum.c ============================================================================== --- head/sbin/gvinum/gvinum.c Wed Mar 3 21:22:53 2010 (r204664) +++ head/sbin/gvinum/gvinum.c Wed Mar 3 21:27:54 2010 (r204665) @@ -83,8 +83,9 @@ void printconfig(FILE *, char *); char *create_drive(char *); void create_volume(int, char **, char *); char *find_name(const char *, int, int); -char *find_drive(const char *); char *find_pattern(char *, char *); +void copy_device(struct gv_drive *, const char *); +#define find_drive() find_name("gvinumdrive", GV_TYPE_DRIVE, GV_MAXDRIVENAME) int main(int argc, char **argv) @@ -424,7 +425,7 @@ create_drive(char *device) drives = 1; dname = NULL; - drivename = find_drive(device); + drivename = find_drive(); if (drivename == NULL) return (NULL); @@ -436,7 +437,7 @@ create_drive(char *device) err(1, "unable to allocate for gv_drive object"); strlcpy(d->name, drivename, sizeof(d->name)); - strlcpy(d->device, device, sizeof(d->device)); + copy_device(d, device); gctl_ro_param(req, "drive0", sizeof(*d), d); gctl_ro_param(req, "flags", sizeof(int), &flags); gctl_ro_param(req, "drives", sizeof(int), &drives); @@ -626,14 +627,13 @@ find_name(const char *prefix, int type, return (NULL); } -char * -find_drive(const char *device) +void +copy_device(struct gv_drive *d, const char *device) { - - /* Strip possible /dev/ in front. */ if (strncmp(device, "/dev/", 5) == 0) - device += 5; - return (find_name("gvinumdrive", GV_TYPE_DRIVE, GV_MAXDRIVENAME)); + strlcpy(d->device, (device + 5), sizeof(d->device)); + else + strlcpy(d->device, device, sizeof(d->device)); } /* Detach a plex or subdisk from its parent. */ @@ -1275,7 +1275,7 @@ gvinum_grow(int argc, char **argv) return; } /* Lookup device and set an appropriate drive name. */ - drive = find_drive(argv[2]); + drive = find_drive(); if (drive == NULL) { warn("unable to find an appropriate drive name"); free(s); @@ -1283,10 +1283,8 @@ gvinum_grow(int argc, char **argv) return; } strlcpy(d->name, drive, sizeof(d->name)); - if (strncmp(argv[2], "/dev/", 5) == 0) - strlcpy(d->device, (argv[2] + 5), sizeof(d->device)); - else - strlcpy(d->device, argv[2], sizeof(d->device)); + copy_device(d, argv[2]); + drives = 1; /* We try to use the plex name as basis for the subdisk name. */ From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:28:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E2AB106566C; Wed, 3 Mar 2010 21:28:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E2DC8FC32; Wed, 3 Mar 2010 21:28:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23LSt5Z070770; Wed, 3 Mar 2010 21:28:55 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23LStlY070768; Wed, 3 Mar 2010 21:28:55 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003032128.o23LStlY070768@svn.freebsd.org> From: Warner Losh Date: Wed, 3 Mar 2010 21:28:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204666 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:28:55 -0000 Author: imp Date: Wed Mar 3 21:28:55 2010 New Revision: 204666 URL: http://svn.freebsd.org/changeset/base/204666 Log: Looks like S8 and SP are reversed in setjmp, so longjmp doesn't work as well as one would hope.... Submitted by: Arten Belevich Modified: head/sys/mips/mips/support.S Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Wed Mar 3 21:27:54 2010 (r204665) +++ head/sys/mips/mips/support.S Wed Mar 3 21:28:55 2010 (r204666) @@ -1474,8 +1474,8 @@ LEAF(setjmp) STORE s5, (RSIZE * PREG_S5)(a0) STORE s6, (RSIZE * PREG_S6)(a0) STORE s7, (RSIZE * PREG_S7)(a0) - STORE s8, (RSIZE * PREG_SP)(a0) - STORE sp, (RSIZE * PREG_S8)(a0) + STORE s8, (RSIZE * PREG_S8)(a0) + STORE sp, (RSIZE * PREG_SP)(a0) STORE ra, (RSIZE * PREG_RA)(a0) STORE v0, (RSIZE * PREG_SR)(a0) jr ra From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:40:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACB9D106566B; Wed, 3 Mar 2010 21:40:44 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C4788FC16; Wed, 3 Mar 2010 21:40:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23LeiEY073608; Wed, 3 Mar 2010 21:40:44 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23LeiKv073606; Wed, 3 Mar 2010 21:40:44 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201003032140.o23LeiKv073606@svn.freebsd.org> From: Weongyo Jeong Date: Wed, 3 Mar 2010 21:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204669 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:40:44 -0000 Author: weongyo Date: Wed Mar 3 21:40:44 2010 New Revision: 204669 URL: http://svn.freebsd.org/changeset/base/204669 Log: Adds bwn(4) to NOTES. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Mar 3 21:39:49 2010 (r204668) +++ head/sys/conf/NOTES Wed Mar 3 21:40:44 2010 (r204669) @@ -1886,6 +1886,7 @@ device xmphy # XaQti XMAC II # the Netgear GA302T, the SysKonnect SK-9D21 and SK-9D41, and # the embedded gigE NICs on Dell PowerEdge 2550 servers. # bwi: Broadcom BCM430* and BCM431* family of wireless adapters. +# bwn: Broadcom BCM43xx family of wireless adapters. # cas: Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn # cm: Arcnet SMC COM90c26 / SMC COM90c56 # (and SMC COM90c66 in '56 compatibility mode) adapters. @@ -2092,6 +2093,7 @@ options AH_SUPPORT_AR5416 # enable AR54 #device ath_ar9280 # AR9280 chips device ath_rate_sample # SampleRate tx rate control for ath device bwi # Broadcom BCM430* BCM431* +device bwn # Broadcom BCM43xx device ral # Ralink Technology RT2500 wireless NICs. # Use "private" jumbo buffers allocated exclusively for the ti(4) driver. From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:46:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A3F5106564A; Wed, 3 Mar 2010 21:46:51 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 599558FC12; Wed, 3 Mar 2010 21:46:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23Lkpbk074991; Wed, 3 Mar 2010 21:46:51 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23LkpD6074988; Wed, 3 Mar 2010 21:46:51 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201003032146.o23LkpD6074988@svn.freebsd.org> From: Randall Stewart Date: Wed, 3 Mar 2010 21:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204670 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:46:51 -0000 Author: rrs Date: Wed Mar 3 21:46:51 2010 New Revision: 204670 URL: http://svn.freebsd.org/changeset/base/204670 Log: sched_getparam was just plain broke for time-share processes. It did not return an error but instead just let garbage be passed back. This I fix so it actually properly translates the priority the process is at to a posix's high means more priority. I also fix it so that if the ULE scheduler has bumped it up to a realtime process you get back a sane value i.e. the highest priority (63 for time-share). sched_setscheduler() had the setting of the timeshare class priority disabled. With some notes about rejecting the posix high numbers is greater priority and use nice instead. This fix also adjusts that to work, with the cavet that a t-s process may well get bumped up or down i.e. the setscheduler() will NOT change the nice value only the current priority. I think this is reasonable considering if the user wants to play with nice then he can. At least all the posix'ish interfaces now respond sanely. MFC after: 3 weeks Modified: head/sys/kern/kern_resource.c head/sys/kern/ksched.c Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Wed Mar 3 21:40:44 2010 (r204669) +++ head/sys/kern/kern_resource.c Wed Mar 3 21:46:51 2010 (r204670) @@ -471,14 +471,20 @@ rtp_to_pri(struct rtprio *rtp, struct th u_char newpri; u_char oldpri; - if (rtp->prio > RTP_PRIO_MAX) - return (EINVAL); thread_lock(td); switch (RTP_PRIO_BASE(rtp->type)) { case RTP_PRIO_REALTIME: + if (rtp->prio > RTP_PRIO_MAX) { + thread_unlock(td); + return (EINVAL); + } newpri = PRI_MIN_REALTIME + rtp->prio; break; case RTP_PRIO_NORMAL: + if (rtp->prio > (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE)) { + thread_unlock(td); + return (EINVAL); + } newpri = PRI_MIN_TIMESHARE + rtp->prio; break; case RTP_PRIO_IDLE: Modified: head/sys/kern/ksched.c ============================================================================== --- head/sys/kern/ksched.c Wed Mar 3 21:40:44 2010 (r204669) +++ head/sys/kern/ksched.c Wed Mar 3 21:46:51 2010 (r204670) @@ -81,9 +81,8 @@ ksched_detach(struct ksched *ks) * higher priority. It also permits sched_setparam to be * implementation defined for SCHED_OTHER. I don't like * the notion of inverted priorites for normal processes when - * you can use "setpriority" for that. + * you can use "setpriority" for that. * - * I'm rejecting sched_setparam for SCHED_OTHER with EINVAL. */ /* Macros to convert between the unix (lower numerically is higher priority) @@ -93,6 +92,9 @@ ksched_detach(struct ksched *ks) #define p4prio_to_rtpprio(P) (RTP_PRIO_MAX - (P)) #define rtpprio_to_p4prio(P) (RTP_PRIO_MAX - (P)) +#define p4prio_to_tsprio(P) ((PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE) - (P)) +#define tsprio_to_p4prio(P) ((PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE) - (P)) + /* These improve readability a bit for me: */ #define P1B_PRIO_MIN rtpprio_to_p4prio(RTP_PRIO_MAX) @@ -134,9 +136,6 @@ ksched_setparam(struct ksched *ksched, if (e == 0) { - if (policy == SCHED_OTHER) - e = EINVAL; - else e = ksched_setscheduler(ksched, td, policy, param); } @@ -152,7 +151,16 @@ ksched_getparam(struct ksched *ksched, pri_to_rtp(td, &rtp); if (RTP_PRIO_IS_REALTIME(rtp.type)) param->sched_priority = rtpprio_to_p4prio(rtp.prio); - + else { + if (PRI_MIN_TIMESHARE < rtp.prio) + /* + * The interactive score has it to min realtime + * so we must show max (64 most likely + */ + param->sched_priority = (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE); + else + param->sched_priority = tsprio_to_p4prio(rtp.prio); + } return 0; } @@ -191,11 +199,14 @@ ksched_setscheduler(struct ksched *ksche break; case SCHED_OTHER: - { + if (param->sched_priority >= 0 && + param->sched_priority <= (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE)) { rtp.type = RTP_PRIO_NORMAL; rtp.prio = p4prio_to_rtpprio(param->sched_priority); rtp_to_pri(&rtp, td); - } + } else + e = EINVAL; + break; default: From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:53:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50340106564A; Wed, 3 Mar 2010 21:53:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FAF68FC15; Wed, 3 Mar 2010 21:53:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23LrQoI076530; Wed, 3 Mar 2010 21:53:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23LrQwl076528; Wed, 3 Mar 2010 21:53:26 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003032153.o23LrQwl076528@svn.freebsd.org> From: Warner Losh Date: Wed, 3 Mar 2010 21:53:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204672 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:53:26 -0000 Author: imp Date: Wed Mar 3 21:53:25 2010 New Revision: 204672 URL: http://svn.freebsd.org/changeset/base/204672 Log: Cast these to intmax_t before printing to fix build bustage. Better solutions welcome. Modified: head/sbin/newfs/mkfs.c Modified: head/sbin/newfs/mkfs.c ============================================================================== --- head/sbin/newfs/mkfs.c Wed Mar 3 21:47:25 2010 (r204671) +++ head/sbin/newfs/mkfs.c Wed Mar 3 21:53:25 2010 (r204672) @@ -191,8 +191,8 @@ restart: exit(17); } if (sblock.fs_fsize < sectorsize) { - printf("increasing fragment size from %d to sector size (%d)\n", - sblock.fs_fsize, sectorsize); + printf("increasing fragment size from %d to sector size (%jd)\n", + sblock.fs_fsize, (intmax_t)sectorsize); sblock.fs_fsize = sectorsize; } if (sblock.fs_bsize > MAXBSIZE) { @@ -337,8 +337,8 @@ restart: } else if (density < minfragsperinode * fsize) { origdensity = density; density = minfragsperinode * fsize; - fprintf(stderr, "density increased from %d to %d\n", - origdensity, density); + fprintf(stderr, "density increased from %d to %jd\n", + origdensity, (intmax_t)density); } origdensity = density; for (;;) { @@ -346,8 +346,9 @@ restart: if (fragsperinode < minfragsperinode) { bsize <<= 1; fsize <<= 1; - printf("Block size too small for a file system %s %d\n", - "of this size. Increasing blocksize to", bsize); + printf("Block size too small for a file system %s %jd\n", + "of this size. Increasing blocksize to", + (intmax_t)bsize); goto restart; } minfpg = fragsperinode * INOPB(&sblock); @@ -371,7 +372,8 @@ restart: density -= sblock.fs_fsize; } if (density != origdensity) - printf("density reduced from %d to %d\n", origdensity, density); + printf("density reduced from %d to %jd\n", origdensity, + (intmax_t)density); /* * Start packing more blocks into the cylinder group until * it cannot grow any larger, the number of cylinder groups From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:54:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DA59106566C; Wed, 3 Mar 2010 21:54:29 +0000 (UTC) (envelope-from kmatthew.macy@gmail.com) Received: from mail-qy0-f183.google.com (mail-qy0-f183.google.com [209.85.221.183]) by mx1.freebsd.org (Postfix) with ESMTP id 10C5E8FC16; Wed, 3 Mar 2010 21:54:28 +0000 (UTC) Received: by qyk14 with SMTP id 14so1878125qyk.9 for ; Wed, 03 Mar 2010 13:54:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=x6f2xJwn/eBunBMN4eGxdA6AJEOjEoOFsE8D3KmVmL0=; b=WYhD2ZtkaU+0HaBREff4Jkun7TuCp7dr4+vTvcvMRFAPcR6iQPQDTVNCN/rgU/6dH8 MxI1qTbbrLvYg6NwbqT2pV4WKOdzq6tI+uUWEqMQggmO4XCfo3nb/HDphml8D8xHAFcY TI/fnIVZPpkd1966XLcsjaeQVScqRmLmPASuI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=sNxI++zmiG4jimDeUaFQtTjMlzDAef3Y+APcjPhavbvVdia0pG9YifG5NhCBeCzsDK aGsvsoiK7Ih765fzDLwKehsAh6hnYTuDLIRNcgX4N+3gwcts5OdwrMKgYvj2OGcrRhm4 urBtuzP9+IzQtiBzFBlcjNim1ltDwIGjd6DO4= MIME-Version: 1.0 Sender: kmatthew.macy@gmail.com Received: by 10.229.241.82 with SMTP id ld18mr332515qcb.60.1267651872825; Wed, 03 Mar 2010 13:31:12 -0800 (PST) In-Reply-To: <201003031925.o23JPTnW042804@svn.freebsd.org> References: <201003031925.o23JPTnW042804@svn.freebsd.org> Date: Wed, 3 Mar 2010 13:31:12 -0800 X-Google-Sender-Auth: c5f5ba2dfd18badb Message-ID: <82c4140e1003031331y37a7c7a6x935084dbe46743e3@mail.gmail.com> From: "K. Macy" To: Maxim Sobolev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204654 - in head: sbin/newfs usr.bin/truncate X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kmacy@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:54:29 -0000 This broke world. On Wed, Mar 3, 2010 at 11:25 AM, Maxim Sobolev wrote: > Author: sobomax > Date: Wed Mar =A03 19:25:28 2010 > New Revision: 204654 > URL: http://svn.freebsd.org/changeset/base/204654 > > Log: > =A0Use expand_number(3) from libutil instead of home-grown function to pa= rse > =A0human-friendly power-of-two numbers (i.e. 2k, 5M etc). > > =A0Suggested by: many > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/sbin/newfs/Makefile > =A0head/sbin/newfs/newfs.c > =A0head/sbin/newfs/newfs.h > =A0head/usr.bin/truncate/Makefile > =A0head/usr.bin/truncate/truncate.c > > Modified: head/sbin/newfs/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/newfs/Makefile =A0 =A0Wed Mar =A03 19:14:05 2010 =A0 =A0 = =A0 =A0(r204653) > +++ head/sbin/newfs/Makefile =A0 =A0Wed Mar =A03 19:25:28 2010 =A0 =A0 = =A0 =A0(r204654) > @@ -4,8 +4,8 @@ > =A0.PATH: ${.CURDIR}/../../sys/geom > > =A0PROG=3D =A0newfs > -DPADD=3D ${LIBUFS} > -LDADD=3D -lufs > +DPADD=3D ${LIBUFS} ${LIBUTIL} > +LDADD=3D -lufs -lutil > =A0SRCS=3D =A0newfs.c mkfs.c geom_bsd_enc.c > > =A0WARNS?=3D =A0 =A0 =A0 =A03 > > Modified: head/sbin/newfs/newfs.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/newfs/newfs.c =A0 =A0 Wed Mar =A03 19:14:05 2010 =A0 =A0 = =A0 =A0(r204653) > +++ head/sbin/newfs/newfs.c =A0 =A0 Wed Mar =A03 19:25:28 2010 =A0 =A0 = =A0 =A0(r204654) > @@ -77,6 +77,8 @@ __FBSDID("$FreeBSD$"); > =A0#include > =A0#include > > +#include > + > =A0#include "newfs.h" > > =A0int =A0 =A0Eflag; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* Erase previous= disk contents */ > @@ -90,19 +92,19 @@ int Jflag; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* enab= le gjournal for file > =A0int =A0 =A0lflag; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* enable multila= bel for file system */ > =A0int =A0 =A0nflag; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* do not create = .snap directory */ > =A0intmax_t fssize; =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* file system size */ > -int =A0 =A0sectorsize; =A0 =A0 =A0 =A0 =A0 =A0 /* bytes/sector */ > +int64_t =A0 =A0 =A0 =A0sectorsize; =A0 =A0 =A0 =A0 =A0 =A0 /* bytes/sect= or */ > =A0int =A0 =A0realsectorsize; =A0 =A0 =A0 =A0 /* bytes/sector in hardware= */ > -int =A0 =A0fsize =3D 0; =A0 =A0 =A0 =A0 =A0 =A0 =A0/* fragment size */ > -int =A0 =A0bsize =3D 0; =A0 =A0 =A0 =A0 =A0 =A0 =A0/* block size */ > -int =A0 =A0maxbsize =3D 0; =A0 =A0 =A0 =A0 =A0 /* maximum clustering */ > -int =A0 =A0maxblkspercg =3D MAXBLKSPERCG; /* maximum blocks per cylinder= group */ > +int64_t =A0 =A0 =A0 =A0fsize =3D 0; =A0 =A0 =A0 =A0 =A0 =A0 =A0/* fragme= nt size */ > +int64_t =A0 =A0 =A0 =A0bsize =3D 0; =A0 =A0 =A0 =A0 =A0 =A0 =A0/* block = size */ > +int64_t =A0 =A0 =A0 =A0maxbsize =3D 0; =A0 =A0 =A0 =A0 =A0 /* maximum cl= ustering */ > +int64_t =A0 =A0 =A0 =A0maxblkspercg =3D MAXBLKSPERCG; /* maximum blocks = per cylinder group */ > =A0int =A0 =A0minfree =3D MINFREE; =A0 =A0 =A0/* free space threshold */ > =A0int =A0 =A0opt =3D DEFAULTOPT; =A0 =A0 =A0 /* optimization preference = (space or time) */ > -int =A0 =A0density; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* number of bytes pe= r inode */ > -int =A0 =A0maxcontig =3D 0; =A0 =A0 =A0 =A0 =A0/* max contiguous blocks = to allocate */ > -int =A0 =A0maxbpg; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* maximum blocks per= file in a cyl group */ > -int =A0 =A0avgfilesize =3D AVFILESIZ;/* expected average file size */ > -int =A0 =A0avgfilesperdir =3D AFPDIR;/* expected number of files per dir= ectory */ > +int64_t =A0 =A0 =A0 =A0density; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* number= of bytes per inode */ > +int64_t =A0 =A0 =A0 =A0maxcontig =3D 0; =A0 =A0 =A0 =A0 =A0/* max contig= uous blocks to allocate */ > +int64_t =A0 =A0 =A0 =A0maxbpg; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* maximu= m blocks per file in a cyl group */ > +int64_t =A0 =A0 =A0 =A0avgfilesize =3D AVFILESIZ;/* expected average fil= e size */ > +int64_t =A0 =A0 =A0 =A0avgfilesperdir =3D AFPDIR;/* expected number of f= iles per directory */ > =A0u_char *volumelabel =3D NULL; =A0 =A0/* volume label for filesystem */ > =A0struct uufsd disk; =A0 =A0 =A0 =A0 =A0 =A0 /* libufs disk structure */ > > @@ -117,7 +119,6 @@ static void getfssize(intmax_t *, const > =A0static struct disklabel *getdisklabel(char *s); > =A0static void rewritelabel(char *s, struct disklabel *lp); > =A0static void usage(void); > -static int parselength(const char *ls, int *sz); > > =A0ufs2_daddr_t part_ofs; /* partition offset in blocks, used with files = */ > > @@ -170,7 +171,7 @@ main(int argc, char *argv[]) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Rflag =3D 1; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 'S': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D parselength(optarg= , §orsize); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D expand_number(opta= rg, §orsize); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rval < 0 || sectorsize= <=3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errx(1, "%= s: bad sector size", optarg); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > @@ -184,13 +185,13 @@ main(int argc, char *argv[]) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Xflag++; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 'a': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D parselength(optarg= , &maxcontig); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D expand_number(opta= rg, &maxcontig); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rval < 0 || maxcontig = <=3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errx(1, "%= s: bad maximum contiguous blocks", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0op= targ); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 'b': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D parselength(optarg= , &bsize); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D expand_number(opta= rg, &bsize); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rval < 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 errx(1, "= %s: bad block size", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 o= ptarg); > @@ -202,39 +203,39 @@ main(int argc, char *argv[]) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0op= targ, MAXBSIZE); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 'c': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D parselength(optarg= , &maxblkspercg); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D expand_number(opta= rg, &maxblkspercg); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rval < 0 || maxblksper= cg <=3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errx(1, "%= s: bad blocks per cylinder group", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0op= targ); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 'd': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D parselength(optarg= , &maxbsize); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D expand_number(opta= rg, &maxbsize); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rval < 0 || maxbsize <= MINBSIZE) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errx(1, "%= s: bad extent block size", optarg); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 'e': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D parselength(optarg= , &maxbpg); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D expand_number(opta= rg, &maxbpg); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rval < 0 || maxbpg <= =3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errx(1, "%s: bad block= s per file in a cylinder group", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0op= targ); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 'f': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D parselength(optarg= , &fsize); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D expand_number(opta= rg, &fsize); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rval < 0 || fsize <=3D= 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errx(1, "%= s: bad fragment size", optarg); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 'g': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D parselength(optarg= , &avgfilesize); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D expand_number(opta= rg, &avgfilesize); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rval < 0 || avgfilesiz= e <=3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errx(1, "%= s: bad average file size", optarg); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 'h': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D parselength(optarg= , &avgfilesperdir); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D expand_number(opta= rg, &avgfilesperdir); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rval < 0 || avgfilespe= rdir <=3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 errx(1, "%s: = bad average files per dir", optarg); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 'i': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D parselength(optarg= , &density); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rval =3D expand_number(opta= rg, &density); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rval < 0 || density <= =3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errx(1, "%= s: bad bytes per inode", optarg); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > @@ -495,62 +496,3 @@ usage() > =A0 =A0 =A0 =A0fprintf(stderr, "\t-s file system size (sectors)\n"); > =A0 =A0 =A0 =A0exit(1); > =A0} > - > -/* > - * Return the numeric value of a string given in the form [+-][0-9]+[GMK= T] > - * or -1 on format error or overflow. > - */ > -static int > -parselength(const char *ls, int *sz) > -{ > - =A0 =A0 =A0 off_t length, oflow; > - =A0 =A0 =A0 int lsign; > - > - =A0 =A0 =A0 length =3D 0; > - =A0 =A0 =A0 lsign =3D 1; > - > - =A0 =A0 =A0 switch (*ls) { > - =A0 =A0 =A0 case '-': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 lsign =3D -1; > - =A0 =A0 =A0 case '+': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ls++; > - =A0 =A0 =A0 } > - > -#define ASSIGN_CHK_OFLOW(x, y) =A0if (x < y) return -1; y =3D x > - =A0 =A0 =A0 /* > - =A0 =A0 =A0 =A0* Calculate the value of the decimal digit string, faili= ng > - =A0 =A0 =A0 =A0* on overflow. > - =A0 =A0 =A0 =A0*/ > - =A0 =A0 =A0 while (isdigit(*ls)) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 oflow =3D length * 10 + *ls++ - '0'; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ASSIGN_CHK_OFLOW(oflow, length); > - =A0 =A0 =A0 } > - > - =A0 =A0 =A0 switch (*ls) { > - =A0 =A0 =A0 case 'T': > - =A0 =A0 =A0 case 't': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 oflow =3D length * 1024; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ASSIGN_CHK_OFLOW(oflow, length); > - =A0 =A0 =A0 case 'G': > - =A0 =A0 =A0 case 'g': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 oflow =3D length * 1024; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ASSIGN_CHK_OFLOW(oflow, length); > - =A0 =A0 =A0 case 'M': > - =A0 =A0 =A0 case 'm': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 oflow =3D length * 1024; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ASSIGN_CHK_OFLOW(oflow, length); > - =A0 =A0 =A0 case 'K': > - =A0 =A0 =A0 case 'k': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ls[1] !=3D '\0') > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -1; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 oflow =3D length * 1024; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ASSIGN_CHK_OFLOW(oflow, length); > - =A0 =A0 =A0 case '\0': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; > - =A0 =A0 =A0 default: > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -1; > - =A0 =A0 =A0 } > - > - =A0 =A0 =A0 *sz =3D length * lsign; > - =A0 =A0 =A0 return 0; > -} > > Modified: head/sbin/newfs/newfs.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/newfs/newfs.h =A0 =A0 Wed Mar =A03 19:14:05 2010 =A0 =A0 = =A0 =A0(r204653) > +++ head/sbin/newfs/newfs.h =A0 =A0 Wed Mar =A03 19:25:28 2010 =A0 =A0 = =A0 =A0(r204654) > @@ -86,19 +86,19 @@ extern int =A0Jflag; =A0 =A0 =A0 =A0 =A0/* enable gjo= urnal fo > =A0extern int =A0 =A0 lflag; =A0 =A0 =A0 =A0 =A0/* enable multilabel MAC = for file system */ > =A0extern int =A0 =A0 nflag; =A0 =A0 =A0 =A0 =A0/* do not create .snap di= rectory */ > =A0extern intmax_t =A0 =A0 =A0 =A0fssize; =A0 =A0 =A0 =A0 /* file system = size */ > -extern int =A0 =A0 sectorsize; =A0 =A0 /* bytes/sector */ > +extern int64_t sectorsize; =A0 =A0 /* bytes/sector */ > =A0extern int =A0 =A0 realsectorsize; /* bytes/sector in hardware*/ > -extern int =A0 =A0 fsize; =A0 =A0 =A0 =A0 =A0/* fragment size */ > -extern int =A0 =A0 bsize; =A0 =A0 =A0 =A0 =A0/* block size */ > -extern int =A0 =A0 maxbsize; =A0 =A0 =A0 /* maximum clustering */ > -extern int =A0 =A0 maxblkspercg; =A0 /* maximum blocks per cylinder grou= p */ > +extern int64_t fsize; =A0 =A0 =A0 =A0 =A0/* fragment size */ > +extern int64_t bsize; =A0 =A0 =A0 =A0 =A0/* block size */ > +extern int64_t maxbsize; =A0 =A0 =A0 /* maximum clustering */ > +extern int64_t maxblkspercg; =A0 /* maximum blocks per cylinder group */ > =A0extern int =A0 =A0 minfree; =A0 =A0 =A0 =A0/* free space threshold */ > =A0extern int =A0 =A0 opt; =A0 =A0 =A0 =A0 =A0 =A0/* optimization prefere= nce (space or time) */ > -extern int =A0 =A0 density; =A0 =A0 =A0 =A0/* number of bytes per inode = */ > -extern int =A0 =A0 maxcontig; =A0 =A0 =A0/* max contiguous blocks to all= ocate */ > -extern int =A0 =A0 maxbpg; =A0 =A0 =A0 =A0 /* maximum blocks per file in= a cyl group */ > -extern int =A0 =A0 avgfilesize; =A0 =A0/* expected average file size */ > -extern int =A0 =A0 avgfilesperdir; /* expected number of files per direc= tory */ > +extern int64_t density; =A0 =A0 =A0 =A0/* number of bytes per inode */ > +extern int64_t maxcontig; =A0 =A0 =A0/* max contiguous blocks to allocat= e */ > +extern int64_t maxbpg; =A0 =A0 =A0 =A0 /* maximum blocks per file in a c= yl group */ > +extern int64_t avgfilesize; =A0 =A0/* expected average file size */ > +extern int64_t avgfilesperdir; /* expected number of files per directory= */ > =A0extern u_char =A0*volumelabel; =A0 /* volume label for filesystem */ > =A0extern struct uufsd disk; =A0 =A0 =A0/* libufs disk structure */ > > > Modified: head/usr.bin/truncate/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/truncate/Makefile =A0 =A0 =A0Wed Mar =A03 19:14:05 2010 = =A0 =A0 =A0 =A0(r204653) > +++ head/usr.bin/truncate/Makefile =A0 =A0 =A0Wed Mar =A03 19:25:28 2010 = =A0 =A0 =A0 =A0(r204654) > @@ -1,5 +1,7 @@ > =A0# $FreeBSD$ > > =A0PROG=3D =A0 =A0 =A0 =A0 =A0truncate > +DPADD=3D =A0 =A0 =A0 =A0 ${LIBUTIL} > +LDADD=3D =A0 =A0 =A0 =A0 -lutil > > =A0.include > > Modified: head/usr.bin/truncate/truncate.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/truncate/truncate.c =A0 =A0Wed Mar =A03 19:14:05 2010 = =A0 =A0 =A0 =A0(r204653) > +++ head/usr.bin/truncate/truncate.c =A0 =A0Wed Mar =A03 19:25:28 2010 = =A0 =A0 =A0 =A0(r204654) > @@ -40,7 +40,8 @@ static const char rcsid[] =3D > =A0#include > =A0#include > > -static int =A0 =A0 parselength(char *, off_t *); > +#include > + > =A0static void =A0 =A0usage(void); > > =A0static int =A0 =A0 no_create; > @@ -53,7 +54,8 @@ main(int argc, char **argv) > =A0{ > =A0 =A0 =A0 =A0struct stat =A0 =A0 sb; > =A0 =A0 =A0 =A0mode_t =A0omode; > - =A0 =A0 =A0 off_t =A0 oflow, rsize, sz, tsize; > + =A0 =A0 =A0 off_t =A0 oflow, rsize, tsize; > + =A0 =A0 =A0 int64_t sz; > =A0 =A0 =A0 =A0int =A0 =A0 ch, error, fd, oflags; > =A0 =A0 =A0 =A0char =A0 *fname, *rname; > > @@ -71,7 +73,7 @@ main(int argc, char **argv) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rname =3D optarg; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 's': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (parselength(optarg, &sz= ) =3D=3D -1) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (expand_number(optarg, &= sz) =3D=3D -1) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errx(EXIT_= FAILURE, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"i= nvalid size argument `%s'", optarg); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (*optarg =3D=3D '+' || = *optarg =3D=3D '-') > @@ -148,65 +150,6 @@ main(int argc, char **argv) > =A0 =A0 =A0 =A0return error ? EXIT_FAILURE : EXIT_SUCCESS; > =A0} > > -/* > - * Return the numeric value of a string given in the form [+-][0-9]+[GMK= T] > - * or -1 on format error or overflow. > - */ > -static int > -parselength(char *ls, off_t *sz) > -{ > - =A0 =A0 =A0 off_t =A0 length, oflow; > - =A0 =A0 =A0 int =A0 =A0 lsign; > - > - =A0 =A0 =A0 length =3D 0; > - =A0 =A0 =A0 lsign =3D 1; > - > - =A0 =A0 =A0 switch (*ls) { > - =A0 =A0 =A0 case '-': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 lsign =3D -1; > - =A0 =A0 =A0 case '+': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ls++; > - =A0 =A0 =A0 } > - > -#define =A0 =A0 =A0 =A0ASSIGN_CHK_OFLOW(x, y) =A0if (x < y) return -1; y= =3D x > - =A0 =A0 =A0 /* > - =A0 =A0 =A0 =A0* Calculate the value of the decimal digit string, faili= ng > - =A0 =A0 =A0 =A0* on overflow. > - =A0 =A0 =A0 =A0*/ > - =A0 =A0 =A0 while (isdigit(*ls)) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 oflow =3D length * 10 + *ls++ - '0'; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ASSIGN_CHK_OFLOW(oflow, length); > - =A0 =A0 =A0 } > - > - =A0 =A0 =A0 switch (*ls) { > - =A0 =A0 =A0 case 'T': > - =A0 =A0 =A0 case 't': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 oflow =3D length * 1024; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ASSIGN_CHK_OFLOW(oflow, length); > - =A0 =A0 =A0 case 'G': > - =A0 =A0 =A0 case 'g': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 oflow =3D length * 1024; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ASSIGN_CHK_OFLOW(oflow, length); > - =A0 =A0 =A0 case 'M': > - =A0 =A0 =A0 case 'm': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 oflow =3D length * 1024; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ASSIGN_CHK_OFLOW(oflow, length); > - =A0 =A0 =A0 case 'K': > - =A0 =A0 =A0 case 'k': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ls[1] !=3D '\0') > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -1; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 oflow =3D length * 1024; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ASSIGN_CHK_OFLOW(oflow, length); > - =A0 =A0 =A0 case '\0': > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; > - =A0 =A0 =A0 default: > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -1; > - =A0 =A0 =A0 } > - > - =A0 =A0 =A0 *sz =3D length * lsign; > - =A0 =A0 =A0 return 0; > -} > - > =A0static void > =A0usage(void) > =A0{ > From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:54:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C433F1065679; Wed, 3 Mar 2010 21:54:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B41C08FC1F; Wed, 3 Mar 2010 21:54:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23LsnxC076857; Wed, 3 Mar 2010 21:54:49 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23Lsnr4076855; Wed, 3 Mar 2010 21:54:49 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003032154.o23Lsnr4076855@svn.freebsd.org> From: Warner Losh Date: Wed, 3 Mar 2010 21:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204673 - head/lib/csu/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:54:49 -0000 Author: imp Date: Wed Mar 3 21:54:49 2010 New Revision: 204673 URL: http://svn.freebsd.org/changeset/base/204673 Log: __main and __gccmain are no longer required, so eliminate them. Submitted by: jmallet@ Modified: head/lib/csu/mips/crt1.c Modified: head/lib/csu/mips/crt1.c ============================================================================== --- head/lib/csu/mips/crt1.c Wed Mar 3 21:53:25 2010 (r204672) +++ head/lib/csu/mips/crt1.c Wed Mar 3 21:54:49 2010 (r204673) @@ -66,9 +66,6 @@ extern int etext; char **environ; const char *__progname = ""; -void __gccmain(void) {} -void __main(void) {} - /* The entry function. */ void __start(char **ap, From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:59:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22050106567F; Wed, 3 Mar 2010 21:59:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EACA88FC0A; Wed, 3 Mar 2010 21:59:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23LxNrr077922; Wed, 3 Mar 2010 21:59:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23LxN9P077919; Wed, 3 Mar 2010 21:59:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003032159.o23LxN9P077919@svn.freebsd.org> From: Warner Losh Date: Wed, 3 Mar 2010 21:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204674 - head/lib/csu/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:59:24 -0000 Author: imp Date: Wed Mar 3 21:59:23 2010 New Revision: 204674 URL: http://svn.freebsd.org/changeset/base/204674 Log: Use ABI neutral macrosa Submitted by: jmallet Modified: head/lib/csu/mips/crti.S head/lib/csu/mips/crtn.S Modified: head/lib/csu/mips/crti.S ============================================================================== --- head/lib/csu/mips/crti.S Wed Mar 3 21:54:49 2010 (r204673) +++ head/lib/csu/mips/crti.S Wed Mar 3 21:59:23 2010 (r204674) @@ -6,32 +6,45 @@ __FBSDID("$FreeBSD$"); .globl _init .type _init,%function _init: -#ifdef __ABICALLS__ - .set noreorder - .cpload $25 - .set reorder - subu sp, sp, 32 - .cprestore 16 - sw ra, 28(sp) - + .set nreoorder +#if defined(__ABICALLS__) && (defined(__mips_o32) || defined(__mips_o64)) + SETUP_GP +#endif + PTR_ADDU sp, sp, -CALLFRAME_SIZ + REG_S ra, CALLFRAME_RA(sp) +#if defined(__ABICALLS__) +#if defined(__mips_o32) || defined(__mips_o64) + SAVE_GP(CALLFRAME_GP) #else - subu sp, sp, 32 - sw ra, 28(sp) + SETUP_GP64(CALLFRAME_GP, _init) +#endif +#else /* __ABICALLS__ */ +#if defined(__mips_n32) || defined(__mips_n64) + REG_S gp, CALLFRAME_GP(sp) +#endif #endif + .set reorder .section .fini,"ax",%progbits .align 4 .globl _fini .type _fini,%function _fini: -#ifdef __ABICALLS__ - .set noreorder - .cpload $25 - .set reorder - subu sp, sp, 32 - .cprestore 16 - sw ra, 28(sp) + .set noreorder +#if defined(__ABICALLS__) && (defined(__mips_o32) || defined(__mips_o64)) + SETUP_GP +#endif + PTR_ADDU sp, sp, -CALLFRAME_SIZ + REG_S ra, CALLFRAME_RA(sp) +#if defined(__ABICALLS__) +#if defined(__mips_o32) || defined(__mips_o64) + SAVE_GP(CALLFRAME_GP) #else - subu sp, sp, 32 - sw ra, 28(sp) + SETUP_GP64(CALLFRAME_GP, _fini) +#endif +#else /* __ABICALLS__ */ +#if defined(__mips_n32) || defined(__mips_n64) + REG_S gp, CALLFRAME_GP(sp) +#endif #endif + .set reorder Modified: head/lib/csu/mips/crtn.S ============================================================================== --- head/lib/csu/mips/crtn.S Wed Mar 3 21:54:49 2010 (r204673) +++ head/lib/csu/mips/crtn.S Wed Mar 3 21:59:23 2010 (r204674) @@ -1,15 +1,24 @@ #include __FBSDID("$FreeBSD$"); + .section .init,"ax",%progbits - lw ra, 28(sp) - .set noreorder - j ra - addu sp, sp, 32 - .set reorder + .align 4 + .set noreorder +#if defined(__ABICALLS__) && (defined(__mips_n32) || defined(__mips_n64)) + REG_L gp, CALLFRAME_GP(sp) +#endif + REG_L ra, CALLFRAME_RA(sp) + jr ra + PTR_ADDU sp, sp, CALLFRAME_SIZ + .set reorder .section .fini,"ax",%progbits - lw ra, 28(sp) - .set noreorder - j ra - addu sp, sp, 32 - .set reorder + .align 4 + .set noreorder +#if defined(__ABICALLS__) && (defined(__mips_n32) || defined(__mips_n64)) + REG_L gp, CALLFRAME_GP(sp) +#endif + REG_L ra, CALLFRAME_RA(sp) + jr ra + PTR_ADDU sp, sp, CALLFRAME_SIZ + .set reorder From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:59:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E43C2106578B; Wed, 3 Mar 2010 21:59:31 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 9B52C8FC13; Wed, 3 Mar 2010 21:59:31 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 6740F1FFC22; Wed, 3 Mar 2010 21:59:30 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 41F9B84500; Wed, 3 Mar 2010 22:59:30 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Schouten References: <201003031849.o23InFJU034484@svn.freebsd.org> <20100303190551.GJ8200@hoeg.nl> Date: Wed, 03 Mar 2010 22:59:30 +0100 In-Reply-To: <20100303190551.GJ8200@hoeg.nl> (Ed Schouten's message of "Wed, 3 Mar 2010 20:05:52 +0100") Message-ID: <868wa92hj1.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r204650 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:59:32 -0000 Ed Schouten writes: > Maybe I'm flogging a dead horse, but this is 2010. Whether or not a > compiler supports C99 is no longer an issue. We're already far beyond > the point of going back to C89. One of the world's most widely used C compilers is still stuck at C89. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 21:59:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C504F10656F0; Wed, 3 Mar 2010 21:59:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B48B18FC13; Wed, 3 Mar 2010 21:59:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23Lxj6b078026; Wed, 3 Mar 2010 21:59:45 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23Lxj04078024; Wed, 3 Mar 2010 21:59:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003032159.o23Lxj04078024@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 3 Mar 2010 21:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204675 - head/sys/fs/msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:59:45 -0000 Author: kib Date: Wed Mar 3 21:59:45 2010 New Revision: 204675 URL: http://svn.freebsd.org/changeset/base/204675 Log: When returning error from msdosfs_lookup(), make sure that *vpp is NULL. lookup() KASSERTs this condition. Reported and tested by: pho MFC after: 3 weeks Modified: head/sys/fs/msdosfs/msdosfs_lookup.c Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Wed Mar 3 21:59:23 2010 (r204674) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Wed Mar 3 21:59:45 2010 (r204675) @@ -125,14 +125,14 @@ msdosfs_lookup_(struct vnode *vdp, struc #endif dp = VTODE(vdp); pmp = dp->de_pmp; - if (vpp != NULL) - *vpp = NULL; #ifdef MSDOSFS_DEBUG printf("msdosfs_lookup(): vdp %p, dp %p, Attr %02x\n", vdp, dp, dp->de_Attributes); #endif restart: + if (vpp != NULL) + *vpp = NULL; /* * If they are going after the . or .. entry in the root directory, * they won't find it. DOS filesystems don't have them in the root @@ -525,8 +525,10 @@ foundroot: pdp = vdp; if (flags & ISDOTDOT) { error = msdosfs_deget_dotdot(pdp, cluster, blkoff, vpp); - if (error) + if (error) { + *vpp = NULL; return (error); + } /* * Recheck that ".." still points to the inode we * looked up before pdp lock was dropped. @@ -534,6 +536,7 @@ foundroot: error = msdosfs_lookup_(pdp, NULL, cnp, &inode1); if (error) { vput(*vpp); + *vpp = NULL; return (error); } if (VTODE(*vpp)->de_inode != inode1) { From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 22:06:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67F271065677; Wed, 3 Mar 2010 22:06:40 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 2C6648FC23; Wed, 3 Mar 2010 22:06:40 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 3791C35A831; Wed, 3 Mar 2010 23:06:39 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 2A3D517B48; Wed, 3 Mar 2010 23:06:39 +0100 (CET) Date: Wed, 3 Mar 2010 23:06:39 +0100 From: Jilles Tjoelker To: Kostik Belousov Message-ID: <20100303220639.GA52066@stack.nl> References: <201002271532.o1RFWnCp099462@svn.freebsd.org> <20100227220854.GB77656@stack.nl> <20100228111508.GN2489@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100228111508.GN2489@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204413 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 22:06:40 -0000 On Sun, Feb 28, 2010 at 01:15:08PM +0200, Kostik Belousov wrote: > On Sat, Feb 27, 2010 at 11:08:54PM +0100, Jilles Tjoelker wrote: > > On Sat, Feb 27, 2010 at 03:32:49PM +0000, Konstantin Belousov wrote: > > > Author: kib > > > Date: Sat Feb 27 15:32:49 2010 > > > New Revision: 204413 > > > URL: http://svn.freebsd.org/changeset/base/204413 > > > Log: > > > For kinfo_proc in kp->ki_siglist, return the set of the signals pending > > > in the process queue when gathering information for the process, and set > > > of signals pending for the thread, when gathering information for the > > > thread. Previously, the sysctl returned a union of the process and some > > > arbitrary thread pending set for the process, and union of the process > > > and the thread pending set for the thread. > > Although the new way provides maximum information and the old way was > > definitely broken for processes, I think the new way may not be what I > > expect. In particular, 'ps O pending' and 'ps HO pending' now give > > (usually) disjunct answers, even for single-threaded processes. I > > suppose these different answers can be useful for kernel debugging, but > > it should be documented. > Not only for the kernel debugging. Being able to see a pending signal in > the process queue means that signal delivery for the process is stopped. > Change provides a capability to start analyze such situation without > resorting to the kernel debugger. > More, I do not consider the change to be significant enough from the > interface stability point of view, thus planning to merge it to 8. > Where do you suggest to document the behaviour ? ps(1) ? Yes. Unfortunately the signal keywords are pretty poorly documented. > > Somewhat related, ki_sigmask could be the logical AND of all threads' > > td_sigmask when gathering information for the process, instead of the > > td_sigmask of the most recently created thread; fill_kinfo_aggregate() > > could handle this. > ki_sigmask arguably has no meaning in the process context. Do you > propose this to simplify handling of a single-threaded process ? To make non-threaded output of multi-threaded processes slightly more consistent. It is not that important, also given apparent plans to show signal information in procstat(1) which will be easier to use. -- Jilles Tjoelker From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 22:22:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 315831065673; Wed, 3 Mar 2010 22:22:18 +0000 (UTC) (envelope-from niclas.zeising@gmail.com) Received: from mxf1.bahnhof.se (mxf1.bahnhof.se [213.80.101.25]) by mx1.freebsd.org (Postfix) with ESMTP id D4DE98FC1E; Wed, 3 Mar 2010 22:22:16 +0000 (UTC) Received: from localhost (mxf1.local [127.0.0.1]) by mxf1-reinject (Postfix) with ESMTP id BEBC81E3120; Wed, 3 Mar 2010 23:22:16 +0100 (CET) X-Virus-Scanned: by amavisd-new using ClamAV at bahnhof.se (MXF1) X-Spam-Score: 4.245 X-Spam-Level: **** X-Spam-Status: No, score=4.245 tagged_above=-99 required=5 tests=[DNS_FROM_RFC_POST=1.44, RATWARE_GECKO_BUILD=1.426, SPF_NEUTRAL=1.379] Received: from mxf1.bahnhof.se ([127.0.0.1]) by localhost (mxf1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id udhwWthtDgkq; Wed, 3 Mar 2010 23:22:13 +0100 (CET) Received: from [192.168.1.33] (h-90-99.A163.priv.bahnhof.se [79.136.90.99]) by mxf1.bahnhof.se (Postfix) with ESMTP id AB1481E3141; Wed, 3 Mar 2010 23:22:13 +0100 (CET) Received: from 127.0.0.1 (AVG SMTP 9.0.733 [271.1.1/2720]); Wed, 03 Mar 2010 23:22:11 +0100 Message-ID: <4B8EE113.4030004@gmail.com> Date: Wed, 03 Mar 2010 23:22:11 +0100 From: Niclas Zeising User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: Ulf Lilleengen References: <201003032127.o23LRsYC070496@svn.freebsd.org> In-Reply-To: <201003032127.o23LRsYC070496@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204665 - head/sbin/gvinum X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 22:22:18 -0000 On 2010-03-03 22:27, Ulf Lilleengen wrote: > Author: lulf > Date: Wed Mar 3 21:27:54 2010 > New Revision: 204665 > URL: http://svn.freebsd.org/changeset/base/204665 > > Log: > - Make function of finding an available drive name a macro. > - Move check of /dev/ prefix and copy into a function to save code duplication. > This also fixes a bug where the /dev/ prefix could not be used when creating > volumes on the command line. > > Tested by: Niclas Zeising > Thank you! //Niclas From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 22:23:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54277106567B; Wed, 3 Mar 2010 22:23:15 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mx1.freebsd.org (Postfix) with ESMTP id 88C7D8FC18; Wed, 3 Mar 2010 22:23:14 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 25so334255eya.9 for ; Wed, 03 Mar 2010 14:23:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:organization:x-operation-sytem; bh=NHhvj6zW0fEEW9qQtPmGrBuO4TRg1lXV7SESN8Wi2/k=; b=gCatatnwT58nTtIQwgC/T42bBRGD2i8RTMKU6XiDys3TFsbNqPlD+Iz6W638Tp0H/3 yHLyDnrbWfr+L1r8DoV9O63JGGSS6e04yIZaSuIE8Jjwe8RAoDVQzG3zxA0cgshxHLa9 4EnFAT4Wt8lrlzCJAYv6X/Y+sASgKQ86ufBiY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:organization:x-operation-sytem; b=dQf/QdlmdHbDeWNyaBb0FW42nbXT8peDNGSrUfzgASKM2keLMCh0SQ5W0C74vIXngg VO6L4H0Iv22iFuqOHMFiGjSvuJFWvBoz3p3gFCP5z02US1URLMJC6X3OQJspTRWHI76n AIVUhEQ+oGgRY5FMxf7Z66kSR3zATXHcvAPME= Received: by 10.213.42.70 with SMTP id r6mr6011076ebe.4.1267653518776; Wed, 03 Mar 2010 13:58:38 -0800 (PST) Received: from weongyo ([174.35.1.224]) by mx.google.com with ESMTPS id 5sm578611eyh.11.2010.03.03.13.58.36 (version=SSLv3 cipher=RC4-MD5); Wed, 03 Mar 2010 13:58:38 -0800 (PST) Received: by weongyo (sSMTP sendmail emulation); Wed, 3 Mar 2010 13:58:37 -0800 From: Weongyo Jeong Date: Wed, 3 Mar 2010 13:58:37 -0800 To: src-committers@freebsd.org Message-ID: <20100303215837.GK1295@weongyo> Mail-Followup-To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201003032006.o23K69Hr052032@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003032006.o23K69Hr052032@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204657 - in head/sys/dev: bwn siba X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Weongyo Jeong List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 22:23:15 -0000 On Wed, Mar 03, 2010 at 08:06:09PM +0000, Weongyo Jeong wrote: > Author: weongyo > Date: Wed Mar 3 20:06:09 2010 > New Revision: 204657 > URL: http://svn.freebsd.org/changeset/base/204657 > > Log: > fixes an attached-at-boot issue that bwn(4) using device_identify > interface didn't be attached automatically at boot time so changes a > approach to attach children based on leveraging some newbus niceties. > > Submitted by: nwhitehorn Reported by: marcus, nwhitehorn regards, Weongyo Jeong From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 23:05:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB97F1065673; Wed, 3 Mar 2010 23:05:27 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 953528FC0C; Wed, 3 Mar 2010 23:05:27 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o23N5NZ1043396; Wed, 3 Mar 2010 16:05:23 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <4B8EC9E0.6050703@FreeBSD.org> Date: Wed, 3 Mar 2010 16:05:23 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201003031758.o23HwfnD023194@svn.freebsd.org> <4B8EC54E.4050705@fsn.hu> <4B8EC9E0.6050703@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1077) X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204648 - head/sys/dev/ciss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 23:05:28 -0000 On Mar 3, 2010, at 1:43 PM, Alexander Motin wrote: > Attila Nagy wrote: >> Alexander Motin wrote: >>> Author: mav >>> Date: Wed Mar 3 17:58:41 2010 >>> New Revision: 204648 >>> URL: http://svn.freebsd.org/changeset/base/204648 >>>=20 >>> Log: >>> Several changes to fix livelock under high load, introduced by = r203489: >>> - change the way in which command queue overflow is handled; >>> - do not expose to CAM two command slots, used for driver's = internal purposes; >>> - allow driver to use up to 1024 command slots, instead of 256 = before. >>>=20 >> Thank you for hunting this bug down. Do you plan to increase the = maximum >> logical device limit as well? >=20 > Not sure. I just have no idea why this limitation was enforced. Even = if > I personally don't see problems from increasing it, it would be nice = if > somebody more aware of this driver tell whether it is correct for all > supported hardware. I just don't have any. Thank you for provided > access. If nobody responds, we may try our luck in CURRENT. >=20 If you don't know, then please ask the people who maintain the code. Scott From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 23:11:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCE49106564A; Wed, 3 Mar 2010 23:11:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC2BA8FC08; Wed, 3 Mar 2010 23:11:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o23NBESZ094202; Wed, 3 Mar 2010 23:11:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o23NBEuk094200; Wed, 3 Mar 2010 23:11:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003032311.o23NBEuk094200@svn.freebsd.org> From: Xin LI Date: Wed, 3 Mar 2010 23:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204677 - head/usr.sbin/jail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 23:11:14 -0000 Author: delphij Date: Wed Mar 3 23:11:14 2010 New Revision: 204677 URL: http://svn.freebsd.org/changeset/base/204677 Log: Make 'make manlint' happy. No actual visible change. Modified: head/usr.sbin/jail/jail.8 Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Wed Mar 3 22:42:15 2010 (r204676) +++ head/usr.sbin/jail/jail.8 Wed Mar 3 23:11:14 2010 (r204677) @@ -47,7 +47,6 @@ .Op Fl l u Ar username | Fl U Ar username .Op Fl c | m .Op Ar parameter=value ... -.Br .Nm .Op Fl hi .Op Fl n Ar jailname @@ -55,7 +54,6 @@ .Op Fl s Ar securelevel .Op Fl l u Ar username | Fl U Ar username .Op Ar path hostname [ip[,..]] command ... -.Br .Nm .Op Fl r Ar jail .Sh DESCRIPTION @@ -67,9 +65,7 @@ imprisoning the current process (and fut The options are as follows: .Bl -tag -width indent .It Fl d -Allow making changes to a -.Va -dying jail. +Allow making changes to a dying jail. .It Fl h Resolve the .Va host.hostname From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 23:26:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B8B81065670; Wed, 3 Mar 2010 23:26:12 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 47A4B8FC15; Wed, 3 Mar 2010 23:26:12 +0000 (UTC) Received: by pwj1 with SMTP id 1so1372352pwj.13 for ; Wed, 03 Mar 2010 15:26:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:x-mailer:mime-version :subject:date:cc; bh=e2lEuvvyGQfBG7IPq4sgVI9rAHn1s3Xlz1qSJ/bUH/o=; b=KrpRElLpFg/5H3Y8Ag2I03U3ni/j9PmybYbBlBH2b9fLEEef+5z5PWrgNPOooqxjwz A9rxGinYtfMa+8wfpNip9AebkM0ch2BUsT3ZncaNk6saQyXARrXtHL9WzVV7sXZAQt99 HFDh7cNSEq0B/iy7tI3fJN0ujBlgRMLCKe39Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; b=JaH+SaXFUe+Yi27qtXWJYnS3XBAr0LIQL98lt6Ks6sjNZdJ+xIqZsMp10SqAfMkBZp ZjdQOGGKQXMjv588db3AGvvYh2OewWKESQLK0XsAmyM4t3U8Uys4TbRgEsUJrOb6rjds KVHSNmdrBtDeokLc1TjE9AA2Nxu+nC7sQOOOw= Received: by 10.140.251.9 with SMTP id y9mr4661808rvh.6.1267658766883; Wed, 03 Mar 2010 15:26:06 -0800 (PST) Received: from ?10.70.184.104? ([166.205.137.28]) by mx.google.com with ESMTPS id 22sm6232524pzk.13.2010.03.03.15.26.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Mar 2010 15:26:05 -0800 (PST) Message-Id: From: Garrett Cooper To: Warner Losh Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (7E18) Mime-Version: 1.0 (iPhone Mail 7E18) Date: Wed, 3 Mar 2010 15:25:53 -0800 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r204672 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 23:26:12 -0000 On Mar 3, 2010, at 1:53 PM, Warner Losh wrote: > Author: imp > Date: Wed Mar 3 21:53:25 2010 > New Revision: 204672 > URL: http://svn.freebsd.org/changeset/base/204672 > > Log: > Cast these to intmax_t before printing to fix build bustage. Better > solutions welcome. > > Modified: > head/sbin/newfs/mkfs.c > > Modified: head/sbin/newfs/mkfs.c > === > === > === > ===================================================================== > --- head/sbin/newfs/mkfs.c Wed Mar 3 21:47:25 2010 (r204671) > +++ head/sbin/newfs/mkfs.c Wed Mar 3 21:53:25 2010 (r204672) > @@ -191,8 +191,8 @@ restart: > exit(17); > } > if (sblock.fs_fsize < sectorsize) { > - printf("increasing fragment size from %d to sector size (%d) > \n", > - sblock.fs_fsize, sectorsize); > + printf("increasing fragment size from %d to sector size > (%jd)\n", > + sblock.fs_fsize, (intmax_t)sectorsize); > sblock.fs_fsize = sectorsize; > } > if (sblock.fs_bsize > MAXBSIZE) { > @@ -337,8 +337,8 @@ restart: > } else if (density < minfragsperinode * fsize) { > origdensity = density; > density = minfragsperinode * fsize; > - fprintf(stderr, "density increased from %d to %d\n", > - origdensity, density); > + fprintf(stderr, "density increased from %d to %jd\n", > + origdensity, (intmax_t)density); > } > origdensity = density; > for (;;) { > @@ -346,8 +346,9 @@ restart: > if (fragsperinode < minfragsperinode) { > bsize <<= 1; > fsize <<= 1; > - printf("Block size too small for a file system %s %d\n", > - "of this size. Increasing blocksize to", bsize); > + printf("Block size too small for a file system %s %jd\n", > + "of this size. Increasing blocksize to", > + (intmax_t)bsize); > goto restart; > } > minfpg = fragsperinode * INOPB(&sblock); > @@ -371,7 +372,8 @@ restart: > density -= sblock.fs_fsize; > } > if (density != origdensity) > - printf("density reduced from %d to %d\n", origdensity, > density); > + printf("density reduced from %d to %jd\n", origdensity, > + (intmax_t)density); > /* > * Start packing more blocks into the cylinder group until > * it cannot grow any larger, the number of cylinder groups Use PRId64 from inttypes.h ? Thanks, -Garrert From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 23:36:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BD751065673 for ; Wed, 3 Mar 2010 23:36:30 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by mx1.freebsd.org (Postfix) with ESMTP id 552868FC16 for ; Wed, 3 Mar 2010 23:36:29 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-067-239-163.pools.arcor-ip.net [88.67.239.163]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MSp3l-1OCRZu2PCf-00SM7T; Thu, 04 Mar 2010 00:36:27 +0100 Received: (qmail 47803 invoked from network); 3 Mar 2010 23:36:26 -0000 Received: from f8x64.laiers.local (192.168.4.188) by mx.laiers.local with SMTP; 3 Mar 2010 23:36:26 -0000 From: Max Laier Organization: FreeBSD To: Garrett Cooper Date: Thu, 4 Mar 2010 00:36:25 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-RELEASE-p2; KDE/4.3.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003040036.25583.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19iac3PMBmoQhwCyp6ISsDtDQsnTidcdQYnLbQ Fo52V8kMf2IdrTFsSjPIlGrs4sO4zizqnrz8iBoqSXTjvKtiFE DOV5c04nL/CoDm+C0+CGw== Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh Subject: Re: svn commit: r204672 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 23:36:30 -0000 On Thursday 04 March 2010 00:25:53 Garrett Cooper wrote: > On Mar 3, 2010, at 1:53 PM, Warner Losh wrote: > > Author: imp > > Date: Wed Mar 3 21:53:25 2010 > > New Revision: 204672 > > URL: http://svn.freebsd.org/changeset/base/204672 > > > > Log: > > Cast these to intmax_t before printing to fix build bustage. Better > > solutions welcome. > > > > Modified: > > head/sbin/newfs/mkfs.c > > > > Modified: head/sbin/newfs/mkfs.c > > === > > === > > === > > ===================================================================== > > --- head/sbin/newfs/mkfs.c Wed Mar 3 21:47:25 2010 (r204671) > > +++ head/sbin/newfs/mkfs.c Wed Mar 3 21:53:25 2010 (r204672) > > @@ -191,8 +191,8 @@ restart: > > exit(17); > > } > > if (sblock.fs_fsize < sectorsize) { > > - printf("increasing fragment size from %d to sector size (%d) > > \n", > > - sblock.fs_fsize, sectorsize); > > + printf("increasing fragment size from %d to sector size > > (%jd)\n", > > + sblock.fs_fsize, (intmax_t)sectorsize); > > sblock.fs_fsize = sectorsize; > > } > > if (sblock.fs_bsize > MAXBSIZE) { > > @@ -337,8 +337,8 @@ restart: > > } else if (density < minfragsperinode * fsize) { > > origdensity = density; > > density = minfragsperinode * fsize; > > - fprintf(stderr, "density increased from %d to %d\n", > > - origdensity, density); > > + fprintf(stderr, "density increased from %d to %jd\n", > > + origdensity, (intmax_t)density); > > } > > origdensity = density; > > for (;;) { > > @@ -346,8 +346,9 @@ restart: > > if (fragsperinode < minfragsperinode) { > > bsize <<= 1; > > fsize <<= 1; > > - printf("Block size too small for a file system %s %d\n", > > - "of this size. Increasing blocksize to", bsize); > > + printf("Block size too small for a file system %s %jd\n", > > + "of this size. Increasing blocksize to", > > + (intmax_t)bsize); > > goto restart; > > } > > minfpg = fragsperinode * INOPB(&sblock); > > @@ -371,7 +372,8 @@ restart: > > density -= sblock.fs_fsize; > > } > > if (density != origdensity) > > - printf("density reduced from %d to %d\n", origdensity, > > density); > > + printf("density reduced from %d to %jd\n", origdensity, > > + (intmax_t)density); > > /* > > * Start packing more blocks into the cylinder group until > > * it cannot grow any larger, the number of cylinder groups > > Use PRId64 from inttypes.h ? you just forgot to type ";)" there, didn't you? How are the PRI* macros better than an intmax_t cast? In my opinion, the intmax_t cast and %j is the best, realistic solution for this. I have partitioned in the past that we change int64 types to "long long" on platforms with 64bit "long". That way you can print int64 types with "%ll" on all platforms. But casting to intmax is just as good and the compiler should be able to figure out what goes on and make it a no-op. Regards, Max From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 00:14:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E031106566C; Thu, 4 Mar 2010 00:14:53 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 17B2F8FC15; Thu, 4 Mar 2010 00:14:52 +0000 (UTC) Received: by pvg3 with SMTP id 3so668165pvg.13 for ; Wed, 03 Mar 2010 16:14:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=jUWuhXtPRF/QsKyyHoz/zK6pxjca/m/x1MBczHOuKu4=; b=n4iiGzaP6DScXVa9gnENi2/trmUB1o5nctSSxztMCRxheURCgoOIIqmXfbpft68oas EPWyweaAuf2SxW2/kumZieG9KU480heEFEJAU6UqMhFVD0lVlQw2KSilzN8wNL+pc2nH MpbjjUncEsukyK5Oz0b/lvUIgTpfduKEW7ubw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=qTwsppE8w6gACvtBqkPTJ3WxqGz4clKmu1hQu5aGSe7gTfaR/zi5/x6Yrruc9hb9MX CSz72Q08pOsiGiwL/jW0t1pBQDFdNj6Tf0MwCkXqOxcf/3/UjPFw1a7VLJF4B/CbZQxp rJArsM5UtXWEuJ3X6/8CW6lgBk/le3W1i9o/Q= Received: by 10.142.248.26 with SMTP id v26mr1219196wfh.335.1267661687650; Wed, 03 Mar 2010 16:14:47 -0800 (PST) Received: from [10.70.184.104] ([166.205.137.28]) by mx.google.com with ESMTPS id 23sm3769pzk.6.2010.03.03.16.14.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Mar 2010 16:14:46 -0800 (PST) References: <201003040036.25583.max@love2party.net> Message-Id: <38B3C45B-B617-413F-868C-A25E3651CA59@gmail.com> From: Garrett Cooper To: Max Laier In-Reply-To: <201003040036.25583.max@love2party.net> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (7E18) Mime-Version: 1.0 (iPhone Mail 7E18) Date: Wed, 3 Mar 2010 16:14:35 -0800 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh Subject: Re: svn commit: r204672 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 00:14:53 -0000 On Mar 3, 2010, at 3:36 PM, Max Laier wrote: > On Thursday 04 March 2010 00:25:53 Garrett Cooper wrote: >> On Mar 3, 2010, at 1:53 PM, Warner Losh wrote: >>> Author: imp >>> Date: Wed Mar 3 21:53:25 2010 >>> New Revision: 204672 >>> URL: http://svn.freebsd.org/changeset/base/204672 >>> >>> Log: >>> Cast these to intmax_t before printing to fix build bustage. Better >>> solutions welcome. >>> >>> Modified: >>> head/sbin/newfs/mkfs.c >>> >>> Modified: head/sbin/newfs/mkfs.c >>> === >>> === >>> === >>> === >>> ================================================================== >>> --- head/sbin/newfs/mkfs.c Wed Mar 3 21:47:25 2010 (r204671) >>> +++ head/sbin/newfs/mkfs.c Wed Mar 3 21:53:25 2010 (r204672) >>> @@ -191,8 +191,8 @@ restart: >>> exit(17); >>> } >>> if (sblock.fs_fsize < sectorsize) { >>> - printf("increasing fragment size from %d to sector size >>> (%d) >>> \n", >>> - sblock.fs_fsize, sectorsize); >>> + printf("increasing fragment size from %d to sector size >>> (%jd)\n", >>> + sblock.fs_fsize, (intmax_t)sectorsize); >>> sblock.fs_fsize = sectorsize; >>> } >>> if (sblock.fs_bsize > MAXBSIZE) { >>> @@ -337,8 +337,8 @@ restart: >>> } else if (density < minfragsperinode * fsize) { >>> origdensity = density; >>> density = minfragsperinode * fsize; >>> - fprintf(stderr, "density increased from %d to %d\n", >>> - origdensity, density); >>> + fprintf(stderr, "density increased from %d to %jd\n", >>> + origdensity, (intmax_t)density); >>> } >>> origdensity = density; >>> for (;;) { >>> @@ -346,8 +346,9 @@ restart: >>> if (fragsperinode < minfragsperinode) { >>> bsize <<= 1; >>> fsize <<= 1; >>> - printf("Block size too small for a file system %s %d >>> \n", >>> - "of this size. Increasing blocksize to", bsize); >>> + printf("Block size too small for a file system %s %jd >>> \n", >>> + "of this size. Increasing blocksize to", >>> + (intmax_t)bsize); >>> goto restart; >>> } >>> minfpg = fragsperinode * INOPB(&sblock); >>> @@ -371,7 +372,8 @@ restart: >>> density -= sblock.fs_fsize; >>> } >>> if (density != origdensity) >>> - printf("density reduced from %d to %d\n", origdensity, >>> density); >>> + printf("density reduced from %d to %jd\n", origdensity, >>> + (intmax_t)density); >>> /* >>> * Start packing more blocks into the cylinder group until >>> * it cannot grow any larger, the number of cylinder groups >> >> Use PRId64 from inttypes.h ? > > you just forgot to type ";)" there, didn't you? Eh, not really my intent TBH (although I guess my answer was pretty cheeky looking back). > How are the PRI* macros > better than an intmax_t cast? In my opinion, the intmax_t cast and > %j is the > best, realistic solution for this. I have partitioned in the past > that we > change int64 types to "long long" on platforms with 64bit "long". > That way > you can print int64 types with "%ll" on all platforms. But casting > to intmax > is just as good and the compiler should be able to figure out what > goes on and > make it a no-op. Course it helps to read more dilligently too. It's fine today I suppose, but pardoning my ignorance, are there any archs where in practice today, intmax_t isn't synonymous with int64_t, like maybe some ARM variants? TIA! -Garrett From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 02:08:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A0AB1065689; Thu, 4 Mar 2010 02:08:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1EDD18FC1C; Thu, 4 Mar 2010 02:08:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o242132T087049; Wed, 3 Mar 2010 19:01:03 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 03 Mar 2010 19:01:19 -0700 (MST) Message-Id: <20100303.190119.422040040053350733.imp@bsdimp.com> To: yanefbsd@gmail.com From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204672 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 02:08:21 -0000 In message: Garrett Cooper writes: : On Mar 3, 2010, at 1:53 PM, Warner Losh wrote: : : > Author: imp : > Date: Wed Mar 3 21:53:25 2010 : > New Revision: 204672 : > URL: http://svn.freebsd.org/changeset/base/204672 : > : > Log: : > Cast these to intmax_t before printing to fix build bustage. Better : > solutions welcome. : > : > Modified: : > head/sbin/newfs/mkfs.c : > : > Modified: head/sbin/newfs/mkfs.c : > === : > === : > === : > ===================================================================== : > --- head/sbin/newfs/mkfs.c Wed Mar 3 21:47:25 2010 (r204671) : > +++ head/sbin/newfs/mkfs.c Wed Mar 3 21:53:25 2010 (r204672) : > @@ -191,8 +191,8 @@ restart: : > exit(17); : > } : > if (sblock.fs_fsize < sectorsize) { : > - printf("increasing fragment size from %d to sector size (%d)\n", : > - sblock.fs_fsize, sectorsize); : > + printf("increasing fragment size from %d to sector size (%jd)\n", : > + sblock.fs_fsize, (intmax_t)sectorsize); : > sblock.fs_fsize = sectorsize; : > } : > if (sblock.fs_bsize > MAXBSIZE) { : > @@ -337,8 +337,8 @@ restart: : > } else if (density < minfragsperinode * fsize) { : > origdensity = density; : > density = minfragsperinode * fsize; : > - fprintf(stderr, "density increased from %d to %d\n", : > - origdensity, density); : > + fprintf(stderr, "density increased from %d to %jd\n", : > + origdensity, (intmax_t)density); : > } : > origdensity = density; : > for (;;) { : > @@ -346,8 +346,9 @@ restart: : > if (fragsperinode < minfragsperinode) { : > bsize <<= 1; : > fsize <<= 1; : > - printf("Block size too small for a file system %s %d\n", : > - "of this size. Increasing blocksize to", bsize); : > + printf("Block size too small for a file system %s %jd\n", : > + "of this size. Increasing blocksize to", : > + (intmax_t)bsize); : > goto restart; : > } : > minfpg = fragsperinode * INOPB(&sblock); : > @@ -371,7 +372,8 @@ restart: : > density -= sblock.fs_fsize; : > } : > if (density != origdensity) : > - printf("density reduced from %d to %d\n", origdensity, density); : > + printf("density reduced from %d to %jd\n", origdensity, : > + (intmax_t)density); : > /* : > * Start packing more blocks into the cylinder group until : > * it cannot grow any larger, the number of cylinder groups : : Use PRId64 from inttypes.h ? Nope. Warner From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 03:36:46 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B656D1065670; Thu, 4 Mar 2010 03:36:46 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 53EAE8FC12; Thu, 4 Mar 2010 03:36:45 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o243afF8044395; Wed, 3 Mar 2010 20:36:42 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <200906152105.n5FL50Ju001949@svn.freebsd.org> Date: Wed, 3 Mar 2010 20:36:41 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <200906152105.n5FL50Ju001949@svn.freebsd.org> To: Ed Schouten X-Mailer: Apple Mail (2.1077) X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 03:36:46 -0000 Forcing the entire build to fail if chflags fails breaks installing to = an NFS destination. I haven't tested all possible permutations of src = vs dest filesystems mounting, but I don't see how it can work over any = type of NFS mount. What is the reason for forcing this failure? The = NO_FSCHG variable is undocumented, and the failure mode here is pretty = useless at helping the user fix the problem. I'd like to re-add the '-' = modifier to the chflags command that you removed. Scott On Jun 15, 2009, at 3:05 PM, Ed Schouten wrote: > Author: ed > Date: Mon Jun 15 21:05:00 2009 > New Revision: 194266 > URL: http://svn.freebsd.org/changeset/base/194266 >=20 > Log: > Make the chpass Makefile honour NO_FSCHG. >=20 > The chpass Makefile tried to set the fschg flag on the binaries, even = if > NO_FSCHG was passed to the installworld. This meant that if I = installed > FreeBSD into a Jail, I couldn't installworld from within the Jail > anymore. >=20 > Now that it listens to NO_FSCHG, we can just make it bail out when it > fails, just like PRECIOUSPROG does. >=20 > Modified: > head/usr.bin/chpass/Makefile >=20 > Modified: head/usr.bin/chpass/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.bin/chpass/Makefile Mon Jun 15 21:03:25 2009 = (r194265) > +++ head/usr.bin/chpass/Makefile Mon Jun 15 21:05:00 2009 = (r194266) > @@ -39,11 +39,12 @@ MLINKS+=3D chpass.1 ypchpass.1 chpass.1 yp >=20 > beforeinstall: > .for i in chpass chfn chsh ypchpass ypchfn ypchsh > - [ ! -e ${DESTDIR}${BINDIR}/$i ] || \ > - chflags noschg ${DESTDIR}${BINDIR}/$i || true > + -chflags noschg ${DESTDIR}${BINDIR}/$i > .endfor >=20 > +.if !defined(NO_FSCHG) > afterinstall: > - -chflags schg ${DESTDIR}${BINDIR}/chpass > + chflags schg ${DESTDIR}${BINDIR}/chpass > +.endif >=20 > .include From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 04:30:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E440C106566C; Thu, 4 Mar 2010 04:30:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3EEA8FC08; Thu, 4 Mar 2010 04:30:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o244UG6f065128; Thu, 4 Mar 2010 04:30:16 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o244UGm7065125; Thu, 4 Mar 2010 04:30:16 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003040430.o244UGm7065125@svn.freebsd.org> From: Warner Losh Date: Thu, 4 Mar 2010 04:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204685 - head/gnu/usr.bin/binutils/ld X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 04:30:17 -0000 Author: imp Date: Thu Mar 4 04:30:16 2010 New Revision: 204685 URL: http://svn.freebsd.org/changeset/base/204685 Log: Make the n32 scripts actually generate, ummm, n32 binaries... Submitted by: jmallet Modified: head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh Modified: head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh ============================================================================== --- head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh Thu Mar 4 02:52:16 2010 (r204684) +++ head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh Thu Mar 4 04:30:16 2010 (r204685) @@ -1,4 +1,4 @@ # $FreeBSD$ -. ${srcdir}/emulparams/elf32btsmip.sh +. ${srcdir}/emulparams/elf32btsmipn32.sh . ${srcdir}/emulparams/elf_fbsd.sh GENERATE_PIE_SCRIPT=yes Modified: head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh ============================================================================== --- head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh Thu Mar 4 02:52:16 2010 (r204684) +++ head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh Thu Mar 4 04:30:16 2010 (r204685) @@ -1,4 +1,4 @@ # $FreeBSD$ -. ${srcdir}/emulparams/elf32ltsmip.sh +. ${srcdir}/emulparams/elf32ltsmipn32.sh . ${srcdir}/emulparams/elf_fbsd.sh GENERATE_PIE_SCRIPT=yes From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 04:53:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDD581065674; Thu, 4 Mar 2010 04:53:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC7758FC08; Thu, 4 Mar 2010 04:53:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o244r5Qr070200; Thu, 4 Mar 2010 04:53:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o244r5qn070197; Thu, 4 Mar 2010 04:53:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003040453.o244r5qn070197@svn.freebsd.org> From: Warner Losh Date: Thu, 4 Mar 2010 04:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204687 - head/libexec/rtld-elf/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 04:53:06 -0000 Author: imp Date: Thu Mar 4 04:53:05 2010 New Revision: 204687 URL: http://svn.freebsd.org/changeset/base/204687 Log: Updated rtld for n32 support. Submitted by: jmallet@ Obtained from: NetBSD Modified: head/libexec/rtld-elf/mips/reloc.c head/libexec/rtld-elf/mips/rtld_start.S Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Thu Mar 4 04:33:57 2010 (r204686) +++ head/libexec/rtld-elf/mips/reloc.c Thu Mar 4 04:53:05 2010 (r204687) @@ -1,5 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.23 2003/07/26 15:04:38 mrg Exp $ */ -/* $NetBSD: mips_reloc.c,v 1.53 2008/07/24 04:39:25 matt Exp $ */ +/* $NetBSD: mips_reloc.c,v 1.58 2010/01/14 11:57:06 skrll Exp $ */ /* * Copyright 1997 Michael L. Hitch @@ -31,66 +30,102 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include +#include +#include +#include + #include #include -#include + #include "debug.h" #include "rtld.h" void init_pltgot(Obj_Entry *obj) -{ +{ if (obj->pltgot != NULL) { obj->pltgot[0] = (Elf_Addr) &_rtld_bind_start; + /* XXX only if obj->pltgot[1] & 0x80000000 ?? */ obj->pltgot[1] |= (Elf_Addr) obj; } } -int +int do_copy_relocations(Obj_Entry *dstobj) { /* Do nothing */ - return 0; + return 0; } -void _rtld_bind_start(void); void _rtld_relocate_nonplt_self(Elf_Dyn *, Elf_Addr); -int open(); -int _open(); - /* * It is possible for the compiler to emit relocations for unaligned data. * We handle this situation with these inlines. */ -#define RELOC_ALIGNED_P(x) \ - (((uintptr_t)(x) & (sizeof(void *) - 1)) == 0) - -static __inline Elf_Addr -load_ptr(void *where) -{ - if (__predict_true(RELOC_ALIGNED_P(where))) - return *(Elf_Addr *)where; - else { - Elf_Addr res; - - (void)memcpy(&res, where, sizeof(res)); - return res; +#if ELFSIZE == 64 +/* + * ELF64 MIPS encodes the relocs uniquely. The first 32-bits of info contain + * the symbol index. The top 32-bits contain three relocation types encoded + * in big-endian integer with first relocation in LSB. This means for little + * endian we have to byte swap that interger (r_type). + */ +#define Elf_Sxword Elf64_Sxword +#define ELF_R_NXTTYPE_64_P(r_type) ((((r_type) >> 8) & 0xff) == R_TYPE(64)) +#if BYTE_ORDER == LITTLE_ENDIAN +#undef ELF_R_SYM +#undef ELF_R_TYPE +#define ELF_R_SYM(r_info) ((r_info) & 0xffffffff) +#define ELF_R_TYPE(r_info) bswap32((r_info) >> 32) +#endif +#else +#define ELF_R_NXTTYPE_64_P(r_type) (0) +#define Elf_Sxword Elf32_Sword +#endif + +static __inline Elf_Sxword +load_ptr(void *where, size_t len) +{ + Elf_Sxword val; + + if (__predict_true(((uintptr_t)where & (len - 1)) == 0)) { +#if ELFSIZE == 64 + if (len == sizeof(Elf_Sxword)) + return *(Elf_Sxword *)where; +#endif + return *(Elf_Sword *)where; } + + val = 0; +#if BYTE_ORDER == LITTLE_ENDIAN + (void)memcpy(&val, where, len); +#endif +#if BYTE_ORDER == BIG_ENDIAN + (void)memcpy((uint8_t *)((&val)+1) - len, where, len); +#endif + return (len == sizeof(Elf_Sxword)) ? val : (Elf_Sword)val; } static __inline void -store_ptr(void *where, Elf_Addr val) +store_ptr(void *where, Elf_Sxword val, size_t len) { - if (__predict_true(RELOC_ALIGNED_P(where))) - *(Elf_Addr *)where = val; - else - (void)memcpy(where, &val, sizeof(val)); + if (__predict_true(((uintptr_t)where & (len - 1)) == 0)) { +#if ELFSIZE == 64 + if (len == sizeof(Elf_Sxword)) { + *(Elf_Sxword *)where = val; + return; + } +#endif + *(Elf_Sword *)where = val; + return; + } +#if BYTE_ORDER == LITTLE_ENDIAN + (void)memcpy(where, &val, len); +#endif +#if BYTE_ORDER == BIG_ENDIAN + (void)memcpy(where, (const uint8_t *)((&val)+1) - len, len); +#endif } void @@ -102,7 +137,7 @@ _rtld_relocate_nonplt_self(Elf_Dyn *dynp Elf_Addr *where; Elf_Addr *got = NULL; Elf_Word local_gotno = 0, symtabno = 0, gotsym = 0; - int i; + size_t i; for (; dynp->d_tag != DT_NULL; dynp++) { switch (dynp->d_tag) { @@ -134,7 +169,7 @@ _rtld_relocate_nonplt_self(Elf_Dyn *dynp /* Relocate the local GOT entries */ got += i; for (; i < local_gotno; i++) { - *got++ += relocbase; + *got++ += relocbase; } sym = symtab + gotsym; @@ -147,19 +182,41 @@ _rtld_relocate_nonplt_self(Elf_Dyn *dynp rellim = (const Elf_Rel *)((caddr_t)rel + relsz); for (; rel < rellim; rel++) { + Elf_Word r_symndx, r_type; + where = (void *)(relocbase + rel->r_offset); - switch (ELF_R_TYPE(rel->r_info)) { - case R_TYPE(NONE): - break; + r_symndx = ELF_R_SYM(rel->r_info); + r_type = ELF_R_TYPE(rel->r_info); - case R_TYPE(REL32): - assert(ELF_R_SYM(rel->r_info) < gotsym); - sym = symtab + ELF_R_SYM(rel->r_info); + switch (r_type & 0xff) { + case R_TYPE(REL32): { + const size_t rlen = + ELF_R_NXTTYPE_64_P(r_type) + ? sizeof(Elf_Sxword) + : sizeof(Elf_Sword); + Elf_Sxword old = load_ptr(where, rlen); + Elf_Sxword val = old; +#if ELFSIZE == 64 + assert(r_type == R_TYPE(REL32) + || r_type == (R_TYPE(REL32)|(R_TYPE(64) << 8))); +#endif + assert(r_symndx < gotsym); + sym = symtab + r_symndx; assert(ELF_ST_BIND(sym->st_info) == STB_LOCAL); - store_ptr(where, load_ptr(where) + relocbase); + val += relocbase; + store_ptr(where, val, sizeof(Elf_Sword)); + dbg("REL32/L(%p) %p -> %p in ", + where, (void *)old, (void *)val); + store_ptr(where, val, rlen); + break; + } + + case R_TYPE(GPREL32): + case R_TYPE(NONE): break; + default: abort(); break; @@ -189,9 +246,6 @@ _mips_rtld_bind(Obj_Entry *obj, Elf_Size return (Elf_Addr)target; } -/* - * Process non-PLT relocations - */ int reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) { @@ -200,12 +254,24 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry Elf_Addr *got = obj->pltgot; const Elf_Sym *sym, *def; const Obj_Entry *defobj; - int i; + Elf_Word i; +#ifdef SUPPORT_OLD_BROKEN_LD + int broken; +#endif /* The relocation for the dynamic loader has already been done. */ if (obj == obj_rtld) return (0); +#ifdef SUPPORT_OLD_BROKEN_LD + broken = 0; + sym = obj->symtab; + for (i = 1; i < 12; i++) + if (sym[i].st_info == ELF_ST_INFO(STB_LOCAL, STT_NOTYPE)) + broken = 1; + dbg("%s: broken=%d", obj->path, broken); +#endif + i = (got[1] & 0x80000000) ? 2 : 1; /* Relocate the local GOT entries */ @@ -213,16 +279,39 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry dbg("got:%p for %d entries adding %x", got, obj->local_gotno, (uint32_t)obj->relocbase); for (; i < obj->local_gotno; i++) { - *got += (Elf_Addr)obj->relocbase; - got++; + *got += (Elf_Addr)obj->relocbase; + got++; } sym = obj->symtab + obj->gotsym; - dbg("got:%p for %d entries", got, obj->symtabno); /* Now do the global GOT entries */ for (i = obj->gotsym; i < obj->symtabno; i++) { + dbg(" doing got %d sym %p (%s, %lx)", i - obj->gotsym, sym, + sym->st_name + obj->strtab, (u_long) *got); + +#ifdef SUPPORT_OLD_BROKEN_LD + if (ELF_ST_TYPE(sym->st_info) == STT_FUNC && + broken && sym->st_shndx == SHN_UNDEF) { + /* + * XXX DANGER WILL ROBINSON! + * You might think this is stupid, as it intentionally + * defeats lazy binding -- and you'd be right. + * Unfortunately, for lazy binding to work right, we + * need to a way to force the GOT slots used for + * function pointers to be resolved immediately. This + * is supposed to be done automatically by the linker, + * by not outputting a PLT slot and setting st_value + * to 0 if there are non-PLT references, but older + * versions of GNU ld do not do this. + */ + def = find_symdef(i, obj, &defobj, false, NULL); + if (def == NULL) + return -1; + *got = def->st_value + (Elf_Addr)defobj->relocbase; + } else +#endif if (ELF_ST_TYPE(sym->st_info) == STT_FUNC && sym->st_value != 0 && sym->st_shndx == SHN_UNDEF) { /* @@ -242,81 +331,118 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry */ *got = sym->st_value + (Elf_Addr)obj->relocbase; if ((Elf_Addr)(*got) == (Elf_Addr)obj->relocbase) { - dbg("Warning2, i:%d maps to relocbase address:%x", - i, (uint32_t)obj->relocbase); + dbg("Warning2, i:%d maps to relocbase address:%x", + i, (uint32_t)obj->relocbase); } } else if (sym->st_info == ELF_ST_INFO(STB_GLOBAL, STT_SECTION)) { /* Symbols with index SHN_ABS are not relocated. */ - if (sym->st_shndx != SHN_ABS) { + if (sym->st_shndx != SHN_ABS) { *got = sym->st_value + (Elf_Addr)obj->relocbase; if ((Elf_Addr)(*got) == (Elf_Addr)obj->relocbase) { - dbg("Warning3, i:%d maps to relocbase address:%x", - i, (uint32_t)obj->relocbase); + dbg("Warning3, i:%d maps to relocbase address:%x", + i, (uint32_t)obj->relocbase); } } } else { /* TODO: add cache here */ def = find_symdef(i, obj, &defobj, false, NULL); if (def == NULL) { - dbg("Warning4, cant find symbole %d", i); + dbg("Warning4, cant find symbole %d", i); return -1; } *got = def->st_value + (Elf_Addr)defobj->relocbase; if ((Elf_Addr)(*got) == (Elf_Addr)obj->relocbase) { - dbg("Warning4, i:%d maps to relocbase address:%x", - i, (uint32_t)obj->relocbase); - dbg("via first obj symbol %s", - obj->strtab + obj->symtab[i].st_name); - dbg("found in obj %p:%s", - defobj, defobj->path); - } + dbg("Warning4, i:%d maps to relocbase address:%x", + i, (uint32_t)obj->relocbase); + dbg("via first obj symbol %s", + obj->strtab + obj->symtab[i].st_name); + dbg("found in obj %p:%s", + defobj, defobj->path); + } } + + dbg(" --> now %lx", (u_long) *got); ++sym; ++got; } + got = obj->pltgot; rellim = (const Elf_Rel *)((caddr_t)obj->rel + obj->relsize); for (rel = obj->rel; rel < rellim; rel++) { + Elf_Word r_symndx, r_type; void *where; - Elf_Addr tmp; - unsigned long symnum; where = obj->relocbase + rel->r_offset; - symnum = ELF_R_SYM(rel->r_info); - switch (ELF_R_TYPE(rel->r_info)) { + r_symndx = ELF_R_SYM(rel->r_info); + r_type = ELF_R_TYPE(rel->r_info); + + switch (r_type & 0xff) { case R_TYPE(NONE): break; - case R_TYPE(REL32): + case R_TYPE(REL32): { /* 32-bit PC-relative reference */ - def = obj->symtab + symnum; - if (symnum >= obj->gotsym) { - tmp = load_ptr(where); - tmp += got[obj->local_gotno + symnum - obj->gotsym]; - store_ptr(where, tmp); - break; + const size_t rlen = + ELF_R_NXTTYPE_64_P(r_type) + ? sizeof(Elf_Sxword) + : sizeof(Elf_Sword); + Elf_Sxword old = load_ptr(where, rlen); + Elf_Sxword val = old; + + def = obj->symtab + r_symndx; + + if (r_symndx >= obj->gotsym) { + val += got[obj->local_gotno + r_symndx - obj->gotsym]; + dbg("REL32/G(%p) %p --> %p (%s) in %s", + where, (void *)old, (void *)val, + obj->strtab + def->st_name, + obj->path); } else { - tmp = load_ptr(where); + /* + * XXX: ABI DIFFERENCE! + * + * Old NetBSD binutils would generate shared + * libs with section-relative relocations being + * already adjusted for the start address of + * the section. + * + * New binutils, OTOH, generate shared libs + * with the same relocations being based at + * zero, so we need to add in the start address + * of the section. + * + * --rkb, Oct 6, 2001 + */ if (def->st_info == ELF_ST_INFO(STB_LOCAL, STT_SECTION) +#ifdef SUPPORT_OLD_BROKEN_LD + && !broken +#endif ) - tmp += (Elf_Addr)def->st_value; + val += (Elf_Addr)def->st_value; + + val += (Elf_Addr)obj->relocbase; - tmp += (Elf_Addr)obj->relocbase; - store_ptr(where, tmp); + dbg("REL32/L(%p) %p -> %p (%s) in %s", + where, (void *)old, (void *)val, + obj->strtab + def->st_name, obj->path); } + store_ptr(where, val, rlen); break; + } + default: dbg("sym = %lu, type = %lu, offset = %p, " "contents = %p, symbol = %s", - symnum, (u_long)ELF_R_TYPE(rel->r_info), - (void *)rel->r_offset, (void *)load_ptr(where), - obj->strtab + obj->symtab[symnum].st_name); + (u_long)r_symndx, (u_long)ELF_R_TYPE(rel->r_info), + (void *)rel->r_offset, + (void *)load_ptr(where, sizeof(Elf_Sword)), + obj->strtab + obj->symtab[r_symndx].st_name); _rtld_error("%s: Unsupported relocation type %ld " - "in non-PLT relocations\n", + "in non-PLT relocations", obj->path, (u_long) ELF_R_TYPE(rel->r_info)); return -1; } @@ -331,6 +457,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry int reloc_plt(Obj_Entry *obj) { +#if 0 const Elf_Rel *rellim; const Elf_Rel *rel; @@ -345,6 +472,8 @@ reloc_plt(Obj_Entry *obj) *where += (Elf_Addr )obj->relocbase; } +#endif + /* PLT fixups were done above in the GOT relocation. */ return (0); } Modified: head/libexec/rtld-elf/mips/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/mips/rtld_start.S Thu Mar 4 04:33:57 2010 (r204686) +++ head/libexec/rtld-elf/mips/rtld_start.S Thu Mar 4 04:53:05 2010 (r204687) @@ -1,5 +1,4 @@ -/* $NetBSD: rtld_start.S,v 1.9 2002/10/05 11:59:05 mycroft Exp $ */ -/* $FreeBSD$ */ +/* $NetBSD: rtld_start.S,v 1.10 2009/12/14 00:41:19 matt Exp $ */ /* * Copyright 1997 Michael L. Hitch @@ -27,6 +26,8 @@ * 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. + * + * $FreeBSD$ */ #include @@ -34,94 +35,126 @@ .globl _C_LABEL(_rtld_relocate_nonplt_self) .globl _C_LABEL(_rtld) +#define PTR_SIZE (1< 1*PTR_SIZE(sp) for atexit */ + /* -> 2*PTR_SIZE(sp) for obj_main */ + move s0, a0 /* save stack pointer from a0 */ + move s3, a3 /* save ps_strings pointer */ - .cpload t9 - addu sp, sp, -16 /* adjust stack pointer */ - /* keep it aligned */ - .cprestore 0 /* -> 0(sp) for gp */ - /* -> 4(sp) for atexit */ - /* -> 8(sp) for obj_main */ - move s0,a0 /* save stack pointer from a0 */ - move s1,a3 /* save ps_strings pointer */ - - la a1, 1f + PTR_LA a1, 1f bal 1f - nop -1: subu a1, ra, a1 /* relocbase */ - la t9,_C_LABEL(_rtld_relocate_nonplt_self) - move s2,a1 - la a0,_DYNAMIC - addu t9, a1, t9 - jalr t9 - addu a0, a1, a0 /* &_DYNAMIC */ - - - move a0, s0 /* stack pointer */ - addu a1, sp, 4 /* &exit_proc */ - addu a2, sp, 8 /* &objp */ - addu sp, sp, -16 /* arguments slot */ - jal _C_LABEL(_rtld) /* v0 = _rtld(sp, exit_proc, objp) */ - nop - addu sp, sp, 16 - - move a0, s0 /* arguments pointer */ - move a3, s1 /* arguments pointer */ - lw a1, 4(sp) /* our atexit function */ - lw a2, 8(sp) /* obj_main entry */ - addu sp, sp, 16 /* readjust stack */ - move t9,v0 - move a2,s1 /* restore ps_strings */ - jr t9 /* _start(ap, cleanup, obj, ps_strings); */ - nop + PTR_LA t0, _C_LABEL(_rtld_relocate_nonplt_self) +1: PTR_SUBU a1, ra, a1 /* relocbase */ + PTR_LA a0, _DYNAMIC + PTR_ADDU t9, a1, t0 + jalr t9 /* _rtld_relocate_nonplt_self(dynp, relocabase) */ + PTR_ADDU a0, a1, a0 /* &_DYNAMIC */ + + move a0, s0 /* sp */ + PTR_ADDU a1, sp, 2*PTR_SIZE /* &our atexit function */ + PTR_ADDU a2, sp, 3*PTR_SIZE /* obj_main entry */ + jal _C_LABEL(_rtld) /* v0 = _rtld(sp, cleanup, objp) */ + nop + + PTR_L a1, 2*PTR_SIZE(sp) /* our atexit function */ + PTR_L a2, 3*PTR_SIZE(sp) /* obj_main entry */ + PTR_ADDU sp, 4*PTR_SIZE /* readjust stack */ + move a0, s0 /* stack pointer */ + move t9, v0 + jr t9 /* _start(sp, cleanup, obj); */ + move a3, s3 /* restore ps_strings */ END(rtld_start) +#define XCALLFRAME_SIZ (12*SZREG) +#define XCALLFRAME_RA (10*SZREG) +#define XCALLFRAME_GP (9*SZREG) +#define XCALLFRAME_S0 (8*SZREG) +#define XCALLFRAME_A3 (7*SZREG) +#define XCALLFRAME_A2 (6*SZREG) +#define XCALLFRAME_A1 (5*SZREG) +#define XCALLFRAME_A0 (4*SZREG) +#if defined(__mips_n32) || defined(__mips_n64) +#define XCALLFRAME_A7 (3*SZREG) +#define XCALLFRAME_A6 (2*SZREG) +#define XCALLFRAME_A5 (1*SZREG) +#define XCALLFRAME_A4 (0*SZREG) +#endif + .globl _rtld_bind_start .ent _rtld_bind_start _rtld_bind_start: - /* ABI conventions for stubs: - * t8 contains symbol index - * t7 contains return address - */ - .frame sp, 0, ra /* satisfy compiler */ - - move v1,gp /* save old GP */ - add t9,8 /* modify T9 to point at .cpload */ - .cpload t9 - subu sp,48 /* save arguments and sp value */ - .cprestore 36 - sw a0,16(sp) - sw a1,20(sp) - sw a2,24(sp) - sw a3,28(sp) - sw s0,32(sp) - sw t7,40(sp) - move s0,sp - move a0,v1 /* old GP */ - subu a0,a0,0x7ff0 /* The offset of $gp from the */ - /* beginning of the .got section: */ + .frame sp, XCALLFRAME_SIZ, $15 + move v1, gp /* save old GP */ +#if defined(__mips_o32) || defined(__mips_o64) + PTR_ADDU t9, 8 /* modify T9 to point at .cpload */ +#endif + SETUP_GP + PTR_SUBU sp, XCALLFRAME_SIZ /* save arguments and sp value in stack */ + SETUP_GP64(XCALLFRAME_GP, _rtld_bind_start) + SAVE_GP(XCALLFRAME_GP) +#if defined(__mips_n32) || defined(__mips_n64) + REG_S a4, XCALLFRAME_A4(sp) + REG_S a5, XCALLFRAME_A5(sp) + REG_S a6, XCALLFRAME_A6(sp) + REG_S a7, XCALLFRAME_A7(sp) +#endif + REG_S a0, XCALLFRAME_A0(sp) + REG_S a1, XCALLFRAME_A1(sp) + REG_S a2, XCALLFRAME_A2(sp) + REG_S a3, XCALLFRAME_A3(sp) + REG_S $15, XCALLFRAME_RA(sp) /* ra is in t7/t3 */ + REG_S s0, XCALLFRAME_S0(sp) + move s0, sp + + move a0, v1 /* old GP */ + subu a0, a0, 0x7ff0 /* The offset of $gp from the */ + /* beginning of the .got section: */ /* $gp = .got + 0x7ff0, so */ /* .got = $gp - 0x7ff0 */ /* Simple math as you can see. */ +#if defined(__mips_n64) + ld a0, 8(a0) /* object = pltgot[1] & 0x7fffffff */ +#else + lw a0, 4(a0) /* object = pltgot[1] & 0x7fffffff */ +#endif + and a0, a0, 0x7fffffff + move a1, t8 /* symbol index */ - lw a0,4(a0) /* object = pltgot[1] & 0x7fffffff */ - and a0,a0,0x7fffffff - move a1,t8 /* symbol index */ - jal _C_LABEL(_mips_rtld_bind) - nop - move sp,s0 - lw ra,40(sp) - lw a0,16(sp) - lw a1,20(sp) - lw a2,24(sp) - lw a3,28(sp) - lw s0,32(sp) - addu sp,48 - move t9,v0 + nop + + move sp, s0 + REG_L ra, XCALLFRAME_RA(sp) + REG_L s0, XCALLFRAME_S0(sp) + REG_L a0, XCALLFRAME_A0(sp) + REG_L a1, XCALLFRAME_A1(sp) + REG_L a2, XCALLFRAME_A2(sp) + REG_L a3, XCALLFRAME_A3(sp) +#if defined(__mips_n32) || defined(__mips_n64) + REG_L a4, XCALLFRAME_A4(sp) + REG_L a5, XCALLFRAME_A5(sp) + REG_L a6, XCALLFRAME_A6(sp) + REG_L a7, XCALLFRAME_A7(sp) +#endif + RESTORE_GP64 + PTR_ADDU sp, XCALLFRAME_SIZ + move t9, v0 jr t9 - nop - .end _rtld_bind_start + nop +END(_rtld_bind_start) From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 05:04:14 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E7A5106566C; Thu, 4 Mar 2010 05:04:14 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 309748FC12; Thu, 4 Mar 2010 05:04:13 +0000 (UTC) Received: from [192.168.1.38] (S0106005004e13421.vs.shawcable.net [70.71.175.212]) (authenticated bits=0) by sippysoft.com (8.14.3/8.14.3) with ESMTP id o2454Brm060681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Mar 2010 21:04:12 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4B8F3F4B.7020002@FreeBSD.org> Date: Wed, 03 Mar 2010 21:04:11 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Warner Losh References: <201003032153.o23LrQwl076528@svn.freebsd.org> In-Reply-To: <201003032153.o23LrQwl076528@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 05:04:14 -0000 Warner Losh wrote: > Author: imp > Date: Wed Mar 3 21:53:25 2010 > New Revision: 204672 > URL: http://svn.freebsd.org/changeset/base/204672 > > Log: > Cast these to intmax_t before printing to fix build bustage. Better > solutions welcome. Thanks for a quick fix and sorry for the breakage. IMHO you fix's fine, there is no real reason to use 64-bit quantity anyway, it's just because expand_number(3) interface is not very well designed and forces anyone using it stick with that data type. So downsizing from 64-bit to 32-bit on platforms where intmax_t is 32-bit only (if any) should not be an issue in real life. -Maxim From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 05:23:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E95C1065670; Thu, 4 Mar 2010 05:23:09 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1E038FC13; Thu, 4 Mar 2010 05:23:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o245N8gE076894; Thu, 4 Mar 2010 05:23:08 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o245N86s076889; Thu, 4 Mar 2010 05:23:08 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201003040523.o245N86s076889@svn.freebsd.org> From: Neel Natu Date: Thu, 4 Mar 2010 05:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204689 - in head/sys/mips: include mips sibyte X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 05:23:09 -0000 Author: neel Date: Thu Mar 4 05:23:08 2010 New Revision: 204689 URL: http://svn.freebsd.org/changeset/base/204689 Log: Add support for CPUs with cache coherent DMA. The two main changes are: - We don't need to fall back to uncacheable memory to satisfy BUS_DMA_COHERENT requests on these CPUs. - The bus_dmamap_sync() is a no-op for these CPUs. A side-effect of this change is rename DMAMAP_COHERENT flag to DMAMAP_UNCACHEABLE. This conveys the purpose of the flag more accurately. Reviewed by: gonzo, imp Modified: head/sys/mips/include/cpuinfo.h head/sys/mips/mips/busdma_machdep.c head/sys/mips/mips/cpu.c head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/include/cpuinfo.h ============================================================================== --- head/sys/mips/include/cpuinfo.h Thu Mar 4 05:19:46 2010 (r204688) +++ head/sys/mips/include/cpuinfo.h Thu Mar 4 05:23:08 2010 (r204689) @@ -56,6 +56,7 @@ struct mips_cpuinfo { u_int8_t tlb_type; u_int16_t tlb_nentries; u_int8_t icache_virtual; + boolean_t cache_coherent_dma; struct { u_int32_t ic_size; u_int8_t ic_linesize; @@ -68,6 +69,8 @@ struct mips_cpuinfo { } l1; }; +extern struct mips_cpuinfo cpuinfo; + /* TODO: Merge above structure with NetBSD's below. */ struct cpu_info { Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Thu Mar 4 05:19:46 2010 (r204688) +++ head/sys/mips/mips/busdma_machdep.c Thu Mar 4 05:23:08 2010 (r204689) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define MAX_BPAGES 64 @@ -124,7 +125,7 @@ SYSCTL_INT(_hw_busdma, OID_AUTO, total_b #define DMAMAP_MBUF 0x2 #define DMAMAP_UIO 0x4 #define DMAMAP_TYPE_MASK (DMAMAP_LINEAR|DMAMAP_MBUF|DMAMAP_UIO) -#define DMAMAP_COHERENT 0x8 +#define DMAMAP_UNCACHEABLE 0x8 #define DMAMAP_ALLOCATED 0x10 #define DMAMAP_MALLOCUSED 0x20 @@ -340,6 +341,8 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->nsegments = nsegments; newtag->maxsegsz = maxsegsz; newtag->flags = flags; + if (cpuinfo.cache_coherent_dma) + newtag->flags |= BUS_DMA_COHERENT; newtag->ref_count = 1; /* Count ourself */ newtag->map_count = 0; if (lockfunc != NULL) { @@ -517,9 +520,6 @@ bus_dmamap_create(bus_dma_tag_t dmat, in bz->map_count++; } - if (flags & BUS_DMA_COHERENT) - newmap->flags |= DMAMAP_COHERENT; - CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, error); @@ -577,13 +577,23 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi *mapp = newmap; newmap->dmat = dmat; + /* + * If all the memory is coherent with DMA then we don't need to + * do anything special for a coherent mapping request. + */ + if (dmat->flags & BUS_DMA_COHERENT) + flags &= ~BUS_DMA_COHERENT; + + /* + * Allocate uncacheable memory if all else fails. + */ if (flags & BUS_DMA_COHERENT) - newmap->flags |= DMAMAP_COHERENT; - + newmap->flags |= DMAMAP_UNCACHEABLE; + if (dmat->maxsize <= PAGE_SIZE && (dmat->alignment < dmat->maxsize) && !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr) && - !(flags & BUS_DMA_COHERENT)) { + !(newmap->flags & DMAMAP_UNCACHEABLE)) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); newmap->flags |= DMAMAP_MALLOCUSED; } else { @@ -619,7 +629,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi return (ENOMEM); } - if (flags & BUS_DMA_COHERENT) { + if (newmap->flags & DMAMAP_UNCACHEABLE) { void *tmpaddr = (void *)*vaddr; if (tmpaddr) { @@ -1177,8 +1187,13 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus return; if (STAILQ_FIRST(&map->bpages)) _bus_dmamap_sync_bp(dmat, map, op); - if (map->flags & DMAMAP_COHERENT) + + if (dmat->flags & BUS_DMA_COHERENT) return; + + if (map->flags & DMAMAP_UNCACHEABLE) + return; + CTR3(KTR_BUSDMA, "%s: op %x flags %x", __func__, op, map->flags); switch(map->flags & DMAMAP_TYPE_MASK) { case DMAMAP_LINEAR: Modified: head/sys/mips/mips/cpu.c ============================================================================== --- head/sys/mips/mips/cpu.c Thu Mar 4 05:19:46 2010 (r204688) +++ head/sys/mips/mips/cpu.c Thu Mar 4 05:23:08 2010 (r204689) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -static struct mips_cpuinfo cpuinfo; +struct mips_cpuinfo cpuinfo; union cpuprid cpu_id; union cpuprid fpu_id; Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Thu Mar 4 05:19:46 2010 (r204688) +++ head/sys/mips/sibyte/sb_machdep.c Thu Mar 4 05:23:08 2010 (r204689) @@ -220,6 +220,13 @@ mips_init(void) mips_cpu_init(); /* + * Sibyte has a L1 data cache coherent with DMA. This includes + * on-chip network interfaces as well as PCI/HyperTransport bus + * masters. + */ + cpuinfo.cache_coherent_dma = TRUE; + + /* * XXX * The kernel is running in 32-bit mode but the CFE is running in * 64-bit mode. So the SR_KX bit in the status register is turned From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 05:32:23 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32BD81065670; Thu, 4 Mar 2010 05:32:23 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id CB4A68FC2E; Thu, 4 Mar 2010 05:32:22 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id B7B2B1CCFB; Thu, 4 Mar 2010 06:32:21 +0100 (CET) Date: Thu, 4 Mar 2010 06:32:21 +0100 From: Ed Schouten To: Scott Long Message-ID: <20100304053221.GL8200@hoeg.nl> References: <200906152105.n5FL50Ju001949@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kZqPUAYTJsqzhrY2" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 05:32:23 -0000 --kZqPUAYTJsqzhrY2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Scott Long wrote: > I'd like to re-add the '-' modifier to the chflags command that you > removed. Be my guest. As long as it's not done unconditionally. :-) Greetings, --=20 Ed Schouten WWW: http://80386.nl/ --kZqPUAYTJsqzhrY2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuPReUACgkQ52SDGA2eCwXxmwCePwh5KTDAz4mcS3QZUF2ZqpLQ f40An1/Ee2K8rhNJa704A7dSTsHZA3aG =jLn0 -----END PGP SIGNATURE----- --kZqPUAYTJsqzhrY2-- From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 05:37:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE36B106564A; Thu, 4 Mar 2010 05:37:19 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D008FC20; Thu, 4 Mar 2010 05:37:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o245bJ0M080087; Thu, 4 Mar 2010 05:37:19 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o245bJnq080085; Thu, 4 Mar 2010 05:37:19 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201003040537.o245bJnq080085@svn.freebsd.org> From: Neel Natu Date: Thu, 4 Mar 2010 05:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204690 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 05:37:19 -0000 Author: neel Date: Thu Mar 4 05:37:19 2010 New Revision: 204690 URL: http://svn.freebsd.org/changeset/base/204690 Log: Remove some unused cruft. Modified: head/sys/mips/include/cpuinfo.h Modified: head/sys/mips/include/cpuinfo.h ============================================================================== --- head/sys/mips/include/cpuinfo.h Thu Mar 4 05:23:08 2010 (r204689) +++ head/sys/mips/include/cpuinfo.h Thu Mar 4 05:37:19 2010 (r204690) @@ -71,53 +71,6 @@ struct mips_cpuinfo { extern struct mips_cpuinfo cpuinfo; -/* TODO: Merge above structure with NetBSD's below. */ - -struct cpu_info { -#ifdef notyet - struct schedstate_percpu ci_schedstate; /* scheduler state */ -#endif - u_long ci_cpu_freq; /* CPU frequency */ - u_long ci_cycles_per_hz; /* CPU freq / hz */ - u_long ci_divisor_delay; /* for delay/DELAY */ - u_long ci_divisor_recip; /* scaled reciprocal of previous; - see below */ -#if defined(DIAGNOSTIC) || defined(LOCKDEBUG) - u_long ci_spin_locks; /* # of spin locks held */ - u_long ci_simple_locks; /* # of simple locks held */ -#endif -}; - -/* - * To implement a more accurate microtime using the CP0 COUNT register - * we need to divide that register by the number of cycles per MHz. - * But... - * - * DIV and DIVU are expensive on MIPS (eg 75 clocks on the R4000). MULT - * and MULTU are only 12 clocks on the same CPU. - * - * The strategy we use is to calculate the reciprical of cycles per MHz, - * scaled by 1<<32. Then we can simply issue a MULTU and pluck of the - * HI register and have the results of the division. - */ -#define MIPS_SET_CI_RECIPRICAL(cpu) \ -do { \ - KASSERT((cpu)->ci_divisor_delay != 0, ("divisor delay")); \ - (cpu)->ci_divisor_recip = 0x100000000ULL / (cpu)->ci_divisor_delay; \ -} while (0) - -#define MIPS_COUNT_TO_MHZ(cpu, count, res) \ - __asm __volatile ("multu %1,%2 ; mfhi %0" \ - : "=r"((res)) : "r"((count)), "r"((cpu)->ci_divisor_recip)) - - -extern struct cpu_info cpu_info_store; - -#if 0 -#define curcpu() (&cpu_info_store) -#define cpu_number() (0) -#endif - #endif /* !LOCORE */ #endif /* _KERNEL */ #endif /* _CPUINFO_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 05:53:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72B4F106566C; Thu, 4 Mar 2010 05:53:06 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6269C8FC1C; Thu, 4 Mar 2010 05:53:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o245r6P9083592; Thu, 4 Mar 2010 05:53:06 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o245r6Co083590; Thu, 4 Mar 2010 05:53:06 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201003040553.o245r6Co083590@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 4 Mar 2010 05:53:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204691 - head/lib/libsm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 05:53:06 -0000 Author: gshapiro Date: Thu Mar 4 05:53:06 2010 New Revision: 204691 URL: http://svn.freebsd.org/changeset/base/204691 Log: Enable the use of nanosleep() instead of using pause() and signals. This Makefile change can be removed when the next version of sendmail is imported as it will have this built in to the FreeBSD conf.h section. Submitted by: John Marshall MFC after: 3 days Modified: head/lib/libsm/Makefile Modified: head/lib/libsm/Makefile ============================================================================== --- head/lib/libsm/Makefile Thu Mar 4 05:37:19 2010 (r204690) +++ head/lib/libsm/Makefile Thu Mar 4 05:53:06 2010 (r204691) @@ -7,6 +7,7 @@ SENDMAIL_DIR=${.CURDIR}/../../contrib/se CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. CFLAGS+=-DNEWDB -DNIS -DMAP_REGEX -DNOT_SENDMAIL +CFLAGS+=-DHAVE_NANOSLEEP .if ${MK_INET6_SUPPORT} != "no" CFLAGS+=-DNETINET6 From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 06:36:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDC821065673; Thu, 4 Mar 2010 06:36:00 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBDD18FC17; Thu, 4 Mar 2010 06:36:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o246a0AB093151; Thu, 4 Mar 2010 06:36:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o246a0Xo093149; Thu, 4 Mar 2010 06:36:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003040636.o246a0Xo093149@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 4 Mar 2010 06:36:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204692 - head/sys/powerpc/powermac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 06:36:01 -0000 Author: nwhitehorn Date: Thu Mar 4 06:36:00 2010 New Revision: 204692 URL: http://svn.freebsd.org/changeset/base/204692 Log: Rework smu(4) to be asynchronous. It turns out that the combination of the automatic fan management and the polling in smu_run_cmd() was putting my system interrupt load at 20%. This change reduces that to 0.4%. Modified: head/sys/powerpc/powermac/smu.c Modified: head/sys/powerpc/powermac/smu.c ============================================================================== --- head/sys/powerpc/powermac/smu.c Thu Mar 4 05:53:06 2010 (r204691) +++ head/sys/powerpc/powermac/smu.c Thu Mar 4 06:36:00 2010 (r204692) @@ -32,16 +32,18 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include +#include #include #include #include +#include #include +#include #include #include @@ -53,8 +55,12 @@ struct smu_cmd { volatile uint8_t cmd; uint8_t len; uint8_t data[254]; + + STAILQ_ENTRY(smu_cmd) cmd_q; }; +STAILQ_HEAD(smu_cmdq, smu_cmd); + struct smu_fan { cell_t reg; cell_t min_rpm; @@ -88,16 +94,21 @@ struct smu_softc { bus_space_tag_t sc_bt; bus_space_handle_t sc_mailbox; - struct smu_cmd *sc_cmd; + struct smu_cmd *sc_cmd, *sc_cur_cmd; bus_addr_t sc_cmd_phys; bus_dmamap_t sc_cmd_dmamap; + struct smu_cmdq sc_cmdq; struct smu_fan *sc_fans; int sc_nfans; struct smu_sensor *sc_sensors; int sc_nsensors; - struct callout sc_fanmgt_callout; + int sc_doorbellirqid; + struct resource *sc_doorbellirq; + void *sc_doorbellirqcookie; + + struct proc *sc_fanmgt_proc; time_t sc_lastuserchange; /* Calibration data */ @@ -130,14 +141,16 @@ static void smu_cpufreq_pre_change(devic static void smu_cpufreq_post_change(device_t, const struct cf_level *level); /* utility functions */ -static int smu_run_cmd(device_t dev, struct smu_cmd *cmd); +static int smu_run_cmd(device_t dev, struct smu_cmd *cmd, int wait); static int smu_get_datablock(device_t dev, int8_t id, uint8_t *buf, size_t len); static void smu_attach_fans(device_t dev, phandle_t fanroot); static void smu_attach_sensors(device_t dev, phandle_t sensroot); -static void smu_fanmgt_callout(void *xdev); +static void smu_fan_management_proc(void *xdev); +static void smu_manage_fans(device_t smu); static void smu_set_sleepled(void *xdev, int onoff); static int smu_server_mode(SYSCTL_HANDLER_ARGS); +static void smu_doorbell_intr(void *xdev); /* where to find the doorbell GPIO */ @@ -162,7 +175,7 @@ DRIVER_MODULE(smu, nexus, smu_driver, sm MALLOC_DEFINE(M_SMU, "smu", "SMU Sensor Information"); #define SMU_MAILBOX 0x8000860c -#define SMU_FANMGT_INTERVAL 500 /* ms */ +#define SMU_FANMGT_INTERVAL 1000 /* ms */ /* Command types */ #define SMU_ADC 0xd8 @@ -227,6 +240,8 @@ smu_attach(device_t dev) sc = device_get_softc(dev); mtx_init(&sc->sc_mtx, "smu", NULL, MTX_DEF); + sc->sc_cur_cmd = NULL; + sc->sc_doorbellirqid = -1; /* * Map the mailbox area. This should be determined from firmware, @@ -246,6 +261,7 @@ smu_attach(device_t dev) BUS_DMA_ZERO, &sc->sc_cmd_dmamap); bus_dmamap_load(sc->sc_dmatag, sc->sc_cmd_dmamap, sc->sc_cmd, PAGE_SIZE, smu_phys_callback, sc, 0); + STAILQ_INIT(&sc->sc_cmdq); /* * Set up handlers to change CPU voltage when CPU frequency is changed. @@ -304,8 +320,8 @@ smu_attach(device_t dev) "critical_temp", CTLTYPE_INT | CTLFLAG_RW, &sc->sc_critical_temp, sizeof(int), "Critical temperature (C)"); - callout_init(&sc->sc_fanmgt_callout, 1); - smu_fanmgt_callout(dev); + kproc_create(smu_fan_management_proc, dev, &sc->sc_fanmgt_proc, + RFHIGHPID, 0, "smu_thermal"); /* * Set up LED interface @@ -321,24 +337,37 @@ smu_attach(device_t dev) "server_mode", CTLTYPE_INT | CTLFLAG_RW, dev, 0, smu_server_mode, "I", "Enable reboot after power failure"); + /* + * Set up doorbell interrupt. + */ + sc->sc_doorbellirqid = 0; + sc->sc_doorbellirq = bus_alloc_resource_any(smu_doorbell, SYS_RES_IRQ, + &sc->sc_doorbellirqid, RF_ACTIVE); + bus_setup_intr(smu_doorbell, sc->sc_doorbellirq, + INTR_TYPE_MISC | INTR_MPSAFE, NULL, smu_doorbell_intr, dev, + &sc->sc_doorbellirqcookie); + powerpc_config_intr(rman_get_start(sc->sc_doorbellirq), + INTR_TRIGGER_EDGE, INTR_POLARITY_LOW); + return (0); } -static int -smu_run_cmd(device_t dev, struct smu_cmd *cmd) +static void +smu_send_cmd(device_t dev, struct smu_cmd *cmd) { struct smu_softc *sc; - int doorbell_ack, result, oldpow; sc = device_get_softc(dev); - mtx_lock(&sc->sc_mtx); + mtx_assert(&sc->sc_mtx, MA_OWNED); - oldpow = powerpc_pow_enabled; - powerpc_pow_enabled = 0; + powerpc_pow_enabled = 0; /* SMU cannot work if we go to NAP */ + sc->sc_cur_cmd = cmd; /* Copy the command to the mailbox */ - memcpy(sc->sc_cmd, cmd, sizeof(*cmd)); + sc->sc_cmd->cmd = cmd->cmd; + sc->sc_cmd->len = cmd->len; + memcpy(sc->sc_cmd->data, cmd->data, sizeof(cmd->data)); bus_dmamap_sync(sc->sc_dmatag, sc->sc_cmd_dmamap, BUS_DMASYNC_PREWRITE); bus_space_write_4(sc->sc_bt, sc->sc_mailbox, 0, sc->sc_cmd_phys); @@ -347,33 +376,107 @@ smu_run_cmd(device_t dev, struct smu_cmd /* Ring SMU doorbell */ macgpio_write(smu_doorbell, GPIO_DDR_OUTPUT); +} + +static void +smu_doorbell_intr(void *xdev) +{ + device_t smu; + struct smu_softc *sc; + int doorbell_ack; + + smu = xdev; + doorbell_ack = macgpio_read(smu_doorbell); + sc = device_get_softc(smu); + + if (doorbell_ack != (GPIO_DDR_OUTPUT | GPIO_LEVEL_RO | GPIO_DATA)) + return; - /* Wait for the doorbell GPIO to go high, signaling completion */ - do { - /* XXX: timeout */ - DELAY(50); - doorbell_ack = macgpio_read(smu_doorbell); - } while (doorbell_ack != (GPIO_DDR_OUTPUT | GPIO_LEVEL_RO | GPIO_DATA)); + mtx_lock(&sc->sc_mtx); + + if (sc->sc_cur_cmd == NULL) /* spurious */ + goto done; /* Check result. First invalidate the cache again... */ __asm __volatile("dcbf 0,%0; sync" :: "r"(sc->sc_cmd) : "memory"); bus_dmamap_sync(sc->sc_dmatag, sc->sc_cmd_dmamap, BUS_DMASYNC_POSTREAD); - /* SMU acks the command by inverting the command bits */ - if (sc->sc_cmd->cmd == ((~cmd->cmd) & 0xff)) - result = 0; - else - result = EIO; + sc->sc_cur_cmd->cmd = sc->sc_cmd->cmd; + sc->sc_cur_cmd->len = sc->sc_cmd->len; + memcpy(sc->sc_cur_cmd->data, sc->sc_cmd->data, + sizeof(sc->sc_cmd->data)); + wakeup(sc->sc_cur_cmd); + sc->sc_cur_cmd = NULL; + powerpc_pow_enabled = 1; + + done: + /* Queue next command if one is pending */ + if (STAILQ_FIRST(&sc->sc_cmdq) != NULL) { + sc->sc_cur_cmd = STAILQ_FIRST(&sc->sc_cmdq); + STAILQ_REMOVE_HEAD(&sc->sc_cmdq, cmd_q); + smu_send_cmd(smu, sc->sc_cur_cmd); + } - powerpc_pow_enabled = oldpow; + mtx_unlock(&sc->sc_mtx); +} - memcpy(cmd->data, sc->sc_cmd->data, sizeof(cmd->data)); - cmd->len = sc->sc_cmd->len; +static int +smu_run_cmd(device_t dev, struct smu_cmd *cmd, int wait) +{ + struct smu_softc *sc; + uint8_t cmd_code; + int error; + + sc = device_get_softc(dev); + cmd_code = cmd->cmd; + mtx_lock(&sc->sc_mtx); + if (sc->sc_cur_cmd != NULL) { + STAILQ_INSERT_TAIL(&sc->sc_cmdq, cmd, cmd_q); + } else + smu_send_cmd(dev, cmd); mtx_unlock(&sc->sc_mtx); - return (result); + if (!wait) + return (0); + + if (sc->sc_doorbellirqid < 0) { + /* Poll if the IRQ has not been set up yet */ + do { + DELAY(50); + smu_doorbell_intr(dev); + } while (sc->sc_cur_cmd != NULL); + } else { + /* smu_doorbell_intr will wake us when the command is ACK'ed */ + error = tsleep(cmd, 0, "smu", 800 * hz / 1000); + if (error != 0) + smu_doorbell_intr(dev); /* One last chance */ + + if (error != 0) { + mtx_lock(&sc->sc_mtx); + if (cmd->cmd == cmd_code) { /* Never processed */ + /* Abort this command if we timed out */ + if (sc->sc_cur_cmd == cmd) + sc->sc_cur_cmd = NULL; + else + STAILQ_REMOVE(&sc->sc_cmdq, cmd, smu_cmd, + cmd_q); + mtx_unlock(&sc->sc_mtx); + return (error); + } + error = 0; + mtx_unlock(&sc->sc_mtx); + } + } + + /* SMU acks the command by inverting the command bits */ + if (cmd->cmd == ((~cmd_code) & 0xff)) + error = 0; + else + error = EIO; + + return (error); } static int @@ -387,7 +490,7 @@ smu_get_datablock(device_t dev, int8_t i cmd.data[0] = SMU_PARTITION_LATEST; cmd.data[1] = id; - smu_run_cmd(dev, &cmd); + smu_run_cmd(dev, &cmd, 1); addr[0] = addr[1] = 0; addr[2] = cmd.data[0]; @@ -400,7 +503,7 @@ smu_get_datablock(device_t dev, int8_t i memcpy(&cmd.data[2], addr, sizeof(addr)); cmd.data[6] = len; - smu_run_cmd(dev, &cmd); + smu_run_cmd(dev, &cmd, 1); memcpy(buf, cmd.data, len); return (0); } @@ -421,7 +524,7 @@ smu_slew_cpu_voltage(device_t dev, int t cmd.data[6] = 1; cmd.data[7] = to; - smu_run_cmd(dev, &cmd); + smu_run_cmd(dev, &cmd, 1); } static void @@ -516,7 +619,7 @@ smu_fan_set_rpm(device_t smu, struct smu cmd.data[2] = (rpm >> 8) & 0xff; cmd.data[3] = rpm & 0xff; - error = smu_run_cmd(smu, &cmd); + error = smu_run_cmd(smu, &cmd, 1); if (error) fan->old_style = 1; } @@ -527,7 +630,7 @@ smu_fan_set_rpm(device_t smu, struct smu cmd.data[1] = 1 << fan->reg; cmd.data[2 + 2*fan->reg] = (rpm >> 8) & 0xff; cmd.data[3 + 2*fan->reg] = rpm & 0xff; - error = smu_run_cmd(smu, &cmd); + error = smu_run_cmd(smu, &cmd, 1); } if (error == 0) @@ -545,7 +648,7 @@ smu_fan_read_rpm(device_t smu, struct sm cmd.len = 1; cmd.data[0] = 1; - smu_run_cmd(smu, &cmd); + smu_run_cmd(smu, &cmd, 1); return ((cmd.data[fan->reg*2+1] << 8) | cmd.data[fan->reg*2+2]); } @@ -651,17 +754,21 @@ smu_attach_fans(device_t dev, phandle_t } static int -smu_sensor_read(device_t smu, struct smu_sensor *sens) +smu_sensor_read(device_t smu, struct smu_sensor *sens, int *val) { struct smu_cmd cmd; struct smu_softc *sc; int64_t value; + int error; cmd.cmd = SMU_ADC; cmd.len = 1; cmd.data[0] = sens->reg; + error = 0; - smu_run_cmd(smu, &cmd); + error = smu_run_cmd(smu, &cmd, 1); + if (error != 0) + return (error); sc = device_get_softc(smu); value = (cmd.data[0] << 8) | cmd.data[1]; @@ -674,9 +781,7 @@ smu_sensor_read(device_t smu, struct smu value <<= 1; /* Convert from 16.16 fixed point degC into integer C. */ - value *= 15625; - value /= 1024; - value /= 1000000; + value >>= 16; break; case SMU_VOLTAGE_SENSOR: value *= sc->sc_cpu_volt_scale; @@ -710,7 +815,8 @@ smu_sensor_read(device_t smu, struct smu break; } - return (value); + *val = value; + return (0); } static int @@ -725,7 +831,10 @@ smu_sensor_sysctl(SYSCTL_HANDLER_ARGS) sc = device_get_softc(smu); sens = &sc->sc_sensors[arg2]; - value = smu_sensor_read(smu, sens); + error = smu_sensor_read(smu, sens, &value); + if (error != 0) + return (error); + error = sysctl_handle_int(oidp, &value, 0, req); return (error); @@ -808,41 +917,32 @@ smu_attach_sensors(device_t dev, phandle } } -static int -ms_to_ticks(int ms) +static void +smu_fan_management_proc(void *xdev) { - if (hz > 1000) - return ms*(hz/1000); + device_t smu = xdev; - return ms/(1000/hz); -} + while(1) { + smu_manage_fans(smu); + pause("smu", SMU_FANMGT_INTERVAL * hz / 1000); + } +} static void -smu_fanmgt_callout(void *xdev) { - device_t smu = xdev; +smu_manage_fans(device_t smu) +{ struct smu_softc *sc; - int i, maxtemp, temp, factor; + int i, maxtemp, temp, factor, error; sc = device_get_softc(smu); - if (time_uptime - sc->sc_lastuserchange < 3) { - /* - * If we have heard from a user process in the last 3 seconds, - * go away. - */ - - callout_reset(&sc->sc_fanmgt_callout, - ms_to_ticks(SMU_FANMGT_INTERVAL), smu_fanmgt_callout, smu); - return; - } - maxtemp = 0; for (i = 0; i < sc->sc_nsensors; i++) { if (sc->sc_sensors[i].type != SMU_TEMP_SENSOR) continue; - temp = smu_sensor_read(smu, &sc->sc_sensors[i]); - if (temp > maxtemp) + error = smu_sensor_read(smu, &sc->sc_sensors[i], &temp); + if (error == 0 && temp > maxtemp) maxtemp = temp; } @@ -865,8 +965,19 @@ smu_fanmgt_callout(void *xdev) { "more than 20 degrees over target temperature (%d C)!\n", maxtemp, sc->sc_target_temp); - if (maxtemp > sc->sc_target_temp) + if (time_uptime - sc->sc_lastuserchange < 3) { + /* + * If we have heard from a user process in the last 3 seconds, + * go away. + */ + + return; + } + + if (maxtemp - sc->sc_target_temp > 4) factor = 110; + else if (maxtemp - sc->sc_target_temp > 1) + factor = 105; else if (sc->sc_target_temp - maxtemp > 4) factor = 90; else if (sc->sc_target_temp - maxtemp > 1) @@ -877,15 +988,12 @@ smu_fanmgt_callout(void *xdev) { for (i = 0; i < sc->sc_nfans; i++) smu_fan_set_rpm(smu, &sc->sc_fans[i], (sc->sc_fans[i].setpoint * factor) / 100); - - callout_reset(&sc->sc_fanmgt_callout, - ms_to_ticks(SMU_FANMGT_INTERVAL), smu_fanmgt_callout, smu); } static void smu_set_sleepled(void *xdev, int onoff) { - struct smu_cmd cmd; + static struct smu_cmd cmd; device_t smu = xdev; cmd.cmd = SMU_MISC; @@ -894,7 +1002,7 @@ smu_set_sleepled(void *xdev, int onoff) cmd.data[1] = 0; cmd.data[2] = onoff; - smu_run_cmd(smu, &cmd); + smu_run_cmd(smu, &cmd, 0); } static int @@ -909,7 +1017,7 @@ smu_server_mode(SYSCTL_HANDLER_ARGS) cmd.len = 1; cmd.data[0] = SMU_PWR_GET_POWERUP; - error = smu_run_cmd(smu, &cmd); + error = smu_run_cmd(smu, &cmd, 1); if (error) return (error); @@ -932,6 +1040,6 @@ smu_server_mode(SYSCTL_HANDLER_ARGS) cmd.data[1] = 0; cmd.data[2] = SMU_WAKEUP_AC_INSERT; - return (smu_run_cmd(smu, &cmd)); + return (smu_run_cmd(smu, &cmd, 1)); } From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 06:39:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F323B106566B; Thu, 4 Mar 2010 06:39:58 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D837F8FC0C; Thu, 4 Mar 2010 06:39:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o246dweQ094100; Thu, 4 Mar 2010 06:39:58 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o246dwVA094098; Thu, 4 Mar 2010 06:39:58 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003040639.o246dwVA094098@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 4 Mar 2010 06:39:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204694 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 06:39:59 -0000 Author: nwhitehorn Date: Thu Mar 4 06:39:58 2010 New Revision: 204694 URL: http://svn.freebsd.org/changeset/base/204694 Log: Patch some more concurrency issues here. This expands the page table lock to cover the PVOs, and removes the scratchpage PTEs from the PVOs entirely to avoid the system trying to be helpful and rewriting them. Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Mar 4 06:36:48 2010 (r204693) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Mar 4 06:39:58 2010 (r204694) @@ -327,7 +327,6 @@ SYSCTL_INT(_machdep, OID_AUTO, moea64_pv &moea64_pvo_remove_calls, 0, ""); vm_offset_t moea64_scratchpage_va[2]; -struct pvo_entry *moea64_scratchpage_pvo[2]; struct lpte *moea64_scratchpage_pte[2]; struct mtx moea64_scratchpage_mtx; @@ -965,22 +964,36 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o PMAP_UNLOCK(kernel_pmap); /* - * Allocate some things for page zeroing + * Allocate some things for page zeroing. We put this directly + * in the page table, marked with LPTE_LOCKED, to avoid any + * of the PVO book-keeping or other parts of the VM system + * from even knowing that this hack exists. */ mtx_init(&moea64_scratchpage_mtx, "pvo zero page", NULL, MTX_DEF); for (i = 0; i < 2; i++) { + struct lpte pt; + uint64_t vsid; + int pteidx, ptegidx; + moea64_scratchpage_va[i] = (virtual_end+1) - PAGE_SIZE; virtual_end -= PAGE_SIZE; - moea64_kenter(mmup,moea64_scratchpage_va[i],0); - LOCK_TABLE(); - moea64_scratchpage_pvo[i] = moea64_pvo_find_va(kernel_pmap, - moea64_scratchpage_va[i],&j); - moea64_scratchpage_pte[i] = moea64_pvo_to_pte( - moea64_scratchpage_pvo[i],j); - moea64_scratchpage_pte[i]->pte_hi |= LPTE_LOCKED; + + vsid = va_to_vsid(kernel_pmap, moea64_scratchpage_va[i]); + moea64_pte_create(&pt, vsid, moea64_scratchpage_va[i], + LPTE_NOEXEC); + pt.pte_hi |= LPTE_LOCKED; + + ptegidx = va_to_pteg(vsid, moea64_scratchpage_va[i]); + pteidx = moea64_pte_insert(ptegidx, &pt); + if (pt.pte_hi & LPTE_HID) + ptegidx ^= moea64_pteg_mask; + + moea64_scratchpage_pte[i] = + &moea64_pteg_table[ptegidx].pt[pteidx]; + UNLOCK_TABLE(); } @@ -1088,18 +1101,16 @@ moea64_change_wiring(mmu_t mmu, pmap_t p static __inline void moea64_set_scratchpage_pa(int which, vm_offset_t pa) { - mtx_assert(&moea64_scratchpage_mtx, MA_OWNED); - moea64_scratchpage_pvo[which]->pvo_pte.lpte.pte_lo &= - ~(LPTE_WIMG | LPTE_RPGN); - moea64_scratchpage_pvo[which]->pvo_pte.lpte.pte_lo |= - moea64_calc_wimg(pa) | (uint64_t)pa; + mtx_assert(&moea64_scratchpage_mtx, MA_OWNED); moea64_scratchpage_pte[which]->pte_hi &= ~LPTE_VALID; TLBIE(kernel_pmap, moea64_scratchpage_va[which]); - moea64_scratchpage_pte[which]->pte_lo = - moea64_scratchpage_pvo[which]->pvo_pte.lpte.pte_lo; + moea64_scratchpage_pte[which]->pte_lo &= + ~(LPTE_WIMG | LPTE_RPGN); + moea64_scratchpage_pte[which]->pte_lo |= + moea64_calc_wimg(pa) | (uint64_t)pa; EIEIO(); moea64_scratchpage_pte[which]->pte_hi |= LPTE_VALID; @@ -1496,11 +1507,11 @@ moea64_remove_write(mmu_t mmu, vm_page_t return; lo = moea64_attr_fetch(m); SYNC(); + LOCK_TABLE(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { pmap = pvo->pvo_pmap; PMAP_LOCK(pmap); if ((pvo->pvo_pte.lpte.pte_lo & LPTE_PP) != LPTE_BR) { - LOCK_TABLE(); pt = moea64_pvo_to_pte(pvo, -1); pvo->pvo_pte.lpte.pte_lo &= ~LPTE_PP; pvo->pvo_pte.lpte.pte_lo |= LPTE_BR; @@ -1511,10 +1522,10 @@ moea64_remove_write(mmu_t mmu, vm_page_t moea64_pte_change(pt, &pvo->pvo_pte.lpte, pvo->pvo_pmap, PVO_VADDR(pvo)); } - UNLOCK_TABLE(); } PMAP_UNLOCK(pmap); } + UNLOCK_TABLE(); if ((lo & LPTE_CHG) != 0) { moea64_attr_clear(m, LPTE_CHG); vm_page_dirty(m); @@ -1651,12 +1662,14 @@ moea64_page_exists_quick(mmu_t mmu, pmap return FALSE; loops = 0; + LOCK_TABLE(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { if (pvo->pvo_pmap == pmap) return (TRUE); if (++loops >= 16) break; } + UNLOCK_TABLE(); return (FALSE); } @@ -1675,9 +1688,11 @@ moea64_page_wired_mappings(mmu_t mmu, vm if (!moea64_initialized || (m->flags & PG_FICTITIOUS) != 0) return (count); mtx_assert(&vm_page_queue_mtx, MA_OWNED); + LOCK_TABLE(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) if ((pvo->pvo_vaddr & PVO_WIRED) != 0) count++; + UNLOCK_TABLE(); return (count); } @@ -1896,6 +1911,7 @@ moea64_remove_all(mmu_t mmu, vm_page_t m mtx_assert(&vm_page_queue_mtx, MA_OWNED); pvo_head = vm_page_to_pvoh(m); + LOCK_TABLE(); for (pvo = LIST_FIRST(pvo_head); pvo != NULL; pvo = next_pvo) { next_pvo = LIST_NEXT(pvo, pvo_vlink); @@ -1905,6 +1921,7 @@ moea64_remove_all(mmu_t mmu, vm_page_t m moea64_pvo_remove(pvo, -1); PMAP_UNLOCK(pmap); } + UNLOCK_TABLE(); if ((m->flags & PG_WRITEABLE) && moea64_is_modified(mmu, m)) { moea64_attr_clear(m, LPTE_CHG); vm_page_dirty(m); @@ -2130,7 +2147,6 @@ moea64_pvo_remove(struct pvo_entry *pvo, } else { moea64_pte_overflow--; } - UNLOCK_TABLE(); /* * Update our statistics. @@ -2162,9 +2178,12 @@ moea64_pvo_remove(struct pvo_entry *pvo, * if we aren't going to reuse it. */ LIST_REMOVE(pvo, pvo_olink); + UNLOCK_TABLE(); + if (!(pvo->pvo_vaddr & PVO_BOOTSTRAP)) uma_zfree((pvo->pvo_vaddr & PVO_MANAGED) ? moea64_mpvo_zone : moea64_upvo_zone, pvo); + moea64_pvo_entries--; moea64_pvo_remove_calls++; } @@ -2313,6 +2332,7 @@ moea64_query_bit(vm_page_t m, u_int64_t if (moea64_attr_fetch(m) & ptebit) return (TRUE); + LOCK_TABLE(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { MOEA_PVO_CHECK(pvo); /* sanity check */ @@ -2322,6 +2342,7 @@ moea64_query_bit(vm_page_t m, u_int64_t */ if (pvo->pvo_pte.lpte.pte_lo & ptebit) { moea64_attr_save(m, ptebit); + UNLOCK_TABLE(); MOEA_PVO_CHECK(pvo); /* sanity check */ return (TRUE); } @@ -2341,7 +2362,6 @@ moea64_query_bit(vm_page_t m, u_int64_t * REF/CHG bits from the valid PTE. If the appropriate * ptebit is set, cache it and return success. */ - LOCK_TABLE(); pt = moea64_pvo_to_pte(pvo, -1); if (pt != NULL) { moea64_pte_synch(pt, &pvo->pvo_pte.lpte); @@ -2353,8 +2373,8 @@ moea64_query_bit(vm_page_t m, u_int64_t return (TRUE); } } - UNLOCK_TABLE(); } + UNLOCK_TABLE(); return (FALSE); } @@ -2387,10 +2407,10 @@ moea64_clear_bit(vm_page_t m, u_int64_t * valid pte clear the ptebit from the valid pte. */ count = 0; + LOCK_TABLE(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { MOEA_PVO_CHECK(pvo); /* sanity check */ - LOCK_TABLE(); pt = moea64_pvo_to_pte(pvo, -1); if (pt != NULL) { moea64_pte_synch(pt, &pvo->pvo_pte.lpte); @@ -2399,11 +2419,11 @@ moea64_clear_bit(vm_page_t m, u_int64_t moea64_pte_clear(pt, pvo->pvo_pmap, PVO_VADDR(pvo), ptebit); } } - UNLOCK_TABLE(); rv |= pvo->pvo_pte.lpte.pte_lo; pvo->pvo_pte.lpte.pte_lo &= ~ptebit; MOEA_PVO_CHECK(pvo); /* sanity check */ } + UNLOCK_TABLE(); if (origbit != NULL) { *origbit = rv; From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 07:04:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18BA1106566B; Thu, 4 Mar 2010 07:04:28 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06B698FC2A; Thu, 4 Mar 2010 07:04:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2474SLC099850; Thu, 4 Mar 2010 07:04:28 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2474Rct099846; Thu, 4 Mar 2010 07:04:27 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003040704.o2474Rct099846@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 4 Mar 2010 07:04:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204697 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 07:04:28 -0000 Author: edwin Date: Thu Mar 4 07:04:27 2010 New Revision: 204697 URL: http://svn.freebsd.org/changeset/base/204697 Log: - Implement -3 option (show previous, this and next month) option. - Add -A option (months after this month). - Add -B option (months before this month). - Fix highlighting of today in year overview. - Fix aligning of "foreign" characters. MFC after: 2 weeks Modified: head/usr.bin/ncal/Makefile head/usr.bin/ncal/ncal.1 head/usr.bin/ncal/ncal.c Modified: head/usr.bin/ncal/Makefile ============================================================================== --- head/usr.bin/ncal/Makefile Thu Mar 4 06:55:10 2010 (r204696) +++ head/usr.bin/ncal/Makefile Thu Mar 4 07:04:27 2010 (r204697) @@ -4,7 +4,7 @@ PROG= ncal DPADD= ${LIBCALENDAR} ${LIBTERMCAP} LDADD= -lcalendar -ltermcap -WARNS?= 1 +WARNS?= 6 LINKS= ${BINDIR}/ncal ${BINDIR}/cal MLINKS= ncal.1 cal.1 Modified: head/usr.bin/ncal/ncal.1 ============================================================================== --- head/usr.bin/ncal/ncal.1 Thu Mar 4 06:55:10 2010 (r204696) +++ head/usr.bin/ncal/ncal.1 Thu Mar 4 07:04:27 2010 (r204697) @@ -109,6 +109,22 @@ Britain and her colonies switched to the Print the number of the week below each week column. .It Fl y Display a calendar for the specified year. +.It Fl b +Switch to backwards compatibility mode (for debugging). +.It Fl d Ar yyyy-mm-dd +Use +.Ar yyyy-mm-dd +as the current date (for debugging of highlighting). +.It Fl 3 +Display the previous, current and next month surrounding today. +.It Fl A Ar number +Display the +.Ar number +of months after the current month. +.It Fl B Ar number +Display the +.Ar number +of months before the current month. .El .Pp A single parameter specifies the year (1\(en9999) to be displayed; @@ -116,12 +132,13 @@ note the year must be fully specified: .Dq Li cal 89 will .Em not -display a calendar for 1989. -Two parameters denote the month and year; the month is either a number between -1 and 12, or a full or abbreviated name as specified by the current locale. -Month and year default to those of the current system clock and time zone (so +display a calendar for 1989. Two parameters denote the month and +year; the month is either a number between 1 and 12, or a full or +abbreviated name as specified by the current locale. Month and +year default to those of the current system clock and time zone (so .Dq Li cal -m 8 -will display a calendar for the month of August in the current year). +will display a calendar for the month of August in the current +year). .Pp A year starts on January 1. .Sh SEE ALSO @@ -142,5 +159,5 @@ The command and manual were written by .An Wolfgang Helbig Aq helbig@FreeBSD.org . .Sh BUGS -The assignment of Julian\(enGregorian switching dates to -country codes is historically naive for many countries. +The assignment of Julian\(enGregorian switching dates to country +codes is historically naive for many countries. Modified: head/usr.bin/ncal/ncal.c ============================================================================== --- head/usr.bin/ncal/ncal.c Thu Mar 4 06:55:10 2010 (r204696) +++ head/usr.bin/ncal/ncal.c Thu Mar 4 07:04:27 2010 (r204697) @@ -45,12 +45,12 @@ static const char rcsid[] = #include #undef lines /* term.h defines this */ -/* Width of one month with backward compatibility */ +/* Width of one month with backward compatibility and in regular mode*/ #define MONTH_WIDTH_B_J 27 #define MONTH_WIDTH_B 20 -#define MONTH_WIDTH_J 24 -#define MONTH_WIDTH 18 +#define MONTH_WIDTH_R_J 24 +#define MONTH_WIDTH_R 18 #define MAX_WIDTH 64 @@ -60,6 +60,7 @@ struct monthlines { wchar_t name[MAX_WIDTH + 1]; char lines[7][MAX_WIDTH + 1]; char weeks[MAX_WIDTH + 1]; + unsigned int linelen[7]; }; struct weekdays { @@ -164,25 +165,22 @@ int nswitchb; /* switch date for backwa const char *term_so, *term_se; int today; -char *center(char *s, char *t, int w); +char *center(char *s, char *t, int w); wchar_t *wcenter(wchar_t *s, wchar_t *t, int w); -void mkmonth(int year, int month, int jd_flag, struct monthlines * monthl); -void mkmonthb(int year, int month, int jd_flag, struct monthlines * monthl); -void mkweekdays(struct weekdays * wds); -int parsemonth(const char *s, int *m, int *y); -void printcc(void); -void printeaster(int year, int julian, int orthodox); -void printmonth(int year, int month, int jd_flag); -void printmonthb(int year, int month, int jd_flag); -void printyear(int year, int jd_flag); -void printyearb(int year, int jd_flag); +void mkmonthr(int year, int month, int jd_flag, struct monthlines * monthl); +void mkmonthb(int year, int month, int jd_flag, struct monthlines * monthl); +void mkweekdays(struct weekdays * wds); +int parsemonth(const char *s, int *m, int *y); +void printcc(void); +void printeaster(int year, int julian, int orthodox); int firstday(int y, int m); -date *sdate(int ndays, struct date * d); -date *sdateb(int ndays, struct date * d); -int sndays(struct date * d); -int sndaysb(struct date * d); -static void usage(void); -int weekdayb(int nd); +date *sdater(int ndays, struct date * d); +date *sdateb(int ndays, struct date * d); +int sndaysr(struct date * d); +int sndaysb(struct date * d); +static void usage(void); +void monthranger(int year, int jd_flag, int m, int before, int after); +void monthrangeb(int year, int jd_flag, int m, int before, int after); int main(int argc, char *argv[]) @@ -190,6 +188,7 @@ main(int argc, char *argv[]) struct djswitch *p, *q; /* to search user defined switch date */ date never = {10000, 1, 1}; /* outside valid range of dates */ date ukswitch = {1752, 9, 2};/* switch date for Great Britain */ + date dt; int ch; /* holds the option character */ int m = 0; /* month */ int y = 0; /* year */ @@ -202,26 +201,17 @@ main(int argc, char *argv[]) int flag_easter = 0; /* use wants easter date */ char *cp; /* character pointer */ char *flag_month = NULL; /* requested month as string */ + char *flag_highlightdate = NULL; + int before, after; const char *locale; /* locale to get country code */ char tbuf[1024], cbuf[512], *b; - time_t t; - struct tm *tm1; + /* On how to highlight on this terminal */ term_se = term_so = NULL; - today = 0; if (isatty(STDOUT_FILENO) && tgetent(tbuf, NULL) == 1) { - date dt; /* handy date */ - b = cbuf; term_so = tgetstr("so", &b); term_se = tgetstr("se", &b); - t = time(NULL); - tm1 = localtime(&t); - dt.y = tm1->tm_year + 1900; - dt.m = tm1->tm_mon + 1; - dt.d = tm1->tm_mday; - - today = sndaysb(&dt); } /* @@ -263,14 +253,35 @@ main(int argc, char *argv[]) if (flag_backward) nswitchb = ndaysj(&ukswitch); - while ((ch = getopt(argc, argv, "Jehjm:ops:wy")) != -1) + before = after = -1; + + while ((ch = getopt(argc, argv, "A:B:3Jbd:ehjm:ops:wy")) != -1) switch (ch) { + case '3': + before = after = 1; + break; + case 'A': + after = strtol(optarg, NULL, 10); + if (after < 0) + errx(1, "Argument to -A must be positive"); + break; + case 'B': + before = strtol(optarg, NULL, 10); + if (before < 0) + errx(1, "Argument to -B must be positive"); + break; case 'J': if (flag_backward) usage(); nswitch = ndaysj(&never); flag_julian_cal = 1; break; + case 'b': + flag_backward = 1; + break; + case 'd': + flag_highlightdate = optarg; + break; case 'h': term_so = term_se = NULL; break; @@ -335,6 +346,9 @@ main(int argc, char *argv[]) y = atoi(*argv++); if (y < 1 || y > 9999) errx(EX_USAGE, "year %d not in range 1..9999", y); + before = 0; + after = 11; + m = 1; break; case 0: { @@ -345,6 +359,10 @@ main(int argc, char *argv[]) tm = localtime(&t); y = tm->tm_year + 1900; m = tm->tm_mon + 1; + if (before == -1) + before = 0; + if (after == -1) + after = 0; } break; default: @@ -359,21 +377,29 @@ main(int argc, char *argv[]) } } + if (flag_highlightdate != NULL) { + dt.y = strtol(flag_highlightdate, NULL, 10); + dt.m = strtol(flag_highlightdate + 5, NULL, 10); + dt.d = strtol(flag_highlightdate + 8, NULL, 10); + } else { + time_t t; + struct tm *tm1; + + t = time(NULL); + tm1 = localtime(&t); + dt.y = tm1->tm_year + 1900; + dt.m = tm1->tm_mon + 1; + dt.d = tm1->tm_mday; + } + today = sndaysb(&dt); + if (flag_easter) printeaster(y, flag_julian_cal, flag_orthodox); - else if (argc == 1 || flag_hole_year) { - /* disable the highlight for now */ - today = 0; - if (flag_backward) - printyearb(y, flag_julian_day); - else - printyear(y, flag_julian_day); - } else + else if (flag_backward) - printmonthb(y, m, flag_julian_day); + monthrangeb(y, flag_julian_day, m, before, after); else - printmonth(y, m, flag_julian_day); - + monthranger(y, flag_julian_day, m, before, after); return (0); } @@ -385,7 +411,9 @@ usage(void) "usage: cal [-hjy] [[month] year]\n" " cal [-hj] [-m month] [year]\n" " ncal [-hJjpwy] [-s country_code] [[month] year]\n" - " ncal [-hJeo] [year]\n", stderr); + " ncal [-hJeo] [year]\n" + "for debug the highlighting: [-b] [-d yyyy-mm-dd]\n", + stderr); exit(EX_USAGE); } @@ -416,7 +444,7 @@ printeaster(int y, int julian, int ortho { date dt; struct tm tm; - char buf[80]; + char buf[MAX_WIDTH]; static int d_first = -1; if (d_first < 0) @@ -441,183 +469,196 @@ printeaster(int y, int julian, int ortho printf("%s\n", buf); } -void -printmonth(int y, int m, int jd_flag) -{ - struct monthlines month; - struct weekdays wds; - int i, len; - - mkmonth(y, m - 1, jd_flag, &month); - mkweekdays(&wds); - printf(" %ls %d\n", month.name, y); - for (i = 0; i != 7; i++) { - len = wcslen(wds.names[i]); - if (wcswidth(wds.names[i], len) == len) - wprintf(L"%.2ls%s\n", wds.names[i], month.lines[i]); - else - wprintf(L"%.1ls%s\n", wds.names[i], month.lines[i]); - } - if (flag_weeks) - printf(" %s\n", month.weeks); -} +#define MW(mw, ms, ml) \ + strlen(ms) > (ml) ? (mw) + 9 : (mw) +#define DECREASEMONTH(m, y) \ + if (--m == 0) { \ + m = 12; \ + y--; \ + } +#define INCREASEMONTH(m, y) \ + if (++(m) == 13) { \ + (m) = 1; \ + (y)++; \ + } +#define M2Y(m) ((m) / 12) +#define M2M(m) (1 + (m) % 12) void -printmonthb(int y, int m, int jd_flag) +monthrangeb(int y, int jd_flag, int m, int before, int after) { - struct monthlines month; + struct monthlines year[12]; struct weekdays wds; - wchar_t s[MAX_WIDTH], t[MAX_WIDTH]; - int i; - int mw; - - mkmonthb(y, m - 1, jd_flag, &month); - mkweekdays(&wds); + char s[MAX_WIDTH], t[MAX_WIDTH]; + wchar_t ws[MAX_WIDTH], ws1[MAX_WIDTH]; + const char *wdss; + int i, j; + int mpl; + int mw; + int m1, m2; + int printyearheader; + int prevyear = -1; + mpl = jd_flag ? 2 : 3; mw = jd_flag ? MONTH_WIDTH_B_J : MONTH_WIDTH_B; + wdss = (mpl == 2) ? " " : ""; - swprintf(s, MAX_WIDTH, L"%ls %d", month.name, y); - wprintf(L"%ls\n", wcenter(t, s, mw)); + while (before != 0) { + DECREASEMONTH(m, y); + before--; + after++; + } + m1 = y * 12 + m - 1; + m2 = m1 + after; - if (jd_flag) - wprintf(L" %ls %ls %ls %ls %ls %ls %.2ls\n", - wds.names[6], wds.names[0], - wds.names[1], wds.names[2], wds.names[3], - wds.names[4], wds.names[5]); - else - wprintf(L"%ls%ls%ls%ls%ls%ls%.2ls\n", wds.names[6], - wds.names[0], wds.names[1], wds.names[2], wds.names[3], - wds.names[4], wds.names[5]); + mkweekdays(&wds); - for (i = 0; i != 6; i++) - printf("%s\n", month.lines[i]+1); -} + /* + * The year header is printed when there are more than 'mpl' months + * and if the first month is a multitude of 'mpl'. + * If not, it will print the year behind every month. + */ + printyearheader = (after >= mpl - 1) && (M2M(m1) - 1) % mpl == 0; -void -printyear(int y, int jd_flag) -{ - struct monthlines year[12]; - struct weekdays wds; - char s[80], t[80]; - int i, j; - int mpl; - int mw; + m = m1; + while (m <= m2) { + int count = 0; + for (i = 0; i != mpl && m + i <= m2; i++) { + mkmonthb(M2Y(m + i), M2M(m + i) - 1, jd_flag, year + i); + count++; + } - for (i = 0; i != 12; i++) - mkmonth(y, i, jd_flag, year + i); - mkweekdays(&wds); - mpl = jd_flag ? 3 : 4; - mw = jd_flag ? MONTH_WIDTH_J : MONTH_WIDTH; + /* Empty line between two rows of months */ + if (m != m1) + printf("\n"); + + /* Year at the top */ + if (printyearheader && M2Y(m) != prevyear) { + sprintf(s, "%d", M2Y(m)); + printf("%s\n", center(t, s, mpl * mw)); + prevyear = M2Y(m); + } - sprintf(s, "%d", y); - printf("%s\n", center(t, s, mpl * mw)); + /* Month names */ + for (i = 0; i < count; i++) + if (printyearheader) + wprintf(L"%-*ls ", + mw, wcenter(ws, year[i].name, mw)); + else { + swprintf(ws, sizeof(ws), L"%-ls %d", + year[i].name, M2Y(m + i)); + wprintf(L"%-*ls ", mw, wcenter(ws1, ws, mw)); + } + printf("\n"); - for (j = 0; j != 12; j += mpl) { - wprintf(L" %-*ls%-*ls", - mw, year[j].name, - mw, year[j + 1].name); - if (mpl == 3) - printf("%ls\n", year[j + 2].name); - else - wprintf(L"%-*ls%ls\n", - mw, year[j + 2].name, - year[j + 3].name); - for (i = 0; i != 7; i++) { - wprintf(L"%.2ls%-*s%-*s", - wds.names[i], - mw, year[j].lines[i], - mw, year[j + 1].lines[i]); - if (mpl == 3) - printf("%s\n", year[j + 2].lines[i]); - else - printf("%-*s%s\n", - mw, year[j + 2].lines[i], - year[j + 3].lines[i]); + /* Day of the week names */ + for (i = 0; i < count; i++) { + wprintf(L"%s%ls%s%ls%s%ls%s%ls%s%ls%s%ls%s%ls ", + wdss, wds.names[6], wdss, wds.names[0], + wdss, wds.names[1], wdss, wds.names[2], + wdss, wds.names[3], wdss, wds.names[4], + wdss, wds.names[5]); } - if (flag_weeks) { - if (mpl == 3) - printf(" %-*s%-*s%-s\n", - mw, year[j].weeks, - mw, year[j + 1].weeks, - year[j + 2].weeks); - else - printf(" %-*s%-*s%-*s%-s\n", - mw, year[j].weeks, - mw, year[j + 1].weeks, - mw, year[j + 2].weeks, - year[j + 3].weeks); + printf("\n"); + + for (i = 0; i != 6; i++) { + for (j = 0; j < count; j++) + printf("%-*s ", mw, year[j].lines[i]+1); + printf("\n"); } + + m += mpl; } } void -printyearb(int y, int jd_flag) +monthranger(int y, int jd_flag, int m, int before, int after) { struct monthlines year[12]; struct weekdays wds; - char s[80], t[80]; - wchar_t ws[80], wt[80]; + char s[MAX_WIDTH], t[MAX_WIDTH]; int i, j; int mpl; int mw; + int m1, m2; + int prevyear = -1; + int printyearheader; + + mpl = jd_flag ? 3 : 4; + mw = jd_flag ? MONTH_WIDTH_R_J : MONTH_WIDTH_R; + + while (before != 0) { + DECREASEMONTH(m, y); + before--; + after++; + } + m1 = y * 12 + m - 1; + m2 = m1 + after; - for (i = 0; i != 12; i++) - mkmonthb(y, i, jd_flag, year + i); mkweekdays(&wds); - mpl = jd_flag ? 2 : 3; - mw = jd_flag ? MONTH_WIDTH_B_J : MONTH_WIDTH_B; - sprintf(s, "%d", y); - printf("%s\n\n", center(t, s, mw * mpl + mpl)); + /* + * The year header is printed when there are more than 'mpl' months + * and if the first month is a multitude of 'mpl'. + * If not, it will print the year behind every month. + */ + printyearheader = (after >= mpl - 1) && (M2M(m1) - 1) % mpl == 0; - for (j = 0; j != 12; j += mpl) { - wprintf(L"%-*ls ", mw, wcenter(ws, year[j].name, mw)); - if (mpl == 2) - printf("%ls\n", wcenter(ws, year[j + 1].name, mw)); - else - wprintf(L"%-*ls %ls\n", mw, - wcenter(ws, year[j + 1].name, mw), - wcenter(wt, year[j + 2].name, mw)); - - if (mpl == 2) - wprintf(L" %ls %ls %ls %ls %ls %ls %ls " - " %ls %ls %ls %ls %ls %ls %.2ls\n", - wds.names[6], wds.names[0], wds.names[1], - wds.names[2], wds.names[3], wds.names[4], - wds.names[5], - wds.names[6], wds.names[0], wds.names[1], - wds.names[2], wds.names[3], wds.names[4], - wds.names[5]); - else - wprintf(L"%ls%ls%ls%ls%ls%ls%ls " - "%ls%ls%ls%ls%ls%ls%ls " - "%ls%ls%ls%ls%ls%ls%.2ls\n", - wds.names[6], wds.names[0], wds.names[1], - wds.names[2], wds.names[3], wds.names[4], - wds.names[5], - wds.names[6], wds.names[0], wds.names[1], - wds.names[2], wds.names[3], wds.names[4], - wds.names[5], - wds.names[6], wds.names[0], wds.names[1], - wds.names[2], wds.names[3], wds.names[4], - wds.names[5]); - for (i = 0; i != 6; i++) { - if (mpl == 2) - printf("%-*s %s\n", - mw, year[j].lines[i]+1, - year[j + 1].lines[i]+1); + m = m1; + while (m <= m2) { + int count = 0; + for (i = 0; i != mpl && m + i <= m2; i++) { + mkmonthr(M2Y(m + i), M2M(m + i) - 1, jd_flag, year + i); + count++; + } + + /* Empty line between two rows of months */ + if (m != m1) + printf("\n"); + + /* Year at the top */ + if (printyearheader && M2Y(m) != prevyear) { + sprintf(s, "%d", M2Y(m)); + printf("%s\n", center(t, s, mpl * mw)); + prevyear = M2Y(m); + } + + /* Month names */ + wprintf(L" "); + for (i = 0; i < count; i++) + if (printyearheader) + wprintf(L"%-*ls", mw, year[i].name); else - printf("%-*s %-*s %s\n", - mw, year[j].lines[i]+1, - mw, year[j + 1].lines[i]+1, - year[j + 2].lines[i]+1); + wprintf(L"%-ls %-*d", year[i].name, + mw - wcslen(year[i].name) - 1, M2Y(m + i)); + printf("\n"); + for (i = 0; i != 7; i++) { + /* Week day */ + wprintf(L"%.2ls", wds.names[i]); + + /* Full months */ + for (j = 0; j < count; j++) + printf("%-*s", + MW(mw, year[j].lines[i], + year[j].linelen[i]), year[j].lines[i]); + printf("\n"); } + + if (flag_weeks) { + printf(" "); + for (i = 0; i < count; i++) + printf("%-*s", mw, year[i].weeks); + printf("\n"); + } + + m += mpl; } + return; } void -mkmonth(int y, int m, int jd_flag, struct monthlines *mlines) +mkmonthr(int y, int m, int jd_flag, struct monthlines *mlines) { struct tm tm; /* for strftime printing local names of @@ -676,7 +717,8 @@ mkmonth(int y, int m, int jd_flag, struc for (i = 0; i != 7; i++) { l = 0; for (j = firstm + i, k = 0; j < last; j += 7, k += dw) { - if (j == today && (term_so != NULL && term_se != NULL)) { + if (j == today && + (term_so != NULL && term_se != NULL)) { l = strlen(term_so); if (jd_flag) dt.d = j - jan1 + 1; @@ -699,14 +741,14 @@ mkmonth(int y, int m, int jd_flag, struc if (jd_flag) dt.d = j - jan1 + 1; else - sdate(j, &dt); + sdater(j, &dt); memcpy(mlines->lines[i] + k + l, ds + dt.d * dw, dw); } else memcpy(mlines->lines[i] + k + l, " ", dw); } mlines->lines[i][k + l] = '\0'; - + mlines->linelen[i] = k; } /* fill the weeknumbers */ @@ -795,7 +837,8 @@ mkmonthb(int y, int m, int jd_flag, stru l = 0; for (j = firsts + 7 * i, k = 0; j < last && k != dw * 7; j++, k += dw) { - if (j == today && (term_so != NULL && term_se != NULL)) { + if (j == today && + (term_so != NULL && term_se != NULL)) { l = strlen(term_so); if (jd_flag) dt.d = j - jan1 + 1; @@ -870,9 +913,9 @@ firstday(int y, int m) dt.y = y; dt.m = m; dt.d = 1; - nd = sndays(&dt); + nd = sndaysr(&dt); for (;;) { - sdate(nd, &dt); + sdater(nd, &dt); if ((dt.m >= m && dt.y == y) || dt.y > y) return (nd); else @@ -886,7 +929,7 @@ firstday(int y, int m) * Julian to Gregorian if specified by the user. */ int -sndays(struct date *d) +sndaysr(struct date *d) { if (nswitch != 0) @@ -914,7 +957,7 @@ sndaysb(struct date *d) /* Inverse of sndays */ struct date * -sdate(int nd, struct date *d) +sdater(int nd, struct date *d) { if (nswitch < nd) @@ -938,7 +981,7 @@ sdateb(int nd, struct date *d) char * center(char *s, char *t, int w) { - char blanks[80]; + char blanks[MAX_WIDTH]; memset(blanks, ' ', sizeof(blanks)); sprintf(s, "%.*s%s", (int)(w - strlen(t)) / 2, blanks, t); @@ -949,7 +992,7 @@ center(char *s, char *t, int w) wchar_t * wcenter(wchar_t *s, wchar_t *t, int w) { - char blanks[80]; + char blanks[MAX_WIDTH]; memset(blanks, ' ', sizeof(blanks)); swprintf(s, MAX_WIDTH, L"%.*s%ls", (int)(w - wcslen(t)) / 2, blanks, t); From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 07:30:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71AD5106564A; Thu, 4 Mar 2010 07:30:09 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com [209.85.220.223]) by mx1.freebsd.org (Postfix) with ESMTP id A2F578FC16; Thu, 4 Mar 2010 07:30:08 +0000 (UTC) Received: by fxm23 with SMTP id 23so959650fxm.3 for ; Wed, 03 Mar 2010 23:30:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=xRfLFwt/MuPYK+idYudrvapsy7Le28gOXI8CemxUf68=; b=UM5JlJuInT3XBM3FS3F3gn/fPeZW7OjSm4cXZdmYN988mvNZuBK4G3IvmiM/XPTWkz HzJ5YUEeXip7Omp2ckcLWIpP/e7YherHq/zRwKDwKyw6iI5qfOP2jnSy81kv/uWKC6ys 0IHIkPl5t/2xhpSyIME9tF3AKGucBrV/Q5Ors= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=C92BytwuqBe/8Ypn/lCyuPEHlXS/XUkHltt4XaXv6aDWlw3it+9FL5lOX8ttaRzAf0 gdsbiowf+uf7W4QOtf5eUbv0YVf5dA/c95yPRFwccP0C8Rw5D332/zO0YMPneTGTnn97 FcJJGLjtrmIdpLxJ7JaDwuhEZCwZXQKNSK+KI= Received: by 10.223.100.216 with SMTP id z24mr2454036fan.5.1267687803637; Wed, 03 Mar 2010 23:30:03 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 16sm154993fxm.15.2010.03.03.23.30.01 (version=SSLv3 cipher=RC4-MD5); Wed, 03 Mar 2010 23:30:02 -0800 (PST) Sender: Alexander Motin Message-ID: <4B8F6177.1090703@FreeBSD.org> Date: Thu, 04 Mar 2010 09:29:59 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Scott Long References: <201003031758.o23HwfnD023194@svn.freebsd.org> <4B8EC54E.4050705@fsn.hu> <4B8EC9E0.6050703@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204648 - head/sys/dev/ciss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 07:30:09 -0000 Scott Long wrote: > On Mar 3, 2010, at 1:43 PM, Alexander Motin wrote: >> Attila Nagy wrote: >>> Alexander Motin wrote: >>>> Author: mav >>>> Date: Wed Mar 3 17:58:41 2010 >>>> New Revision: 204648 >>>> URL: http://svn.freebsd.org/changeset/base/204648 >>>> >>>> Log: >>>> Several changes to fix livelock under high load, introduced by r203489: >>>> - change the way in which command queue overflow is handled; >>>> - do not expose to CAM two command slots, used for driver's internal purposes; >>>> - allow driver to use up to 1024 command slots, instead of 256 before. >>>> >>> Thank you for hunting this bug down. Do you plan to increase the maximum >>> logical device limit as well? >> Not sure. I just have no idea why this limitation was enforced. Even if >> I personally don't see problems from increasing it, it would be nice if >> somebody more aware of this driver tell whether it is correct for all >> supported hardware. I just don't have any. Thank you for provided >> access. If nobody responds, we may try our luck in CURRENT. > > If you don't know, then please ask the people who maintain the code. For last two years CVS shows mostly you. And you are already here. So do you have some opinion? -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 09:56:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAC46106564A; Thu, 4 Mar 2010 09:56:18 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id 14F3A8FC23; Thu, 4 Mar 2010 09:56:17 +0000 (UTC) Received: by people.fsn.hu (Postfix, from userid 1001) id C73162273CE; Thu, 4 Mar 2010 10:56:15 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 19.7041] X-CRM114-CacheID: sfid-20100304_10561_B966C699 X-CRM114-Status: Good ( pR: 19.7041 ) Message-ID: <4B8F83BE.70101@fsn.hu> Date: Thu, 04 Mar 2010 10:56:14 +0100 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Alexander Motin References: <201003031758.o23HwfnD023194@svn.freebsd.org> <4B8EC54E.4050705@fsn.hu> <4B8EC9E0.6050703@FreeBSD.org> <4B8F6177.1090703@FreeBSD.org> In-Reply-To: <4B8F6177.1090703@FreeBSD.org> X-Stationery: 0.4.10 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (people.fsn.hu); Thu, 04 Mar 2010 10:56:14 +0100 (CET) Cc: svn-src-head@freebsd.org, Scott Long , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204648 - head/sys/dev/ciss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 09:56:18 -0000 Alexander Motin wrote: > Scott Long wrote: > >> On Mar 3, 2010, at 1:43 PM, Alexander Motin wrote: >> >>> Attila Nagy wrote: >>> >>>> Alexander Motin wrote: >>>> >>>>> Author: mav >>>>> Date: Wed Mar 3 17:58:41 2010 >>>>> New Revision: 204648 >>>>> URL: http://svn.freebsd.org/changeset/base/204648 >>>>> >>>>> Log: >>>>> Several changes to fix livelock under high load, introduced by r203489: >>>>> - change the way in which command queue overflow is handled; >>>>> - do not expose to CAM two command slots, used for driver's internal purposes; >>>>> - allow driver to use up to 1024 command slots, instead of 256 before. >>>>> >>>>> >>>> Thank you for hunting this bug down. Do you plan to increase the maximum >>>> logical device limit as well? >>>> >>> Not sure. I just have no idea why this limitation was enforced. Even if >>> I personally don't see problems from increasing it, it would be nice if >>> somebody more aware of this driver tell whether it is correct for all >>> supported hardware. I just don't have any. Thank you for provided >>> access. If nobody responds, we may try our luck in CURRENT. >>> >> If you don't know, then please ask the people who maintain the code. >> > > For last two years CVS shows mostly you. And you are already here. So do > you have some opinion? > I think 15 is too low in 2010 and it was even that in 2008 (first asked this question), when SAS controllers and ZFS became mainstream. Sad that HP doesn't really gives an option to work around these ancient RAID stuff with simple SAS HBAs in their blades. BTW, I'm also curious why there is such a limit there. Maybe not so relevant, but Linux seems to have a 1024 limit, hence works out of the box with external SAS boxes like MSA70 (25 disks per box) or MDS600 (70 disks per box). I hope you can make a compromise. :) Thanks, From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 10:59:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D51A7106566B; Thu, 4 Mar 2010 10:59:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2CAB8FC12; Thu, 4 Mar 2010 10:59:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24AxLGN052959; Thu, 4 Mar 2010 10:59:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24AxLKj052957; Thu, 4 Mar 2010 10:59:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003041059.o24AxLKj052957@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Mar 2010 10:59:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204704 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 10:59:21 -0000 Author: mav Date: Thu Mar 4 10:59:21 2010 New Revision: 204704 URL: http://svn.freebsd.org/changeset/base/204704 Log: Reflect added CAM ATA support. Modified: head/share/man/man4/scsi.4 Modified: head/share/man/man4/scsi.4 ============================================================================== --- head/share/man/man4/scsi.4 Thu Mar 4 10:57:52 2010 (r204703) +++ head/share/man/man4/scsi.4 Thu Mar 4 10:59:21 2010 (r204704) @@ -24,15 +24,15 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd October 15, 1998 -.Dt SCSI 4 +.Dd March 4, 2010 +.Dt CAM 4 .Os .Sh NAME -.Nm SCSI , .Nm CAM -.Nd CAM SCSI subsystem +.Nd Common Access Method SCSI/ATA subsystem .Sh SYNOPSIS .Cd "device scbus" +.Cd "device ada" .Cd "device cd" .Cd "device ch" .Cd "device da" @@ -49,31 +49,32 @@ .Cd "options SCSI_NO_OP_STRINGS" .Cd "options SCSI_DELAY=8000" .Sh DESCRIPTION -The CAM -.Tn SCSI +The +.Nm subsystem provides a uniform and modular system for the implementation of drivers to control various .Tn SCSI +and +.Tn ATA devices, and to utilize different .Tn SCSI +and +.Tn ATA host adapters through host adapter drivers. -When the system probes the -.Tn SCSI -busses, it attaches any devices it finds to the appropriate -drivers. +When the system probes busses, it attaches any devices it finds to the +appropriate drivers. The .Xr pass 4 -driver, if it is configured in the kernel, will attach to all -.Tn SCSI -devices. +driver, if it is configured in the kernel, will attach to all devices. .Sh KERNEL CONFIGURATION There are a number of generic kernel configuration options for the -CAM -.Tn SCSI +.Nm subsystem: .Bl -tag -width SCSI_NO_SENSE_STRINGS .It Dv CAMDEBUG -This option enables the CAM debugging printf code. +This option enables the +.Nm +debugging printf code. This will not actually cause any debugging information to be printed out when included by itself. Enabling printouts requires additional configuration. @@ -82,12 +83,11 @@ See below for details. This sets the maximum allowable number of concurrent "high power" commands. A "high power" command is a command that takes more electrical power than most to complete. -An example of this (and the only command currently -tagged as "high power") is the +An example of this is the .Tn SCSI START UNIT command. -Starting a SCSI disk often takes significantly more -electrical power than normal operation of the disk. +Starting a disk often takes significantly more electrical power than normal +operation. This option allows the user to specify how many concurrent high power commands may be outstanding without overloading the power supply on his computer. @@ -120,7 +120,9 @@ problems. This is the .Tn SCSI "bus settle delay." -In CAM, it is specified in +In +.Nm , +it is specified in .Em milliseconds , not seconds like the old .Tn SCSI @@ -148,7 +150,7 @@ In that case, the will be reset to 100ms. .El .Pp -All devices and the SCSI busses support boot time allocation so that +All devices and busses support dynamic allocation so that an upper number of devices and controllers does not need to be configured; .Cd "device da" will suffice for any number of disk drivers. @@ -204,7 +206,9 @@ hint.da.0.unit="0" This assigns .Em da0 to target 0, unit (lun) 0 of scbus 0. -Omitting the target or unit hints will instruct CAM to treat them as wildcards +Omitting the target or unit hints will instruct +.Nm +to treat them as wildcards and use the first respective counted instances. These examples can be combined together to allow a peripheral device to be wired to any particular controller, bus, target, and/or unit instance. @@ -221,7 +225,9 @@ The system allows common device drivers types of adapters. The adapters take requests from the upper layers and do all IO between the -.Em SCSI +.Tn SCSI +or +.Tn ATA bus and the system. The maximum size of a transfer is governed by the adapter. @@ -233,7 +239,8 @@ Some adapters support in which the system is capable of operating as a device, responding to operations initiated by another system. Target mode is supported for -some adapters, but is not yet complete for this version of the CAM +some adapters, but is not yet complete for this version of the +.Nm .Tn SCSI subsystem. .Sh FILES @@ -278,7 +285,9 @@ Users can enable debugging from their ke the following kernel config options: .Bl -tag -width CAM_DEBUG_TARGET .It Dv CAMDEBUG -This enables CAM debugging. +This enables +.Nm +debugging. Without this option, users will not even be able to turn on debugging from userland via .Xr camcontrol 8 . @@ -313,9 +322,12 @@ See .Xr camcontrol 8 for details. .Sh SEE ALSO +.Xr ada 4 , .Xr aha 4 , .Xr ahb 4 , .Xr ahc 4 , +.Xr ahci 4 , +.Xr ata 4 , .Xr bt 4 , .Xr cd 4 , .Xr ch 4 , @@ -326,15 +338,26 @@ for details. .Xr xpt 4 , .Xr camcontrol 8 .Sh HISTORY -The CAM +The +.Nm .Tn SCSI subsystem first appeared in .Fx 3.0 . +The +.Nm +ATA support was added in +.Fx 8.0 . .Sh AUTHORS .An -nosplit -The CAM +The +.Nm .Tn SCSI subsystem was written by .An Justin Gibbs and .An Kenneth Merry . +The +.Nm +.Tn ATA +support was added by +.An Alexander Motin Aq mav@FreeBSD.org . From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 11:09:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD801106566C; Thu, 4 Mar 2010 11:09:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B5E68FC16; Thu, 4 Mar 2010 11:09:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24B9nl9055436; Thu, 4 Mar 2010 11:09:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24B9nPO055426; Thu, 4 Mar 2010 11:09:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003041109.o24B9nPO055426@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Mar 2010 11:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204705 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 11:09:49 -0000 Author: mav Date: Thu Mar 4 11:09:49 2010 New Revision: 204705 URL: http://svn.freebsd.org/changeset/base/204705 Log: Add links to cam(4). Modified: head/share/man/man4/ada.4 head/share/man/man4/ahci.4 head/share/man/man4/cd.4 head/share/man/man4/ch.4 head/share/man/man4/da.4 head/share/man/man4/pass.4 head/share/man/man4/pt.4 head/share/man/man4/sa.4 head/share/man/man4/siis.4 Modified: head/share/man/man4/ada.4 ============================================================================== --- head/share/man/man4/ada.4 Thu Mar 4 10:59:21 2010 (r204704) +++ head/share/man/man4/ada.4 Thu Mar 4 11:09:49 2010 (r204705) @@ -127,6 +127,7 @@ ATA device nodes .Sh SEE ALSO .Xr ad 4 , .Xr ahci 4 , +.Xr cam 4 , .Xr da 4 , .Xr siis 4 .Sh HISTORY Modified: head/share/man/man4/ahci.4 ============================================================================== --- head/share/man/man4/ahci.4 Thu Mar 4 10:59:21 2010 (r204704) +++ head/share/man/man4/ahci.4 Thu Mar 4 11:09:49 2010 (r204705) @@ -139,10 +139,10 @@ such as JMicron JMB36x and Marvell 88SX6 .Sh SEE ALSO .Xr ada 4 , .Xr ata 4 , +.Xr cam 4 , .Xr cd 4 , .Xr da 4 , -.Xr sa 4 , -.Xr scsi 4 +.Xr sa 4 .Sh HISTORY The .Nm Modified: head/share/man/man4/cd.4 ============================================================================== --- head/share/man/man4/cd.4 Thu Mar 4 10:59:21 2010 (r204704) +++ head/share/man/man4/cd.4 Thu Mar 4 11:09:49 2010 (r204705) @@ -496,8 +496,8 @@ devices .Sh DIAGNOSTICS None. .Sh SEE ALSO +.Xr cam 4 , .Xr da 4 , -.Xr scsi 4 , .Xr disklabel 5 , .Xr disklabel 8 , .Xr cd 9 Modified: head/share/man/man4/ch.4 ============================================================================== --- head/share/man/man4/ch.4 Thu Mar 4 10:59:21 2010 (r204704) +++ head/share/man/man4/ch.4 Thu Mar 4 11:09:49 2010 (r204705) @@ -325,6 +325,7 @@ If the media changer does not support fe driver, it will produce both console error messages and failure return codes to the ioctls described here. .Sh SEE ALSO +.Xr cam 4 , .Xr chio 1 , .Xr cd 4 , .Xr da 4 , Modified: head/share/man/man4/da.4 ============================================================================== --- head/share/man/man4/da.4 Thu Mar 4 10:59:21 2010 (r204704) +++ head/share/man/man4/da.4 Thu Mar 4 11:09:49 2010 (r204705) @@ -196,6 +196,7 @@ SCSI disk device nodes None. .Sh SEE ALSO .Xr ad 4 , +.Xr cam 4 , .Xr geom 4 , .Xr bsdlabel 8 , .Xr fdisk 8 Modified: head/share/man/man4/pass.4 ============================================================================== --- head/share/man/man4/pass.4 Thu Mar 4 10:59:21 2010 (r204704) +++ head/share/man/man4/pass.4 Thu Mar 4 11:09:49 2010 (r204705) @@ -104,6 +104,7 @@ CAM subsystem. None. .Sh SEE ALSO .Xr cam 3 , +.Xr cam 4 , .Xr cam_cdbparse 3 , .Xr xpt 4 , .Xr camcontrol 8 Modified: head/share/man/man4/pt.4 ============================================================================== --- head/share/man/man4/pt.4 Thu Mar 4 10:59:21 2010 (r204704) +++ head/share/man/man4/pt.4 Thu Mar 4 11:09:49 2010 (r204705) @@ -84,7 +84,7 @@ the .Ar N Ns th processor device. .El .Sh SEE ALSO -.Xr scsi 4 +.Xr cam 4 .Sh HISTORY The .Nm Modified: head/share/man/man4/sa.4 ============================================================================== --- head/share/man/man4/sa.4 Thu Mar 4 10:59:21 2010 (r204704) +++ head/share/man/man4/sa.4 Thu Mar 4 11:09:49 2010 (r204705) @@ -200,8 +200,8 @@ accessing the device, e.g.). .Sh DIAGNOSTICS None. .Sh SEE ALSO -.Xr mt 1 , -.Xr scsi 4 +.Xr cam 4 , +.Xr mt 1 .Sh AUTHORS .An -nosplit The Modified: head/share/man/man4/siis.4 ============================================================================== --- head/share/man/man4/siis.4 Thu Mar 4 10:59:21 2010 (r204704) +++ head/share/man/man4/siis.4 Thu Mar 4 11:09:49 2010 (r204705) @@ -113,10 +113,10 @@ SiI3531 .Sh SEE ALSO .Xr ada 4 , .Xr ata 4 , +.Xr cam 4 , .Xr cd 4 , .Xr da 4 , -.Xr sa 4 , -.Xr scsi 4 +.Xr sa 4 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 11:47:05 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8D491065672; Thu, 4 Mar 2010 11:47:05 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 4D7968FC0A; Thu, 4 Mar 2010 11:47:05 +0000 (UTC) Received: from pooker.samsco.home (pooker.samsco.home [192.168.254.1]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o24Bkm5R001272; Thu, 4 Mar 2010 04:46:48 -0700 (MST) (envelope-from scottl@samsco.org) Date: Thu, 4 Mar 2010 04:46:48 -0700 (MST) From: Scott Long To: Ed Schouten In-Reply-To: <20100304053221.GL8200@hoeg.nl> Message-ID: <20100304044516.R1188@pooker.samsco.org> References: <200906152105.n5FL50Ju001949@svn.freebsd.org> <20100304053221.GL8200@hoeg.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 11:47:05 -0000 On Thu, 4 Mar 2010, Ed Schouten wrote: > * Scott Long wrote: >> I'd like to re-add the '-' modifier to the chflags command that you >> removed. > > Be my guest. As long as it's not done unconditionally. :-) > What do you mean by "unconditionally"? Most of the utilities that install themselves with 'chflags schg' do so by unconditionally ignoring errors. Chpass seems to be the only exception at the moment. Scott From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 11:47:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D306C1065673; Thu, 4 Mar 2010 11:47:13 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 39DF68FC19; Thu, 4 Mar 2010 11:47:12 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,580,1262559600"; d="scan'208";a="298198413" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER05.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 04 Mar 2010 12:47:11 +0100 Received: by ZIVMAILUSER05.UNI-MUENSTER.DE (Postfix, from userid 149459) id 28FED1B07E7; Thu, 4 Mar 2010 12:47:11 +0100 (CET) Date: Thu, 04 Mar 2010 12:47:10 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Edwin Groothuis Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204697 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 11:47:13 -0000 thanks. :) From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 12:02:52 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 450D4106568C; Thu, 4 Mar 2010 12:02:52 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id DBE6E8FC22; Thu, 4 Mar 2010 12:02:51 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id BDB871CCFB; Thu, 4 Mar 2010 13:02:50 +0100 (CET) Date: Thu, 4 Mar 2010 13:02:50 +0100 From: Ed Schouten To: Scott Long Message-ID: <20100304120250.GN8200@hoeg.nl> References: <200906152105.n5FL50Ju001949@svn.freebsd.org> <20100304053221.GL8200@hoeg.nl> <20100304044516.R1188@pooker.samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kg4mXnqz7C/eEpmA" Content-Disposition: inline In-Reply-To: <20100304044516.R1188@pooker.samsco.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 12:02:52 -0000 --Kg4mXnqz7C/eEpmA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Scott Long wrote: > What do you mean by "unconditionally"? Most of the utilities that > install themselves with 'chflags schg' do so by unconditionally > ignoring errors. Chpass seems to be the only exception at the > moment. No, I mean, don't set schg unconditionally. NO_FSCHG should still work afterwards. All applications currently honour this. If you create a FreeBSD jail and run `make installworld' a second time while inside the jail, this currently works, because there is not a single file which has schg set, which means `make installworld' can overwrite everything. Greetings, --=20 Ed Schouten WWW: http://80386.nl/ --Kg4mXnqz7C/eEpmA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuPoWoACgkQ52SDGA2eCwVtPgCfZM+uEXWsTjuWg4auU+TtyBi/ vzgAnR57tMqBFx/aFG6VslMUvuIA7LEt =0BrH -----END PGP SIGNATURE----- --Kg4mXnqz7C/eEpmA-- From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 12:14:29 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E4AE1065673; Thu, 4 Mar 2010 12:14:29 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0848FC22; Thu, 4 Mar 2010 12:14:28 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o24CENwi001628; Thu, 4 Mar 2010 05:14:23 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <20100304120250.GN8200@hoeg.nl> Date: Thu, 4 Mar 2010 05:14:23 -0700 Content-Transfer-Encoding: 7bit Message-Id: <20920CE7-2963-45F2-8D64-E36FBAAFE369@samsco.org> References: <200906152105.n5FL50Ju001949@svn.freebsd.org> <20100304053221.GL8200@hoeg.nl> <20100304044516.R1188@pooker.samsco.org> <20100304120250.GN8200@hoeg.nl> To: Ed Schouten X-Mailer: Apple Mail (2.1077) X-Spam-Status: No, score=-4.5 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 12:14:29 -0000 On Mar 4, 2010, at 5:02 AM, Ed Schouten wrote: > * Scott Long wrote: >> What do you mean by "unconditionally"? Most of the utilities that >> install themselves with 'chflags schg' do so by unconditionally >> ignoring errors. Chpass seems to be the only exception at the >> moment. > > No, I mean, don't set schg unconditionally. NO_FSCHG should still work > afterwards. All applications currently honour this. If you create a > FreeBSD jail and run `make installworld' a second time while inside the > jail, this currently works, because there is not a single file which has > schg set, which means `make installworld' can overwrite everything. > Does this look good? =================================================================== --- Makefile (revision 204639) +++ Makefile (working copy) @@ -43,7 +43,7 @@ .if !defined(NO_FSCHG) afterinstall: - chflags schg ${DESTDIR}${BINDIR}/chpass + -chflags schg ${DESTDIR}${BINDIR}/chpass .endif .include From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 12:18:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D0E11065752; Thu, 4 Mar 2010 12:18:25 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C5628FC19; Thu, 4 Mar 2010 12:18:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24CIOk7070542; Thu, 4 Mar 2010 12:18:24 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24CIO2M070540; Thu, 4 Mar 2010 12:18:24 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003041218.o24CIO2M070540@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 4 Mar 2010 12:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204706 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 12:18:25 -0000 Author: edwin Date: Thu Mar 4 12:18:24 2010 New Revision: 204706 URL: http://svn.freebsd.org/changeset/base/204706 Log: Remove no-op of WARNS?= Submitted by: Ulrich Sp??rlein Modified: head/usr.bin/ncal/Makefile Modified: head/usr.bin/ncal/Makefile ============================================================================== --- head/usr.bin/ncal/Makefile Thu Mar 4 11:09:49 2010 (r204705) +++ head/usr.bin/ncal/Makefile Thu Mar 4 12:18:24 2010 (r204706) @@ -4,7 +4,6 @@ PROG= ncal DPADD= ${LIBCALENDAR} ${LIBTERMCAP} LDADD= -lcalendar -ltermcap -WARNS?= 6 LINKS= ${BINDIR}/ncal ${BINDIR}/cal MLINKS= ncal.1 cal.1 From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 12:28:07 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11B50106566C; Thu, 4 Mar 2010 12:28:07 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id CA7B38FC23; Thu, 4 Mar 2010 12:28:06 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 414FD1CCFB; Thu, 4 Mar 2010 13:28:06 +0100 (CET) Date: Thu, 4 Mar 2010 13:28:06 +0100 From: Ed Schouten To: Scott Long Message-ID: <20100304122806.GP8200@hoeg.nl> References: <200906152105.n5FL50Ju001949@svn.freebsd.org> <20100304053221.GL8200@hoeg.nl> <20100304044516.R1188@pooker.samsco.org> <20100304120250.GN8200@hoeg.nl> <20920CE7-2963-45F2-8D64-E36FBAAFE369@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0whZnPlcuZ0HCwyD" Content-Disposition: inline In-Reply-To: <20920CE7-2963-45F2-8D64-E36FBAAFE369@samsco.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 12:28:07 -0000 --0whZnPlcuZ0HCwyD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Scott Long wrote: > On Mar 4, 2010, at 5:02 AM, Ed Schouten wrote: > > * Scott Long wrote: > >> What do you mean by "unconditionally"? Most of the utilities that > >> install themselves with 'chflags schg' do so by unconditionally > >> ignoring errors. Chpass seems to be the only exception at the > >> moment. > >=20 > > No, I mean, don't set schg unconditionally. NO_FSCHG should still work > > afterwards. All applications currently honour this. If you create a > > FreeBSD jail and run `make installworld' a second time while inside the > > jail, this currently works, because there is not a single file which has > > schg set, which means `make installworld' can overwrite everything. > >=20 >=20 > Does this look good? Sure! --=20 Ed Schouten WWW: http://80386.nl/ --0whZnPlcuZ0HCwyD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuPp1YACgkQ52SDGA2eCwVpQgCff1TyyXDW1Q3nbxxc1WJn2heD pS8AnjjI5raw+XrV5GNxRpG+g4PD0QGH =NBAX -----END PGP SIGNATURE----- --0whZnPlcuZ0HCwyD-- From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 12:31:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EDFC106564A; Thu, 4 Mar 2010 12:31:33 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from mail.vega.ru (mail.vega.ru [90.156.167.5]) by mx1.freebsd.org (Postfix) with ESMTP id 099808FC12; Thu, 4 Mar 2010 12:31:32 +0000 (UTC) Received: from [10.100.124.99] (helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1NnADC-000GFa-Ic; Thu, 04 Mar 2010 15:31:30 +0300 Date: Thu, 4 Mar 2010 15:31:17 +0300 From: Ruslan Ermilov To: Edwin Groothuis Message-ID: <20100304123116.GA33797@edoofus.dev.vega.ru> References: <201003040704.o2474Rct099846@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003040704.o2474Rct099846@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204697 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 12:31:33 -0000 Edwin, On Thu, Mar 04, 2010 at 07:04:27AM +0000, Edwin Groothuis wrote: > Author: edwin > Date: Thu Mar 4 07:04:27 2010 > New Revision: 204697 > URL: http://svn.freebsd.org/changeset/base/204697 > > Log: > - Implement -3 option (show previous, this and next month) option. > - Add -A option (months after this month). > - Add -B option (months before this month). > - Fix highlighting of today in year overview. > - Fix aligning of "foreign" characters. > > MFC after: 2 weeks - This breaks "cal -y". - All of the above options are missing from usage(). - Options -b and -d are missing from the manpage's SYNOPSIS. - "for debug the highlighting" can be spelled better. Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 12:35:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E57A81065670; Thu, 4 Mar 2010 12:35:20 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D528A8FC15; Thu, 4 Mar 2010 12:35:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24CZK37074263; Thu, 4 Mar 2010 12:35:20 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24CZKaj074261; Thu, 4 Mar 2010 12:35:20 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201003041235.o24CZKaj074261@svn.freebsd.org> From: Scott Long Date: Thu, 4 Mar 2010 12:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204707 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 12:35:21 -0000 Author: scottl Date: Thu Mar 4 12:35:20 2010 New Revision: 204707 URL: http://svn.freebsd.org/changeset/base/204707 Log: Let the afterinstall target ignore failures from running chflags. This allows it to work over NFS, and puts it back into conformance with other 'schg' utlitilties in the system. Reviewed by: ed Modified: head/usr.bin/chpass/Makefile Modified: head/usr.bin/chpass/Makefile ============================================================================== --- head/usr.bin/chpass/Makefile Thu Mar 4 12:18:24 2010 (r204706) +++ head/usr.bin/chpass/Makefile Thu Mar 4 12:35:20 2010 (r204707) @@ -43,7 +43,7 @@ beforeinstall: .if !defined(NO_FSCHG) afterinstall: - chflags schg ${DESTDIR}${BINDIR}/chpass + -chflags schg ${DESTDIR}${BINDIR}/chpass .endif .include From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 13:54:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C20F1065670; Thu, 4 Mar 2010 13:54:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3F7788FC17; Thu, 4 Mar 2010 13:54:19 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D021446B17; Thu, 4 Mar 2010 08:54:18 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id F20D28A01F; Thu, 4 Mar 2010 08:54:17 -0500 (EST) From: John Baldwin To: Pyun YongHyeon Date: Wed, 3 Mar 2010 17:19:09 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003031756.o23Huq7q022758@svn.freebsd.org> In-Reply-To: <201003031756.o23Huq7q022758@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003031719.09785.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 04 Mar 2010 08:54:18 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.0 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_12_24 autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204647 - head/sys/dev/mii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 13:54:19 -0000 On Wednesday 03 March 2010 12:56:52 pm Pyun YongHyeon wrote: > Author: yongari > Date: Wed Mar 3 17:56:52 2010 > New Revision: 204647 > URL: http://svn.freebsd.org/changeset/base/204647 > > Log: > Remove programming LED register and enable 25MHz TX clock for > 88E1149 PHY. This will fix intermittent watchdog timeouts as well > as very slow network performance on 88E8072 Yukon Extreme. Thanks, this has greatly improved the performance of this controller on my netbook. Previously, the wireless (using ndis) performed much better than the msk0 interface. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 16:07:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDDF2106566C; Thu, 4 Mar 2010 16:07:14 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3CC48FC12; Thu, 4 Mar 2010 16:07:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24G7EgP021309; Thu, 4 Mar 2010 16:07:14 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24G7EmZ021306; Thu, 4 Mar 2010 16:07:14 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201003041607.o24G7EmZ021306@svn.freebsd.org> From: Ulrich Spoerlein Date: Thu, 4 Mar 2010 16:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204710 - head/usr.sbin/mount_nwfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 16:07:14 -0000 Author: uqs Date: Thu Mar 4 16:07:14 2010 New Revision: 204710 URL: http://svn.freebsd.org/changeset/base/204710 Log: mount_nwfs(8): make WARNS=6 clean uid_t and gid_t are unsigned. While initializing them to -1 and later checking against -1 to see if they are still at their default usually works, introduce two new flags and stop the inband signalling. Approved by: ed (co-mentor) Modified: head/usr.sbin/mount_nwfs/Makefile head/usr.sbin/mount_nwfs/mount_nwfs.c Modified: head/usr.sbin/mount_nwfs/Makefile ============================================================================== --- head/usr.sbin/mount_nwfs/Makefile Thu Mar 4 15:54:06 2010 (r204709) +++ head/usr.sbin/mount_nwfs/Makefile Thu Mar 4 16:07:14 2010 (r204710) @@ -6,7 +6,6 @@ MAN= mount_nwfs.8 MOUNT= ${.CURDIR}/../../sbin/mount CFLAGS+= -DNWFS -I${MOUNT} -WARNS?= 0 .PATH: ${MOUNT} Modified: head/usr.sbin/mount_nwfs/mount_nwfs.c ============================================================================== --- head/usr.sbin/mount_nwfs/mount_nwfs.c Thu Mar 4 15:54:06 2010 (r204709) +++ head/usr.sbin/mount_nwfs/mount_nwfs.c Thu Mar 4 16:07:14 2010 (r204710) @@ -62,16 +62,19 @@ static int parsercfile(struct ncp_conn_l static struct mntopt mopts[] = { MOPT_STDOPTS, - { NULL } + MOPT_END }; -static int -parsercfile(struct ncp_conn_loginfo *li, struct nwfs_args *mdata) { +static int +parsercfile(struct ncp_conn_loginfo *li __unused, + struct nwfs_args *mdata __unused) +{ return 0; } int -main(int argc, char *argv[]) { +main(int argc, char *argv[]) +{ NWCONN_HANDLE connHandle; struct nwfs_args mdata; struct ncp_conn_loginfo li; @@ -80,6 +83,7 @@ main(int argc, char *argv[]) { struct tm *tm; time_t ltime; int opt, error, mntflags, nlsopt, wall_clock; + int uid_set, gid_set; size_t len; char *p, *p1, tmp[1024]; u_char *pv; @@ -100,7 +104,7 @@ main(int argc, char *argv[]) { mntflags = error = 0; bzero(&mdata,sizeof(mdata)); - mdata.uid = mdata.gid = -1; + gid_set = uid_set = 0; nlsopt = 0; if (ncp_li_init(&li, argc, argv)) return 1; @@ -182,6 +186,7 @@ main(int argc, char *argv[]) { if (pwd == NULL) errx(EX_NOUSER, "unknown user '%s'", optarg); mdata.uid = pwd->pw_uid; + uid_set = 1; break; } case 'g': { @@ -192,6 +197,7 @@ main(int argc, char *argv[]) { if (grp == NULL) errx(EX_NOUSER, "unknown group '%s'", optarg); mdata.gid = grp->gr_gid; + gid_set = 1; break; } case 'd': @@ -282,10 +288,10 @@ main(int argc, char *argv[]) { if (ncp_geteinfo(mount_point, &einfo) == 0) errx(EX_OSERR, "can't mount on %s twice", mount_point); - if (mdata.uid == -1) { + if (uid_set == 0) { mdata.uid = st.st_uid; } - if (mdata.gid == -1) { + if (gid_set == 0) { mdata.gid = st.st_gid; } if (mdata.file_mode == 0 ) { From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 16:08:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CD1610656C4; Thu, 4 Mar 2010 16:08:01 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D92B8FC08; Thu, 4 Mar 2010 16:08:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24G81Xg021543; Thu, 4 Mar 2010 16:08:01 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24G81FY021540; Thu, 4 Mar 2010 16:08:01 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201003041608.o24G81FY021540@svn.freebsd.org> From: Ulrich Spoerlein Date: Thu, 4 Mar 2010 16:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204711 - head/bin/ed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 16:08:01 -0000 Author: uqs Date: Thu Mar 4 16:08:01 2010 New Revision: 204711 URL: http://svn.freebsd.org/changeset/base/204711 Log: ed(1): make WARNS=6 clean Although argc and argv are never read after the longjmp is complete, gcc is not clever enough to see that and needlessly warns about it. So add volatile to silence the compiler. Approved by: ed (the co-mentor, not ed(1)) Modified: head/bin/ed/Makefile head/bin/ed/main.c Modified: head/bin/ed/Makefile ============================================================================== --- head/bin/ed/Makefile Thu Mar 4 16:07:14 2010 (r204710) +++ head/bin/ed/Makefile Thu Mar 4 16:08:01 2010 (r204711) @@ -4,7 +4,6 @@ PROG= ed SRCS= buf.c cbc.c glbl.c io.c main.c re.c sub.c undo.c -WARNS?= 2 LINKS= ${BINDIR}/ed ${BINDIR}/red MLINKS= ed.1 red.1 Modified: head/bin/ed/main.c ============================================================================== --- head/bin/ed/main.c Thu Mar 4 16:07:14 2010 (r204710) +++ head/bin/ed/main.c Thu Mar 4 16:08:01 2010 (r204711) @@ -103,15 +103,10 @@ const char usage[] = "usage: %s [-] [-sx /* ed: line editor */ int -main(int argc, char *argv[]) +main(volatile int argc, char ** volatile argv) { int c, n; long status = 0; -#if __GNUC__ - /* Avoid longjmp clobbering */ - (void) &argc; - (void) &argv; -#endif (void)setlocale(LC_ALL, ""); From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 16:08:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 276C3106564A; Thu, 4 Mar 2010 16:08:52 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1B3E8FC1A; Thu, 4 Mar 2010 16:08:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24G8pD8021749; Thu, 4 Mar 2010 16:08:51 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24G8p5k021747; Thu, 4 Mar 2010 16:08:51 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003041608.o24G8p5k021747@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 4 Mar 2010 16:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204712 - head/sbin/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 16:08:52 -0000 Author: luigi Date: Thu Mar 4 16:08:51 2010 New Revision: 204712 URL: http://svn.freebsd.org/changeset/base/204712 Log: remove stale comment Modified: head/sbin/ipfw/dummynet.c Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Thu Mar 4 16:08:01 2010 (r204711) +++ head/sbin/ipfw/dummynet.c Thu Mar 4 16:08:51 2010 (r204712) @@ -10,8 +10,6 @@ * * This software is provided ``AS IS'' without any warranties of any kind. * - * NEW command line interface for IP firewall facility - * * $FreeBSD$ * * dummynet support From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 16:52:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1938110656AC; Thu, 4 Mar 2010 16:52:27 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09A3A8FC23; Thu, 4 Mar 2010 16:52:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24GqQhL031559; Thu, 4 Mar 2010 16:52:26 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24GqQNk031557; Thu, 4 Mar 2010 16:52:26 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003041652.o24GqQNk031557@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 4 Mar 2010 16:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204713 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 16:52:27 -0000 Author: luigi Date: Thu Mar 4 16:52:26 2010 New Revision: 204713 URL: http://svn.freebsd.org/changeset/base/204713 Log: improve compatibility with RELENG_7.2 Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Thu Mar 4 16:08:51 2010 (r204712) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Thu Mar 4 16:52:26 2010 (r204713) @@ -1212,6 +1212,13 @@ convert_rule_to_7(struct ip_fw *rule) ccmdlen = F_LEN(ccmd); bcopy(ccmd, dst, F_LEN(ccmd)*sizeof(uint32_t)); + + if (dst->opcode > O_NAT) + /* O_REASS doesn't exists in 7.2 version, so + * decrement opcode if it is after O_REASS + */ + dst->opcode--; + if (ccmdlen > ll) { printf("ipfw: opcode %d size truncated\n", ccmd->opcode); @@ -1246,6 +1253,13 @@ convert_rule_to_8(struct ip_fw *rule) ccmdlen = F_LEN(ccmd); bcopy(ccmd, dst, F_LEN(ccmd)*sizeof(uint32_t)); + + if (dst->opcode > O_NAT) + /* O_REASS doesn't exists in 7.2 version, so + * increment opcode if it is after O_REASS + */ + dst->opcode++; + if (ccmdlen > ll) { printf("ipfw: opcode %d size truncated\n", ccmd->opcode); From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 16:53:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B2F51065675; Thu, 4 Mar 2010 16:53:39 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B7638FC29; Thu, 4 Mar 2010 16:53:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24GrcOr031863; Thu, 4 Mar 2010 16:53:39 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24GrcHb031861; Thu, 4 Mar 2010 16:53:38 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003041653.o24GrcHb031861@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 4 Mar 2010 16:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204714 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 16:53:39 -0000 Author: luigi Date: Thu Mar 4 16:53:38 2010 New Revision: 204714 URL: http://svn.freebsd.org/changeset/base/204714 Log: use callout_drain() (outside the lock) when unloading the module. This prevents a potential deadlock. Submitted by: Francesco Magno Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Thu Mar 4 16:52:26 2010 (r204713) +++ head/sys/netinet/ipfw/ip_dummynet.c Thu Mar 4 16:53:38 2010 (r204714) @@ -1690,8 +1690,8 @@ compute_space(struct dn_id *cmd, int *to * link, scheduler template, flowset * integrated in scheduler and header * for flowset list - * (NSI)*(dn_flow + dn_queue) all scheduler instance + one - * queue per instance + * (NSI)*(dn_flow) all scheduler instance (includes + * the queue instance) * - ipfw sched show * (NP/2)*(dn_link + dn_sch + dn_id + dn_fs) only half scheduler * link, scheduler template, flowset @@ -1708,11 +1708,13 @@ compute_space(struct dn_id *cmd, int *to default: return -1; /* XXX where do LINK and SCH differ ? */ + /* 'ipfw sched show' could list all queues associated to + * a scheduler. This feature for now is disabled + */ case DN_LINK: /* pipe show */ x = DN_C_LINK | DN_C_SCH | DN_C_FLOW; need += dn_cfg.schk_count * (sizeof(struct dn_fs) + profile_size) / 2; - need += dn_cfg.si_count * sizeof(struct dn_queue); need += dn_cfg.fsk_count * sizeof(uint32_t); break; case DN_SCH: /* sched show */ @@ -2072,11 +2074,12 @@ ip_dn_init(void) static void ip_dn_destroy(void) { + callout_drain(&dn_timeout); + DN_BH_WLOCK(); ip_dn_ctl_ptr = NULL; ip_dn_io_ptr = NULL; - callout_stop(&dn_timeout); dummynet_flush(); DN_BH_WUNLOCK(); taskqueue_drain(dn_tq, &dn_task); From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 16:54:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31063106566B; Thu, 4 Mar 2010 16:54:57 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21B048FC08; Thu, 4 Mar 2010 16:54:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24GsvCs032210; Thu, 4 Mar 2010 16:54:57 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24GsvCv032208; Thu, 4 Mar 2010 16:54:57 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003041654.o24GsvCv032208@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 4 Mar 2010 16:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204716 - head/sbin/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 16:54:57 -0000 Author: luigi Date: Thu Mar 4 16:54:56 2010 New Revision: 204716 URL: http://svn.freebsd.org/changeset/base/204716 Log: reduce diffs with the cross-platform version (windows needs some extra initialization) Modified: head/sbin/ipfw/main.c Modified: head/sbin/ipfw/main.c ============================================================================== --- head/sbin/ipfw/main.c Thu Mar 4 16:54:16 2010 (r204715) +++ head/sbin/ipfw/main.c Thu Mar 4 16:54:56 2010 (r204716) @@ -583,6 +583,20 @@ ipfw_readfile(int ac, char *av[]) int main(int ac, char *av[]) { +#if defined(_WIN32) && defined(TCC) + { + WSADATA wsaData; + int ret=0; + unsigned short wVersionRequested = MAKEWORD(2, 2); + ret = WSAStartup(wVersionRequested, &wsaData); + if (ret != 0) { + /* Tell the user that we could not find a usable */ + /* Winsock DLL. */ + printf("WSAStartup failed with error: %d\n", ret); + return 1; + } + } +#endif /* * If the last argument is an absolute pathname, interpret it * as a file to be preprocessed. From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 16:55:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76532106566B; Thu, 4 Mar 2010 16:55:32 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66DDE8FC0A; Thu, 4 Mar 2010 16:55:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24GtWbc032396; Thu, 4 Mar 2010 16:55:32 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24GtWI1032394; Thu, 4 Mar 2010 16:55:32 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003041655.o24GtWI1032394@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 4 Mar 2010 16:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204717 - head/sbin/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 16:55:32 -0000 Author: luigi Date: Thu Mar 4 16:55:32 2010 New Revision: 204717 URL: http://svn.freebsd.org/changeset/base/204717 Log: fix handling of sets Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Thu Mar 4 16:54:56 2010 (r204716) +++ head/sbin/ipfw/ipfw2.c Thu Mar 4 16:55:32 2010 (r204717) @@ -1625,13 +1625,21 @@ ipfw_sets_handler(char *av[]) if (av[0] == NULL) errx(EX_USAGE, "set needs command"); if (_substrcmp(*av, "show") == 0) { - void *data; + void *data = NULL; char const *msg; + int nalloc; - nbytes = sizeof(struct ip_fw); + nalloc = nbytes = sizeof(struct ip_fw); + while (nbytes >= nalloc) { + if (data) + free(data); + nalloc = nalloc * 2 + 200; + nbytes = nalloc; data = safe_calloc(1, nbytes); if (do_cmd(IP_FW_GET, data, (uintptr_t)&nbytes) < 0) err(EX_OSERR, "getsockopt(IP_FW_GET)"); + } + bcopy(&((struct ip_fw *)data)->next_rule, &set_disable, sizeof(set_disable)); @@ -1661,7 +1669,7 @@ ipfw_sets_handler(char *av[]) i = do_cmd(IP_FW_DEL, masks, sizeof(uint32_t)); } else if (_substrcmp(*av, "move") == 0) { av++; - if (!av[0] && _substrcmp(*av, "rule") == 0) { + if (av[0] && _substrcmp(*av, "rule") == 0) { cmd = 2; av++; } else @@ -1685,7 +1693,7 @@ ipfw_sets_handler(char *av[]) av++; masks[0] = masks[1] = 0; - while (!av[0]) { + while (av[0]) { if (isdigit(**av)) { i = atoi(*av); if (i < 0 || i > RESVD_SET) From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 16:56:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11705106566B; Thu, 4 Mar 2010 16:56:37 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01AB28FC17; Thu, 4 Mar 2010 16:56:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24GuaAB032662; Thu, 4 Mar 2010 16:56:36 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24GuaDO032660; Thu, 4 Mar 2010 16:56:36 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003041656.o24GuaDO032660@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 4 Mar 2010 16:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204718 - head/sbin/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 16:56:37 -0000 Author: luigi Date: Thu Mar 4 16:56:36 2010 New Revision: 204718 URL: http://svn.freebsd.org/changeset/base/204718 Log: make the listing of queues/pipes/schedulers handle the case of data size increasing while we fetch the info. Modified: head/sbin/ipfw/dummynet.c Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Thu Mar 4 16:55:32 2010 (r204717) +++ head/sbin/ipfw/dummynet.c Thu Mar 4 16:56:36 2010 (r204718) @@ -1241,8 +1241,8 @@ dummynet_flush(void) void dummynet_list(int ac, char *av[], int show_counters) { - struct dn_id oid, *x; - int ret, l = sizeof(oid); + struct dn_id oid, *x = NULL; + int ret, i, l = sizeof(oid); oid_fill(&oid, l, DN_CMD_GET, DN_API_VERSION); switch (co.do_pipe) { @@ -1256,14 +1256,29 @@ dummynet_list(int ac, char *av[], int sh oid.subtype = DN_SCH; /* list sched */ break; } + + /* Request the buffer size (in oid.id)*/ ret = do_cmd(-IP_DUMMYNET3, &oid, (uintptr_t)&l); // printf("%s returns %d need %d\n", __FUNCTION__, ret, oid.id); if (ret != 0 || oid.id <= sizeof(oid)) return; - l = oid.id; - x = safe_calloc(1, l); + + /* Try max 10 times + * Buffer is correct if l != 0. + * If l == 0 no buffer is sent, maybe because kernel requires + * a greater buffer, so try with the new size in x->id. + */ + for (i = 0, l = oid.id; i < 10; i++, l = x->id) { + x = safe_realloc(x, l); *x = oid; ret = do_cmd(-IP_DUMMYNET3, x, (uintptr_t)&l); + + if (ret != 0 || x->id <= sizeof(oid)) + return; + + if (l != 0) + break; /* ok */ + } // printf("%s returns %d need %d\n", __FUNCTION__, ret, oid.id); // XXX filter on ac, av list_pipes(x, O_NEXT(x, l)); From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 17:24:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9EE61065676; Thu, 4 Mar 2010 17:24:31 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B98088FC24; Thu, 4 Mar 2010 17:24:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24HOVt8038964; Thu, 4 Mar 2010 17:24:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24HOVXR038962; Thu, 4 Mar 2010 17:24:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003041724.o24HOVXR038962@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 4 Mar 2010 17:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204719 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 17:24:31 -0000 Author: nwhitehorn Date: Thu Mar 4 17:24:31 2010 New Revision: 204719 URL: http://svn.freebsd.org/changeset/base/204719 Log: Fix an obvious lock escape and fix a typo in a comment. Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Mar 4 16:56:36 2010 (r204718) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Mar 4 17:24:31 2010 (r204719) @@ -1664,8 +1664,10 @@ moea64_page_exists_quick(mmu_t mmu, pmap loops = 0; LOCK_TABLE(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { - if (pvo->pvo_pmap == pmap) + if (pvo->pvo_pmap == pmap) { + UNLOCK_TABLE(); return (TRUE); + } if (++loops >= 16) break; } @@ -2063,7 +2065,7 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z bootstrap = 1; } else { /* - * Note: drop the table around the UMA allocation in + * Note: drop the table lock around the UMA allocation in * case the UMA allocator needs to manipulate the page * table. The mapping we are working with is already * protected by the PMAP lock. From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 17:26:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7DB91065675; Thu, 4 Mar 2010 17:26:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 5C69F8FC1A; Thu, 4 Mar 2010 17:26:12 +0000 (UTC) Received: from c122-107-127-1.carlnfd1.nsw.optusnet.com.au (c122-107-127-1.carlnfd1.nsw.optusnet.com.au [122.107.127.1]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o24HQ9C9014554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Mar 2010 04:26:11 +1100 Date: Fri, 5 Mar 2010 04:26:10 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Garrett Cooper In-Reply-To: <38B3C45B-B617-413F-868C-A25E3651CA59@gmail.com> Message-ID: <20100305035406.I9077@delplex.bde.org> References: <201003040036.25583.max@love2party.net> <38B3C45B-B617-413F-868C-A25E3651CA59@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "svn-src-head@freebsd.org" , Max Laier , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh Subject: Re: svn commit: r204672 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 17:26:14 -0000 On Wed, 3 Mar 2010, Garrett Cooper wrote: > On Mar 3, 2010, at 3:36 PM, Max Laier wrote: > >> On Thursday 04 March 2010 00:25:53 Garrett Cooper wrote: >>> On Mar 3, 2010, at 1:53 PM, Warner Losh wrote: >>>> Author: imp >>>> Date: Wed Mar 3 21:53:25 2010 >>>> New Revision: 204672 >>>> URL: http://svn.freebsd.org/changeset/base/204672 >>>> >>>> Log: >>>> Cast these to intmax_t before printing to fix build bustage. Better >>>> solutions welcome. Better solutions sent in private mail (basically, don't use int64_t to hold small integers just because the expand_number() API is bad). >>> Use PRId64 from inttypes.h ? >> >> you just forgot to type ";)" there, didn't you? :-). > Eh, not really my intent TBH (although I guess my answer was pretty cheeky > looking back). > >> How are the PRI* macros >> better than an intmax_t cast? They reduce runtime bloat at a cost of source code size and ugliness bloat. They should never be used, except perhaps on systems with 16K RAM. Unfortunately, the corresponding macros for the scanf() family are sometimes useful, since more than a simple cast would be needed instead. Fortunately the scanf() family must never be used to scan integer variables from user-supplied strings, since it gives undefined behaviour on overflow, so scanf() is rarely useable. > In my opinion, the intmax_t cast and %j is >> the >> best, realistic solution for this. I have partitioned in the past that we >> change int64 types to "long long" on platforms with 64bit "long". That way >> you can print int64 types with "%ll" on all platforms. But casting to >> intmax >> is just as good and the compiler should be able to figure out what goes on >> and >> make it a no-op. You forgot to type ";)" in the past, didn't you? Depending on that would add another layer of bogusness here. The types were changed from int to int64_t to match the broken-as-designed API of expand_number() (it returns an int64_t indirectly, and it is convenient though sloppy to point it to the final variable, so as not to add range checking (though the necessary range check was nonexistent before). This API is broken since intmax_t is much more useful and easy to use than int64_t, but the API is limited to int64_t. It is also missing support for unsigned values. Anyway, with a non-broken API, but keeping the sloppy type changes, all the types would have changed to intmax_t and there would have been no problems with the printf formats provided they were changed to match (no casts needed for intmax_t). > Course it helps to read more dilligently too. It's fine today I suppose, but > pardoning my ignorance, are there any archs where in practice today, intmax_t > isn't synonymous with int64_t, like maybe some ARM variants? Not that I know of. But there are likely to be arches in practice tomorrow (I guess 20 years for normal practice) where intmax_t is larger than int64_t. Who knows what size long long will have then (it should have size -6 feet but will take longer than 20 years to get there). Why write broken code that will have to be changed every 10-20 years when normal type sizes change? Bruce From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 17:58:51 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEDFB1065674; Thu, 4 Mar 2010 17:58:51 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3208FC12; Thu, 4 Mar 2010 17:58:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o24Hs54K003416; Thu, 4 Mar 2010 10:54:05 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 04 Mar 2010 10:54:23 -0700 (MST) Message-Id: <20100304.105423.10150326159285427.imp@bsdimp.com> To: sobomax@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <4B8F3F4B.7020002@FreeBSD.org> References: <201003032153.o23LrQwl076528@svn.freebsd.org> <4B8F3F4B.7020002@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 17:58:52 -0000 In message: <4B8F3F4B.7020002@FreeBSD.org> Maxim Sobolev writes: : Warner Losh wrote: : > Author: imp : > Date: Wed Mar 3 21:53:25 2010 : > New Revision: 204672 : > URL: http://svn.freebsd.org/changeset/base/204672 : > Log: : > Cast these to intmax_t before printing to fix build bustage. Better : > solutions welcome. : : Thanks for a quick fix and sorry for the breakage. IMHO you fix's : fine, there is no real reason to use 64-bit quantity anyway, it's just : because expand_number(3) interface is not very well designed and : forces anyone using it stick with that data type. So downsizing from : 64-bit to 32-bit on platforms where intmax_t is 32-bit only (if any) : should not be an issue in real life. Yea, but as others have pointed out, this seems to point out that there's interface problems, and things have silently changed from needing to be int to needing to be int64_t, which breaks on i386... Warner From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 17:58:53 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14CFF106564A; Thu, 4 Mar 2010 17:58:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A757F8FC21; Thu, 4 Mar 2010 17:58:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o24HqlGm003412; Thu, 4 Mar 2010 10:52:47 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 04 Mar 2010 10:53:04 -0700 (MST) Message-Id: <20100304.105304.29649700129034.imp@bsdimp.com> To: scottl@samsco.org From: "M. Warner Losh" In-Reply-To: References: <200906152105.n5FL50Ju001949@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, ed@FreeBSD.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 17:58:53 -0000 In message: Scott Long writes: : Forcing the entire build to fail if chflags fails breaks installing : to an NFS destination. I haven't tested all possible permutations : of src vs dest filesystems mounting, but I don't see how it can : work over any type of NFS mount. What is the reason for forcing : this failure? The NO_FSCHG variable is undocumented, and the : failure mode here is pretty useless at helping the user fix the : problem. I'd like to re-add the '-' modifier to the chflags : command that you removed. NO_FSCHG variable has been around a long time, and is de-facto supported. It will be documented shortly when I get done cleaning up build(7). NO_FSCHG has been the documented way (in examples) for installing over NFS for a very long time. It looks to my eye like this change fixed a problem with that... Warner : : Scott : : On Jun 15, 2009, at 3:05 PM, Ed Schouten wrote: : : > Author: ed : > Date: Mon Jun 15 21:05:00 2009 : > New Revision: 194266 : > URL: http://svn.freebsd.org/changeset/base/194266 : > : > Log: : > Make the chpass Makefile honour NO_FSCHG. : > : > The chpass Makefile tried to set the fschg flag on the binaries, even if : > NO_FSCHG was passed to the installworld. This meant that if I installed : > FreeBSD into a Jail, I couldn't installworld from within the Jail : > anymore. : > : > Now that it listens to NO_FSCHG, we can just make it bail out when it : > fails, just like PRECIOUSPROG does. : > : > Modified: : > head/usr.bin/chpass/Makefile : > : > Modified: head/usr.bin/chpass/Makefile : > ============================================================================== : > --- head/usr.bin/chpass/Makefile Mon Jun 15 21:03:25 2009 (r194265) : > +++ head/usr.bin/chpass/Makefile Mon Jun 15 21:05:00 2009 (r194266) : > @@ -39,11 +39,12 @@ MLINKS+= chpass.1 ypchpass.1 chpass.1 yp : > : > beforeinstall: : > .for i in chpass chfn chsh ypchpass ypchfn ypchsh : > - [ ! -e ${DESTDIR}${BINDIR}/$i ] || \ : > - chflags noschg ${DESTDIR}${BINDIR}/$i || true : > + -chflags noschg ${DESTDIR}${BINDIR}/$i : > .endfor : > : > +.if !defined(NO_FSCHG) : > afterinstall: : > - -chflags schg ${DESTDIR}${BINDIR}/chpass : > + chflags schg ${DESTDIR}${BINDIR}/chpass : > +.endif : > : > .include : From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 18:43:03 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 071431065670; Thu, 4 Mar 2010 18:43:03 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id B41598FC13; Thu, 4 Mar 2010 18:43:02 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o24IgvYW003414; Thu, 4 Mar 2010 11:42:57 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <20100304.105304.29649700129034.imp@bsdimp.com> Date: Thu, 4 Mar 2010 11:42:57 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <9A8644AD-3B92-4BCE-8A51-132F8EA35F7D@samsco.org> References: <200906152105.n5FL50Ju001949@svn.freebsd.org> <20100304.105304.29649700129034.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1077) X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, ed@FreeBSD.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 18:43:03 -0000 On Mar 4, 2010, at 10:53 AM, M. Warner Losh wrote: >=20 > In message: > Scott Long writes: > : Forcing the entire build to fail if chflags fails breaks installing > : to an NFS destination. I haven't tested all possible permutations > : of src vs dest filesystems mounting, but I don't see how it can > : work over any type of NFS mount. What is the reason for forcing > : this failure? The NO_FSCHG variable is undocumented, and the > : failure mode here is pretty useless at helping the user fix the > : problem. I'd like to re-add the '-' modifier to the chflags > : command that you removed. >=20 > NO_FSCHG variable has been around a long time, and is de-facto > supported. It will be documented shortly when I get done cleaning up > build(7). >=20 > NO_FSCHG has been the documented way (in examples) for installing over > NFS for a very long time. It looks to my eye like this change fixed a > problem with that... >=20 > Warner >=20 > :=20 Every other base package that sets schg does so by allowing chflags to = silently fail. My change puts chpass back into conformance with the = status quo. Scott From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 18:51:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0567C106566B; Thu, 4 Mar 2010 18:51:28 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id F2D318FC1B; Thu, 4 Mar 2010 18:51:26 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,582,1262559600"; d="scan'208";a="298242506" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER05.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 04 Mar 2010 19:51:25 +0100 Received: by ZIVMAILUSER05.UNI-MUENSTER.DE (Postfix, from userid 149459) id E4EA71B07E7; Thu, 4 Mar 2010 19:51:24 +0100 (CET) Date: Thu, 04 Mar 2010 19:51:24 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Edwin Groothuis Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Ruslan Ermilov Subject: Re: svn commit: r204697 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 18:51:28 -0000 apart from the problems ruslan mentioned: * highlighting doesn't work with the -J option, though this problem was also present in ncal(1) < r204697. when using -j or -J -b highlighting works. cheers. alex From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 18:56:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF6F9106566B; Thu, 4 Mar 2010 18:56:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5FDEA8FC12; Thu, 4 Mar 2010 18:56:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o24Iqm6A004173; Thu, 4 Mar 2010 11:52:49 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 04 Mar 2010 11:53:05 -0700 (MST) Message-Id: <20100304.115305.769599705400649806.imp@bsdimp.com> To: scottl@samsco.org From: "M. Warner Losh" In-Reply-To: <9A8644AD-3B92-4BCE-8A51-132F8EA35F7D@samsco.org> References: <20100304.105304.29649700129034.imp@bsdimp.com> <9A8644AD-3B92-4BCE-8A51-132F8EA35F7D@samsco.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ed@freebsd.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 18:56:54 -0000 In message: <9A8644AD-3B92-4BCE-8A51-132F8EA35F7D@samsco.org> Scott Long writes: : On Mar 4, 2010, at 10:53 AM, M. Warner Losh wrote: : > : > In message: : > Scott Long writes: : > : Forcing the entire build to fail if chflags fails breaks installing : > : to an NFS destination. I haven't tested all possible permutations : > : of src vs dest filesystems mounting, but I don't see how it can : > : work over any type of NFS mount. What is the reason for forcing : > : this failure? The NO_FSCHG variable is undocumented, and the : > : failure mode here is pretty useless at helping the user fix the : > : problem. I'd like to re-add the '-' modifier to the chflags : > : command that you removed. : > : > NO_FSCHG variable has been around a long time, and is de-facto : > supported. It will be documented shortly when I get done cleaning up : > build(7). : > : > NO_FSCHG has been the documented way (in examples) for installing over : > NFS for a very long time. It looks to my eye like this change fixed a : > problem with that... : > : > Warner : > : > : : : Every other base package that sets schg does so by allowing chflags to silently fail. My change puts chpass back into conformance with the status quo. Well, maybe for chflags, but not for install. You still need NO_FSCHG if you are installing over NFS, with or without this change... Warner From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 19:14:13 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC874106566C; Thu, 4 Mar 2010 19:14:13 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 6907A8FC22; Thu, 4 Mar 2010 19:14:13 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o24JE7JL003572; Thu, 4 Mar 2010 12:14:07 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <20100304.115305.769599705400649806.imp@bsdimp.com> Date: Thu, 4 Mar 2010 12:14:07 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20100304.105304.29649700129034.imp@bsdimp.com> <9A8644AD-3B92-4BCE-8A51-132F8EA35F7D@samsco.org> <20100304.115305.769599705400649806.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1077) X-Spam-Status: No, score=-4.6 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, ed@FreeBSD.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 19:14:13 -0000 On Mar 4, 2010, at 11:53 AM, M. Warner Losh wrote: > In message: <9A8644AD-3B92-4BCE-8A51-132F8EA35F7D@samsco.org> > Scott Long writes: > : On Mar 4, 2010, at 10:53 AM, M. Warner Losh wrote: > : >=20 > : > In message: > : > Scott Long writes: > : > : Forcing the entire build to fail if chflags fails breaks = installing > : > : to an NFS destination. I haven't tested all possible = permutations > : > : of src vs dest filesystems mounting, but I don't see how it can > : > : work over any type of NFS mount. What is the reason for forcing > : > : this failure? The NO_FSCHG variable is undocumented, and the > : > : failure mode here is pretty useless at helping the user fix the > : > : problem. I'd like to re-add the '-' modifier to the chflags > : > : command that you removed. > : >=20 > : > NO_FSCHG variable has been around a long time, and is de-facto > : > supported. It will be documented shortly when I get done cleaning = up > : > build(7). > : >=20 > : > NO_FSCHG has been the documented way (in examples) for installing = over > : > NFS for a very long time. It looks to my eye like this change = fixed a > : > problem with that... > : >=20 > : > Warner > : >=20 > : > :=20 > :=20 > : Every other base package that sets schg does so by allowing chflags = to silently fail. My change puts chpass back into conformance with the = status quo. >=20 > Well, maybe for chflags, but not for install. You still need NO_FSCHG > if you are installing over NFS, with or without this change... >=20 What am I missing by not using it? Just a few minutes ago I did a = successful install over NFS on 9-current and 7-stable. Scott From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 19:26:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9193D106564A; Thu, 4 Mar 2010 19:26:32 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id 867B18FC12; Thu, 4 Mar 2010 19:26:31 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,582,1262559600"; d="scan'208";a="27602703" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 04 Mar 2010 20:26:30 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 19D401B0750; Thu, 4 Mar 2010 20:26:30 +0100 (CET) Date: Thu, 04 Mar 2010 20:26:29 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Alfred Perlstein Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 19:26:32 -0000 hi there, has "device gzio" now become a mandatory kernel option? if it has or if existing options now require "device gzio" it would be nice if you could document this (NOTES or/and UPDATING), because i don't have "options COMPRESS_USER_CORES" in my kernel conf, however when trying to compile a kernel without "device gzio" i'm getting: =2E.. cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=3Dnative -st= d=3Dc99 -O0 -pipe -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=3D8000 --param inline-unit-growth= =3D100 --param large-function-growth=3D1000 -fno-omit-frame-pointer -mcmodel=3Dke= rnel -mno-red-zone -mfpmath=3D387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3d= now -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protect= or vnode_if.c :> hack.c cc -shared -nostdlib hack.c -o hack.So rm -f hack.c MAKE=3Dmake sh /usr/src/sys/conf/newvers.sh ARUNDEL cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=3Dnative -st= d=3Dc99 -O0 -pipe -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=3D8000 --param inline-unit-growth= =3D100 --param large-function-growth=3D1000 -fno-omit-frame-pointer -mcmodel=3Dke= rnel -mno-red-zone -mfpmath=3D387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3d= now -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protect= or vers.c linking kernel.debug imgact_elf.o(.text+0x2509): In function `elf64_coredump': /usr/src/sys/kern/imgact_elf.c:1143: undefined reference to `gzclose' imgact_elf32.o(.text+0x22a0): In function `elf32_coredump': /usr/src/sys/kern/imgact_elf.c:1143: undefined reference to `gzclose' *** Error code 1 Stop in /usr/obj/usr/src/sys/ARUNDEL. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. here's my kernel conf: http://pastebin.com/1p3VsCPm cheers. alex From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 19:27:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52CB81065723; Thu, 4 Mar 2010 19:27:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E4FF98FC13; Thu, 4 Mar 2010 19:27:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o24JPp4e004588; Thu, 4 Mar 2010 12:25:51 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 04 Mar 2010 12:26:08 -0700 (MST) Message-Id: <20100304.122608.256787458627720292.imp@bsdimp.com> To: scottl@samsco.org From: "M. Warner Losh" In-Reply-To: References: <9A8644AD-3B92-4BCE-8A51-132F8EA35F7D@samsco.org> <20100304.115305.769599705400649806.imp@bsdimp.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ed@freebsd.org Subject: Re: svn commit: r194266 - head/usr.bin/chpass X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 19:27:08 -0000 In message: Scott Long writes: : On Mar 4, 2010, at 11:53 AM, M. Warner Losh wrote: : > In message: <9A8644AD-3B92-4BCE-8A51-132F8EA35F7D@samsco.org> : > Scott Long writes: : > : On Mar 4, 2010, at 10:53 AM, M. Warner Losh wrote: : > : > : > : > In message: : > : > Scott Long writes: : > : > : Forcing the entire build to fail if chflags fails breaks installing : > : > : to an NFS destination. I haven't tested all possible permutations : > : > : of src vs dest filesystems mounting, but I don't see how it can : > : > : work over any type of NFS mount. What is the reason for forcing : > : > : this failure? The NO_FSCHG variable is undocumented, and the : > : > : failure mode here is pretty useless at helping the user fix the : > : > : problem. I'd like to re-add the '-' modifier to the chflags : > : > : command that you removed. : > : > : > : > NO_FSCHG variable has been around a long time, and is de-facto : > : > supported. It will be documented shortly when I get done cleaning up : > : > build(7). : > : > : > : > NO_FSCHG has been the documented way (in examples) for installing over : > : > NFS for a very long time. It looks to my eye like this change fixed a : > : > problem with that... : > : > : > : > Warner : > : > : > : > : : > : : > : Every other base package that sets schg does so by allowing chflags to silently fail. My change puts chpass back into conformance with the status quo. : > : > Well, maybe for chflags, but not for install. You still need NO_FSCHG : > if you are installing over NFS, with or without this change... : > : : What am I missing by not using it? Just a few minutes ago I did a successful install over NFS on 9-current and 7-stable. Last night it failed for me when installing libraries.... Part of the problem was that they had been installed with schg when I'd built the tree on the local machine rather than my new remote machine... But it looks like this morning when I tried it to cut-and-paste the error, I can't find it with the -chflags change you made. So it looks like the need for flag for nfs installs has passed... Warner From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 19:38:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B3EA106566B; Thu, 4 Mar 2010 19:38:24 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4608E8FC1A; Thu, 4 Mar 2010 19:38:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24JcO6v068753; Thu, 4 Mar 2010 19:38:24 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24JcOD4068741; Thu, 4 Mar 2010 19:38:24 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003041938.o24JcOD4068741@svn.freebsd.org> From: Joel Dahl Date: Thu, 4 Mar 2010 19:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204725 - in head: lib/libc/posix1e sbin/geom/class/cache sbin/geom/class/mountver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 19:38:24 -0000 Author: joel (doc committer) Date: Thu Mar 4 19:38:24 2010 New Revision: 204725 URL: http://svn.freebsd.org/changeset/base/204725 Log: Use our standard license text. No more voices in the authors head. :-) Approved by: trasz Modified: head/lib/libc/posix1e/acl_add_flag_np.3 head/lib/libc/posix1e/acl_clear_flags_np.3 head/lib/libc/posix1e/acl_delete_flag_np.3 head/lib/libc/posix1e/acl_get_brand_np.3 head/lib/libc/posix1e/acl_get_entry_type_np.3 head/lib/libc/posix1e/acl_get_flag_np.3 head/lib/libc/posix1e/acl_get_flagset_np.3 head/lib/libc/posix1e/acl_set_entry_type_np.3 head/lib/libc/posix1e/acl_set_flagset_np.3 head/sbin/geom/class/cache/gcache.8 head/sbin/geom/class/mountver/gmountver.8 Modified: head/lib/libc/posix1e/acl_add_flag_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_add_flag_np.3 Thu Mar 4 19:35:22 2010 (r204724) +++ head/lib/libc/posix1e/acl_add_flag_np.3 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/lib/libc/posix1e/acl_clear_flags_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_clear_flags_np.3 Thu Mar 4 19:35:22 2010 (r204724) +++ head/lib/libc/posix1e/acl_clear_flags_np.3 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/lib/libc/posix1e/acl_delete_flag_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_delete_flag_np.3 Thu Mar 4 19:35:22 2010 (r204724) +++ head/lib/libc/posix1e/acl_delete_flag_np.3 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/lib/libc/posix1e/acl_get_brand_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_get_brand_np.3 Thu Mar 4 19:35:22 2010 (r204724) +++ head/lib/libc/posix1e/acl_get_brand_np.3 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/lib/libc/posix1e/acl_get_entry_type_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_get_entry_type_np.3 Thu Mar 4 19:35:22 2010 (r204724) +++ head/lib/libc/posix1e/acl_get_entry_type_np.3 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/lib/libc/posix1e/acl_get_flag_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_get_flag_np.3 Thu Mar 4 19:35:22 2010 (r204724) +++ head/lib/libc/posix1e/acl_get_flag_np.3 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/lib/libc/posix1e/acl_get_flagset_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_get_flagset_np.3 Thu Mar 4 19:35:22 2010 (r204724) +++ head/lib/libc/posix1e/acl_get_flagset_np.3 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/lib/libc/posix1e/acl_set_entry_type_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_set_entry_type_np.3 Thu Mar 4 19:35:22 2010 (r204724) +++ head/lib/libc/posix1e/acl_set_entry_type_np.3 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/lib/libc/posix1e/acl_set_flagset_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_set_flagset_np.3 Thu Mar 4 19:35:22 2010 (r204724) +++ head/lib/libc/posix1e/acl_set_flagset_np.3 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/sbin/geom/class/cache/gcache.8 ============================================================================== --- head/sbin/geom/class/cache/gcache.8 Thu Mar 4 19:35:22 2010 (r204724) +++ head/sbin/geom/class/cache/gcache.8 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/sbin/geom/class/mountver/gmountver.8 ============================================================================== --- head/sbin/geom/class/mountver/gmountver.8 Thu Mar 4 19:35:22 2010 (r204724) +++ head/sbin/geom/class/mountver/gmountver.8 Thu Mar 4 19:38:24 2010 (r204725) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 19:54:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B63911065678; Thu, 4 Mar 2010 19:54:10 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id A3ED18FC12; Thu, 4 Mar 2010 19:54:10 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id 5F0EE1A3CF5; Thu, 4 Mar 2010 11:54:05 -0800 (PST) Date: Thu, 4 Mar 2010 11:54:05 -0800 From: Alfred Perlstein To: Alexander Best Message-ID: <20100304195405.GG55658@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 19:54:10 -0000 I'm not sure how this happened, I tried compiling kernels with and without this option and was OK. There may have been something I overlooked or a last minute mistake. I am looking at this now. -Alfred * Alexander Best [100304 11:26] wrote: > hi there, > > has "device gzio" now become a mandatory kernel option? if it has or if > existing options now require "device gzio" it would be nice if you could > document this (NOTES or/and UPDATING), because i don't have > "options COMPRESS_USER_CORES" in my kernel conf, however when trying to > compile a kernel without "device gzio" i'm getting: > > ... > > cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=native -std=c99 > -O0 -pipe -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include > opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 > --param large-function-growth=1000 -fno-omit-frame-pointer -mcmodel=kernel > -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow > -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector > vnode_if.c > :> hack.c > cc -shared -nostdlib hack.c -o hack.So > rm -f hack.c > MAKE=make sh /usr/src/sys/conf/newvers.sh ARUNDEL > cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=native -std=c99 > -O0 -pipe -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include > opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 > --param large-function-growth=1000 -fno-omit-frame-pointer -mcmodel=kernel > -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow > -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector > vers.c > linking kernel.debug > imgact_elf.o(.text+0x2509): In function `elf64_coredump': > /usr/src/sys/kern/imgact_elf.c:1143: undefined reference to `gzclose' > imgact_elf32.o(.text+0x22a0): In function `elf32_coredump': > /usr/src/sys/kern/imgact_elf.c:1143: undefined reference to `gzclose' > *** Error code 1 > > Stop in /usr/obj/usr/src/sys/ARUNDEL. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. > > here's my kernel conf: http://pastebin.com/1p3VsCPm > > cheers. > alex -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 20:16:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F417A106566B; Thu, 4 Mar 2010 20:16:40 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-bw0-f228.google.com (mail-bw0-f228.google.com [209.85.218.228]) by mx1.freebsd.org (Postfix) with ESMTP id 073698FC12; Thu, 4 Mar 2010 20:16:39 +0000 (UTC) Received: by bwz28 with SMTP id 28so433872bwz.14 for ; Thu, 04 Mar 2010 12:16:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0bGLzxFqbV9zMueljdjK/DwSVx/YQleK65lPJOaxkM0=; b=LuUZmJvTaHDet+coYaCu6AxnOjuJjgHjnaqswWO5ltgsoaIMNzkJZLLp4HZKslfuuB Gr+2g+ESyCQ+73TpzwCU2dLzGbF6w7OsMLASa0i62YJynzk0jl62fcVFadeH0OnCOp+n 5gcrwu2jmLZWQOspTfiEYbMEkPCiIdWM6sF+g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Kp/d3QO8WljOYJ0/H+tYO1i8A/tBO3uT1XAlj42RzL2JXqWf8hXhZGPyqkYl6Koky0 2QYCBwVqcWr50R0Mqp3rtfyaPWsJ/F7V6o+bPQQ+BraHdMjZFuV1p6pnq3GLLVHwH0wH zwkfEXOyYyCFRGLD59uS+PhC1Mx329GXhUy04= MIME-Version: 1.0 Received: by 10.103.81.12 with SMTP id i12mr633135mul.89.1267733793772; Thu, 04 Mar 2010 12:16:33 -0800 (PST) In-Reply-To: <201003041938.o24JcOD4068741@svn.freebsd.org> References: <201003041938.o24JcOD4068741@svn.freebsd.org> Date: Thu, 4 Mar 2010 23:16:33 +0300 Message-ID: From: pluknet To: Joel Dahl Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204725 - in head: lib/libc/posix1e sbin/geom/class/cache sbin/geom/class/mountver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 20:16:41 -0000 On 4 March 2010 22:38, Joel Dahl wrote: > Author: joel (doc committer) > Date: Thu Mar =A04 19:38:24 2010 > New Revision: 204725 > URL: http://svn.freebsd.org/changeset/base/204725 > > Log: > =A0Use our standard license text. =A0No more voices in the authors head. = :-) > > =A0Approved by: =A0trasz > Just interesting, what about other 172 files (112 of them in sys/). --=20 wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 20:30:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1515C106566B; Thu, 4 Mar 2010 20:30:38 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id B8CE68FC13; Thu, 4 Mar 2010 20:30:37 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id A1EBFE3F087; Thu, 4 Mar 2010 21:30:36 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r0ZXUICTocbY; Thu, 4 Mar 2010 21:30:32 +0100 (CET) Received: from bubba.vnode.local (unknown [83.223.1.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id BDF53E3F085; Thu, 4 Mar 2010 21:30:29 +0100 (CET) Date: Thu, 4 Mar 2010 21:30:25 +0100 From: Joel Dahl To: pluknet Message-ID: <20100304203025.GA7160@bubba.vnode.local> References: <201003041938.o24JcOD4068741@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204725 - in head: lib/libc/posix1e sbin/geom/class/cache sbin/geom/class/mountver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 20:30:38 -0000 On 04-03-2010 23:16, pluknet wrote: > On 4 March 2010 22:38, Joel Dahl wrote: > > Author: joel (doc committer) > > Date: Thu Mar  4 19:38:24 2010 > > New Revision: 204725 > > URL: http://svn.freebsd.org/changeset/base/204725 > > > > Log: > >  Use our standard license text.  No more voices in the authors head. :-) > > > >  Approved by:  trasz > > > > Just interesting, what about other 172 files (112 of them in sys/). I've contacted most of the authors already and trasz@ was the first one to respond. -- Joel From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 20:31:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AEFC1065678; Thu, 4 Mar 2010 20:31:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F2C78FC25; Thu, 4 Mar 2010 20:31:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24KVnTe080910; Thu, 4 Mar 2010 20:31:49 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24KVnbj080908; Thu, 4 Mar 2010 20:31:49 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003042031.o24KVnbj080908@svn.freebsd.org> From: Warner Losh Date: Thu, 4 Mar 2010 20:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204731 - head/usr.sbin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 20:31:49 -0000 Author: imp Date: Thu Mar 4 20:31:49 2010 New Revision: 204731 URL: http://svn.freebsd.org/changeset/base/204731 Log: moused is useful even without usb, so remove comment asking if it is. Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Thu Mar 4 20:22:48 2010 (r204730) +++ head/usr.sbin/Makefile Thu Mar 4 20:31:49 2010 (r204731) @@ -302,7 +302,6 @@ _jls= jls .endif # XXX MK_SYSCONS -# XXX is moused w/ usb useful? .if ${MK_LEGACY_CONSOLE} != "no" _kbdcontrol= kbdcontrol _kbdmap= kbdmap From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 21:02:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AE841065673; Thu, 4 Mar 2010 21:02:00 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38E458FC18; Thu, 4 Mar 2010 21:02:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24L20Vx087804; Thu, 4 Mar 2010 21:02:00 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24L20Sp087802; Thu, 4 Mar 2010 21:02:00 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003042102.o24L20Sp087802@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 4 Mar 2010 21:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204735 - head/sys/netinet/ipfw/test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 21:02:00 -0000 Author: luigi Date: Thu Mar 4 21:01:59 2010 New Revision: 204735 URL: http://svn.freebsd.org/changeset/base/204735 Log: don't use keywords as variable names. Modified: head/sys/netinet/ipfw/test/mylist.h Modified: head/sys/netinet/ipfw/test/mylist.h ============================================================================== --- head/sys/netinet/ipfw/test/mylist.h Thu Mar 4 20:55:26 2010 (r204734) +++ head/sys/netinet/ipfw/test/mylist.h Thu Mar 4 21:01:59 2010 (r204735) @@ -13,19 +13,19 @@ struct list_head { #define INIT_LIST_HEAD(l) do { (l)->prev = (l)->next = (l); } while (0) #define list_empty(l) ( (l)->next == l ) static inline void -__list_add(struct list_head *new, struct list_head *prev, +__list_add(struct list_head *o, struct list_head *prev, struct list_head *next) { - next->prev = new; - new->next = next; - new->prev = prev; - prev->next = new; + next->prev = o; + o->next = next; + o->prev = prev; + prev->next = o; } static inline void -list_add_tail(struct list_head *new, struct list_head *head) +list_add_tail(struct list_head *o, struct list_head *head) { - __list_add(new, head->prev, head); + __list_add(o, head->prev, head); } #define list_first_entry(pL, ty, member) \ From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 21:12:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FBB6106566C; Thu, 4 Mar 2010 21:12:01 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from k7.mavetju.org (ppp113-58.static.internode.on.net [150.101.113.58]) by mx1.freebsd.org (Postfix) with ESMTP id A636C8FC08; Thu, 4 Mar 2010 21:12:00 +0000 (UTC) Received: by k7.mavetju.org (Postfix, from userid 1001) id 95F00451C2; Fri, 5 Mar 2010 08:10:43 +1100 (EST) Date: Fri, 5 Mar 2010 08:10:43 +1100 From: Edwin Groothuis To: Ruslan Ermilov Message-ID: <20100304211043.GE1761@mavetju.org> References: <201003040704.o2474Rct099846@svn.freebsd.org> <20100304123116.GA33797@edoofus.dev.vega.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100304123116.GA33797@edoofus.dev.vega.ru> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204697 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 21:12:01 -0000 On Thu, Mar 04, 2010 at 03:31:17PM +0300, Ruslan Ermilov wrote: > Edwin, > > On Thu, Mar 04, 2010 at 07:04:27AM +0000, Edwin Groothuis wrote: > > Author: edwin > > Date: Thu Mar 4 07:04:27 2010 > > New Revision: 204697 > > URL: http://svn.freebsd.org/changeset/base/204697 > > > > Log: > > - Implement -3 option (show previous, this and next month) option. > > - Add -A option (months after this month). > > - Add -B option (months before this month). > > - Fix highlighting of today in year overview. > > - Fix aligning of "foreign" characters. > > > > MFC after: 2 weeks > > - This breaks "cal -y". I see, thanks. > - All of the above options are missing from usage(). So many options, so many places, so many eyeballs :-) > - Options -b and -d are missing from the manpage's SYNOPSIS. > - "for debug the highlighting" can be spelled better. I will fix this all before the end of the weekend. Edwin -- Edwin Groothuis Website: http://www.mavetju.org/ edwin@mavetju.org Weblog: http://www.mavetju.org/weblog/ From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 21:52:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAABB106564A; Thu, 4 Mar 2010 21:52:40 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B89F08FC17; Thu, 4 Mar 2010 21:52:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24Lqe7L098954; Thu, 4 Mar 2010 21:52:40 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24Lqeee098951; Thu, 4 Mar 2010 21:52:40 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003042152.o24Lqeee098951@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 4 Mar 2010 21:52:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204736 - head/sys/netinet/ipfw/test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 21:52:40 -0000 Author: luigi Date: Thu Mar 4 21:52:40 2010 New Revision: 204736 URL: http://svn.freebsd.org/changeset/base/204736 Log: portability fixes Modified: head/sys/netinet/ipfw/test/dn_test.h head/sys/netinet/ipfw/test/test_dn_sched.c Modified: head/sys/netinet/ipfw/test/dn_test.h ============================================================================== --- head/sys/netinet/ipfw/test/dn_test.h Thu Mar 4 21:01:59 2010 (r204735) +++ head/sys/netinet/ipfw/test/dn_test.h Thu Mar 4 21:52:40 2010 (r204736) @@ -12,11 +12,9 @@ #include /* bzero, ffs, ... */ #include /* strcmp */ #include -#include #include #include - extern int debug; #define ND(fmt, args...) do {} while (0) #define D1(fmt, args...) do {} while (0) @@ -141,6 +139,10 @@ struct dn_alg { #endif +#ifndef __FreeBSD__ +int fls(int); +#endif + static inline void mq_append(struct mq *q, struct mbuf *m) { Modified: head/sys/netinet/ipfw/test/test_dn_sched.c ============================================================================== --- head/sys/netinet/ipfw/test/test_dn_sched.c Thu Mar 4 21:01:59 2010 (r204735) +++ head/sys/netinet/ipfw/test/test_dn_sched.c Thu Mar 4 21:52:40 2010 (r204736) @@ -74,3 +74,16 @@ ipdn_bound_var(int *v, int dflt, int lo, return *v; } +#ifndef __FreeBSD__ +int +fls(int mask) +{ + int bit; + + if (mask == 0) + return (0); + for (bit = 1; mask != 1; bit++) + mask = (unsigned int)mask >> 1; + return (bit); +} +#endif From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 21:53:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 663EB1065670; Thu, 4 Mar 2010 21:53:45 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5488B8FC0A; Thu, 4 Mar 2010 21:53:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24LrjEl099221; Thu, 4 Mar 2010 21:53:45 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24LrjGS099219; Thu, 4 Mar 2010 21:53:45 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201003042153.o24LrjGS099219@svn.freebsd.org> From: Alfred Perlstein Date: Thu, 4 Mar 2010 21:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204737 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 21:53:45 -0000 Author: alfred Date: Thu Mar 4 21:53:45 2010 New Revision: 204737 URL: http://svn.freebsd.org/changeset/base/204737 Log: put calls to gzclose() under ifdef COMPRESS_USER_CORES to prevent undefined symbols on kernels without this option. Reported by: Alexander Best Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Thu Mar 4 21:52:40 2010 (r204736) +++ head/sys/kern/imgact_elf.c Thu Mar 4 21:53:45 2010 (r204737) @@ -1136,11 +1136,11 @@ __elfN(coredump)(struct thread *td, stru #ifdef COMPRESS_USER_CORES done: -#endif if (core_buf) free(core_buf, M_TEMP); if (gzfile) gzclose(gzfile); +#endif free(hdr, M_TEMP); From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 21:54:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4449106566B; Thu, 4 Mar 2010 21:54:56 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id A221E8FC19; Thu, 4 Mar 2010 21:54:56 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id 610241A3D00; Thu, 4 Mar 2010 13:54:56 -0800 (PST) Date: Thu, 4 Mar 2010 13:54:56 -0800 From: Alfred Perlstein To: Alexander Best Message-ID: <20100304215456.GH55658@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 21:54:56 -0000 Ok, fix should be committed. * Alexander Best [100304 11:26] wrote: > hi there, > > has "device gzio" now become a mandatory kernel option? if it has or if > existing options now require "device gzio" it would be nice if you could > document this (NOTES or/and UPDATING), because i don't have > "options COMPRESS_USER_CORES" in my kernel conf, however when trying to > compile a kernel without "device gzio" i'm getting: > > ... > > cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=native -std=c99 > -O0 -pipe -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include > opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 > --param large-function-growth=1000 -fno-omit-frame-pointer -mcmodel=kernel > -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow > -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector > vnode_if.c > :> hack.c > cc -shared -nostdlib hack.c -o hack.So > rm -f hack.c > MAKE=make sh /usr/src/sys/conf/newvers.sh ARUNDEL > cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=native -std=c99 > -O0 -pipe -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include > opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 > --param large-function-growth=1000 -fno-omit-frame-pointer -mcmodel=kernel > -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow > -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector > vers.c > linking kernel.debug > imgact_elf.o(.text+0x2509): In function `elf64_coredump': > /usr/src/sys/kern/imgact_elf.c:1143: undefined reference to `gzclose' > imgact_elf32.o(.text+0x22a0): In function `elf32_coredump': > /usr/src/sys/kern/imgact_elf.c:1143: undefined reference to `gzclose' > *** Error code 1 > > Stop in /usr/obj/usr/src/sys/ARUNDEL. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. > > here's my kernel conf: http://pastebin.com/1p3VsCPm > > cheers. > alex -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 21:56:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0C081065670; Thu, 4 Mar 2010 21:56:58 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id D89DF8FC12; Thu, 4 Mar 2010 21:56:58 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id BCDBB1A3D00; Thu, 4 Mar 2010 13:56:58 -0800 (PST) Date: Thu, 4 Mar 2010 13:56:58 -0800 From: Alfred Perlstein To: Joel Dahl Message-ID: <20100304215658.GI55658@elvis.mu.org> References: <201003041938.o24JcOD4068741@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003041938.o24JcOD4068741@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204725 - in head: lib/libc/posix1e sbin/geom/class/cache sbin/geom/class/mountver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 21:56:59 -0000 Hahaha, Bill Paul. :) * Joel Dahl [100304 11:38] wrote: > Author: joel (doc committer) > Date: Thu Mar 4 19:38:24 2010 > New Revision: 204725 > URL: http://svn.freebsd.org/changeset/base/204725 > > Log: > Use our standard license text. No more voices in the authors head. :-) > > Approved by: trasz > > Modified: > head/lib/libc/posix1e/acl_add_flag_np.3 > head/lib/libc/posix1e/acl_clear_flags_np.3 > head/lib/libc/posix1e/acl_delete_flag_np.3 > head/lib/libc/posix1e/acl_get_brand_np.3 > head/lib/libc/posix1e/acl_get_entry_type_np.3 > head/lib/libc/posix1e/acl_get_flag_np.3 > head/lib/libc/posix1e/acl_get_flagset_np.3 > head/lib/libc/posix1e/acl_set_entry_type_np.3 > head/lib/libc/posix1e/acl_set_flagset_np.3 > head/sbin/geom/class/cache/gcache.8 > head/sbin/geom/class/mountver/gmountver.8 > > Modified: head/lib/libc/posix1e/acl_add_flag_np.3 > ============================================================================== > --- head/lib/libc/posix1e/acl_add_flag_np.3 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/lib/libc/posix1e/acl_add_flag_np.3 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" > > Modified: head/lib/libc/posix1e/acl_clear_flags_np.3 > ============================================================================== > --- head/lib/libc/posix1e/acl_clear_flags_np.3 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/lib/libc/posix1e/acl_clear_flags_np.3 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" > > Modified: head/lib/libc/posix1e/acl_delete_flag_np.3 > ============================================================================== > --- head/lib/libc/posix1e/acl_delete_flag_np.3 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/lib/libc/posix1e/acl_delete_flag_np.3 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" > > Modified: head/lib/libc/posix1e/acl_get_brand_np.3 > ============================================================================== > --- head/lib/libc/posix1e/acl_get_brand_np.3 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/lib/libc/posix1e/acl_get_brand_np.3 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" > > Modified: head/lib/libc/posix1e/acl_get_entry_type_np.3 > ============================================================================== > --- head/lib/libc/posix1e/acl_get_entry_type_np.3 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/lib/libc/posix1e/acl_get_entry_type_np.3 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" > > Modified: head/lib/libc/posix1e/acl_get_flag_np.3 > ============================================================================== > --- head/lib/libc/posix1e/acl_get_flag_np.3 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/lib/libc/posix1e/acl_get_flag_np.3 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" > > Modified: head/lib/libc/posix1e/acl_get_flagset_np.3 > ============================================================================== > --- head/lib/libc/posix1e/acl_get_flagset_np.3 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/lib/libc/posix1e/acl_get_flagset_np.3 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" > > Modified: head/lib/libc/posix1e/acl_set_entry_type_np.3 > ============================================================================== > --- head/lib/libc/posix1e/acl_set_entry_type_np.3 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/lib/libc/posix1e/acl_set_entry_type_np.3 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" > > Modified: head/lib/libc/posix1e/acl_set_flagset_np.3 > ============================================================================== > --- head/lib/libc/posix1e/acl_set_flagset_np.3 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/lib/libc/posix1e/acl_set_flagset_np.3 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" > > Modified: head/sbin/geom/class/cache/gcache.8 > ============================================================================== > --- head/sbin/geom/class/cache/gcache.8 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/sbin/geom/class/cache/gcache.8 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" > > Modified: head/sbin/geom/class/mountver/gmountver.8 > ============================================================================== > --- head/sbin/geom/class/mountver/gmountver.8 Thu Mar 4 19:35:22 2010 (r204724) > +++ head/sbin/geom/class/mountver/gmountver.8 Thu Mar 4 19:38:24 2010 (r204725) > @@ -14,14 +14,14 @@ > .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD 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. > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. > .\" > .\" $FreeBSD$ > .\" -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 22:01:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AA7C106564A; Thu, 4 Mar 2010 22:01:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1983D8FC13; Thu, 4 Mar 2010 22:01:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24M1BZ7001024; Thu, 4 Mar 2010 22:01:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24M1B2F001022; Thu, 4 Mar 2010 22:01:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003042201.o24M1B2F001022@svn.freebsd.org> From: Warner Losh Date: Thu, 4 Mar 2010 22:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204738 - head/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 22:01:12 -0000 Author: imp Date: Thu Mar 4 22:01:11 2010 New Revision: 204738 URL: http://svn.freebsd.org/changeset/base/204738 Log: Remove stale references to libkrb5. Rejigger the SUBDIR setting a smidge: we now set all the libraries that depend on something else, and then SUBDIR+= the rest. A separate commit will fix the SUBDIR style to be the same as the rest of the tree. Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu Mar 4 21:53:45 2010 (r204737) +++ head/lib/Makefile Thu Mar 4 22:01:11 2010 (r204738) @@ -9,8 +9,8 @@ # csu must be built before all shared libaries for ELF. # libc must be built before all other shared libraries. # libbsm must be built before ibauditd. -# libcom_err must be built before libkrb5 and libpam. -# libcrypt must be built before libkrb5 and libpam. +# libcom_err must be built before libpam. +# libcrypt must be built before libpam. # libkvm must be built before libdevstat. # msun must be built before libg++ and libstdc++. # libmd must be built before libatm, libopie, libradius, and libtacplus. @@ -26,15 +26,16 @@ # libgssapi must be built before librpcsec_gss # # Otherwise, the SUBDIR list should be in alphabetical order. +# +# Except it appears bind needs to be compiled last -SUBDIR= ${_csu} libc libbsm libauditd libcom_err libcrypt libelf libkvm msun \ - libmd \ - ncurses ${_libnetgraph} libradius librpcsvc libsbuf \ - libtacplus libutil ${_libypclnt} libalias libarchive \ - ${_libatm} libbegemot ${_libbluetooth} ${_libbsnmp} libbz2 \ - libcalendar libcam libcompat libdevinfo libdevstat libdisk \ - libdwarf libedit ${_libefi} libexpat libfetch libftpio libgeom \ - ${_libgpib} ${_libgssapi} ${_librpcsec_gss} libipsec \ +SUBDIR= ${_csu} libc libbsm libauditd libcom_err libcrypt libelf libkvm \ + msun libmd ncurses ${_libnetgraph} libradius librpcsvc libsbuf \ + libtacplus libutil ${_libypclnt} +SUBDIR+=libalias libarchive ${_libatm} libbegemot ${_libbluetooth} \ + ${_libbsnmp} libbz2 libcalendar libcam libcompat libdevinfo \ + libdevstat libdisk libdwarf libedit ${_libefi} libexpat libfetch \ + libftpio libgeom ${_libgpib} ${_libgssapi} ${_librpcsec_gss} libipsec \ ${_libipx} libjail libkiconv libmagic libmemstat ${_libmilter} \ ${_libmp} ${_libncp} ${_libngatm} libopie libpam libpcap \ ${_libpmc} libproc librt ${_libsdp} ${_libsm} ${_libsmb} \ From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 22:04:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 435D7106567E; Thu, 4 Mar 2010 22:04:09 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id 355808FC0A; Thu, 4 Mar 2010 22:04:08 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,583,1262559600"; d="scan'208";a="238307682" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 04 Mar 2010 23:04:06 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 802011B0768; Thu, 4 Mar 2010 23:04:06 +0100 (CET) Date: Thu, 04 Mar 2010 23:04:05 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Alfred Perlstein Message-ID: In-Reply-To: <20100304215456.GH55658@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 22:04:09 -0000 Alfred Perlstein schrieb am 2010-03-04: > Ok, fix should be committed. thanks for r204737. :) > * Alexander Best [100304 11:26] wrote: > > hi there, > > has "device gzio" now become a mandatory kernel option? if it has > > or if > > existing options now require "device gzio" it would be nice if you > > could > > document this (NOTES or/and UPDATING), because i don't have > > "options COMPRESS_USER_CORES" in my kernel conf, however when > > trying to > > compile a kernel without "device gzio" i'm getting: > > ... > > cc -c -O2 -frename-registers -pipe -fno-strict-aliasing > > -march=native -std=c99 > > -O0 -pipe -g -Wall -Wredundant-decls -Wnested-externs > > -Wstrict-prototypes > > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS > > -include > > opt_global.h -fno-common -finline-limit=8000 --param > > inline-unit-growth=100 > > --param large-function-growth=1000 -fno-omit-frame-pointer > > -mcmodel=kernel > > -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx > > -mno-3dnow > > -msoft-float -fno-asynchronous-unwind-tables -ffreestanding > > -fstack-protector > > vnode_if.c > > :> hack.c > > cc -shared -nostdlib hack.c -o hack.So > > rm -f hack.c > > MAKE=make sh /usr/src/sys/conf/newvers.sh ARUNDEL > > cc -c -O2 -frename-registers -pipe -fno-strict-aliasing > > -march=native -std=c99 > > -O0 -pipe -g -Wall -Wredundant-decls -Wnested-externs > > -Wstrict-prototypes > > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS > > -include > > opt_global.h -fno-common -finline-limit=8000 --param > > inline-unit-growth=100 > > --param large-function-growth=1000 -fno-omit-frame-pointer > > -mcmodel=kernel > > -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx > > -mno-3dnow > > -msoft-float -fno-asynchronous-unwind-tables -ffreestanding > > -fstack-protector > > vers.c > > linking kernel.debug > > imgact_elf.o(.text+0x2509): In function `elf64_coredump': > > /usr/src/sys/kern/imgact_elf.c:1143: undefined reference to > > `gzclose' > > imgact_elf32.o(.text+0x22a0): In function `elf32_coredump': > > /usr/src/sys/kern/imgact_elf.c:1143: undefined reference to > > `gzclose' > > *** Error code 1 > > Stop in /usr/obj/usr/src/sys/ARUNDEL. > > *** Error code 1 > > Stop in /usr/src. > > *** Error code 1 > > Stop in /usr/src. > > here's my kernel conf: http://pastebin.com/1p3VsCPm > > cheers. > > alex From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 22:06:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10E3A106564A; Thu, 4 Mar 2010 22:06:58 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0D9D8FC16; Thu, 4 Mar 2010 22:06:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o24M6vGm002486; Thu, 4 Mar 2010 22:06:57 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o24M6vrL002478; Thu, 4 Mar 2010 22:06:57 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003042206.o24M6vrL002478@svn.freebsd.org> From: Joel Dahl Date: Thu, 4 Mar 2010 22:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204739 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 22:06:58 -0000 Author: joel (doc committer) Date: Thu Mar 4 22:06:57 2010 New Revision: 204739 URL: http://svn.freebsd.org/changeset/base/204739 Log: Use our preferred license text (no more "voices in his head"). While here, also move to a 2-clause license. From n_hibma@: "The 3rd clause was originally there for a reason, but I guess that it is safe to assume that no one can assume endorsement by me or anyone else without prior consent on anything really, so we might as well remove that clause." Approved by: n_hibma Modified: head/share/man/man4/ohci.4 head/share/man/man4/udbp.4 head/share/man/man4/uhci.4 head/share/man/man4/ukbd.4 head/share/man/man4/umass.4 head/share/man/man4/ums.4 head/share/man/man4/usb.4 Modified: head/share/man/man4/ohci.4 ============================================================================== --- head/share/man/man4/ohci.4 Thu Mar 4 22:01:11 2010 (r204738) +++ head/share/man/man4/ohci.4 Thu Mar 4 22:06:57 2010 (r204739) @@ -9,21 +9,18 @@ .\" 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. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD -.\" 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/share/man/man4/udbp.4 ============================================================================== --- head/share/man/man4/udbp.4 Thu Mar 4 22:01:11 2010 (r204738) +++ head/share/man/man4/udbp.4 Thu Mar 4 22:06:57 2010 (r204739) @@ -9,21 +9,18 @@ .\" 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. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD -.\" 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/share/man/man4/uhci.4 ============================================================================== --- head/share/man/man4/uhci.4 Thu Mar 4 22:01:11 2010 (r204738) +++ head/share/man/man4/uhci.4 Thu Mar 4 22:06:57 2010 (r204739) @@ -9,21 +9,18 @@ .\" 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. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD -.\" 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/share/man/man4/ukbd.4 ============================================================================== --- head/share/man/man4/ukbd.4 Thu Mar 4 22:01:11 2010 (r204738) +++ head/share/man/man4/ukbd.4 Thu Mar 4 22:06:57 2010 (r204739) @@ -9,21 +9,18 @@ .\" 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. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD -.\" 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/share/man/man4/umass.4 ============================================================================== --- head/share/man/man4/umass.4 Thu Mar 4 22:01:11 2010 (r204738) +++ head/share/man/man4/umass.4 Thu Mar 4 22:06:57 2010 (r204739) @@ -9,21 +9,18 @@ .\" 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. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD -.\" 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/share/man/man4/ums.4 ============================================================================== --- head/share/man/man4/ums.4 Thu Mar 4 22:01:11 2010 (r204738) +++ head/share/man/man4/ums.4 Thu Mar 4 22:06:57 2010 (r204739) @@ -9,21 +9,18 @@ .\" 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. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD -.\" 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" Modified: head/share/man/man4/usb.4 ============================================================================== --- head/share/man/man4/usb.4 Thu Mar 4 22:01:11 2010 (r204738) +++ head/share/man/man4/usb.4 Thu Mar 4 22:06:57 2010 (r204739) @@ -1,30 +1,4 @@ -.\" Copyright (c) 1997, 1998 -.\" Nick Hibma . 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. -.\" 3. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA 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 NICK HIBMA OR THE VOICES IN HIS HEAD -.\" 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. -.\" +.\" Copyright (c) 1997, 1998 Nick Hibma .\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without From owner-svn-src-head@FreeBSD.ORG Thu Mar 4 22:16:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2A46106566B; Thu, 4 Mar 2010 22:16:38 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id D04B18FC0A; Thu, 4 Mar 2010 22:16:38 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id 932351A3C4B; Thu, 4 Mar 2010 14:16:38 -0800 (PST) Date: Thu, 4 Mar 2010 14:16:38 -0800 From: Alfred Perlstein To: Alexander Best Message-ID: <20100304221638.GJ55658@elvis.mu.org> References: <20100304215456.GH55658@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204552 - in head/sys: conf kern net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 22:16:39 -0000 * Alexander Best [100304 14:04] wrote: > Alfred Perlstein schrieb am 2010-03-04: > > Ok, fix should be committed. > > thanks for r204737. :) Meh, should have never broke it in the first place, not sure how it slipped by as I was compiling both a with and w/o kernel at the same time... thanks for the polite poke. :) -Alfred > > > * Alexander Best [100304 11:26] wrote: > > > hi there, > > > > has "device gzio" now become a mandatory kernel option? if it has > > > or if > > > existing options now require "device gzio" it would be nice if you > > > could > > > document this (NOTES or/and UPDATING), because i don't have > > > "options COMPRESS_USER_CORES" in my kernel conf, however when > > > trying to > > > compile a kernel without "device gzio" i'm getting: > > > > ... > > > > cc -c -O2 -frename-registers -pipe -fno-strict-aliasing > > > -march=native -std=c99 > > > -O0 -pipe -g -Wall -Wredundant-decls -Wnested-externs > > > -Wstrict-prototypes > > > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > > > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > > > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS > > > -include > > > opt_global.h -fno-common -finline-limit=8000 --param > > > inline-unit-growth=100 > > > --param large-function-growth=1000 -fno-omit-frame-pointer > > > -mcmodel=kernel > > > -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx > > > -mno-3dnow > > > -msoft-float -fno-asynchronous-unwind-tables -ffreestanding > > > -fstack-protector > > > vnode_if.c > > > :> hack.c > > > cc -shared -nostdlib hack.c -o hack.So > > > rm -f hack.c > > > MAKE=make sh /usr/src/sys/conf/newvers.sh ARUNDEL > > > cc -c -O2 -frename-registers -pipe -fno-strict-aliasing > > > -march=native -std=c99 > > > -O0 -pipe -g -Wall -Wredundant-decls -Wnested-externs > > > -Wstrict-prototypes > > > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > > > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > > > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS > > > -include > > > opt_global.h -fno-common -finline-limit=8000 --param > > > inline-unit-growth=100 > > > --param large-function-growth=1000 -fno-omit-frame-pointer > > > -mcmodel=kernel > > > -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx > > > -mno-3dnow > > > -msoft-float -fno-asynchronous-unwind-tables -ffreestanding > > > -fstack-protector > > > vers.c > > > linking kernel.debug > > > imgact_elf.o(.text+0x2509): In function `elf64_coredump': > > > /usr/src/sys/kern/imgact_elf.c:1143: undefined reference to > > > `gzclose' > > > imgact_elf32.o(.text+0x22a0): In function `elf32_coredump': > > > /usr/src/sys/kern/imgact_elf.c:1143: undefined reference to > > > `gzclose' > > > *** Error code 1 > > > > Stop in /usr/obj/usr/src/sys/ARUNDEL. > > > *** Error code 1 > > > > Stop in /usr/src. > > > *** Error code 1 > > > > Stop in /usr/src. > > > > here's my kernel conf: http://pastebin.com/1p3VsCPm > > > > cheers. > > > alex -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 00:41:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4911106566B for ; Fri, 5 Mar 2010 00:41:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 7666D8FC16 for ; Fri, 5 Mar 2010 00:41:21 +0000 (UTC) Received: (qmail 19481 invoked by uid 399); 5 Mar 2010 00:41:20 -0000 Received: from localhost (HELO ?192.168.0.145?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 5 Mar 2010 00:41:20 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B90532E.2000700@FreeBSD.org> Date: Thu, 04 Mar 2010 16:41:18 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Warner Losh References: <201003042201.o24M1B2F001022@svn.freebsd.org> In-Reply-To: <201003042201.o24M1B2F001022@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204738 - head/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 00:41:22 -0000 On 3/4/2010 2:01 PM, Warner Losh wrote: > Author: imp > Date: Thu Mar 4 22:01:11 2010 > New Revision: 204738 > URL: http://svn.freebsd.org/changeset/base/204738 > > Log: > Remove stale references to libkrb5. > Rejigger the SUBDIR setting a smidge: we now set all the libraries that depend > on something else, and then SUBDIR+= the rest. > +# Except it appears bind needs to be compiled last I'm not arguing, just curious ... how did you come to this conclusion, and is this a problem that needs to be solved? I could certainly understand why it might be true, the BIND libs pull in a lot of stuff. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 00:57:25 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17481106566B; Fri, 5 Mar 2010 00:57:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 981128FC14; Fri, 5 Mar 2010 00:57:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o250p1lN007860; Thu, 4 Mar 2010 17:51:01 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 04 Mar 2010 17:51:19 -0700 (MST) Message-Id: <20100304.175119.914206331825746882.imp@bsdimp.com> To: dougb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <4B90532E.2000700@FreeBSD.org> References: <201003042201.o24M1B2F001022@svn.freebsd.org> <4B90532E.2000700@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r204738 - head/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 00:57:25 -0000 In message: <4B90532E.2000700@FreeBSD.org> Doug Barton writes: : On 3/4/2010 2:01 PM, Warner Losh wrote: : > Author: imp : > Date: Thu Mar 4 22:01:11 2010 : > New Revision: 204738 : > URL: http://svn.freebsd.org/changeset/base/204738 : > : > Log: : > Remove stale references to libkrb5. : > Rejigger the SUBDIR setting a smidge: we now set all the libraries : > that depend : > on something else, and then SUBDIR+= the rest. : : > +# Except it appears bind needs to be compiled last : : I'm not arguing, just curious ... how did you come to this conclusion, : and is this a problem that needs to be solved? I could certainly : understand why it might be true, the BIND libs pull in a lot of stuff. Purely by it being built last today, out of alphabetical order. I've not had time to investigate more fully... Since I'll be rearranging things a little for some other work I'm doing, I'll see if I can find out if it is true, and if so what the dependencies are and document them here. Warner From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 01:12:59 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9212A106566C for ; Fri, 5 Mar 2010 01:12:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id C11298FC18 for ; Fri, 5 Mar 2010 01:12:58 +0000 (UTC) Received: (qmail 28425 invoked by uid 399); 5 Mar 2010 01:12:57 -0000 Received: from localhost (HELO ?192.168.0.145?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 5 Mar 2010 01:12:57 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B905A97.7070107@FreeBSD.org> Date: Thu, 04 Mar 2010 17:12:55 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: "M. Warner Losh" References: <201003042201.o24M1B2F001022@svn.freebsd.org> <4B90532E.2000700@FreeBSD.org> <20100304.175119.914206331825746882.imp@bsdimp.com> In-Reply-To: <20100304.175119.914206331825746882.imp@bsdimp.com> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r204738 - head/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 01:12:59 -0000 On 3/4/2010 4:51 PM, M. Warner Losh wrote: > In message:<4B90532E.2000700@FreeBSD.org> > Doug Barton writes: > : On 3/4/2010 2:01 PM, Warner Losh wrote: > :> Author: imp > :> Date: Thu Mar 4 22:01:11 2010 > :> New Revision: 204738 > :> URL: http://svn.freebsd.org/changeset/base/204738 > :> > :> Log: > :> Remove stale references to libkrb5. > :> Rejigger the SUBDIR setting a smidge: we now set all the libraries > :> that depend > :> on something else, and then SUBDIR+= the rest. > : > :> +# Except it appears bind needs to be compiled last > : > : I'm not arguing, just curious ... how did you come to this conclusion, > : and is this a problem that needs to be solved? I could certainly > : understand why it might be true, the BIND libs pull in a lot of stuff. > > Purely by it being built last today, out of alphabetical order. I've > not had time to investigate more fully... Since I'll be rearranging > things a little for some other work I'm doing, I'll see if I can find > out if it is true, and if so what the dependencies are and document > them here. Sounds good, let me know if there is anything I can do to help. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 03:37:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B197A106564A; Fri, 5 Mar 2010 03:37:42 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0C1B8FC13; Fri, 5 Mar 2010 03:37:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o253bgef077104; Fri, 5 Mar 2010 03:37:42 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o253bgnp077102; Fri, 5 Mar 2010 03:37:42 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201003050337.o253bgnp077102@svn.freebsd.org> From: Maxim Sobolev Date: Fri, 5 Mar 2010 03:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204748 - head/sys/dev/ispfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 03:37:42 -0000 Author: sobomax Date: Fri Mar 5 03:37:42 2010 New Revision: 204748 URL: http://svn.freebsd.org/changeset/base/204748 Log: Don't spam dmesg with "registered firmware ..." when module is compiled into kernel, unless there is a verbose boot flag set. There is no real need to have this information printed. MFC after: 1 week Modified: head/sys/dev/ispfw/ispfw.c Modified: head/sys/dev/ispfw/ispfw.c ============================================================================== --- head/sys/dev/ispfw/ispfw.c Fri Mar 5 02:52:23 2010 (r204747) +++ head/sys/dev/ispfw/ispfw.c Fri Mar 5 03:37:42 2010 (r204748) @@ -142,6 +142,13 @@ static int isp_2500_multi_loaded; #endif #define ISPFW_VERSION 1 + +#if !defined(KLD_MODULE) +#define ISPFW_KLD 0 +#else +#define ISPFW_KLD 1 +#endif + #define RMACRO(token) do { \ if (token##_loaded) \ break; \ @@ -153,7 +160,9 @@ static int isp_2500_multi_loaded; break; \ } \ token##_loaded++; \ - printf("%s: registered firmware <%s>\n", MODULE_NAME, #token); \ + if (bootverbose || ISPFW_KLD) \ + printf("%s: registered firmware <%s>\n", MODULE_NAME, \ + #token); \ } while (0) #define UMACRO(token) do { \ @@ -165,7 +174,9 @@ static int isp_2500_multi_loaded; break; \ } \ token##_loaded--; \ - printf("%s: unregistered firmware <%s>\n", MODULE_NAME, #token);\ + if (bootverbose || ISPFW_KLD) \ + printf("%s: unregistered firmware <%s>\n", MODULE_NAME, \ + #token); \ } while (0) static void From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 11:11:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 989A31065670; Fri, 5 Mar 2010 11:11:42 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A52C8FC08; Fri, 5 Mar 2010 11:11:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25BBgco079320; Fri, 5 Mar 2010 11:11:42 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25BBgtE079318; Fri, 5 Mar 2010 11:11:42 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201003051111.o25BBgtE079318@svn.freebsd.org> From: Takahashi Yoshihiro Date: Fri, 5 Mar 2010 11:11:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204753 - head/sys/pc98/cbus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 11:11:42 -0000 Author: nyan Date: Fri Mar 5 11:11:42 2010 New Revision: 204753 URL: http://svn.freebsd.org/changeset/base/204753 Log: MFx86: the part of r204641 In order to do that cleanly, lapic_setup_clock(), on both ia32 and amd64, now accepts as arguments the desired sources to handle, and returns the actual ones (LAPIC_CLOCK_NONE is forbidden because otherwise there is no meaning in calling such function). This allows to bring out into commont x86 code the handling part for machdep.lapic_allclocks tunable, which is retained. Modified: head/sys/pc98/cbus/clock.c Modified: head/sys/pc98/cbus/clock.c ============================================================================== --- head/sys/pc98/cbus/clock.c Fri Mar 5 06:06:20 2010 (r204752) +++ head/sys/pc98/cbus/clock.c Fri Mar 5 11:11:42 2010 (r204753) @@ -93,6 +93,9 @@ TUNABLE_INT("hw.i8254.freq", &i8254_freq int i8254_max_count; static int i8254_real_max_count; +static int lapic_allclocks; +TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); + static struct mtx clock_lock; static struct intsrc *i8254_intsrc; static u_int32_t i8254_lastcount; @@ -432,9 +435,11 @@ startrtclock() void cpu_initclocks() { +#if defined(DEV_APIC) + enum lapic_clock tlsca; -#ifdef DEV_APIC - using_lapic_timer = lapic_setup_clock(); + tlsca = lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL; + using_lapic_timer = lapic_setup_clock(tlsca); #endif /* * If we aren't using the local APIC timer to drive the kernel From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 12:58:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD0761065670; Fri, 5 Mar 2010 12:58:19 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD3DB8FC24; Fri, 5 Mar 2010 12:58:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25CwJwV002916; Fri, 5 Mar 2010 12:58:19 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25CwJD5002914; Fri, 5 Mar 2010 12:58:19 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003051258.o25CwJD5002914@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 5 Mar 2010 12:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204754 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 12:58:19 -0000 Author: luigi Date: Fri Mar 5 12:58:19 2010 New Revision: 204754 URL: http://svn.freebsd.org/changeset/base/204754 Log: fix a memory leak when deleting RED queues Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Fri Mar 5 11:11:42 2010 (r204753) +++ head/sys/netinet/ipfw/ip_dummynet.c Fri Mar 5 12:58:19 2010 (r204754) @@ -595,6 +595,12 @@ fsk_detach(struct dn_fsk *fs, int flags) h = fs->sched ? &fs->sched->fsk_list : &dn_cfg.fsu; SLIST_REMOVE(h, fs, dn_fsk, sch_chain); } + /* Free the RED parameters, they will be recomputed on + * subsequent attach if needed. + */ + if (fs->w_q_lookup) + free(fs->w_q_lookup, M_DUMMYNET); + fs->w_q_lookup = NULL; qht_delete(fs, flags); if (fs->sched && fs->sched->fp->free_fsk) fs->sched->fp->free_fsk(fs); From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 13:13:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FFCA106566C; Fri, 5 Mar 2010 13:13:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 556878FC0A; Fri, 5 Mar 2010 13:13:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25DDZAV006417; Fri, 5 Mar 2010 13:13:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25DDZtP006415; Fri, 5 Mar 2010 13:13:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003051313.o25DDZtP006415@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 5 Mar 2010 13:13:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204755 - head/bin/ps X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 13:13:35 -0000 Author: kib Date: Fri Mar 5 13:13:35 2010 New Revision: 204755 URL: http://svn.freebsd.org/changeset/base/204755 Log: Update the list of the process flags. Note that the lists of pending signals for process and its threads are distinct. Reviewed by: jilles MFC after: 2 weeks Modified: head/bin/ps/ps.1 Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Fri Mar 5 12:58:19 2010 (r204754) +++ head/bin/ps/ps.1 Fri Mar 5 13:13:35 2010 (r204755) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd July 9, 2009 +.Dd March 5, 2010 .Dt PS 1 .Os .Sh NAME @@ -284,11 +284,10 @@ The percentage of real memory used by th The flags associated with the process as in the include file .In sys/proc.h : -.Bl -column P_STOPPED_SINGLE 0x4000000 +.Bl -column P_SINGLE_BOUNDARY 0x40000000 .It Dv "P_ADVLOCK" Ta No "0x00001 Process may hold a POSIX advisory lock" .It Dv "P_CONTROLT" Ta No "0x00002 Has a controlling terminal" .It Dv "P_KTHREAD" Ta No "0x00004 Kernel thread" -.It Dv "P_NOLOAD" Ta No "0x00008 Ignore during load avg calculations" .It Dv "P_PPWAIT" Ta No "0x00010 Parent is waiting for child to exec/exit" .It Dv "P_PROFIL" Ta No "0x00020 Has started profiling" .It Dv "P_STOPPROF" Ta No "0x00040 Has thread in requesting to stop prof" @@ -305,8 +304,14 @@ the include file .It Dv "P_STOPPED_SINGLE" Ta No "0x80000 Only one thread can continue" .It Dv "P_PROTECTED" Ta No "0x100000 Do not kill on memory overcommit" .It Dv "P_SIGEVENT" Ta No "0x200000 Process pending signals changed" +.It Dv "P_SINGLE_BOUNDARY" Ta No "0x400000 Threads should suspend at user boundary" +.It Dv "P_HWPMC" Ta No "0x800000 Process is using HWPMCs" .It Dv "P_JAILED" Ta No "0x1000000 Process is in jail" .It Dv "P_INEXEC" Ta No "0x4000000 Process is in execve()" +.It Dv "P_STATCHILD" Ta No "0x8000000 Child process stopped or exited" +.It Dv "P_INMEM" Ta No "0x10000000 Loaded into memory" +.It Dv "P_SWAPPINGOUT" Ta No "0x20000000 Process is being swapped out" +.It Dv "P_SWAPPINGIN" Ta No "0x40000000 Process is being swapped in" .El .It Cm label The MAC label of the process. @@ -615,6 +620,13 @@ wait channel (as a symbolic name) .It Cm xstat exit or stop status (valid only for stopped or zombie process) .El +.Pp +Note that the +.Cm pending +column displays bitmask of signals pending in the process queue when +.Fl H +option is not specified, otherwise the per-thread queue of pending signals +is shown. .Sh ENVIRONMENT The following environment variables affect the execution of .Nm : From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 13:28:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDF30106564A; Fri, 5 Mar 2010 13:28:05 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACBD98FC1E; Fri, 5 Mar 2010 13:28:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25DS51x009620; Fri, 5 Mar 2010 13:28:05 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25DS5o6009614; Fri, 5 Mar 2010 13:28:05 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201003051328.o25DS5o6009614@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 5 Mar 2010 13:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204756 - in head/lib/csu: amd64 arm mips powerpc sparc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 13:28:05 -0000 Author: uqs Date: Fri Mar 5 13:28:05 2010 New Revision: 204756 URL: http://svn.freebsd.org/changeset/base/204756 Log: Properly declare non-extern functions in crt1 Also move the declarations after __progname consistently to make the distinction clearer. Reviewed by: jmallett Approved by: ed (co-mentor) Modified: head/lib/csu/amd64/crt1.c head/lib/csu/arm/crt1.c head/lib/csu/mips/crt1.c head/lib/csu/powerpc/crt1.c head/lib/csu/sparc64/crt1.c Modified: head/lib/csu/amd64/crt1.c ============================================================================== --- head/lib/csu/amd64/crt1.c Fri Mar 5 13:13:35 2010 (r204755) +++ head/lib/csu/amd64/crt1.c Fri Mar 5 13:28:05 2010 (r204756) @@ -43,7 +43,6 @@ typedef void (*fptr)(void); extern void _fini(void); extern void _init(void); extern int main(int, char **, char **); -extern void _start(char **, void (*)(void)); #ifdef GCRT extern void _mcleanup(void); @@ -55,6 +54,8 @@ extern int etext; char **environ; const char *__progname = ""; +void _start(char **, void (*)(void)); + /* The entry function. */ void _start(char **ap, void (*cleanup)(void)) Modified: head/lib/csu/arm/crt1.c ============================================================================== --- head/lib/csu/arm/crt1.c Fri Mar 5 13:13:35 2010 (r204755) +++ head/lib/csu/arm/crt1.c Fri Mar 5 13:28:05 2010 (r204756) @@ -74,6 +74,9 @@ char **environ; const char *__progname = ""; struct ps_strings *__ps_strings; +void __start(int, char **, char **, struct ps_strings *, + const struct Struct_Obj_Entry *, void (*)(void)); + /* The entry function. */ __asm(" .text \n" " .align 0 \n" Modified: head/lib/csu/mips/crt1.c ============================================================================== --- head/lib/csu/mips/crt1.c Fri Mar 5 13:13:35 2010 (r204755) +++ head/lib/csu/mips/crt1.c Fri Mar 5 13:28:05 2010 (r204756) @@ -66,6 +66,8 @@ extern int etext; char **environ; const char *__progname = ""; +void __start(char **, void (*)(void), struct Struct_Obj_Entry *, struct ps_strings *); + /* The entry function. */ void __start(char **ap, Modified: head/lib/csu/powerpc/crt1.c ============================================================================== --- head/lib/csu/powerpc/crt1.c Fri Mar 5 13:13:35 2010 (r204755) +++ head/lib/csu/powerpc/crt1.c Fri Mar 5 13:28:05 2010 (r204756) @@ -59,8 +59,6 @@ extern int _DYNAMIC; extern void _fini(void); extern void _init(void); extern int main(int, char **, char **); -extern void _start(int, char **, char **, const struct Struct_Obj_Entry *, - void (*)(void), struct ps_strings *); #ifdef GCRT extern void _mcleanup(void); @@ -73,6 +71,9 @@ char **environ; const char *__progname = ""; struct ps_strings *__ps_strings; +void _start(int, char **, char **, const struct Struct_Obj_Entry *, + void (*)(void), struct ps_strings *); + /* The entry function. */ /* * First 5 arguments are specified by the PowerPC SVR4 ABI. Modified: head/lib/csu/sparc64/crt1.c ============================================================================== --- head/lib/csu/sparc64/crt1.c Fri Mar 5 13:13:35 2010 (r204755) +++ head/lib/csu/sparc64/crt1.c Fri Mar 5 13:28:05 2010 (r204756) @@ -50,8 +50,6 @@ extern int _DYNAMIC; extern void _fini(void); extern void _init(void); extern int main(int, char **, char **); -extern void _start(char **, void (*)(void), struct Struct_Obj_Entry *, - struct ps_strings *); extern void __sparc_utrap_setup(void); #ifdef GCRT @@ -64,6 +62,9 @@ extern int etext; char **environ; const char *__progname = ""; +void _start(char **, void (*)(void), struct Struct_Obj_Entry *, + struct ps_strings *); + /* The entry function. */ /* * %o0 holds ps_strings pointer. From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 13:29:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6351B1065677; Fri, 5 Mar 2010 13:29:06 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 526FC8FC28; Fri, 5 Mar 2010 13:29:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25DT6Q5009855; Fri, 5 Mar 2010 13:29:06 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25DT6YL009848; Fri, 5 Mar 2010 13:29:06 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201003051329.o25DT6YL009848@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 5 Mar 2010 13:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204757 - in head/lib/csu: . arm ia64 mips powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 13:29:06 -0000 Author: uqs Date: Fri Mar 5 13:29:05 2010 New Revision: 204757 URL: http://svn.freebsd.org/changeset/base/204757 Log: Use default WARNS setting (of 6) for lib/csu. PR: bin/140089 Reviewed by: jmallett Approved by: ed (co-mentor) Modified: head/lib/csu/Makefile.inc head/lib/csu/arm/Makefile head/lib/csu/ia64/Makefile head/lib/csu/mips/Makefile head/lib/csu/mips/crt1.c head/lib/csu/powerpc/Makefile Modified: head/lib/csu/Makefile.inc ============================================================================== --- head/lib/csu/Makefile.inc Fri Mar 5 13:28:05 2010 (r204756) +++ head/lib/csu/Makefile.inc Fri Mar 5 13:29:05 2010 (r204757) @@ -2,4 +2,4 @@ SSP_CFLAGS= -WARNS?= 6 +.include "../Makefile.inc" Modified: head/lib/csu/arm/Makefile ============================================================================== --- head/lib/csu/arm/Makefile Fri Mar 5 13:28:05 2010 (r204756) +++ head/lib/csu/arm/Makefile Fri Mar 5 13:29:05 2010 (r204757) @@ -5,12 +5,9 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -Wall -Wno-unused \ - -I${.CURDIR}/../common \ +CFLAGS+= -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include -WARNS?= 2 - all: ${OBJS} CLEANFILES= ${OBJS} Modified: head/lib/csu/ia64/Makefile ============================================================================== --- head/lib/csu/ia64/Makefile Fri Mar 5 13:28:05 2010 (r204756) +++ head/lib/csu/ia64/Makefile Fri Mar 5 13:29:05 2010 (r204757) @@ -5,8 +5,7 @@ SRCS= crt1.S crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -Wall -Wno-unused \ - -I${.CURDIR}/../common \ +CFLAGS+= -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include all: ${OBJS} Modified: head/lib/csu/mips/Makefile ============================================================================== --- head/lib/csu/mips/Makefile Fri Mar 5 13:28:05 2010 (r204756) +++ head/lib/csu/mips/Makefile Fri Mar 5 13:29:05 2010 (r204757) @@ -5,12 +5,9 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -Wall -Wno-unused \ - -I${.CURDIR}/../common \ +CFLAGS+= -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include -WARNS?= 2 - all: ${OBJS} CLEANFILES= ${OBJS} Modified: head/lib/csu/mips/crt1.c ============================================================================== --- head/lib/csu/mips/crt1.c Fri Mar 5 13:28:05 2010 (r204756) +++ head/lib/csu/mips/crt1.c Fri Mar 5 13:29:05 2010 (r204757) @@ -72,8 +72,8 @@ void __start(char **, void (*)(void), st void __start(char **ap, void (*cleanup)(void), /* from shared loader */ - struct Struct_Obj_Entry *obj, /* from shared loader */ - struct ps_strings *ps_strings) + struct Struct_Obj_Entry *obj __unused, /* from shared loader */ + struct ps_strings *ps_strings __unused) { int argc; char **argv; Modified: head/lib/csu/powerpc/Makefile ============================================================================== --- head/lib/csu/powerpc/Makefile Fri Mar 5 13:28:05 2010 (r204756) +++ head/lib/csu/powerpc/Makefile Fri Mar 5 13:29:05 2010 (r204757) @@ -5,8 +5,7 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -Wall -Wno-unused \ - -I${.CURDIR}/../common \ +CFLAGS+= -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include all: ${OBJS} From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 14:13:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83C2E1065673; Fri, 5 Mar 2010 14:13:59 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71C9B8FC2A; Fri, 5 Mar 2010 14:13:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25EDxC9019872; Fri, 5 Mar 2010 14:13:59 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25EDxwM019870; Fri, 5 Mar 2010 14:13:59 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003051413.o25EDxwM019870@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 5 Mar 2010 14:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204758 - head/sbin/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 14:13:59 -0000 Author: luigi Date: Fri Mar 5 14:13:58 2010 New Revision: 204758 URL: http://svn.freebsd.org/changeset/base/204758 Log: more documentation on new dummynet features. Modified: head/sbin/ipfw/ipfw.8 Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Fri Mar 5 13:29:05 2010 (r204757) +++ head/sbin/ipfw/ipfw.8 Fri Mar 5 14:13:58 2010 (r204758) @@ -1404,7 +1404,7 @@ If not found, the match fails. Otherwise, the match succeeds and .Cm tablearg is set to the value extracted from the table. -.Br +.Pp This option can be useful to quickly dispatch traffic based on certain packet fields. See the @@ -1847,7 +1847,7 @@ is also the user interface for the .Nm dummynet traffic shaper, packet scheduler and network emulator, a subsystem that can artificially queue, delay or drop packets -emulator the behaviour of certain network links +emulating the behaviour of certain network links or queueing systems. .Pp .Nm dummynet @@ -1859,26 +1859,33 @@ Matching packets are then passed to eith different objects, which implement the traffic regulation: .Bl -hang -offset XXXX .It Em pipe -A pipe emulates a link with given bandwidth, propagation delay, +A +.Em pipe +emulates a +.Em link +with given bandwidth and propagation delay, +driven by a FIFO scheduler and a single queue with programmable queue size and packet loss rate. -Packets are queued in front of the pipe as they come out from the classifier, -and then transferred to the pipe according to the pipe's parameters. +Packets are appended to the queue as they come out from +.Nm ipfw , +and then transferred in FIFO order to the link at the desired rate. .It Em queue -A queue +A +.Em queue is an abstraction used to implement packet scheduling using one of several packet scheduling algorithms. -.Pp -The queue associates a -.Em weight -and a reference scheduler to each flow (a flow is a set of packets -with the same addresses and ports after masking). -A scheduler in turn is connected to a pipe, and arbitrates -the pipe's bandwidth among backlogged flows according to +Packets sent to a +.Em queue +are first grouped into flows according to a mask on the 5-tuple. +Flows are then passed to the scheduler associated to the +.Em queue , +and each flow uses scheduling parameters (weight and others) +as configured in the +.Em queue +itself. +A scheduler in turn is connected to an emulated link, +and arbitrates the link's bandwidth among backlogged flows according to weights and to the features of the scheduling algorithm in use. -.Pp -Note that weights are not priorities; a flow with a lower weight -is still guaranteed to get its fraction of the bandwidth even if a -flow with a higher weight is permanently backlogged. .El .Pp In practice, @@ -1887,6 +1894,52 @@ can be used to set hard limits to the ba .Em queues can be used to determine how different flows share the available bandwidth. .Pp +A graphical representation of the binding of queues, +flows, schedulers and links is below. +.Bd -literal -offset indent + (flow_mask|sched_mask) sched_mask + +---------+ weight Wx +-------------+ + | |->-[flow]-->--| |-+ + -->--| QUEUE x | ... | | | + | |->-[flow]-->--| SCHEDuler N | | + +---------+ | | | + ... | +--[LINK N]-->-- + +---------+ weight Wy | | +--[LINK N]-->-- + | |->-[flow]-->--| | | + -->--| QUEUE y | ... | | | + | |->-[flow]-->--| | | + +---------+ +-------------+ | + +-------------+ +.Ed +It is important to understand the role of the SCHED_MASK +and FLOW_MASK, which are configured through the commands +.Dl "ipfw sched N config mask SCHED_MASK ..." +and +.Dl "ipfw queue X config mask FLOW_MASK ..." . +.Pp +The SCHED_MASK is used to assign flows to one or more +scheduler instances, one for each +value of the packet's 5-fuple after applying SCHED_MASK. +As an example, using ``src-ip 0xffffff00'' creates one instance +for each /24 destination subnet. +.Pp +The FLOW_MASK, together with the SCHED_MASK, is used to split +packets into flows. As an example, using +``src-ip 0x000000ff'' +together with the previous SCHED_MASK makes a flow for +each individual source address. In turn, flows for each /24 +subnet will be sent to the same scheduler instance. +.Pp +The above diagram holds even for the +.Em pipe +case, with the only restriction that a +.Em pipe +only supports a SCHED_MASK, and forces the use of a FIFO +scheduler (these are for backward compatibility reasons; +in fact, internally, a +.Nm dummynet's +pipe is implemented exactly as above). +.Pp There are two modes of .Nm dummynet operation: @@ -2087,9 +2140,36 @@ The following parameters can be configur .Pp .Bl -tag -width indent -compact .It Cm type Ar {fifo | wf2qp | rr | qfq} +specifies the scheduling algorithm to use. +.Bl -tag -width indent -compact +.It cm fifo +is just a FIFO scheduler (which means that all packets +are stored in the same queue as they arrive to the scheduler). +FIFO has O(1) per-packet time complexity, with very low +constants (estimate 60-80ns on a 2Ghz desktop machine) +but gives no service guarantees. +.It Cm wf2qp +implements the WF2Q+ algorithm, which is a Weighted Fair Queueing +algorithm which permits flows to share bandwidth according to +their weights. Note that weights are not priorities; even a flow +with a minuscule weight will never starve. +WF2Q+ has O(log N) per-packet processing cost, where N is the number +of flows, and is the default algorithm used by previous versions +dummynet's queues. +.It Cm rr +implements the Deficit Round Robin algorithm, which has O(1) processing +costs (roughly, 100-150ns per packet) +and permits bandwidth allocation according to weights, but +with poor service guarantees. +.It Cm qfq +implements the QFQ algorithm, which is a very fast variant of +WF2Q+, with similar service guarantees and O(1) processing +costs (roughly, 200-250ns per packet). +.El .El .Pp -plus all the parameters allowed for a pipe. +In addition to the type, all parameters allowed for a pipe can also +be specified for a scheduler. .Pp Finally, the following parameters can be configured for both pipes and queues: From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 14:34:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87FCE1065674; Fri, 5 Mar 2010 14:34:33 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7565D8FC16; Fri, 5 Mar 2010 14:34:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25EYXHV024379; Fri, 5 Mar 2010 14:34:33 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25EYXBR024375; Fri, 5 Mar 2010 14:34:33 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201003051434.o25EYXBR024375@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 5 Mar 2010 14:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204759 - in head: etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 14:34:33 -0000 Author: netchild Date: Fri Mar 5 14:34:33 2010 New Revision: 204759 URL: http://svn.freebsd.org/changeset/base/204759 Log: Redirect stdin from /dev/null when starting a jail: At least in RELENG_7 this fixes some start problems for some programs from the ports. It is also more correct, as a jail shall not expect input (interactivity) from the jail-host. Revert the current behavior of starting jails in the background and make it optional only for the start of jails (jail_parallell_start=YES in rc.conf): - The stop can not be done in the background, the system needs to wait until everything is stopped correctly before it can reboot or power down. - The start should not be done in parallel by default, this not only breaks POLA for people comming from RELENG_x, it may also break a dependency chain with other scripts in the jail-host, which need to do some stuff after the jails are up and running (e.g. hardlinking a mysql socket from one jail into another one). Discussed on: freebsd-jails@ Modified: head/etc/defaults/rc.conf head/etc/rc.d/jail head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Fri Mar 5 14:13:58 2010 (r204758) +++ head/etc/defaults/rc.conf Fri Mar 5 14:34:33 2010 (r204759) @@ -637,6 +637,7 @@ mixer_enable="YES" # Run the sound mixer ### Jail Configuration ####################################### ############################################################## jail_enable="NO" # Set to NO to disable starting of any jails +jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails jail_set_hostname_allow="YES" # Allow root user in a jail to change its hostname jail_socket_unixiproute_only="YES" # Route only TCP/IP within a jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Fri Mar 5 14:13:58 2010 (r204758) +++ head/etc/rc.d/jail Fri Mar 5 14:34:33 2010 (r204759) @@ -636,7 +636,8 @@ jail_start() done eval ${_setfib} jail ${_flags} -i ${_rootdir} ${_hostname} \ - \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 + \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 \ + Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CC8F1065673; Fri, 5 Mar 2010 15:18:06 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id 99F6F8FC1B; Fri, 5 Mar 2010 15:18:05 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,587,1262559600"; d="scan'208";a="27696257" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER05.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 05 Mar 2010 16:18:03 +0100 Received: by ZIVMAILUSER05.UNI-MUENSTER.DE (Postfix, from userid 149459) id BF2121B07E7; Fri, 5 Mar 2010 16:18:03 +0100 (CET) Date: Fri, 05 Mar 2010 16:18:03 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Luigi Rizzo Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204758 - head/sbin/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 15:18:06 -0000 thanks for the 'Br' macro fix. :) alex From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 15:23:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1D981065670; Fri, 5 Mar 2010 15:23:01 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE32C8FC22; Fri, 5 Mar 2010 15:23:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25FN1WL035248; Fri, 5 Mar 2010 15:23:01 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25FN1Mx035237; Fri, 5 Mar 2010 15:23:01 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201003051523.o25FN1Mx035237@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 5 Mar 2010 15:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204761 - in head: tools/regression/usr.bin tools/regression/usr.bin/apply usr.bin/apply X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 15:23:02 -0000 Author: jh Date: Fri Mar 5 15:23:01 2010 New Revision: 204761 URL: http://svn.freebsd.org/changeset/base/204761 Log: - Use errx(3) instead of err(3) when checking if snprintf(3) succeeded. snprintf(3) doesn't set errno in the tested cases. - If the same argument reference (for example %1) was specified more than once, the command didn't necessarily fit to the final command buffer. Fix this using a dynamic sbuf buffer. Add a few regression tests for the case. PR: bin/95079 No objections: freebsd-hackers Added: head/tools/regression/usr.bin/apply/ head/tools/regression/usr.bin/apply/Makefile (contents, props changed) head/tools/regression/usr.bin/apply/regress.00.in (contents, props changed) head/tools/regression/usr.bin/apply/regress.00.out (contents, props changed) head/tools/regression/usr.bin/apply/regress.01.out (contents, props changed) head/tools/regression/usr.bin/apply/regress.01.sh (contents, props changed) head/tools/regression/usr.bin/apply/regress.sh (contents, props changed) head/tools/regression/usr.bin/apply/regress.t (contents, props changed) Modified: head/tools/regression/usr.bin/Makefile head/usr.bin/apply/Makefile head/usr.bin/apply/apply.c Modified: head/tools/regression/usr.bin/Makefile ============================================================================== --- head/tools/regression/usr.bin/Makefile Fri Mar 5 15:19:53 2010 (r204760) +++ head/tools/regression/usr.bin/Makefile Fri Mar 5 15:23:01 2010 (r204761) @@ -1,6 +1,7 @@ # $FreeBSD$ -SUBDIR= calendar comm file2c join jot m4 printf sed tr uudecode uuencode xargs +SUBDIR= apply calendar comm file2c join jot m4 printf sed tr \ + uudecode uuencode xargs .if !defined(AUTOMATED) SUBDIR+= lastcomm .endif Added: head/tools/regression/usr.bin/apply/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/apply/Makefile Fri Mar 5 15:23:01 2010 (r204761) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +all: + @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} Added: head/tools/regression/usr.bin/apply/regress.00.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/apply/regress.00.in Fri Mar 5 15:23:01 2010 (r204761) @@ -0,0 +1 @@ +12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 Added: head/tools/regression/usr.bin/apply/regress.00.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/apply/regress.00.out Fri Mar 5 15:23:01 2010 (r204761) @@ -0,0 +1 @@ +12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 789012345678901234567890123456789012 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 012345678901234567890123456789012345678901234567890123456789! 0123456789012 Added: head/tools/regression/usr.bin/apply/regress.01.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/apply/regress.01.out Fri Mar 5 15:23:01 2010 (r204761) @@ -0,0 +1 @@ +apply: Argument list too long Added: head/tools/regression/usr.bin/apply/regress.01.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/apply/regress.01.sh Fri Mar 5 15:23:01 2010 (r204761) @@ -0,0 +1,15 @@ +#!/bin/sh +# $FreeBSD$ + +SHELL=/bin/sh; export SHELL + +ARG_MAX=$(getconf ARG_MAX) +ARG_MAX_HALF=$((ARG_MAX / 2)) + +apply 'echo %1 %1 %1' $(jot $ARG_MAX_HALF 1 1 | tr -d '\n') 2>&1 + +if [ $? -eq 0 ]; then + return 1 +else + return 0 +fi Added: head/tools/regression/usr.bin/apply/regress.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/apply/regress.sh Fri Mar 5 15:23:01 2010 (r204761) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +echo 1..2 + +REGRESSION_START($1) + +REGRESSION_TEST(`00', `apply "echo %1 %1 %1 %1" $(cat regress.00.in)') +REGRESSION_TEST(`01', `sh regress.01.sh') + +REGRESSION_END() Added: head/tools/regression/usr.bin/apply/regress.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/apply/regress.t Fri Mar 5 15:23:01 2010 (r204761) @@ -0,0 +1,6 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +m4 ../regress.m4 regress.sh | sh Modified: head/usr.bin/apply/Makefile ============================================================================== --- head/usr.bin/apply/Makefile Fri Mar 5 15:19:53 2010 (r204760) +++ head/usr.bin/apply/Makefile Fri Mar 5 15:23:01 2010 (r204761) @@ -2,5 +2,7 @@ # $FreeBSD$ PROG= apply +DPADD= ${LIBSBUF} +LDADD= -lsbuf .include Modified: head/usr.bin/apply/apply.c ============================================================================== --- head/usr.bin/apply/apply.c Fri Mar 5 15:19:53 2010 (r204760) +++ head/usr.bin/apply/apply.c Fri Mar 5 15:23:01 2010 (r204761) @@ -44,10 +44,12 @@ static char sccsid[] = "@(#)apply.c 8.4 __FBSDID("$FreeBSD$"); #include +#include #include #include #include +#include #include #include #include @@ -61,10 +63,13 @@ static int exec_shell(const char *, char static void usage(void); int -main(int argc, char *argv[]) { +main(int argc, char *argv[]) +{ + struct sbuf *cmdbuf; + long arg_max; int ch, debug, i, magic, n, nargs, offset, rval; - size_t clen, cmdsize, l; - char *c, *cmd, *name, *p, *q, *shell, *slashp, *tmpshell; + size_t cmdsize; + char *cmd, *name, *p, *shell, *slashp, *tmpshell; debug = 0; magic = '%'; /* Default magic char is `%'. */ @@ -144,13 +149,13 @@ main(int argc, char *argv[]) { p = cmd; offset = snprintf(cmd, cmdsize, EXEC "%s", argv[0]); if ((size_t)offset >= cmdsize) - err(1, "snprintf() failed"); + errx(1, "snprintf() failed"); p += offset; cmdsize -= offset; for (i = 1; i <= nargs; i++) { offset = snprintf(p, cmdsize, " %c%d", magic, i); if ((size_t)offset >= cmdsize) - err(1, "snprintf() failed"); + errx(1, "snprintf() failed"); p += offset; cmdsize -= offset; } @@ -164,61 +169,53 @@ main(int argc, char *argv[]) { } else { offset = snprintf(cmd, cmdsize, EXEC "%s", argv[0]); if ((size_t)offset >= cmdsize) - err(1, "snprintf() failed"); + errx(1, "snprintf() failed"); nargs = n; } - /* - * Grab some space in which to build the command. Allocate - * as necessary later, but no reason to build it up slowly - * for the normal case. - */ - if ((c = malloc(clen = 1024)) == NULL) + cmdbuf = sbuf_new(NULL, NULL, 1024, SBUF_AUTOEXTEND); + if (cmdbuf == NULL) err(1, NULL); + arg_max = sysconf(_SC_ARG_MAX); + /* * (argc) and (argv) are still offset by one to make it simpler to * expand %digit references. At the end of the loop check for (argc) * equals 1 means that all the (argv) has been consumed. */ for (rval = 0; argc > nargs; argc -= nargs, argv += nargs) { - /* - * Find a max value for the command length, and ensure - * there's enough space to build it. - */ - for (l = strlen(cmd), i = 0; i < nargs; i++) - l += strlen(argv[i+1]); - if (l > clen && (c = realloc(c, clen = l)) == NULL) - err(1, NULL); - + sbuf_clear(cmdbuf); /* Expand command argv references. */ - for (p = cmd, q = c; *p != '\0'; ++p) + for (p = cmd; *p != '\0'; ++p) { if (p[0] == magic && isdigit(p[1]) && p[1] != '0') { - offset = snprintf(q, l, "%s", - argv[(++p)[0] - '0']); - if ((size_t)offset >= l) - err(1, "snprintf() failed"); - q += offset; - l -= offset; - } else - *q++ = *p; + if (sbuf_cat(cmdbuf, argv[(++p)[0] - '0']) + == -1) + errc(1, ENOMEM, "sbuf"); + } else { + if (sbuf_putc(cmdbuf, *p) == -1) + errc(1, ENOMEM, "sbuf"); + } + if (sbuf_len(cmdbuf) > arg_max) + errc(1, E2BIG, NULL); + } /* Terminate the command string. */ - *q = '\0'; + sbuf_finish(cmdbuf); /* Run the command. */ if (debug) - (void)printf("%s\n", c); + (void)printf("%s\n", sbuf_data(cmdbuf)); else - if (exec_shell(c, shell, name)) + if (exec_shell(sbuf_data(cmdbuf), shell, name)) rval = 1; } if (argc != 1) errx(1, "expecting additional argument%s after \"%s\"", - (nargs - argc) ? "s" : "", argv[argc - 1]); + (nargs - argc) ? "s" : "", argv[argc - 1]); free(cmd); - free(c); + sbuf_delete(cmdbuf); free(shell); exit(rval); } From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 16:56:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2154A1065678; Fri, 5 Mar 2010 16:56:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8C018FC24; Fri, 5 Mar 2010 16:56:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25Gu80J055867; Fri, 5 Mar 2010 16:56:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25Gu8ca055865; Fri, 5 Mar 2010 16:56:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003051656.o25Gu8ca055865@svn.freebsd.org> From: Warner Losh Date: Fri, 5 Mar 2010 16:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204762 - head/contrib/gcc/config/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 16:56:09 -0000 Author: imp Date: Fri Mar 5 16:56:08 2010 New Revision: 204762 URL: http://svn.freebsd.org/changeset/base/204762 Log: Add support for o32 (when it isn't the default), n32, n64, and o64 to the linker spec. Provide the ability to have a default ABI that's different than o32 (again, for all 4). Submitted by: C. Jayachandran (JC) with tweaks for o64/o32 by me Modified: head/contrib/gcc/config/mips/freebsd.h Modified: head/contrib/gcc/config/mips/freebsd.h ============================================================================== --- head/contrib/gcc/config/mips/freebsd.h Fri Mar 5 15:23:01 2010 (r204761) +++ head/contrib/gcc/config/mips/freebsd.h Fri Mar 5 16:56:08 2010 (r204762) @@ -65,12 +65,17 @@ Boston, MA 02110-1301, USA. */ #undef LINK_SPEC #define LINK_SPEC "\ - %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips32r2} %{mips64} \ + %{G*} %{mips1} %{mips2} %{mips3} %{mips4} \ + %{mips32} %{mips32r2} %{mips64} %{mips64r2} \ %{bestGnum} %{call_shared} %{no_archive} %{exact_version} \ - %(fbsd_link_spec) " -#if 0 - %(endian_spec) -#endif + %{mabi=32:-melf32%{EB:b}%{EL:l}tsmip_fbsd} \ + %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32_fbsd} \ + %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip_fbsd} \ + %{mabi=o64:-melf64%{EB:b}%{EL:l}tsmip_fbsd} \ + %(fbsd_link_spec) \ + %(endian_spec) \ + %(fbsd_link_spec)" + /* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h but trashed by config/mips/elf.h. */ @@ -250,12 +255,28 @@ Boston, MA 02110-1301, USA. */ } \ while (0) -/* Default to the mips32 ISA */ -#undef DRIVER_SELF_SPECS +/* Default ABI and ISA */ +#undef DRIVER_SELF_SPECS +#if MIPS_ABI_DEFAULT == ABI_N32 #define DRIVER_SELF_SPECS \ - "%{!march=*: -march=mips32}" -#if 0 - "%{!EB:%{!EL:%(endian_spec)}}", + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips64}", \ + "%{!mabi=*: -mabi=n32}" +#elif MIPS_ABI_DEFAULT == ABI_64 +#define DRIVER_SELF_SPECS \ + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips64}", \ + "%{!mabi=*: -mabi=64}" +#elif MIPS_ABI_DEFAULT == ABI_O64 +#define DRIVER_SELF_SPECS \ + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips64}", \ + "%{!mabi=*: -mabi=o64}" +#else /* default to o32 */ +#define DRIVER_SELF_SPECS \ + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips32}", \ + "%{!mabi=*: -mabi=32}" #endif #if 0 From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 17:53:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263F91065676; Fri, 5 Mar 2010 17:53:29 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 130FE8FC08; Fri, 5 Mar 2010 17:53:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25HrSRn068602; Fri, 5 Mar 2010 17:53:28 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25HrSHY068600; Fri, 5 Mar 2010 17:53:28 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003051753.o25HrSHY068600@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 5 Mar 2010 17:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204763 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 17:53:29 -0000 Author: luigi Date: Fri Mar 5 17:53:28 2010 New Revision: 204763 URL: http://svn.freebsd.org/changeset/base/204763 Log: plug a memory leak on pipe's reconfiguration Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Fri Mar 5 16:56:08 2010 (r204762) +++ head/sys/netinet/ipfw/ip_dummynet.c Fri Mar 5 17:53:28 2010 (r204763) @@ -1320,12 +1320,13 @@ config_sched(struct dn_sch *_nsch, struc struct schk_new_arg a; /* argument for schk_new */ int i; struct dn_link p; /* copy of oldlink */ - struct dn_profile *pf; /* copy of old link profile */ + struct dn_profile *pf = NULL; /* copy of old link profile */ /* Used to preserv mask parameter */ struct ipfw_flow_id new_mask; int new_buckets = 0; int new_flags = 0; int pipe_cmd; + int err = ENOMEM; a.sch = _nsch; if (a.sch->oid.len != sizeof(*a.sch)) { @@ -1341,11 +1342,6 @@ config_sched(struct dn_sch *_nsch, struc 1, dn_cfg.max_hash_size, "sched buckets"); /* XXX other sanity checks */ bzero(&p, sizeof(p)); - pf = malloc(sizeof(struct dn_profile), M_DUMMYNET, M_NOWAIT | M_ZERO); - if (pf == NULL) { - D("Error allocating profile"); - return ENOMEM; - } pipe_cmd = a.sch->flags & DN_PIPE_CMD; a.sch->flags &= ~DN_PIPE_CMD; //XXX do it even if is not set? @@ -1390,27 +1386,33 @@ again: /* run twice, for wfq and fifo */ goto again; } } else { - DN_BH_WUNLOCK(); D("invalid scheduler type %d %s", a.sch->oid.subtype, a.sch->name); - return EINVAL; + err = EINVAL; + goto error; } /* normalize name and subtype */ a.sch->oid.subtype = a.fp->type; bzero(a.sch->name, sizeof(a.sch->name)); strlcpy(a.sch->name, a.fp->name, sizeof(a.sch->name)); if (s == NULL) { - DN_BH_WUNLOCK(); D("cannot allocate scheduler %d", i); - return ENOMEM; + goto error; } /* restore existing link if any */ if (p.link_nr) { s->link = p; - if (pf->link_nr == p.link_nr) /* Restore profile */ - s->profile = pf; - else + if (!pf || pf->link_nr != p.link_nr) { /* no saved value */ s->profile = NULL; /* XXX maybe not needed */ + } else { + s->profile = malloc(sizeof(struct dn_profile), + M_DUMMYNET, M_NOWAIT | M_ZERO); + if (s->profile == NULL) { + D("cannot allocate profile"); + goto error; //XXX + } + bcopy(pf, s->profile, sizeof(*pf)); + } } p.link_nr = 0; if (s->fp == NULL) { @@ -1426,8 +1428,13 @@ again: /* run twice, for wfq and fifo */ if (s->link.link_nr == 0) D("XXX WARNING link 0 for sched %d", i); p = s->link; /* preserve link */ - if (s->profile) /* preserve profile */ - bcopy(s->profile, pf, sizeof(struct dn_profile)); + if (s->profile) {/* preserve profile */ + if (!pf) + pf = malloc(sizeof(*pf), + M_DUMMYNET, M_NOWAIT | M_ZERO); + if (pf) /* XXX should issue a warning otherwise */ + bcopy(s->profile, pf, sizeof(*pf)); + } /* remove from the hash */ dn_ht_find(dn_cfg.schedhash, i, DNHT_REMOVE, NULL); /* Detach flowsets, preserve queues. */ @@ -1459,8 +1466,7 @@ again: /* run twice, for wfq and fifo */ if (!s->fs) { schk_delete_cb(s, (void *)DN_DESTROY); D("error creating internal fs for %d", i); - DN_BH_WUNLOCK(); - return ENOMEM; + goto error; } } /* call init function after the flowset is created */ @@ -1479,8 +1485,7 @@ next: /* sched config shouldn't modify the FIFO scheduler */ if (dn_ht_find(dn_cfg.schedhash, i, 0, &a) != NULL) { /* FIFO already exist, don't touch it */ - DN_BH_WUNLOCK(); - return 0; + goto error; } } a.sch->sched_nr = i; @@ -1488,8 +1493,12 @@ next: bzero(a.sch->name, sizeof(a.sch->name)); goto again; } + err = 0; +error: DN_BH_WUNLOCK(); - return 0; + if (pf) + free(pf, M_DUMMYNET); + return err; } /* From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 19:45:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39E63106566B; Fri, 5 Mar 2010 19:45:46 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 28DBB8FC19; Fri, 5 Mar 2010 19:45:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25Jjkdg093566; Fri, 5 Mar 2010 19:45:46 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25Jjk7t093563; Fri, 5 Mar 2010 19:45:46 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201003051945.o25Jjk7t093563@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 5 Mar 2010 19:45:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204764 - in head/sys/arm/mv: . kirkwood X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 19:45:46 -0000 Author: raj Date: Fri Mar 5 19:45:45 2010 New Revision: 204764 URL: http://svn.freebsd.org/changeset/base/204764 Log: Provide correct TCLK value for Kirkwood A1 silicon revision. While there improve SOC ID output accordingly. Obtained from: Semihalf MFC after: 1 week Modified: head/sys/arm/mv/common.c head/sys/arm/mv/kirkwood/kirkwood.c Modified: head/sys/arm/mv/common.c ============================================================================== --- head/sys/arm/mv/common.c Fri Mar 5 17:53:28 2010 (r204763) +++ head/sys/arm/mv/common.c Fri Mar 5 19:45:45 2010 (r204764) @@ -261,6 +261,8 @@ soc_identify(void) rev = "Z0"; else if (r == 2) rev = "A0"; + else if (r == 3) + rev = "A1"; break; case MV_DEV_MV78100_Z0: dev = "Marvell MV78100 Z0"; Modified: head/sys/arm/mv/kirkwood/kirkwood.c ============================================================================== --- head/sys/arm/mv/kirkwood/kirkwood.c Fri Mar 5 17:53:28 2010 (r204763) +++ head/sys/arm/mv/kirkwood/kirkwood.c Fri Mar 5 19:45:45 2010 (r204764) @@ -176,11 +176,11 @@ get_tclk(void) /* * On Kirkwood TCLK is not configurable and depends on silicon * revision: - * - A0 has TCLK hardcoded to 200 MHz. + * - A0 and A1 have TCLK hardcoded to 200 MHz. * - Z0 and others have TCLK hardcoded to 166 MHz. */ soc_id(&dev, &rev); - if (dev == MV_DEV_88F6281 && rev == 2) + if (dev == MV_DEV_88F6281 && (rev == 2 || rev == 3)) return (TCLK_200MHZ); return (TCLK_166MHZ); From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 19:51:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37E06106564A; Fri, 5 Mar 2010 19:51:03 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26D7C8FC17; Fri, 5 Mar 2010 19:51:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25Jp30w094886; Fri, 5 Mar 2010 19:51:03 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25Jp3rl094884; Fri, 5 Mar 2010 19:51:03 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201003051951.o25Jp3rl094884@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 5 Mar 2010 19:51:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204765 - head/gnu/usr.bin/dtc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 19:51:03 -0000 Author: raj Date: Fri Mar 5 19:51:02 2010 New Revision: 204765 URL: http://svn.freebsd.org/changeset/base/204765 Log: Remove stale path reference. Modified: head/gnu/usr.bin/dtc/Makefile Modified: head/gnu/usr.bin/dtc/Makefile ============================================================================== --- head/gnu/usr.bin/dtc/Makefile Fri Mar 5 19:45:45 2010 (r204764) +++ head/gnu/usr.bin/dtc/Makefile Fri Mar 5 19:51:02 2010 (r204765) @@ -4,7 +4,7 @@ DTCDIR= ${.CURDIR}/../../../contrib/dtc LIBFDTDIR= ${.CURDIR}/../../../sys/contrib/libfdt -.PATH: ${DTCDIR} ${LIBFDTDIR} ${DTCDIR}/tests +.PATH: ${DTCDIR} ${LIBFDTDIR} PROG= dtc From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 21:18:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23E7D1065670 for ; Fri, 5 Mar 2010 21:18:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id AF9C58FC22 for ; Fri, 5 Mar 2010 21:18:02 +0000 (UTC) Received: (qmail 10851 invoked by uid 399); 5 Mar 2010 21:18:01 -0000 Received: from localhost (HELO freefall.freebsd.org) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 5 Mar 2010 21:18:01 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Date: Fri, 5 Mar 2010 21:18:00 +0000 (UTC) From: Doug Barton To: Alexander Leidinger In-Reply-To: <201003051434.o25EYXBR024375@svn.freebsd.org> Message-ID: References: <201003051434.o25EYXBR024375@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: Outlook -- Not just for spreading viruses anymore! X-OpenPGP-Key-ID: 0xD5B2F0FB Organization: http://SupersetSolutions.com/ MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="844893955-1427392154-1267823881=:98935" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204759 - in head: etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 21:18:03 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --844893955-1427392154-1267823881=:98935 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Fri, 5 Mar 2010, Alexander Leidinger wrote: > Author: netchild > Date: Fri Mar 5 14:34:33 2010 > New Revision: 204759 > URL: http://svn.freebsd.org/changeset/base/204759 I've got no comments on the jail-related stuff given that my knowledge of jails is almost non-existent. However I wish you had run your diff past freebsd-rc@ since if you had I (or someone else) could have let you know that the attached patch is a much cleaner way of implementing the bit about conditionalizing "parallel" execution (which, to the extent I understand the problem I agree with your solution of only doing it at when starting, FWIW). In general we try to avoid having any code in rc.d scripts run unconditionally. In this case it's harmless (although every cpu cycle counts) but in other cases it can cause problems, which is why as a general rule it's safer to avoid it altogether. hth, Doug --844893955-1427392154-1267823881=:98935 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=jail-rc.diff Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=jail-rc.diff SW5kZXg6IGphaWwNCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCi0tLSBqYWls CShyZXZpc2lvbiAyMDQ3NzApDQorKysgamFpbAkod29ya2luZyBjb3B5KQ0K QEAgLTE4LDYgKzE4LDggQEANCiANCiBuYW1lPSJqYWlsIg0KIHJjdmFyPWBz ZXRfcmN2YXJgDQorDQorc3RhcnRfcHJlY21kPSJqYWlsX3ByZXN0YXJ0Ig0K IHN0YXJ0X2NtZD0iamFpbF9zdGFydCINCiBzdG9wX2NtZD0iamFpbF9zdG9w Ig0KIA0KQEAgLTU0NSw2ICs1NDcsMTMgQEANCiAJZG9uZQ0KIH0NCiANCitq YWlsX3ByZXN0YXJ0KCkNCit7DQorCWlmIGNoZWNreWVzbm8gamFpbF9wYXJh bGxlbF9zdGFydDsgdGhlbg0KKwkJY29tbWFuZF9hcmdzPScmJw0KKwlmaQ0K K30NCisNCiBqYWlsX3N0YXJ0KCkNCiB7DQogCWVjaG8gLW4gJ0NvbmZpZ3Vy aW5nIGphaWxzOicNCkBAIC03MzAsMTggKzczOSw0IEBADQogCWphaWxfbGlz dD0iJCoiDQogZmkNCiANCi0jIE9ubHkgYWxsb3cgdGhlIHBhcmFsbGVsIHN0 YXJ0IG9mIGphaWxzLCBvdGhlciBjb21tYW5kcyBhcmUgbm90DQotIyBzYWZl IHRvIGV4ZWN1dGUgaW4gcGFyYWxsZWwuDQotY2FzZSAiJHtjbWR9IiBpbg0K LSpzdGFydCkNCi0JOzsNCi0qKQ0KLQlqYWlsX3BhcmFsbGVsX3N0YXJ0PU5P DQotZXNhYw0KLQ0KLWlmIGNoZWNreWVzbm8gamFpbF9wYXJhbGxlbF9zdGFy dDsgdGhlbg0KLQlydW5fcmNfY29tbWFuZCAiJHtjbWR9IiAmDQotZWxzZQ0K LQlydW5fcmNfY29tbWFuZCAiJHtjbWR9Ig0KLWZpDQotDQorcnVuX3JjX2Nv bW1hbmQgIiR7Y21kfSINCg== --844893955-1427392154-1267823881=:98935-- From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 21:24:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23610106566C; Fri, 5 Mar 2010 21:24:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12B538FC18; Fri, 5 Mar 2010 21:24:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25LOf5l016346; Fri, 5 Mar 2010 21:24:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25LOfkx016344; Fri, 5 Mar 2010 21:24:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003052124.o25LOfkx016344@svn.freebsd.org> From: Warner Losh Date: Fri, 5 Mar 2010 21:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204771 - head/gnu/usr.bin/cc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 21:24:42 -0000 Author: imp Date: Fri Mar 5 21:24:41 2010 New Revision: 204771 URL: http://svn.freebsd.org/changeset/base/204771 Log: Make little endian compiles produce little endian binaries on mips. Submitted by: neel@ Modified: head/gnu/usr.bin/cc/Makefile.inc Modified: head/gnu/usr.bin/cc/Makefile.inc ============================================================================== --- head/gnu/usr.bin/cc/Makefile.inc Fri Mar 5 21:04:44 2010 (r204770) +++ head/gnu/usr.bin/cc/Makefile.inc Fri Mar 5 21:24:41 2010 (r204771) @@ -30,6 +30,10 @@ CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SI CFLAGS+= -DCROSS_COMPILE .endif +.if ${TARGET_ARCH} == "mips" && !defined(TARGET_BIG_ENDIAN) +CFLAGS += -DTARGET_ENDIAN_DEFAULT=0 +.endif + .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE) CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE} .endif From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 21:25:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5FE61065670; Fri, 5 Mar 2010 21:25:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C55598FC08; Fri, 5 Mar 2010 21:25:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25LPKr6016519; Fri, 5 Mar 2010 21:25:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25LPKNR016517; Fri, 5 Mar 2010 21:25:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003052125.o25LPKNR016517@svn.freebsd.org> From: Warner Losh Date: Fri, 5 Mar 2010 21:25:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204772 - head/contrib/gcc/config/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 21:25:20 -0000 Author: imp Date: Fri Mar 5 21:25:20 2010 New Revision: 204772 URL: http://svn.freebsd.org/changeset/base/204772 Log: Tweak the linker spec a smidge. Correct a typo. Modified: head/contrib/gcc/config/mips/freebsd.h Modified: head/contrib/gcc/config/mips/freebsd.h ============================================================================== --- head/contrib/gcc/config/mips/freebsd.h Fri Mar 5 21:24:41 2010 (r204771) +++ head/contrib/gcc/config/mips/freebsd.h Fri Mar 5 21:25:20 2010 (r204772) @@ -65,6 +65,7 @@ Boston, MA 02110-1301, USA. */ #undef LINK_SPEC #define LINK_SPEC "\ + %{EB} %{EL} %(endian_spec) \ %{G*} %{mips1} %{mips2} %{mips3} %{mips4} \ %{mips32} %{mips32r2} %{mips64} %{mips64r2} \ %{bestGnum} %{call_shared} %{no_archive} %{exact_version} \ @@ -72,8 +73,6 @@ Boston, MA 02110-1301, USA. */ %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32_fbsd} \ %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip_fbsd} \ %{mabi=o64:-melf64%{EB:b}%{EL:l}tsmip_fbsd} \ - %(fbsd_link_spec) \ - %(endian_spec) \ %(fbsd_link_spec)" @@ -82,7 +81,7 @@ Boston, MA 02110-1301, USA. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC FBSD_STARTFILE_SPEC -/* Provide an ENDFILE_SPEC appropriate for FreeBSD/i386. */ +/* Provide an ENDFILE_SPEC appropriate for FreeBSD/mips. */ #undef ENDFILE_SPEC #define ENDFILE_SPEC FBSD_ENDFILE_SPEC From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 21:39:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17790106564A; Fri, 5 Mar 2010 21:39:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 023318FC08; Fri, 5 Mar 2010 21:39:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25LdGK1019604; Fri, 5 Mar 2010 21:39:16 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25LdGgc019587; Fri, 5 Mar 2010 21:39:16 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003052139.o25LdGgc019587@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 5 Mar 2010 21:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204773 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/dispatcher sys/contrib/dev/acpica/events sys/cont... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 21:39:17 -0000 Author: jkim Date: Fri Mar 5 21:39:16 2010 New Revision: 204773 URL: http://svn.freebsd.org/changeset/base/204773 Log: Merge ACPICA 20100304. Added: head/sys/contrib/dev/acpica/compiler/aslpredef.c - copied, changed from r204768, vendor-sys/acpica/dist/compiler/aslpredef.c head/sys/contrib/dev/acpica/executer/exdebug.c - copied, changed from r204768, vendor-sys/acpica/dist/executer/exdebug.c Modified: head/sys/conf/files head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/dispatcher/dsfield.c head/sys/contrib/dev/acpica/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c head/sys/contrib/dev/acpica/dispatcher/dsobject.c head/sys/contrib/dev/acpica/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/dispatcher/dswexec.c head/sys/contrib/dev/acpica/dispatcher/dswstate.c head/sys/contrib/dev/acpica/events/evevent.c head/sys/contrib/dev/acpica/events/evgpe.c head/sys/contrib/dev/acpica/events/evgpeblk.c head/sys/contrib/dev/acpica/events/evmisc.c head/sys/contrib/dev/acpica/events/evxface.c head/sys/contrib/dev/acpica/executer/exconvrt.c head/sys/contrib/dev/acpica/executer/excreate.c head/sys/contrib/dev/acpica/executer/exfield.c head/sys/contrib/dev/acpica/executer/exfldio.c head/sys/contrib/dev/acpica/executer/exmisc.c head/sys/contrib/dev/acpica/executer/exmutex.c head/sys/contrib/dev/acpica/executer/exnames.c head/sys/contrib/dev/acpica/executer/exoparg1.c head/sys/contrib/dev/acpica/executer/exoparg2.c head/sys/contrib/dev/acpica/executer/exoparg3.c head/sys/contrib/dev/acpica/executer/exoparg6.c head/sys/contrib/dev/acpica/executer/exprep.c head/sys/contrib/dev/acpica/executer/exregion.c head/sys/contrib/dev/acpica/executer/exresnte.c head/sys/contrib/dev/acpica/executer/exresolv.c head/sys/contrib/dev/acpica/executer/exresop.c head/sys/contrib/dev/acpica/executer/exstore.c head/sys/contrib/dev/acpica/executer/exsystem.c head/sys/contrib/dev/acpica/hardware/hwregs.c head/sys/contrib/dev/acpica/hardware/hwsleep.c head/sys/contrib/dev/acpica/hardware/hwvalid.c head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/acinterp.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/namespace/nsaccess.c head/sys/contrib/dev/acpica/namespace/nsdump.c head/sys/contrib/dev/acpica/namespace/nsnames.c head/sys/contrib/dev/acpica/namespace/nssearch.c head/sys/contrib/dev/acpica/namespace/nsutils.c head/sys/contrib/dev/acpica/parser/psargs.c head/sys/contrib/dev/acpica/parser/psloop.c head/sys/contrib/dev/acpica/resources/rscreate.c head/sys/contrib/dev/acpica/resources/rslist.c head/sys/contrib/dev/acpica/resources/rsmisc.c head/sys/contrib/dev/acpica/tables/tbfadt.c head/sys/contrib/dev/acpica/tables/tbutils.c head/sys/contrib/dev/acpica/tables/tbxfroot.c head/sys/contrib/dev/acpica/utilities/utalloc.c head/sys/contrib/dev/acpica/utilities/utdelete.c head/sys/contrib/dev/acpica/utilities/uteval.c head/sys/contrib/dev/acpica/utilities/utmisc.c head/sys/contrib/dev/acpica/utilities/utmutex.c head/sys/contrib/dev/acpica/utilities/utobject.c head/sys/contrib/dev/acpica/utilities/uttrack.c head/sys/dev/acpica/acpi.c head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/conf/files Fri Mar 5 21:39:16 2010 (r204773) @@ -184,6 +184,7 @@ contrib/dev/acpica/events/evxfregn.c op contrib/dev/acpica/executer/exconfig.c optional acpi contrib/dev/acpica/executer/exconvrt.c optional acpi contrib/dev/acpica/executer/excreate.c optional acpi +contrib/dev/acpica/executer/exdebug.c optional acpi contrib/dev/acpica/executer/exdump.c optional acpi contrib/dev/acpica/executer/exfield.c optional acpi contrib/dev/acpica/executer/exfldio.c optional acpi Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/changes.txt Fri Mar 5 21:39:16 2010 (r204773) @@ -1,4 +1,57 @@ ---------------------------------------- +04 March 2010. Summary of changes for version 20100304: + +1) ACPI CA Core Subsystem: + +Fixed a possible problem with the AML Mutex handling function +AcpiExReleaseMutex where the function could fault under the very rare +condition when the interpreter has blocked, the interpreter lock is released, +the interpreter is then reentered via the same thread, and attempts to +acquire an AML mutex that was previously acquired. FreeBSD report 140979. Lin +Ming. + +Implemented additional configuration support for the AML "Debug Object". +Output from the debug object can now be enabled via a global variable, +AcpiGbl_EnableAmlDebugObject. This will assist with remote machine debugging. +This debug output is now available in the release version of ACPICA instead +of just the debug version. Also, the entire debug output module can now be +configured out of the ACPICA build if desired. One new file added, +executer/exdebug.c. Lin Ming, Bob Moore. + +Added header support for the ACPI MCHI table (Management Controller Host +Interface Table). This table was added in ACPI 4.0, but the defining document +has only recently become available. + +Standardized output of integer values for ACPICA warnings/errors. Always use +0x prefix for hex output, always use %u for unsigned integer decimal output. +Affects ACPI_INFO, ACPI_ERROR, ACPI_EXCEPTION, and ACPI_WARNING (about 400 +invocations.) These invocations were converted from the original +ACPI_DEBUG_PRINT invocations and were not consistent. ACPICA BZ 835. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.1K Code, 18.0K Data, 105.1K Total + Debug Version: 163.5K Code, 50.9K Data, 214.4K Total + Current Release: + Non-Debug Version: 87.5K Code, 18.4K Data, 105.9K Total + Debug Version: 163.4K Code, 51.1K Data, 214.5K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented typechecking support for static (non-control method) +predefined named objects that are declared with the Name() operator. For +example, the type of this object is now validated to be of type Integer: +Name(_BBN, 1). This change migrates the compiler to using the core predefined +name table instead of maintaining a local version. Added a new file, +aslpredef.c. ACPICA BZ 832. + +Disassembler: Added support for the ACPI 4.0 MCHI table. + +---------------------------------------- 21 January 2010. Summary of changes for version 20100121: 1) ACPI CA Core Subsystem: Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/common/dmextern.c Fri Mar 5 21:39:16 2010 (r204773) @@ -374,7 +374,7 @@ AcpiDmAddToExternalList ( (NextExternal->Value != Value)) { ACPI_ERROR ((AE_INFO, - "Argument count mismatch for method %s %d %d", + "Argument count mismatch for method %s %u %u", NextExternal->Path, NextExternal->Value, Value)); } Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/common/dmtable.c Fri Mar 5 21:39:16 2010 (r204773) @@ -262,6 +262,7 @@ static ACPI_DMTABLE_DATA AcpiDmTableD {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, "I/O Virtualization Reporting Structure"}, {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, "Multiple APIC Description Table"}, {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, "Memory Mapped Configuration table"}, + {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, "Management Controller Host Interface table"}, {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, "Maximum System Characteristics Table"}, {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, "Root System Description Table"}, {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, "Smart Battery Specification Table"}, @@ -911,7 +912,7 @@ AcpiDmDumpTable ( default: ACPI_ERROR ((AE_INFO, - "**** Invalid table opcode [%X] ****\n", Info->Opcode)); + "**** Invalid table opcode [0x%X] ****\n", Info->Opcode)); return (AE_SUPPORT); } } Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Fri Mar 5 21:39:16 2010 (r204773) @@ -363,7 +363,7 @@ AcpiDmDumpAsf ( break; default: - AcpiOsPrintf ("\n**** Unknown ASF sub-table type %X\n", SubTable->Header.Type); + AcpiOsPrintf ("\n**** Unknown ASF sub-table type 0x%X\n", SubTable->Header.Type); return; } @@ -561,7 +561,7 @@ AcpiDmDumpDmar ( ScopeOffset = sizeof (ACPI_DMAR_RHSA); break; default: - AcpiOsPrintf ("\n**** Unknown DMAR sub-table type %X\n\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown DMAR sub-table type 0x%X\n\n", SubTable->Type); return; } @@ -809,7 +809,7 @@ AcpiDmDumpHest ( default: /* Cannot continue on unknown type - no length */ - AcpiOsPrintf ("\n**** Unknown HEST sub-table type %X\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown HEST sub-table type 0x%X\n", SubTable->Type); return; } @@ -916,7 +916,7 @@ AcpiDmDumpIvrs ( InfoTable = AcpiDmTableInfoIvrs1; break; default: - AcpiOsPrintf ("\n**** Unknown IVRS sub-table type %X\n", + AcpiOsPrintf ("\n**** Unknown IVRS sub-table type 0x%X\n", SubTable->Type); /* Attempt to continue */ @@ -1002,7 +1002,7 @@ AcpiDmDumpIvrs ( InfoTable = AcpiDmTableInfoIvrs4; AcpiOsPrintf ( "\n**** Unknown IVRS device entry type/length: " - "%.2X/%X at offset %.4X: (header below)\n", + "0x%.2X/0x%X at offset 0x%.4X: (header below)\n", EntryType, EntryLength, EntryOffset); break; } @@ -1110,7 +1110,7 @@ AcpiDmDumpMadt ( InfoTable = AcpiDmTableInfoMadt10; break; default: - AcpiOsPrintf ("\n**** Unknown MADT sub-table type %X\n\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown MADT sub-table type 0x%X\n\n", SubTable->Type); /* Attempt to continue */ @@ -1378,7 +1378,7 @@ AcpiDmDumpSrat ( InfoTable = AcpiDmTableInfoSrat2; break; default: - AcpiOsPrintf ("\n**** Unknown SRAT sub-table type %X\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown SRAT sub-table type 0x%X\n", SubTable->Type); /* Attempt to continue */ Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Fri Mar 5 21:39:16 2010 (r204773) @@ -142,6 +142,7 @@ #define ACPI_IVRS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_IVRS,f) #define ACPI_MADT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MADT,f) #define ACPI_MCFG_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MCFG,f) +#define ACPI_MCHI_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MCHI,f) #define ACPI_MSCT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MSCT,f) #define ACPI_SBST_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SBST,f) #define ACPI_SLIT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SLIT,f) @@ -1226,6 +1227,30 @@ ACPI_DMTABLE_INFO AcpiDmTableI /******************************************************************************* * + * MCHI - Management Controller Host Interface table + * + ******************************************************************************/ + +ACPI_DMTABLE_INFO AcpiDmTableInfoMchi[] = +{ + {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (InterfaceType), "Interface Type"}, + {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (Protocol), "Protocol"}, + {ACPI_DMT_UINT64, ACPI_MCHI_OFFSET (ProtocolData), "Protocol Data"}, + {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (InterruptType), "Interrupt Type"}, + {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (Gpe), "Gpe"}, + {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (PciDeviceFlag), "Pci Device Flag"}, + {ACPI_DMT_UINT32, ACPI_MCHI_OFFSET (GlobalInterrupt), "Global Interrupt"}, + {ACPI_DMT_GAS, ACPI_MCHI_OFFSET (ControlRegister), "Control Register"}, + {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (PciSegment), "Pci Segment"}, + {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (PciBus), "Pci Bus"}, + {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (PciDevice), "Pci Device"}, + {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (PciFunction), "Pci Function"}, + {ACPI_DMT_EXIT, 0, NULL} +}; + + +/******************************************************************************* + * * MSCT - Maximum System Characteristics Table (ACPI 4.0) * ******************************************************************************/ Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Fri Mar 5 21:39:16 2010 (r204773) @@ -143,16 +143,6 @@ AnGetBtype ( ACPI_PARSE_OBJECT *Op); static UINT32 -AnCheckForReservedName ( - ACPI_PARSE_OBJECT *Op, - char *Name); - -static void -AnCheckForReservedMethod ( - ACPI_PARSE_OBJECT *Op, - ASL_METHOD_INFO *MethodInfo); - -static UINT32 AnMapObjTypeToBtype ( ACPI_PARSE_OBJECT *Op); @@ -598,219 +588,6 @@ AnGetBtype ( /******************************************************************************* * - * FUNCTION: AnCheckForReservedName - * - * PARAMETERS: Op - A parse node - * Name - NameSeg to check - * - * RETURN: None - * - * DESCRIPTION: Check a NameSeg against the reserved list. - * - ******************************************************************************/ - -static UINT32 -AnCheckForReservedName ( - ACPI_PARSE_OBJECT *Op, - char *Name) -{ - UINT32 i; - - - if (Name[0] == 0) - { - AcpiOsPrintf ("Found a null name, external = %s\n", - Op->Asl.ExternalName); - } - - /* All reserved names are prefixed with a single underscore */ - - if (Name[0] != '_') - { - return (ACPI_NOT_RESERVED_NAME); - } - - /* Check for a standard reserved method name */ - - for (i = 0; ReservedMethods[i].Name; i++) - { - if (ACPI_COMPARE_NAME (Name, ReservedMethods[i].Name)) - { - if (ReservedMethods[i].Flags & ASL_RSVD_SCOPE) - { - AslError (ASL_ERROR, ASL_MSG_RESERVED_WORD, Op, - Op->Asl.ExternalName); - return (ACPI_PREDEFINED_NAME); - } - else if (ReservedMethods[i].Flags & ASL_RSVD_RESOURCE_NAME) - { - AslError (ASL_ERROR, ASL_MSG_RESERVED_WORD, Op, - Op->Asl.ExternalName); - return (ACPI_PREDEFINED_NAME); - } - - /* Return index into reserved array */ - - return i; - } - } - - /* - * Now check for the "special" reserved names -- - * GPE: _Lxx - * GPE: _Exx - * EC: _Qxx - */ - if ((Name[1] == 'L') || - (Name[1] == 'E') || - (Name[1] == 'Q')) - { - /* The next two characters must be hex digits */ - - if ((isxdigit ((int) Name[2])) && - (isxdigit ((int) Name[3]))) - { - return (ACPI_EVENT_RESERVED_NAME); - } - } - - - /* Check for the names reserved for the compiler itself: _T_x */ - - else if ((Op->Asl.ExternalName[1] == 'T') && - (Op->Asl.ExternalName[2] == '_')) - { - /* Ignore if actually emitted by the compiler */ - - if (Op->Asl.CompileFlags & NODE_COMPILER_EMITTED) - { - return (ACPI_NOT_RESERVED_NAME); - } - - /* - * Was not actually emitted by the compiler. This is a special case, - * however. If the ASL code being compiled was the result of a - * dissasembly, it may possibly contain valid compiler-emitted names - * of the form "_T_x". We don't want to issue an error or even a - * warning and force the user to manually change the names. So, we - * will issue a remark instead. - */ - AslError (ASL_REMARK, ASL_MSG_COMPILER_RESERVED, Op, Op->Asl.ExternalName); - return (ACPI_COMPILER_RESERVED_NAME); - } - - /* - * The name didn't match any of the known reserved names. Flag it as a - * warning, since the entire namespace starting with an underscore is - * reserved by the ACPI spec. - */ - AslError (ASL_WARNING, ASL_MSG_UNKNOWN_RESERVED_NAME, Op, - Op->Asl.ExternalName); - - return (ACPI_NOT_RESERVED_NAME); -} - - -/******************************************************************************* - * - * FUNCTION: AnCheckForReservedMethod - * - * PARAMETERS: Op - A parse node of type "METHOD". - * MethodInfo - Saved info about this method - * - * RETURN: None - * - * DESCRIPTION: If method is a reserved name, check that the number of arguments - * and the return type (returns a value or not) is correct. - * - ******************************************************************************/ - -static void -AnCheckForReservedMethod ( - ACPI_PARSE_OBJECT *Op, - ASL_METHOD_INFO *MethodInfo) -{ - UINT32 Index; - UINT32 RequiredArgsCurrent; - UINT32 RequiredArgsOld; - - - /* Check for a match against the reserved name list */ - - Index = AnCheckForReservedName (Op, Op->Asl.NameSeg); - - switch (Index) - { - case ACPI_NOT_RESERVED_NAME: - case ACPI_PREDEFINED_NAME: - case ACPI_COMPILER_RESERVED_NAME: - - /* Just return, nothing to do */ - break; - - - case ACPI_EVENT_RESERVED_NAME: - - Gbl_ReservedMethods++; - - /* NumArguments must be zero for all _Lxx, _Exx, and _Qxx methods */ - - if (MethodInfo->NumArguments != 0) - { - sprintf (MsgBuffer, "%s requires %d", - Op->Asl.ExternalName, 0); - - AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op, MsgBuffer); - } - break; - - - default: - - Gbl_ReservedMethods++; - - /* - * Matched a reserved method name - * - * Validate the ASL-defined argument count. Allow two different legal - * arg counts. - */ - RequiredArgsCurrent = ReservedMethods[Index].NumArguments & 0x0F; - RequiredArgsOld = ReservedMethods[Index].NumArguments >> 4; - - if ((MethodInfo->NumArguments != RequiredArgsCurrent) && - (MethodInfo->NumArguments != RequiredArgsOld)) - { - sprintf (MsgBuffer, "%s requires %d", - ReservedMethods[Index].Name, - RequiredArgsCurrent); - - if (MethodInfo->NumArguments > RequiredArgsCurrent) - { - AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op, - MsgBuffer); - } - else - { - AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_LO, Op, - MsgBuffer); - } - } - - if (MethodInfo->NumReturnNoValue && - ReservedMethods[Index].Flags & ASL_RSVD_RETURN_VALUE) - { - sprintf (MsgBuffer, "%s", ReservedMethods[Index].Name); - - AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op, MsgBuffer); - } - break; - } -} - - -/******************************************************************************* - * * FUNCTION: AnMapObjTypeToBtype * * PARAMETERS: Op - A parse node @@ -1187,7 +964,7 @@ AnMethodAnalysisWalkBegin ( * The first operand is a name to be created in the namespace. * Check against the reserved list. */ - i = AnCheckForReservedName (Op, Op->Asl.NameSeg); + i = ApCheckForPredefinedName (Op, Op->Asl.NameSeg); if (i < ACPI_VALID_RESERVED_NAME_MAX) { AslError (ASL_ERROR, ASL_MSG_RESERVED_USE, Op, Op->Asl.ExternalName); @@ -1197,51 +974,29 @@ AnMethodAnalysisWalkBegin ( case PARSEOP_NAME: - i = AnCheckForReservedName (Op, Op->Asl.NameSeg); - if (i < ACPI_VALID_RESERVED_NAME_MAX) + /* Typecheck any predefined names statically defined with Name() */ + + ApCheckForPredefinedObject (Op, Op->Asl.NameSeg); + + /* Special typechecking for _HID */ + + if (!ACPI_STRCMP (METHOD_NAME__HID, Op->Asl.NameSeg)) { - if (ReservedMethods[i].NumArguments > 0) + Next = Op->Asl.Child->Asl.Next; + if (Next->Asl.ParseOpcode == PARSEOP_STRING_LITERAL) { /* - * This reserved name must be a control method because - * it must have arguments + * _HID is a string, all characters must be alphanumeric. + * One of the things we want to catch here is the use of + * a leading asterisk in the string. */ - AslError (ASL_ERROR, ASL_MSG_RESERVED_METHOD, Op, - "with arguments"); - } - - /* Typechecking for _HID */ - - else if (!ACPI_STRCMP (METHOD_NAME__HID, ReservedMethods[i].Name)) - { - /* Examine the second operand to typecheck it */ - - Next = Op->Asl.Child->Asl.Next; - - if ((Next->Asl.ParseOpcode != PARSEOP_INTEGER) && - (Next->Asl.ParseOpcode != PARSEOP_STRING_LITERAL)) - { - /* _HID must be a string or an integer */ - - AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Next, - "String or Integer"); - } - - if (Next->Asl.ParseOpcode == PARSEOP_STRING_LITERAL) + for (i = 0; Next->Asl.Value.String[i]; i++) { - /* - * _HID is a string, all characters must be alphanumeric. - * One of the things we want to catch here is the use of - * a leading asterisk in the string. - */ - for (i = 0; Next->Asl.Value.String[i]; i++) + if (!isalnum ((int) Next->Asl.Value.String[i])) { - if (!isalnum ((int) Next->Asl.Value.String[i])) - { - AslError (ASL_ERROR, ASL_MSG_ALPHANUMERIC_STRING, - Next, Next->Asl.Value.String); - break; - } + AslError (ASL_ERROR, ASL_MSG_ALPHANUMERIC_STRING, + Next, Next->Asl.Value.String); + break; } } } @@ -1394,7 +1149,7 @@ AnMethodAnalysisWalkEnd ( * Check predefined method names for correct return behavior * and correct number of arguments */ - AnCheckForReservedMethod (Op, MethodInfo); + ApCheckForPredefinedMethod (Op, MethodInfo); ACPI_FREE (MethodInfo); break; Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Fri Mar 5 21:39:16 2010 (r204773) @@ -452,8 +452,27 @@ ACPI_OBJECT_TYPE AslMapNamedOpcodeToDataType ( UINT16 Opcode); + +/* + * aslpredef - ACPI predefined names support + */ +void +ApCheckForPredefinedMethod ( + ACPI_PARSE_OBJECT *Op, + ASL_METHOD_INFO *MethodInfo); + +UINT32 +ApCheckForPredefinedName ( + ACPI_PARSE_OBJECT *Op, + char *Name); + +void +ApCheckForPredefinedObject ( + ACPI_PARSE_OBJECT *Op, + char *Name); + void -MpDisplayReservedNames ( +ApDisplayReservedNames ( void); Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Fri Mar 5 21:39:16 2010 (r204773) @@ -261,7 +261,6 @@ ASL_EXTERN FILE *Acp ASL_EXTERN ASL_ANALYSIS_WALK_INFO AnalysisWalkInfo; ASL_EXTERN ACPI_TABLE_HEADER TableHeader; -extern const ASL_RESERVED_INFO ReservedMethods[]; /* Event timing */ Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmain.c Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/compiler/aslmain.c Fri Mar 5 21:39:16 2010 (r204773) @@ -570,7 +570,7 @@ AslDoOptions ( case 'r': /* reserved names */ - MpDisplayReservedNames (); + ApDisplayReservedNames (); exit (0); default: Modified: head/sys/contrib/dev/acpica/compiler/aslmap.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmap.c Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/compiler/aslmap.c Fri Mar 5 21:39:16 2010 (r204773) @@ -114,7 +114,6 @@ * *****************************************************************************/ - #include #include #include @@ -171,322 +170,6 @@ AslMapNamedOpcodeToDataType ( /******************************************************************************* * - * FUNCTION: MpDisplayReservedNames - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Print the table above - * - ******************************************************************************/ - -void -MpDisplayReservedNames ( - void) -{ - UINT32 i; - - printf ("Reserved name information\n\n"); - - for (i = 0; ReservedMethods[i].Name; i++) - { - printf ("%s ", ReservedMethods[i].Name); - - if (ReservedMethods[i].Flags & ASL_RSVD_SCOPE) - { - printf ("Reserved scope name\n"); - } - else if (ReservedMethods[i].Flags & ASL_RSVD_RESOURCE_NAME) - { - printf ("Resource data type reserved field name\n"); - } - else - { - printf ("Method with %d arguments, ", - ReservedMethods[i].NumArguments & 0x0F); - - if (ReservedMethods[i].Flags & ASL_RSVD_RETURN_VALUE) - { - printf ("must return a value\n"); - } - else - { - printf ("no return value\n"); - } - } - } -} - - -/******************************************************************************* - * - * DATA STRUCTURE: ReservedMethods - * - * DESCRIPTION: Contains all reserved methods and names as defined in the - * ACPI specification. Used during the analysis phase to - * ensure that reserved methods have the required number of - * arguments and the proper return type. - * - * Each entry in the table contains the following items: - * - * Name - The ACPI reserved name - * Args - Number of arguments to the method - * Flags - Whether this method must return a value or not. Or if the - * name is a resource descriptor label. - * - ******************************************************************************/ - -const ASL_RESERVED_INFO ReservedMethods[] = { - {"_AC0", 0, ASL_RSVD_RETURN_VALUE}, - {"_AC1", 0, ASL_RSVD_RETURN_VALUE}, - {"_AC2", 0, ASL_RSVD_RETURN_VALUE}, - {"_AC3", 0, ASL_RSVD_RETURN_VALUE}, - {"_AC4", 0, ASL_RSVD_RETURN_VALUE}, - {"_AC5", 0, ASL_RSVD_RETURN_VALUE}, - {"_AC6", 0, ASL_RSVD_RETURN_VALUE}, - {"_AC7", 0, ASL_RSVD_RETURN_VALUE}, - {"_AC8", 0, ASL_RSVD_RETURN_VALUE}, - {"_AC9", 0, ASL_RSVD_RETURN_VALUE}, - {"_ADR", 0, ASL_RSVD_RETURN_VALUE}, - {"_AL0", 0, ASL_RSVD_RETURN_VALUE}, - {"_AL1", 0, ASL_RSVD_RETURN_VALUE}, - {"_AL2", 0, ASL_RSVD_RETURN_VALUE}, - {"_AL3", 0, ASL_RSVD_RETURN_VALUE}, - {"_AL4", 0, ASL_RSVD_RETURN_VALUE}, - {"_AL5", 0, ASL_RSVD_RETURN_VALUE}, - {"_AL6", 0, ASL_RSVD_RETURN_VALUE}, - {"_AL7", 0, ASL_RSVD_RETURN_VALUE}, - {"_AL8", 0, ASL_RSVD_RETURN_VALUE}, - {"_AL9", 0, ASL_RSVD_RETURN_VALUE}, - {"_ALC", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_ALI", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_ALN", 0, ASL_RSVD_RESOURCE_NAME}, - {"_ALP", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_ALR", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_ALT", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_ART", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_ASI", 0, ASL_RSVD_RESOURCE_NAME}, - {"_ASZ", 0, ASL_RSVD_RESOURCE_NAME}, - {"_BAS", 0, ASL_RSVD_RESOURCE_NAME}, - {"_BBN", 0, ASL_RSVD_RETURN_VALUE}, - {"_BCL", 0, ASL_RSVD_RETURN_VALUE}, - {"_BCM", 1, 0}, - {"_BCT", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_BDN", 0, ASL_RSVD_RETURN_VALUE}, - {"_BFS", 1, 0}, - {"_BIF", 0, ASL_RSVD_RETURN_VALUE}, - {"_BIX", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_BLT", 3, 0}, /* Acpi 3.0 */ - {"_BM_", 0, ASL_RSVD_RESOURCE_NAME}, - {"_BMA", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_BMC", 1, 0}, /* Acpi 3.0 */ - {"_BMD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_BMS", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_BQC", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_BST", 0, ASL_RSVD_RETURN_VALUE}, - {"_BTM", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_BTP", 1, 0}, - {"_CBA", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_CDM", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_CID", 0, ASL_RSVD_RETURN_VALUE}, - {"_CRS", 0, ASL_RSVD_RETURN_VALUE}, - {"_CRT", 0, ASL_RSVD_RETURN_VALUE}, - {"_CSD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_CST", 0, ASL_RSVD_RETURN_VALUE}, - {"_DCK", 1, ASL_RSVD_RETURN_VALUE}, - {"_DCS", 0, ASL_RSVD_RETURN_VALUE}, - {"_DDC", 1, ASL_RSVD_RETURN_VALUE}, - {"_DDN", 0, 0}, - {"_DEC", 0, ASL_RSVD_RESOURCE_NAME}, - {"_DGS", 0, ASL_RSVD_RETURN_VALUE}, - {"_DIS", 0, 0}, - {"_DMA", 0, ASL_RSVD_RETURN_VALUE}, - {"_DOD", 0, ASL_RSVD_RETURN_VALUE}, - {"_DOS", 1, 0}, - {"_DSM", 4, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_DSS", 1, 0}, - {"_DSW", 3, 0}, /* Acpi 3.0 */ - {"_DTI", 1, 0}, /* Acpi 4.0 */ - {"_EC_", 0, ASL_RSVD_RETURN_VALUE}, - {"_EDL", 0, ASL_RSVD_RETURN_VALUE}, - {"_EJ0", 1, 0}, - {"_EJ1", 1, 0}, - {"_EJ2", 1, 0}, - {"_EJ3", 1, 0}, - {"_EJ4", 1, 0}, - {"_EJD", 0, ASL_RSVD_RETURN_VALUE}, - {"_ERR", 3, ASL_RSVD_RETURN_VALUE}, - {"_FDE", 0, ASL_RSVD_RETURN_VALUE}, - {"_FDI", 0, ASL_RSVD_RETURN_VALUE}, - {"_FDM", 1, 0}, - {"_FIF", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_FIX", 0, ASL_RSVD_RETURN_VALUE}, - {"_FPS", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_FSL", 1, 0}, /* Acpi 4.0 */ - {"_FST", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_GAI", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_GHL", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_GL_", 0, ASL_RSVD_RETURN_VALUE}, - {"_GLK", 0, ASL_RSVD_RETURN_VALUE}, - {"_GPD", 0, ASL_RSVD_RETURN_VALUE}, - {"_GPE", 0, ASL_RSVD_RETURN_VALUE}, - {"_GRA", 0, ASL_RSVD_RESOURCE_NAME}, - {"_GSB", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_GTF", 0, ASL_RSVD_RETURN_VALUE}, - {"_GTM", 0, ASL_RSVD_RETURN_VALUE}, - {"_GTS", 1, 0}, - {"_HE_", 0, ASL_RSVD_RESOURCE_NAME}, - {"_HID", 0, ASL_RSVD_RETURN_VALUE}, - {"_HOT", 0, ASL_RSVD_RETURN_VALUE}, - {"_HPP", 0, ASL_RSVD_RETURN_VALUE}, - {"_HPX", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_IFT", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_INI", 0, 0}, - {"_INT", 0, ASL_RSVD_RESOURCE_NAME}, - {"_IRC", 0, 0}, - {"_LCK", 1, 0}, - {"_LEN", 0, ASL_RSVD_RESOURCE_NAME}, - {"_LID", 0, ASL_RSVD_RETURN_VALUE}, - {"_LL_", 0, ASL_RSVD_RESOURCE_NAME}, - {"_MAF", 0, ASL_RSVD_RESOURCE_NAME}, - {"_MAT", 0, ASL_RSVD_RETURN_VALUE}, - {"_MAX", 0, ASL_RSVD_RESOURCE_NAME}, - {"_MBM", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_MEM", 0, ASL_RSVD_RESOURCE_NAME}, - {"_MIF", 0, ASL_RSVD_RESOURCE_NAME}, - {"_MIN", 0, ASL_RSVD_RESOURCE_NAME}, - {"_MLS", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_MSG", 1, 0}, - {"_MSM", 4, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_MTP", 0, ASL_RSVD_RESOURCE_NAME}, - {"_NTT", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_OFF", 0, 0}, - {"_ON_", 0, 0}, - {"_OS_", 0, ASL_RSVD_RETURN_VALUE}, - {"_OSC", 4, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_OSI", 1, ASL_RSVD_RETURN_VALUE}, - {"_OST", 3, 0}, /* Acpi 3.0 */ - {"_PAI", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_PCL", 0, ASL_RSVD_RETURN_VALUE}, - {"_PCT", 0, ASL_RSVD_RETURN_VALUE}, - {"_PDC", 1, 0}, - {"_PDL", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_PIC", 1, 0}, - {"_PIF", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_PLD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_PMC", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_PMD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_PMM", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_PPC", 0, ASL_RSVD_RETURN_VALUE}, - {"_PPE", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_PR0", 0, ASL_RSVD_RETURN_VALUE}, - {"_PR1", 0, ASL_RSVD_RETURN_VALUE}, - {"_PR2", 0, ASL_RSVD_RETURN_VALUE}, - {"_PR3", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_PRL", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_PRS", 0, ASL_RSVD_RETURN_VALUE}, - {"_PRT", 0, ASL_RSVD_RETURN_VALUE}, - {"_PRW", 0, ASL_RSVD_RETURN_VALUE}, - {"_PS0", 0, 0}, - {"_PS1", 0, 0}, - {"_PS2", 0, 0}, - {"_PS3", 0, 0}, - {"_PSC", 0, ASL_RSVD_RETURN_VALUE}, - {"_PSD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_PSL", 0, ASL_RSVD_RETURN_VALUE}, - {"_PSR", 0, ASL_RSVD_RETURN_VALUE}, - {"_PSS", 0, ASL_RSVD_RETURN_VALUE}, - {"_PSV", 0, ASL_RSVD_RETURN_VALUE}, - {"_PSW", 1, 0}, - {"_PTC", 0, ASL_RSVD_RETURN_VALUE}, - {"_PTP", 2, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_PTS", 1, 0}, - {"_PUR", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_PXM", 0, ASL_RSVD_RETURN_VALUE}, - {"_RBO", 0, ASL_RSVD_RESOURCE_NAME}, - {"_RBW", 0, ASL_RSVD_RESOURCE_NAME}, - {"_REG", 2, 0}, - {"_REV", 0, ASL_RSVD_RETURN_VALUE}, - {"_RMV", 0, ASL_RSVD_RETURN_VALUE}, - {"_RNG", 0, ASL_RSVD_RESOURCE_NAME}, - {"_ROM", 2, ASL_RSVD_RETURN_VALUE}, - {"_RT_", 0, ASL_RSVD_RESOURCE_NAME}, /* Acpi 3.0 */ - {"_RTV", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_RW_", 0, ASL_RSVD_RESOURCE_NAME}, - {"_S0_", 0, ASL_RSVD_RETURN_VALUE}, - {"_S1_", 0, ASL_RSVD_RETURN_VALUE}, - {"_S2_", 0, ASL_RSVD_RETURN_VALUE}, - {"_S3_", 0, ASL_RSVD_RETURN_VALUE}, - {"_S4_", 0, ASL_RSVD_RETURN_VALUE}, - {"_S5_", 0, ASL_RSVD_RETURN_VALUE}, - {"_S1D", 0, ASL_RSVD_RETURN_VALUE}, - {"_S2D", 0, ASL_RSVD_RETURN_VALUE}, - {"_S3D", 0, ASL_RSVD_RETURN_VALUE}, - {"_S4D", 0, ASL_RSVD_RETURN_VALUE}, - {"_S0W", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_S1W", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_S2W", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_S3W", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_S4W", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_SB_", 0, ASL_RSVD_SCOPE}, - {"_SBS", 0, ASL_RSVD_RETURN_VALUE}, - {"_SCP", 0x13, 0}, /* Acpi 1.0 - one arg; Acpi 3.0 - three args */ - {"_SDD", 1, 0}, /* Acpi 3.0 */ - {"_SEG", 0, ASL_RSVD_RETURN_VALUE}, - {"_SHL", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_SHR", 0, ASL_RSVD_RESOURCE_NAME}, - {"_SI_", 0, ASL_RSVD_SCOPE}, - {"_SIZ", 0, ASL_RSVD_RESOURCE_NAME}, - {"_SLI", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_SPD", 1, ASL_RSVD_RETURN_VALUE}, - {"_SRS", 1, 0}, - {"_SRV", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_SST", 1, 0}, - {"_STA", 0, ASL_RSVD_RETURN_VALUE}, - {"_STM", 3, 0}, - {"_STP", 2, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_STR", 0, ASL_RSVD_RETURN_VALUE}, - {"_STV", 2, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_SUN", 0, ASL_RSVD_RETURN_VALUE}, - {"_SWS", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_TC1", 0, ASL_RSVD_RETURN_VALUE}, - {"_TC2", 0, ASL_RSVD_RETURN_VALUE}, - {"_TDL", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0b */ - {"_TIP", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_TIV", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */ - {"_TMP", 0, ASL_RSVD_RETURN_VALUE}, - {"_TPC", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_TPT", 1, 0}, /* Acpi 3.0 */ - {"_TRA", 0, ASL_RSVD_RESOURCE_NAME}, - {"_TRS", 0, ASL_RSVD_RESOURCE_NAME}, - {"_TRT", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_TSD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_TSF", 0, ASL_RSVD_RESOURCE_NAME}, /* Acpi 3.0 */ - {"_TSP", 0, ASL_RSVD_RETURN_VALUE}, - {"_TSS", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_TST", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_TTP", 0, ASL_RSVD_RESOURCE_NAME}, - {"_TTS", 1, 0}, /* Acpi 3.0 */ - {"_TYP", 0, ASL_RSVD_RESOURCE_NAME}, - {"_TZ_", 0, ASL_RSVD_SCOPE}, - {"_TZD", 0, ASL_RSVD_RETURN_VALUE}, - {"_TZM", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_TZP", 0, ASL_RSVD_RETURN_VALUE}, - {"_UID", 0, ASL_RSVD_RETURN_VALUE}, - {"_UPC", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_UPD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_UPP", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */ - {"_VPO", 0, ASL_RSVD_RETURN_VALUE}, - {"_WAK", 1, ASL_RSVD_RETURN_VALUE}, - {"_WDG", 0, ASL_RSVD_RETURN_VALUE}, /* MS Extension */ - {"_WED", 1, ASL_RSVD_RETURN_VALUE}, /* MS Extension */ - {NULL, 0, 0}, -}; - - -/******************************************************************************* - * * DATA STRUCTURE: AslKeywordMapping * * DESCRIPTION: Maps the ParseOpcode to the actual AML opcode. The parse Copied and modified: head/sys/contrib/dev/acpica/compiler/aslpredef.c (from r204768, vendor-sys/acpica/dist/compiler/aslpredef.c) ============================================================================== --- vendor-sys/acpica/dist/compiler/aslpredef.c Fri Mar 5 20:31:29 2010 (r204768, copy source) +++ head/sys/contrib/dev/acpica/compiler/aslpredef.c Fri Mar 5 21:39:16 2010 (r204773) @@ -115,11 +115,11 @@ #define ACPI_CREATE_PREDEFINED_TABLE -#include "aslcompiler.h" +#include #include "aslcompiler.y.h" -#include "amlcode.h" -#include "acparser.h" -#include "acpredef.h" +#include +#include +#include #define _COMPONENT ACPI_COMPILER Modified: head/sys/contrib/dev/acpica/compiler/aslstubs.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstubs.c Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/compiler/aslstubs.c Fri Mar 5 21:39:16 2010 (r204773) @@ -250,6 +250,15 @@ AcpiEvCheckForWakeOnlyGpe ( return (AE_OK); } +void +AcpiExDoDebugObject ( + ACPI_OPERAND_OBJECT *SourceDesc, + UINT32 Level, + UINT32 Index) +{ + return; +} + ACPI_STATUS AcpiExReadDataFromField ( ACPI_WALK_STATE *WalkState, @@ -276,7 +285,6 @@ AcpiExLoadTableOp ( return (AE_SUPPORT); } - ACPI_STATUS AcpiExUnloadTable ( ACPI_OPERAND_OBJECT *DdbHandle) Modified: head/sys/contrib/dev/acpica/compiler/asltypes.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltypes.h Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/compiler/asltypes.h Fri Mar 5 21:39:16 2010 (r204773) @@ -188,21 +188,6 @@ typedef struct asl_mapping_entry } ASL_MAPPING_ENTRY; -/* An entry in the Reserved Name information table */ - -#define ASL_RSVD_RETURN_VALUE 0x01 -#define ASL_RSVD_RESOURCE_NAME 0x02 -#define ASL_RSVD_SCOPE 0x04 - -typedef struct asl_reserved_info -{ - char *Name; - UINT8 NumArguments; - UINT8 Flags; - -} ASL_RESERVED_INFO; - - /* Parse tree walk info structure */ typedef struct asl_walk_info @@ -522,7 +507,7 @@ char *AslMessages /* ASL_MSG_RESERVED_ARG_COUNT_HI */ "Reserved method has too many arguments", /* ASL_MSG_RESERVED_ARG_COUNT_LO */ "Reserved method has too few arguments", /* ASL_MSG_RESERVED_METHOD */ "Reserved name must be a control method", -/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid operand type for reserved name, must be", +/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name, must be", /* ASL_MSG_RESERVED_RETURN_VALUE */ "Reserved method must return a value", /* ASL_MSG_RESERVED_USE */ "Invalid use of reserved name", /* ASL_MSG_RESERVED_WORD */ "Use of reserved name", Modified: head/sys/contrib/dev/acpica/dispatcher/dsfield.c ============================================================================== --- head/sys/contrib/dev/acpica/dispatcher/dsfield.c Fri Mar 5 21:25:20 2010 (r204772) +++ head/sys/contrib/dev/acpica/dispatcher/dsfield.c Fri Mar 5 21:39:16 2010 (r204773) @@ -424,7 +424,7 @@ AcpiDsGetFieldNames ( default: ACPI_ERROR ((AE_INFO, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 22:44:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28912106566C; Fri, 5 Mar 2010 22:44:50 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 176F58FC20; Fri, 5 Mar 2010 22:44:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25Minws034808; Fri, 5 Mar 2010 22:44:49 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25MinPZ034806; Fri, 5 Mar 2010 22:44:49 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003052244.o25MinPZ034806@svn.freebsd.org> From: Juli Mallett Date: Fri, 5 Mar 2010 22:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204776 - head/sys/mips/cavium/dev/rgmii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 22:44:50 -0000 Author: jmallett Date: Fri Mar 5 22:44:49 2010 New Revision: 204776 URL: http://svn.freebsd.org/changeset/base/204776 Log: Do not mask off the low byte of the chipid, it makes some of the case statements unreachable and seems to be wrong. Fixes detection of the number of ports available on some models. Sponsored by: Packet Forensics Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c Fri Mar 5 22:43:44 2010 (r204775) +++ head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c Fri Mar 5 22:44:49 2010 (r204776) @@ -2181,7 +2181,7 @@ static int octeon_has_4ports (void) u_int chipid; int retcode = 1; - chipid = octeon_get_chipid() & 0xffffff00; + chipid = octeon_get_chipid(); switch (chipid) { case OCTEON_CN31XX_CHIP: From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 22:46:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C97E3106564A; Fri, 5 Mar 2010 22:46:11 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8BC38FC0C; Fri, 5 Mar 2010 22:46:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25MkBVA035149; Fri, 5 Mar 2010 22:46:11 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25MkBaG035147; Fri, 5 Mar 2010 22:46:11 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003052246.o25MkBaG035147@svn.freebsd.org> From: Juli Mallett Date: Fri, 5 Mar 2010 22:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204777 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 22:46:11 -0000 Author: jmallett Date: Fri Mar 5 22:46:11 2010 New Revision: 204777 URL: http://svn.freebsd.org/changeset/base/204777 Log: Properly detect a type of real board that claims to have a 0.0 revision. This fixes at least memory detection on that board. Sponsored by: Packet Forensics Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Fri Mar 5 22:44:49 2010 (r204776) +++ head/sys/mips/cavium/octeon_machdep.c Fri Mar 5 22:46:11 2010 (r204777) @@ -873,8 +873,9 @@ int octeon_chip_rev_major = 0, octeon_ch static octeon_boot_descriptor_t *app_desc_ptr; static cvmx_bootinfo_t *cvmx_desc_ptr; -#define OCTEON_BOARD_TYPE_NONE 0 -#define OCTEON_BOARD_TYPE_SIM 1 +#define OCTEON_BOARD_TYPE_NONE 0 +#define OCTEON_BOARD_TYPE_SIM 1 +#define OCTEON_BOARD_TYPE_CN3010_EVB_HS5 11 #define OCTEON_CLOCK_MIN (100 * 1000 * 1000) #define OCTEON_CLOCK_MAX (800 * 1000 * 1000) @@ -886,11 +887,23 @@ static cvmx_bootinfo_t *cvmx_desc_ptr; int octeon_board_real(void) { - if ((octeon_board_type == OCTEON_BOARD_TYPE_NONE) || - (octeon_board_type == OCTEON_BOARD_TYPE_SIM) || - !octeon_board_rev_major) + switch (octeon_board_type) { + case OCTEON_BOARD_TYPE_NONE: + case OCTEON_BOARD_TYPE_SIM: return 0; - return 1; + case OCTEON_BOARD_TYPE_CN3010_EVB_HS5: + /* + * XXX + * The CAM-0100 identifies itself as type 11, revision 0.0, + * despite its being rather real. Disable the revision check + * for type 11. + */ + return 1; + default: + if (octeon_board_rev_major == 0) + return 0; + return 1; + } } static void From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 22:48:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1AD1106566B; Fri, 5 Mar 2010 22:48:34 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF7D28FC14; Fri, 5 Mar 2010 22:48:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25MmYXS035730; Fri, 5 Mar 2010 22:48:34 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25MmYc7035728; Fri, 5 Mar 2010 22:48:34 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003052248.o25MmYc7035728@svn.freebsd.org> From: Juli Mallett Date: Fri, 5 Mar 2010 22:48:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204778 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 22:48:35 -0000 Author: jmallett Date: Fri Mar 5 22:48:34 2010 New Revision: 204778 URL: http://svn.freebsd.org/changeset/base/204778 Log: o) Simplify the implementation of bus read/write functions, and eliminate some redundant implementations. o) Use ABI, not ISA, to determine address length. o) Disable and restore interrupts around any operation that uses all 64 bits of a register. In kernels using the O32 ABI, the upper 32 bits of those registers is likely to be corrupted by an interrupt. Sponsored by: Packet Forensics Modified: head/sys/mips/cavium/octeon_pcmap_regs.h Modified: head/sys/mips/cavium/octeon_pcmap_regs.h ============================================================================== --- head/sys/mips/cavium/octeon_pcmap_regs.h Fri Mar 5 22:46:11 2010 (r204777) +++ head/sys/mips/cavium/octeon_pcmap_regs.h Fri Mar 5 22:48:34 2010 (r204778) @@ -90,350 +90,228 @@ extern struct pcpu *cpuid_to_pcpu[]; #define OCTEON_SYNCW __asm __volatile (".word 0x10f" : : ) #define OCTEON_SYNCWS __asm __volatile (".word 0x14f" : : ) -#if defined(__mips_n32) || defined(__mips_n64) +#if defined(__mips_n64) +#define oct_write64(a, v) (*(volatile uint64_t *)(a) = (uint64_t)(v)) +#define oct_write8_x8(a, v) (*(volatile uint8_t *)(a) = (uint8_t)(v)) + +#define OCT_READ(n, t) \ +static inline t oct_read ## n(uintptr_t a) \ +{ \ + volatile t *p = (volatile t *)a; \ + return (*p); \ +} + +OCT_READ(8, uint8_t); +OCT_READ(16, uint16_t); +OCT_READ(32, uint32_t); +OCT_READ(64, uint64_t); +#elif defined(__mips_n32) || defined(__mips_o32) +#if defined(__mips_n32) static inline void oct_write64 (uint64_t csr_addr, uint64_t val64) { - uint64_t *ptr = (uint64_t *) csr_addr; - *ptr = val64; -} - -static inline void oct_write64_int64 (uint64_t csr_addr, int64_t val64i) -{ - int64_t *ptr = (int64_t *) csr_addr; - *ptr = val64i; + __asm __volatile ( + ".set push\n" + ".set mips64\n" + "sd %0, 0(%1)\n" + ".set pop\n" + : + : "r"(val64), "r"(csr_addr)); } static inline void oct_write8_x8 (uint64_t csr_addr, uint8_t val8) { - uint64_t *ptr = (uint64_t *) csr_addr; - *ptr = (uint64_t) val8; -} + __asm __volatile ( + ".set push\n" + ".set mips64\n" + "sb %0, 0(%1)\n" + ".set pop\n" + : + : "r"(val8), "r"(csr_addr)); +} + +#define OCT_READ(n, t, insn) \ +static inline t oct_read ## n(uint64_t a) \ +{ \ + uint64_t tmp; \ + \ + __asm __volatile ( \ + ".set push\n" \ + ".set mips64\n" \ + insn "\t%0, 0(%1)\n" \ + ".set pop\n" \ + : "=r"(tmp) \ + : "r"(a)); \ + return ((t)tmp); \ +} + +OCT_READ(8, uint8_t, "lb"); +OCT_READ(16, uint16_t, "lh"); +OCT_READ(32, uint32_t, "lw"); +OCT_READ(64, uint64_t, "ld"); +#else -static inline void oct_write8 (uint64_t csr_addr, uint8_t val8) +/* + * XXX + * Add o32 variants that load the address into a register and the result out + * of a register properly, and simply disable interrupts before and after and + * hope that we don't need to refill or modify the TLB to access the address. + * I'd be a lot happier if csr_addr were a physical address and we mapped it + * into XKPHYS here so that we could guarantee that interrupts were the only + * kind of exception we needed to worry about. + * + * Also, some of this inline assembly is needlessly verbose. Oh, well. + */ +static inline void oct_write64 (uint64_t csr_addr, uint64_t val64) { - oct_write64(csr_addr, (uint64_t) val8); -} + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t valh = val64 >> 32; + uint32_t vall = val64; + uint32_t tmp1; + uint32_t tmp2; + uint32_t tmp3; + register_t sr; -static inline void oct_write16 (uint64_t csr_addr, uint16_t val16) -{ - oct_write64(csr_addr, (uint64_t) val16); -} + sr = intr_disable(); -static inline void oct_write32 (uint64_t csr_addr, uint32_t val32) -{ - oct_write64(csr_addr, (uint64_t) val32); -} + __asm __volatile ( + ".set push\n" + ".set mips64\n" + ".set noreorder\n" + ".set noat\n" + "dsll %0, %3, 32\n" + "dsll %1, %5, 32\n" + "dsll %2, %4, 32\n" + "dsrl %2, %2, 32\n" + "or %0, %0, %2\n" + "dsll %2, %6, 32\n" + "dsrl %2, %2, 32\n" + "or %1, %1, %2\n" + "sd %0, 0(%1)\n" + ".set pop\n" + : "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) + : "r" (valh), "r" (vall), "r" (csr_addrh), "r" (csr_addrl)); -static inline uint8_t oct_read8 (uint64_t csr_addr) -{ - uint8_t *ptr = (uint8_t *) csr_addr; - return (*ptr); + intr_restore(sr); } -static inline uint8_t oct_read16 (uint64_t csr_addr) +static inline void oct_write8_x8 (uint64_t csr_addr, uint8_t val8) { - uint16_t *ptr = (uint16_t *) csr_addr; - return (*ptr); -} + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t tmp1; + uint32_t tmp2; + register_t sr; + sr = intr_disable(); -static inline uint32_t oct_read32 (uint64_t csr_addr) -{ - uint32_t *ptr = (uint32_t *) csr_addr; - return (*ptr); -} + __asm __volatile ( + ".set push\n" + ".set mips64\n" + ".set noreorder\n" + ".set noat\n" + "dsll %0, %3, 32\n" + "dsll %1, %4, 32\n" + "dsrl %1, %1, 32\n" + "or %0, %0, %1\n" + "sb %2, 0(%0)\n" + ".set pop\n" + : "=&r" (tmp1), "=&r" (tmp2) + : "r" (val8), "r" (csr_addrh), "r" (csr_addrl)); + + intr_restore(sr); +} + +#define OCT_READ(n, t, insn) \ +static inline t oct_read ## n(uint64_t csr_addr) \ +{ \ + uint32_t csr_addrh = csr_addr >> 32; \ + uint32_t csr_addrl = csr_addr; \ + uint32_t tmp1, tmp2; \ + register_t sr; \ + \ + sr = intr_disable(); \ + \ + __asm __volatile ( \ + ".set push\n" \ + ".set mips64\n" \ + ".set noreorder\n" \ + ".set noat\n" \ + "dsll %1, %2, 32\n" \ + "dsll %0, %3, 32\n" \ + "dsrl %0, %0, 32\n" \ + "or %1, %1, %0\n" \ + "lb %1, 0(%1)\n" \ + ".set pop\n" \ + : "=&r" (tmp1), "=&r" (tmp2) \ + : "r" (csr_addrh), "r" (csr_addrl)); \ + \ + intr_restore(sr); \ + \ + return ((t)tmp2); \ +} + +OCT_READ(8, uint8_t, "lb"); +OCT_READ(16, uint16_t, "lh"); +OCT_READ(32, uint32_t, "lw"); static inline uint64_t oct_read64 (uint64_t csr_addr) { - uint64_t *ptr = (uint64_t *) csr_addr; - return (*ptr); -} - -static inline int32_t oct_readint32 (uint64_t csr_addr) -{ - int32_t *ptr = (int32_t *) csr_addr; - return (*ptr); -} - - - -#else - - -/* ABI o32 */ + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t valh; + uint32_t vall; + register_t sr; + sr = intr_disable(); -/* - * Read/write functions - */ -static inline void oct_write64 (uint64_t csr_addr, uint64_t val64) -{ - uint32_t csr_addrh = csr_addr >> 32; - uint32_t csr_addrl = csr_addr; - uint32_t valh = (uint64_t)val64 >> 32; - uint32_t vall = val64; - uint32_t tmp1; - uint32_t tmp2; - uint32_t tmp3; - - __asm __volatile ( + __asm __volatile ( + ".set push\n" ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %5, 32\n" - "dsll %2, %4, 32\n" - "dsrl %2, %2, 32\n" - "or %0, %0, %2\n" - "dsll %2, %6, 32\n" - "dsrl %2, %2, 32\n" - "or %1, %1, %2\n" - "sd %0, 0(%1)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) - : "r" (valh), "r" (vall), - "r" (csr_addrh), "r" (csr_addrl) - ); -} - -static inline void oct_write64_int64 (uint64_t csr_addr, int64_t val64i) -{ - uint32_t csr_addrh = csr_addr >> 32; - uint32_t csr_addrl = csr_addr; - int32_t valh = (uint64_t)val64i >> 32; - int32_t vall = val64i; - uint32_t tmp1; - uint32_t tmp2; - uint32_t tmp3; + ".set noreorder\n" + ".set noat\n" + "dsll %0, %2, 32\n" + "dsll %1, %3, 32\n" + "dsrl %1, %1, 32\n" + "or %0, %0, %1\n" + "ld %1, 0(%0)\n" + "dsrl %0, %1, 32\n" + "dsll %1, %1, 32\n" + "dsrl %1, %1, 32\n" + ".set pop\n" + : "=&r" (valh), "=&r" (vall) + : "r" (csr_addrh), "r" (csr_addrl)); - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %5, 32\n" - "dsll %2, %4, 32\n" - "dsrl %2, %2, 32\n" - "or %0, %0, %2\n" - "dsll %2, %6, 32\n" - "dsrl %2, %2, 32\n" - "or %1, %1, %2\n" - "sd %0, 0(%1)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) - : "r" (valh), "r" (vall), - "r" (csr_addrh), "r" (csr_addrl) - ); -} + intr_restore(sr); + return ((uint64_t)valh << 32) | vall; +} +#endif -/* - * oct_write8_x8 - * - * 8 bit data write into IO Space. Written using an 8 bit bus io transaction - */ -static inline void oct_write8_x8 (uint64_t csr_addr, uint8_t val8) -{ - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1; - uint32_t tmp2; +#endif - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %4, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "sb %2, 0(%0)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (val8), "r" (csr_addrh), "r" (csr_addrl) ); -} +#define oct_write64_int64(a, v) (oct_write64(a, (int64_t)(v))) /* - * oct_write8 - * - * 8 bit data write into IO Space. Written using a 64 bit bus io transaction + * Most write bus transactions are actually 64-bit on Octeon. */ static inline void oct_write8 (uint64_t csr_addr, uint8_t val8) { -#if 1 oct_write64(csr_addr, (uint64_t) val8); -#else - - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1; - uint32_t tmp2; - - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %4, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "sb %2, 0(%0)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (val8), "r" (csr_addrh), "r" (csr_addrl) ); -#endif } static inline void oct_write16 (uint64_t csr_addr, uint16_t val16) { -#if 1 oct_write64(csr_addr, (uint64_t) val16); - -#else - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1; - uint32_t tmp2; - - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %4, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "sh %2, 0(%0)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (val16), "r" (csr_addrh), "r" (csr_addrl) ); -#endif } static inline void oct_write32 (uint64_t csr_addr, uint32_t val32) { -#if 1 oct_write64(csr_addr, (uint64_t) val32); -#else - - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1; - uint32_t tmp2; - - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %4, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "sw %2, 0(%0)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (val32), "r" (csr_addrh), "r" (csr_addrl) ); -#endif } - - -static inline uint8_t oct_read8 (uint64_t csr_addr) -{ - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1, tmp2; - - __asm __volatile ( - ".set mips64\n" - "dsll %1, %2, 32\n" - "dsll %0, %3, 32\n" - "dsrl %0, %0, 32\n" - "or %1, %1, %0\n" - "lb %1, 0(%1)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (csr_addrh), "r" (csr_addrl) ); - return ((uint8_t) tmp2); -} - -static inline uint8_t oct_read16 (uint64_t csr_addr) -{ - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1, tmp2; - - __asm __volatile ( - ".set mips64\n" - "dsll %1, %2, 32\n" - "dsll %0, %3, 32\n" - "dsrl %0, %0, 32\n" - "or %1, %1, %0\n" - "lh %1, 0(%1)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (csr_addrh), "r" (csr_addrl) ); - return ((uint16_t) tmp2); -} - - -static inline uint32_t oct_read32 (uint64_t csr_addr) -{ - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t val32; - uint32_t tmp; - - __asm __volatile ( - ".set mips64\n" - "dsll %0, %2, 32\n" - "dsll %1, %3, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "lw %0, 0(%0)\n" - ".set mips0\n" - : "=&r" (val32), "=&r" (tmp) - : "r" (csr_addrh), "r" (csr_addrl) ); - return (val32); -} - - -static inline uint64_t oct_read64 (uint64_t csr_addr) -{ - uint32_t csr_addrh = csr_addr >> 32; - uint32_t csr_addrl = csr_addr; - uint32_t valh; - uint32_t vall; - - __asm __volatile ( - ".set mips64\n" - "dsll %0, %2, 32\n" - "dsll %1, %3, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "ld %1, 0(%0)\n" - "dsrl %0, %1, 32\n" - "dsll %1, %1, 32\n" - "dsrl %1, %1, 32\n" - ".set mips0\n" - : "=&r" (valh), "=&r" (vall) - : "r" (csr_addrh), "r" (csr_addrl) - ); - return ((uint64_t)valh << 32) | vall; -} - - -static inline int32_t oct_readint32 (uint64_t csr_addr) -{ - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - int32_t val32; - uint32_t tmp; - - __asm __volatile ( - ".set mips64\n" - "dsll %0, %2, 32\n" - "dsll %1, %3, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "lw %0, 0(%0)\n" - : "=&r" (val32), "=&r" (tmp) - : "r" (csr_addrh), "r" (csr_addrl) ); - return (val32); -} - - -#endif - +#define oct_readint32(a) ((int32_t)oct_read32((a))) #define OCTEON_HW_BASE ((volatile uint64_t *) 0L) #define OCTEON_REG_OFFSET (-4 * 1024ll) /* local scratchpad reg base */ @@ -589,7 +467,7 @@ typedef enum { /* PTR_SIZE == sizeof(uint32_t) */ -#ifdef ISA_MIPS32 +#if defined(__mips_n32) || defined(__mips_o32) #define mipsx_addr_size uint32_t // u_int64 #define MIPSX_ADDR_SIZE_KSEGX_BIT_SHIFT 30 // 62 #define MIPSX_ADDR_SIZE_KSEGX_MASK_REMOVED 0x1fffffff // 0x1fffffff From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 23:03:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6A66106564A; Fri, 5 Mar 2010 23:03:20 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B6398FC14; Fri, 5 Mar 2010 23:03:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25N3Knh039315; Fri, 5 Mar 2010 23:03:20 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25N3KCU039311; Fri, 5 Mar 2010 23:03:20 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003052303.o25N3KCU039311@svn.freebsd.org> From: Juli Mallett Date: Fri, 5 Mar 2010 23:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204782 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 23:03:20 -0000 Author: jmallett Date: Fri Mar 5 23:03:20 2010 New Revision: 204782 URL: http://svn.freebsd.org/changeset/base/204782 Log: Harmonize Octeon ldscripts, reducing gratuitous diffs and using KERNLOADADDR in all of them to set the load address. Set svn:keywords. Sponsored by: Packet Forensics Modified: head/sys/conf/ldscript.mips.octeon1.32 (contents, props changed) head/sys/conf/ldscript.mips.octeon1.64 (contents, props changed) head/sys/conf/ldscript.mips.octeon1.n32 (contents, props changed) Modified: head/sys/conf/ldscript.mips.octeon1.32 ============================================================================== --- head/sys/conf/ldscript.mips.octeon1.32 Fri Mar 5 22:59:49 2010 (r204781) +++ head/sys/conf/ldscript.mips.octeon1.32 Fri Mar 5 23:03:20 2010 (r204782) @@ -1,13 +1,15 @@ -/* - * This product includes software developed by the University of - * California, Berkeley and its contributors." -*/ +/* $FreeBSD$ */ + +TARGET(elf32-tradbigmips) OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips") OUTPUT_ARCH(mips) ENTRY(_start) + __DYNAMIC = 0; +PROVIDE (_DYNAMIC = 0); SECTIONS { . = KERNLOADADDR + SIZEOF_HEADERS; + .text . : { *(.text) *(.dynamic) Modified: head/sys/conf/ldscript.mips.octeon1.64 ============================================================================== --- head/sys/conf/ldscript.mips.octeon1.64 Fri Mar 5 22:59:49 2010 (r204781) +++ head/sys/conf/ldscript.mips.octeon1.64 Fri Mar 5 23:03:20 2010 (r204782) @@ -1,23 +1,22 @@ +/* $FreeBSD$ */ + TARGET(elf64-tradbigmips) OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips", "elf64-tradlittlemips") OUTPUT_ARCH(mips) ENTRY(_start) -/* __DYNAMIC = 0; + __DYNAMIC = 0; PROVIDE (_DYNAMIC = 0); -*/ -PHDRS { - text PT_LOAD FLAGS ( 5 ) ; -} SECTIONS { + . = KERNLOADADDR + SIZEOF_HEADERS; - .text _start : { + .text . : { *(.text) - /*(.dynamic)*/ + *(.dynamic) etext = .; _etext = .; . = ALIGN(0x2000); - } : text + } .rodata ALIGN(0x2000) : { _fdata = .; Modified: head/sys/conf/ldscript.mips.octeon1.n32 ============================================================================== --- head/sys/conf/ldscript.mips.octeon1.n32 Fri Mar 5 22:59:49 2010 (r204781) +++ head/sys/conf/ldscript.mips.octeon1.n32 Fri Mar 5 23:03:20 2010 (r204782) @@ -1,3 +1,5 @@ +/* $FreeBSD$ */ + TARGET(elf32-ntradbigmips) OUTPUT_FORMAT("elf32-ntradbigmips", "elf32-ntradbigmips", "elf32-ntradlittlemips") OUTPUT_ARCH(mips) @@ -6,6 +8,7 @@ ENTRY(_start) PROVIDE (_DYNAMIC = 0); SECTIONS { + . = KERNLOADADDR + SIZEOF_HEADERS; .text . : { *(.text) From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 23:08:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86E99106566B; Fri, 5 Mar 2010 23:08:19 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75F3F8FC23; Fri, 5 Mar 2010 23:08:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25N8J4s040590; Fri, 5 Mar 2010 23:08:19 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25N8Jpr040586; Fri, 5 Mar 2010 23:08:19 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003052308.o25N8Jpr040586@svn.freebsd.org> From: Fabien Thomas Date: Fri, 5 Mar 2010 23:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204783 - head/usr.sbin/pmcstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 23:08:19 -0000 Author: fabient Date: Fri Mar 5 23:08:19 2010 New Revision: 204783 URL: http://svn.freebsd.org/changeset/base/204783 Log: Bug fixed: - no display on serial terminal in top mode. - display alignment for continuation string. - correct invalid value used for display limit. MFC after: 3 days Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c head/usr.sbin/pmcstat/pmcpl_calltree.c head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_callgraph.c Fri Mar 5 23:03:20 2010 (r204782) +++ head/usr.sbin/pmcstat/pmcpl_callgraph.c Fri Mar 5 23:08:19 2010 (r204783) @@ -550,7 +550,7 @@ pmcstat_cgnode_topprint(struct pmcstat_c len = ns_len + vs_len + 1; if (width - len < 0) { - PMCSTAT_PRINTW("..."); + PMCSTAT_PRINTW(" ..."); break; } width -= len; Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Mar 5 23:03:20 2010 (r204782) +++ head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Mar 5 23:08:19 2010 (r204783) @@ -387,7 +387,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct if (ct->pct_narc == 0) { pmcpl_ct_topscreen[x+1][*y] = NULL; if (*y >= PMCPL_CT_MAXLINE || - *y >= pmcstat_displaywidth) + *y >= pmcstat_displayheight) return 1; *y = *y + 1; for (i=0; i < x; i++) Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Fri Mar 5 23:03:20 2010 (r204782) +++ head/usr.sbin/pmcstat/pmcstat.c Fri Mar 5 23:08:19 2010 (r204783) @@ -1311,6 +1311,9 @@ main(int argc, char **argv) intrflush(stdscr, FALSE); keypad(stdscr, TRUE); clear(); + /* Get terminal width / height with ncurses. */ + getmaxyx(stdscr, pmcstat_displayheight, pmcstat_displaywidth); + pmcstat_displayheight--; pmcstat_displaywidth--; atexit(pmcstat_topexit); } } From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 05:45:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 503B9106564A; Sat, 6 Mar 2010 05:45:50 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DF7F8FC08; Sat, 6 Mar 2010 05:45:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o265jou2031024; Sat, 6 Mar 2010 05:45:50 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o265jnBv031019; Sat, 6 Mar 2010 05:45:49 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003060545.o265jnBv031019@svn.freebsd.org> From: Juli Mallett Date: Sat, 6 Mar 2010 05:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204788 - in head/sys/mips: include mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 05:45:50 -0000 Author: jmallett Date: Sat Mar 6 05:45:49 2010 New Revision: 204788 URL: http://svn.freebsd.org/changeset/base/204788 Log: o) Consistently use MIPS_KSEGn_TO_PHYS instead of MIPS_{,UN}CACHED_TO_PHYS etc. Get rid of the macros that spell KSEG0 CACHED and KSEG1 UNCACHED. o) Get rid of some nearby duplicated and unused macros. Reviewed by: imp Modified: head/sys/mips/include/cpu.h head/sys/mips/include/cpuregs.h head/sys/mips/mips/exception.S head/sys/mips/mips/pmap.c Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Sat Mar 6 01:00:11 2010 (r204787) +++ head/sys/mips/include/cpu.h Sat Mar 6 05:45:49 2010 (r204788) @@ -50,22 +50,8 @@ #include #include -#define MIPS_CACHED_MEMORY_ADDR 0x80000000 -#define MIPS_UNCACHED_MEMORY_ADDR 0xa0000000 -#define MIPS_MAX_MEM_ADDR 0xbe000000 -#define MIPS_RESERVED_ADDR 0xbfc80000 - #define MIPS_KSEG0_LARGEST_PHYS 0x20000000 -#define MIPS_CACHED_TO_PHYS(x) ((uintptr_t)(x) & 0x1fffffff) -#define MIPS_PHYS_TO_CACHED(x) ((uintptr_t)(x) | MIPS_CACHED_MEMORY_ADDR) -#define MIPS_UNCACHED_TO_PHYS(x) ((uintptr_t)(x) & 0x1fffffff) -#define MIPS_PHYS_TO_UNCACHED(x) ((uintptr_t)(x) | MIPS_UNCACHED_MEMORY_ADDR) - #define MIPS_PHYS_MASK (0x1fffffff) -#define MIPS_PA_2_K1VA(x) (MIPS_KSEG1_START | ((x) & MIPS_PHYS_MASK)) - -#define MIPS_VA_TO_CINDEX(x) ((uintptr_t)(x) & 0xffffff | MIPS_CACHED_MEMORY_ADDR) -#define MIPS_CACHED_TO_UNCACHED(x) (MIPS_PHYS_TO_UNCACHED(MIPS_CACHED_TO_PHYS(x))) #define MIPS_PHYS_TO_KSEG0(x) ((uintptr_t)(x) | MIPS_KSEG0_START) #define MIPS_PHYS_TO_KSEG1(x) ((uintptr_t)(x) | MIPS_KSEG1_START) Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Sat Mar 6 01:00:11 2010 (r204787) +++ head/sys/mips/include/cpuregs.h Sat Mar 6 05:45:49 2010 (r204788) @@ -89,12 +89,6 @@ #define MIPS_KSEG2_END MIPS_KSSEG_END #define MIPS_KSEG3_START 0xe0000000 #define MIPS_KSEG3_END 0xffffffff -#define MIPS_MAX_MEM_ADDR 0xbe000000 -#define MIPS_RESERVED_ADDR 0xbfc80000 - -/* Map virtual address to index in mips3 r4k virtually-indexed cache */ -#define MIPS3_VA_TO_CINDEX(x) \ - ((unsigned)(x) & 0xffffff | MIPS_KSEG0_START) #define MIPS_PHYS_TO_XKPHYS(cca,x) \ ((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x)) Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Sat Mar 6 01:00:11 2010 (r204787) +++ head/sys/mips/mips/exception.S Sat Mar 6 05:45:49 2010 (r204788) @@ -1253,7 +1253,7 @@ VECTOR(MipsCache, unknown) PTR_LA k0, _C_LABEL(MipsCacheException) li k1, MIPS_PHYS_MASK and k0, k1 - li k1, MIPS_UNCACHED_MEMORY_ADDR + li k1, MIPS_KSEG1_START or k0, k1 j k0 nop Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Mar 6 01:00:11 2010 (r204787) +++ head/sys/mips/mips/pmap.c Sat Mar 6 05:45:49 2010 (r204788) @@ -205,7 +205,7 @@ struct local_sysmaps { /* This structure is for large memory * above 512Meg. We can't (in 32 bit mode) - * just use the direct mapped MIPS_CACHED_TO_PHYS() + * just use the direct mapped MIPS_KSEG0_TO_PHYS() * macros since we can't see the memory and must * map it in when we need to access it. In 64 * bit mode this goes away. @@ -271,7 +271,7 @@ pmap_steal_memory(vm_size_t size) if (pa >= MIPS_KSEG0_LARGEST_PHYS) { panic("Out of memory below 512Meg?"); } - va = MIPS_PHYS_TO_CACHED(pa); + va = MIPS_PHYS_TO_KSEG0(pa); bzero((caddr_t)va, size); return va; } @@ -994,7 +994,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v mpte = pmap->pm_ptphint; } else { pteva = *pmap_pde(pmap, va); - mpte = PHYS_TO_VM_PAGE(MIPS_CACHED_TO_PHYS(pteva)); + mpte = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pteva)); pmap->pm_ptphint = mpte; } } @@ -1048,7 +1048,7 @@ pmap_pinit(pmap_t pmap) ptdpg->valid = VM_PAGE_BITS_ALL; pmap->pm_segtab = (pd_entry_t *) - MIPS_PHYS_TO_CACHED(VM_PAGE_TO_PHYS(ptdpg)); + MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(ptdpg)); if ((ptdpg->flags & PG_ZERO) == 0) bzero(pmap->pm_segtab, PAGE_SIZE); @@ -1115,7 +1115,7 @@ _pmap_allocpte(pmap_t pmap, unsigned pte pmap->pm_stats.resident_count++; ptepa = VM_PAGE_TO_PHYS(m); - pteva = MIPS_PHYS_TO_CACHED(ptepa); + pteva = MIPS_PHYS_TO_KSEG0(ptepa); pmap->pm_segtab[ptepindex] = (pd_entry_t)pteva; /* @@ -1169,7 +1169,7 @@ retry: (pmap->pm_ptphint->pindex == ptepindex)) { m = pmap->pm_ptphint; } else { - m = PHYS_TO_VM_PAGE(MIPS_CACHED_TO_PHYS(pteva)); + m = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pteva)); pmap->pm_ptphint = m; } m->wire_count++; @@ -1215,7 +1215,7 @@ pmap_release(pmap_t pmap) ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); - ptdpg = PHYS_TO_VM_PAGE(MIPS_CACHED_TO_PHYS(pmap->pm_segtab)); + ptdpg = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pmap->pm_segtab)); ptdpg->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(ptdpg); @@ -1285,7 +1285,7 @@ pmap_growkernel(vm_offset_t addr) */ panic("Gak, can't handle a k-page table outside of lower 512Meg"); } - pte = (pt_entry_t *)MIPS_PHYS_TO_CACHED(ptppaddr); + pte = (pt_entry_t *)MIPS_PHYS_TO_KSEG0(ptppaddr); segtab_pde(kernel_segmap, kernel_vm_end) = (pd_entry_t)pte; /* @@ -2027,7 +2027,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ (pmap->pm_ptphint->pindex == ptepindex)) { mpte = pmap->pm_ptphint; } else { - mpte = PHYS_TO_VM_PAGE(MIPS_CACHED_TO_PHYS(pteva)); + mpte = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pteva)); pmap->pm_ptphint = mpte; } mpte->wire_count++; @@ -2117,7 +2117,7 @@ pmap_kenter_temporary(vm_paddr_t pa, int } else #endif if (pa < MIPS_KSEG0_LARGEST_PHYS) { - va = MIPS_PHYS_TO_CACHED(pa); + va = MIPS_PHYS_TO_KSEG0(pa); } else { int cpu; struct local_sysmaps *sysm; @@ -2289,7 +2289,7 @@ pmap_zero_page(vm_page_t m) #endif if (phys < MIPS_KSEG0_LARGEST_PHYS) { - va = MIPS_PHYS_TO_CACHED(phys); + va = MIPS_PHYS_TO_KSEG0(phys); bzero((caddr_t)va, PAGE_SIZE); mips_dcache_wbinv_range(va, PAGE_SIZE); @@ -2347,7 +2347,7 @@ pmap_zero_page_area(vm_page_t m, int off } else #endif if (phys < MIPS_KSEG0_LARGEST_PHYS) { - va = MIPS_PHYS_TO_CACHED(phys); + va = MIPS_PHYS_TO_KSEG0(phys); bzero((char *)(caddr_t)va + off, size); mips_dcache_wbinv_range(va + off, size); } else { @@ -2388,7 +2388,7 @@ pmap_zero_page_idle(vm_page_t m) } else #endif if (phys < MIPS_KSEG0_LARGEST_PHYS) { - va = MIPS_PHYS_TO_CACHED(phys); + va = MIPS_PHYS_TO_KSEG0(phys); bzero((caddr_t)va, PAGE_SIZE); mips_dcache_wbinv_range(va, PAGE_SIZE); } else { @@ -2463,9 +2463,9 @@ pmap_copy_page(vm_page_t src, vm_page_t */ pmap_flush_pvcache(src); mips_dcache_wbinv_range_index( - MIPS_PHYS_TO_CACHED(phy_dst), NBPG); - va_src = MIPS_PHYS_TO_CACHED(phy_src); - va_dst = MIPS_PHYS_TO_CACHED(phy_dst); + MIPS_PHYS_TO_KSEG0(phy_dst), NBPG); + va_src = MIPS_PHYS_TO_KSEG0(phy_src); + va_dst = MIPS_PHYS_TO_KSEG0(phy_dst); bcopy((caddr_t)va_src, (caddr_t)va_dst, PAGE_SIZE); mips_dcache_wbinv_range(va_dst, PAGE_SIZE); } else { @@ -2479,14 +2479,14 @@ pmap_copy_page(vm_page_t src, vm_page_t int_level = disableintr(); if (phy_src < MIPS_KSEG0_LARGEST_PHYS) { /* one side needs mapping - dest */ - va_src = MIPS_PHYS_TO_CACHED(phy_src); + va_src = MIPS_PHYS_TO_KSEG0(phy_src); sysm->CMAP2 = mips_paddr_to_tlbpfn(phy_dst) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR2, sysm->CMAP2); sysm->valid2 = 1; va_dst = (vm_offset_t)sysm->CADDR2; } else if (phy_dst < MIPS_KSEG0_LARGEST_PHYS) { /* one side needs mapping - src */ - va_dst = MIPS_PHYS_TO_CACHED(phy_dst); + va_dst = MIPS_PHYS_TO_KSEG0(phy_dst); sysm->CMAP1 = mips_paddr_to_tlbpfn(phy_src) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); va_src = (vm_offset_t)sysm->CADDR1; @@ -3306,7 +3306,7 @@ pmap_kextract(vm_offset_t va) { vm_offset_t pa = 0; - if (va < MIPS_CACHED_MEMORY_ADDR) { + if (va < MIPS_KSEG0_START) { /* user virtual address */ pt_entry_t *ptep; @@ -3316,16 +3316,16 @@ pmap_kextract(vm_offset_t va) pa = mips_tlbpfn_to_paddr(*ptep) | (va & PAGE_MASK); } - } else if (va >= MIPS_CACHED_MEMORY_ADDR && - va < MIPS_UNCACHED_MEMORY_ADDR) - pa = MIPS_CACHED_TO_PHYS(va); - else if (va >= MIPS_UNCACHED_MEMORY_ADDR && + } else if (va >= MIPS_KSEG0_START && + va < MIPS_KSEG1_START) + pa = MIPS_KSEG0_TO_PHYS(va); + else if (va >= MIPS_KSEG1_START && va < MIPS_KSEG2_START) - pa = MIPS_UNCACHED_TO_PHYS(va); + pa = MIPS_KSEG1_TO_PHYS(va); #ifdef VM_ALLOC_WIRED_TLB_PG_POOL else if (need_wired_tlb_page_pool && ((va >= VM_MIN_KERNEL_ADDRESS) && (va < (VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET)))) - pa = MIPS_CACHED_TO_PHYS(va); + pa = MIPS_KSEG0_TO_PHYS(va); #endif else if (va >= MIPS_KSEG2_START && va < VM_MAX_KERNEL_ADDRESS) { pt_entry_t *ptep; From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 05:49:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D89AA106566B; Sat, 6 Mar 2010 05:49:15 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C64C08FC14; Sat, 6 Mar 2010 05:49:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o265nFVe031815; Sat, 6 Mar 2010 05:49:15 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o265nFG7031813; Sat, 6 Mar 2010 05:49:15 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003060549.o265nFG7031813@svn.freebsd.org> From: Juli Mallett Date: Sat, 6 Mar 2010 05:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204789 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 05:49:15 -0000 Author: jmallett Date: Sat Mar 6 05:49:15 2010 New Revision: 204789 URL: http://svn.freebsd.org/changeset/base/204789 Log: Check for device faults and for failures to set DRQ when expected, rather than spinning forever. This fixes booting with CF ejected. NB: I've made the driver pretty chatty about errors in case there's hardware that operates differently to mine, so we can easily track down any issues. Reviewed by: imp Sponsored by: Packet Forensics Modified: head/sys/mips/cavium/octeon_ebt3000_cf.c Modified: head/sys/mips/cavium/octeon_ebt3000_cf.c ============================================================================== --- head/sys/mips/cavium/octeon_ebt3000_cf.c Sat Mar 6 05:45:49 2010 (r204788) +++ head/sys/mips/cavium/octeon_ebt3000_cf.c Sat Mar 6 05:49:15 2010 (r204789) @@ -89,6 +89,7 @@ __FBSDID("$FreeBSD$"); /* Status Register */ #define STATUS_BSY 0x80 /* Drive is busy */ #define STATUS_RDY 0x40 /* Drive is ready */ +#define STATUS_DF 0x20 /* Device fault */ #define STATUS_DRQ 0x08 /* Data can be transferred */ /* Miscelaneous */ @@ -153,11 +154,11 @@ static int cf_attach(device_t); static int cf_attach_geom(void *, int); /* ATA methods */ -static void cf_cmd_identify(void); -static void cf_cmd_write(uint32_t, uint32_t, void *); -static void cf_cmd_read(uint32_t, uint32_t, void *); -static void cf_wait_busy(void); -static void cf_send_cmd(uint32_t, uint8_t); +static int cf_cmd_identify(void); +static int cf_cmd_write(uint32_t, uint32_t, void *); +static int cf_cmd_read(uint32_t, uint32_t, void *); +static int cf_wait_busy(void); +static int cf_send_cmd(uint32_t, uint8_t); static void cf_attach_geom_proxy(void *arg, int flag); /* Miscelenous */ @@ -183,6 +184,8 @@ static int cf_access (struct g_provider * ------------------------------------------------------------------- */ static void cf_start (struct bio *bp) { + int error; + /* * Handle actual I/O requests. The request is passed down through * the bio struct. @@ -200,12 +203,19 @@ static void cf_start (struct bio *bp) if ((bp->bio_cmd & (BIO_READ | BIO_WRITE))) { if (bp->bio_cmd & BIO_READ) { - cf_cmd_read(bp->bio_length / drive_param.sector_size, - bp->bio_offset / drive_param.sector_size, bp->bio_data); - + error = cf_cmd_read(bp->bio_length / drive_param.sector_size, + bp->bio_offset / drive_param.sector_size, bp->bio_data); } else if (bp->bio_cmd & BIO_WRITE) { - cf_cmd_write(bp->bio_length / drive_param.sector_size, - bp->bio_offset/drive_param.sector_size, bp->bio_data); + error = cf_cmd_write(bp->bio_length / drive_param.sector_size, + bp->bio_offset/drive_param.sector_size, bp->bio_data); + } else { + printf("%s: unrecognized bio_cmd %x.\n", __func__, bp->bio_cmd); + error = ENOTSUP; + } + + if (error != 0) { + g_io_deliver(bp, error); + return; } bp->bio_resid = 0; @@ -227,12 +237,13 @@ static int cf_ioctl (struct g_provider * * * Read nr_sectors from the device starting from start_sector. */ -static void cf_cmd_read (uint32_t nr_sectors, uint32_t start_sector, void *buf) +static int cf_cmd_read (uint32_t nr_sectors, uint32_t start_sector, void *buf) { unsigned long lba; uint32_t count; uint16_t *ptr_16; uint8_t *ptr_8; + int error; //#define OCTEON_VISUAL_CF_0 1 #ifdef OCTEON_VISUAL_CF_0 @@ -244,8 +255,11 @@ static void cf_cmd_read (uint32_t nr_sec while (nr_sectors--) { - - cf_send_cmd(lba, CMD_READ_SECTOR); + error = cf_send_cmd(lba, CMD_READ_SECTOR); + if (error != 0) { + printf("%s: cf_send_cmd(CMD_READ_SECTOR) failed: %d\n", __func__, error); + return (error); + } if (bus_width == 8) { volatile uint8_t *task_file = (volatile uint8_t*)base_addr; @@ -270,6 +284,7 @@ static void cf_cmd_read (uint32_t nr_sec #ifdef OCTEON_VISUAL_CF_0 octeon_led_write_char(0, ' '); #endif + return (0); } @@ -279,12 +294,13 @@ static void cf_cmd_read (uint32_t nr_sec * * Write nr_sectors to the device starting from start_sector. */ -static void cf_cmd_write (uint32_t nr_sectors, uint32_t start_sector, void *buf) +static int cf_cmd_write (uint32_t nr_sectors, uint32_t start_sector, void *buf) { uint32_t lba; uint32_t count; uint16_t *ptr_16; uint8_t *ptr_8; + int error; //#define OCTEON_VISUAL_CF_1 1 #ifdef OCTEON_VISUAL_CF_1 @@ -295,8 +311,11 @@ static void cf_cmd_write (uint32_t nr_se ptr_16 = (uint16_t*)buf; while (nr_sectors--) { - - cf_send_cmd(lba, CMD_WRITE_SECTOR); + error = cf_send_cmd(lba, CMD_WRITE_SECTOR); + if (error != 0) { + printf("%s: cf_send_cmd(CMD_WRITE_SECTOR) failed: %d\n", __func__, error); + return (error); + } if (bus_width == 8) { volatile uint8_t *task_file; @@ -324,6 +343,7 @@ static void cf_cmd_write (uint32_t nr_se #ifdef OCTEON_VISUAL_CF_1 octeon_led_write_char(1, ' '); #endif + return (0); } @@ -335,10 +355,11 @@ static void cf_cmd_write (uint32_t nr_se * it in the drive_param structure * */ -static void cf_cmd_identify (void) +static int cf_cmd_identify (void) { int count; uint8_t status; + int error; if (bus_width == 8) { volatile uint8_t *task_file; @@ -356,11 +377,11 @@ static void cf_cmd_identify (void) task_file[TF_DRV_HEAD] = 0; task_file[TF_COMMAND] = CMD_IDENTIFY; - cf_wait_busy(); - - for (count = 0; count < SECTOR_SIZE; count++) - drive_param.u.buf[count] = task_file[TF_DATA]; - + error = cf_wait_busy(); + if (error == 0) { + for (count = 0; count < SECTOR_SIZE; count++) + drive_param.u.buf[count] = task_file[TF_DATA]; + } } else { volatile uint16_t *task_file; @@ -374,17 +395,22 @@ static void cf_cmd_identify (void) task_file[TF_CYL_LSB/2] = 0; /* this includes TF_CYL_MSB */ task_file[TF_DRV_HEAD/2] = 0 | (CMD_IDENTIFY<<8); /* this includes TF_COMMAND */ - cf_wait_busy(); - - for (count = 0; count < SECTOR_SIZE; count+=2) { - uint16_t temp; - temp = task_file[TF_DATA]; - - /* endianess will be swapped below */ - drive_param.u.buf[count] = (temp & 0xff); - drive_param.u.buf[count+1] = (temp & 0xff00)>>8; + error = cf_wait_busy(); + if (error == 0) { + for (count = 0; count < SECTOR_SIZE; count+=2) { + uint16_t temp; + temp = task_file[TF_DATA]; + + /* endianess will be swapped below */ + drive_param.u.buf[count] = (temp & 0xff); + drive_param.u.buf[count+1] = (temp & 0xff00)>>8; + } } } + if (error != 0) { + printf("%s: identify failed: %d\n", __func__, error); + return (error); + } cf_swap_ascii(drive_param.u.driveid.model, drive_param.model); @@ -394,6 +420,7 @@ static void cf_cmd_identify (void) drive_param.sec_track = SWAP_SHORT (drive_param.u.driveid.cur_sectors); drive_param.nr_sectors = SWAP_LONG (drive_param.u.driveid.lba_capacity); + return (0); } @@ -404,7 +431,7 @@ static void cf_cmd_identify (void) * Send command to read/write one sector specified by lba. * */ -static void cf_send_cmd (uint32_t lba, uint8_t cmd) +static int cf_send_cmd (uint32_t lba, uint8_t cmd) { uint8_t status; @@ -439,7 +466,7 @@ static void cf_send_cmd (uint32_t lba, u } - cf_wait_busy(); + return (cf_wait_busy()); } /* ------------------------------------------------------------------- * @@ -448,12 +475,16 @@ static void cf_send_cmd (uint32_t lba, u * * Wait until the drive finishes a given command and data is * ready to be transferred. This is done by repeatedly checking - * the BSY and DRQ bits of the status register. When the controller - * is ready for data transfer, it clears the BSY bit and sets the - * DRQ bit. + * the BSY bit of the status register. When the controller is ready for + * data transfer, it clears the BSY bit and sets the DRQ bit. + * + * If the DF bit is ever set, we return error. * + * This code originally spun on DRQ. If that behavior turns out to be + * necessary, a flag can be added or this function can be called + * repeatedly as long as it is returning ENXIO. */ -static void cf_wait_busy (void) +static int cf_wait_busy (void) { uint8_t status; @@ -469,7 +500,11 @@ static void cf_wait_busy (void) task_file = (volatile uint8_t *)base_addr; status = task_file[TF_STATUS]; - while ((status & STATUS_BSY) == STATUS_BSY || (status & STATUS_DRQ) != STATUS_DRQ ) { + while ((status & STATUS_BSY) == STATUS_BSY) { + if ((status & STATUS_DF) != 0) { + printf("%s: device fault (status=%x)\n", __func__, status); + return (EIO); + } DELAY(WAIT_DELAY); status = task_file[TF_STATUS]; } @@ -478,15 +513,24 @@ static void cf_wait_busy (void) task_file = (volatile uint16_t *)base_addr; status = task_file[TF_STATUS/2]>>8; - while ((status & STATUS_BSY) == STATUS_BSY || (status & STATUS_DRQ) != STATUS_DRQ ) { + while ((status & STATUS_BSY) == STATUS_BSY) { + if ((status & STATUS_DF) != 0) { + printf("%s: device fault (status=%x)\n", __func__, status); + return (EIO); + } DELAY(WAIT_DELAY); status = (uint8_t)(task_file[TF_STATUS/2]>>8); } } + if ((status & STATUS_DRQ) == 0) { + printf("%s: device not ready (status=%x)\n", __func__, status); + return (ENXIO); + } #ifdef OCTEON_VISUAL_CF_2 octeon_led_write_char(2, ' '); #endif + return (0); } /* ------------------------------------------------------------------- * @@ -522,9 +566,7 @@ static int cf_probe (device_t dev) device_set_desc(dev, "Octeon Compact Flash Driver"); - cf_cmd_identify(); - - return (0); + return (cf_cmd_identify()); } /* ------------------------------------------------------------------- * @@ -543,7 +585,6 @@ static void cf_identify (driver_t *drv, int count = 0; octeon_mio_boot_reg_cfgx_t cfg; - if (!octeon_board_real()) return; From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 05:57:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87A42106566B; Sat, 6 Mar 2010 05:57:25 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BD658FC17; Sat, 6 Mar 2010 05:57:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o265vOLb033628; Sat, 6 Mar 2010 05:57:25 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o265vOEJ033626; Sat, 6 Mar 2010 05:57:24 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003060557.o265vOEJ033626@svn.freebsd.org> From: Joel Dahl Date: Sat, 6 Mar 2010 05:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204790 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 05:57:25 -0000 Author: joel (doc committer) Date: Sat Mar 6 05:57:24 2010 New Revision: 204790 URL: http://svn.freebsd.org/changeset/base/204790 Log: Switch to our preferred license text. Approved by: imp Modified: head/share/man/man4/ufm.4 Modified: head/share/man/man4/ufm.4 ============================================================================== --- head/share/man/man4/ufm.4 Sat Mar 6 05:49:15 2010 (r204789) +++ head/share/man/man4/ufm.4 Sat Mar 6 05:57:24 2010 (r204790) @@ -10,17 +10,17 @@ .\" 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 FREEBSD AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD -.\" 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. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. .\" .\" $FreeBSD$ .\" From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 15:25:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB4AC1065673; Sat, 6 Mar 2010 15:25:44 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7A7EC8FC13; Sat, 6 Mar 2010 15:25:44 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2FE9C.dip.t-dialin.net [217.226.254.156]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 6D5B8844587; Sat, 6 Mar 2010 16:25:39 +0100 (CET) Received: from unknown (unknown [192.168.2.110]) by outgoing.leidinger.net (Postfix) with ESMTP id A03715046; Sat, 6 Mar 2010 16:25:36 +0100 (CET) Date: Sat, 6 Mar 2010 16:25:35 +0100 From: Alexander Leidinger To: Doug Barton Message-ID: <20100306162535.000078b8@unknown> In-Reply-To: References: <201003051434.o25EYXBR024375@svn.freebsd.org> X-Mailer: Claws Mail 3.7.2cvs15 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 6D5B8844587.4CD9A X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.763, required 6, autolearn=disabled, ALL_TRUSTED -1.44, J_CHICKENPOX_21 0.60, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1268493940.03434@w5eLlu5LLRtIAINyJPWbFQ X-EBL-Spam-Status: No Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204759 - in head: etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 15:25:44 -0000 On Fri, 5 Mar 2010 21:18:00 +0000 (UTC) Doug Barton wrote: > On Fri, 5 Mar 2010, Alexander Leidinger wrote: > > > Author: netchild > > Date: Fri Mar 5 14:34:33 2010 > > New Revision: 204759 > > URL: http://svn.freebsd.org/changeset/base/204759 > > I've got no comments on the jail-related stuff given that my > knowledge of jails is almost non-existent. However I wish you had run > your diff past freebsd-rc@ since if you had I (or someone else) could > have let you know that the attached patch is a much cleaner way of > implementing the bit about conditionalizing "parallel" execution > (which, to the extent I understand the problem I agree with your > solution of only doing it at when starting, FWIW). > > In general we try to avoid having any code in rc.d scripts run > unconditionally. In this case it's harmless (although every cpu cycle > counts) but in other cases it can cause problems, which is why as a > general rule it's safer to avoid it altogether. I assume your version covers onestart, forcestart faststart and start (I can imagine situations where a prestart should be different from a preforcestart, but I doubt we differentiate in the code). The reason why I chose the case was, that forcestart and onestart are more interactive options. I could imagine that someone tells in the future that it may be better to ignore the jail_parallel_start in those cases. Can the one/force part be detected in the prestart? The trick with command_args is neat, but it is a pitfall in case someone wants to use it in the future. Wouldn't it be better to add the ampersand to it instead of letting the ampersand replace the value? Whatever your answers are, feel free to change what you want to change (as long as the feature remains... my main concern is to solve the bugs, not how to solve them). Bye, Alexander. From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 16:57:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F60B106566C; Sat, 6 Mar 2010 16:57:53 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBE728FC12; Sat, 6 Mar 2010 16:57:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26GvrIO081884; Sat, 6 Mar 2010 16:57:53 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26GvrsO081876; Sat, 6 Mar 2010 16:57:53 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003061657.o26GvrsO081876@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 6 Mar 2010 16:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204800 - in head: bin/sh tools/regression/bin/sh/builtins tools/regression/bin/sh/errors X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 16:57:55 -0000 Author: jilles Date: Sat Mar 6 16:57:53 2010 New Revision: 204800 URL: http://svn.freebsd.org/changeset/base/204800 Log: sh: Improve the command builtin: * avoid unnecessary fork * allow executing builtins via command * executing a special builtin via command removes its special properties Obtained from: NetBSD (parts) Added: head/tools/regression/bin/sh/builtins/command8.0 (contents, props changed) head/tools/regression/bin/sh/builtins/var-assign2.0 (contents, props changed) head/tools/regression/bin/sh/errors/redirection-error3.0 (contents, props changed) Modified: head/bin/sh/eval.c head/bin/sh/exec.c head/bin/sh/exec.h head/bin/sh/sh.1 Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sat Mar 6 16:45:55 2010 (r204799) +++ head/bin/sh/eval.c Sat Mar 6 16:57:53 2010 (r204800) @@ -597,6 +597,7 @@ evalcommand(union node *cmd, int flags, char *lastarg; int realstatus; int do_clearcmdentry; + char *path = pathval(); /* First expand the arguments. */ TRACE(("evalcommand(%p, %d) called\n", (void *)cmd, flags)); @@ -682,7 +683,7 @@ evalcommand(union node *cmd, int flags, cmdentry.special = 1; } else { static const char PATH[] = "PATH="; - char *path = pathval(); + int cmd_flags = 0, bltinonly = 0; /* * Modify the command lookup path, if a PATH= assignment @@ -713,24 +714,68 @@ evalcommand(union node *cmd, int flags, do_clearcmdentry = 1; } - find_command(argv[0], &cmdentry, 0, path); - /* implement the bltin builtin here */ - if (cmdentry.cmdtype == CMDBUILTIN && cmdentry.u.index == BLTINCMD) { - for (;;) { - argv++; - if (--argc == 0) - break; - if ((cmdentry.u.index = find_builtin(*argv, - &cmdentry.special)) < 0) { + for (;;) { + if (bltinonly) { + cmdentry.u.index = find_builtin(*argv, &cmdentry.special); + if (cmdentry.u.index < 0) { cmdentry.u.index = BLTINCMD; argv--; argc++; break; } - if (cmdentry.u.index != BLTINCMD) + } else + find_command(argv[0], &cmdentry, cmd_flags, path); + /* implement the bltin and command builtins here */ + if (cmdentry.cmdtype != CMDBUILTIN) + break; + if (cmdentry.u.index == BLTINCMD) { + if (argc == 1) break; - } + argv++; + argc--; + bltinonly = 1; + } else if (cmdentry.u.index == COMMANDCMD) { + if (argc == 1) + break; + if (!strcmp(argv[1], "-p")) { + if (argc == 2) + break; + if (argv[2][0] == '-') { + if (strcmp(argv[2], "--")) + break; + if (argc == 3) + break; + argv += 3; + argc -= 3; + } else { + argv += 2; + argc -= 2; + } + path = _PATH_STDPATH; + clearcmdentry(0); + do_clearcmdentry = 1; + } else if (!strcmp(argv[1], "--")) { + if (argc == 2) + break; + argv += 2; + argc -= 2; + } else if (argv[1][0] == '-') + break; + else { + argv++; + argc--; + } + cmd_flags |= DO_NOFUNC; + bltinonly = 0; + } else + break; } + /* + * Special builtins lose their special properties when + * called via 'command'. + */ + if (cmd_flags & DO_NOFUNC) + cmdentry.special = 0; } /* Fork off a child process if necessary. */ @@ -741,9 +786,7 @@ evalcommand(union node *cmd, int flags, && (cmdentry.cmdtype != CMDBUILTIN || cmdentry.u.index == CDCMD || cmdentry.u.index == DOTCMD - || cmdentry.u.index == EVALCMD)) - || (cmdentry.cmdtype == CMDBUILTIN && - cmdentry.u.index == COMMANDCMD)) { + || cmdentry.u.index == EVALCMD))) { jp = makejob(cmd, 1); mode = cmd->ncmd.backgnd; if (flags & EV_BACKCMD) { @@ -889,7 +932,7 @@ cmddone: for (sp = varlist.list ; sp ; sp = sp->next) setvareq(sp->text, VEXPORT|VSTACK); envp = environment(); - shellexec(argv, envp, pathval(), cmdentry.u.index); + shellexec(argv, envp, path, cmdentry.u.index); /*NOTREACHED*/ } goto out; @@ -996,15 +1039,11 @@ int commandcmd(int argc, char **argv) { static char stdpath[] = _PATH_STDPATH; - struct jmploc loc, *old; - struct strlist *sp; char *path; int ch; int cmd = -1; - for (sp = cmdenviron; sp ; sp = sp->next) - setvareq(sp->text, VEXPORT|VSTACK); - path = pathval(); + path = bltinlookup("PATH", 1); optind = optreset = 1; opterr = 0; @@ -1032,22 +1071,14 @@ commandcmd(int argc, char **argv) error("wrong number of arguments"); return typecmd_impl(2, argv - 1, cmd, path); } - if (argc != 0) { - old = handler; - handler = &loc; - if (setjmp(handler->loc) == 0) - shellexec(argv, environment(), path, 0); - handler = old; - if (exception == EXEXEC) - exit(exerrno); - exraise(exception); - } + if (argc != 0) + error("commandcmd() called while it should not be"); /* * Do nothing successfully if no command was specified; * ksh also does this. */ - exit(0); + return 0; } Modified: head/bin/sh/exec.c ============================================================================== --- head/bin/sh/exec.c Sat Mar 6 16:45:55 2010 (r204799) +++ head/bin/sh/exec.c Sat Mar 6 16:57:53 2010 (r204800) @@ -248,7 +248,7 @@ hashcmd(int argc __unused, char **argv _ && (cmdp->cmdtype == CMDNORMAL || (cmdp->cmdtype == CMDBUILTIN && builtinloc >= 0))) delete_cmd_entry(); - find_command(name, &entry, 1, pathval()); + find_command(name, &entry, DO_ERR, pathval()); if (verbose) { if (entry.cmdtype != CMDUNKNOWN) { /* if no error msg */ cmdp = cmdlookup(name, 0); @@ -310,10 +310,10 @@ printentry(struct tblentry *cmdp, int ve */ void -find_command(const char *name, struct cmdentry *entry, int printerr, +find_command(const char *name, struct cmdentry *entry, int act, const char *path) { - struct tblentry *cmdp; + struct tblentry *cmdp, loc_cmd; int idx; int prev; char *fullname; @@ -330,13 +330,19 @@ find_command(const char *name, struct cm } /* If name is in the table, and not invalidated by cd, we're done */ - if ((cmdp = cmdlookup(name, 0)) != NULL && cmdp->rehash == 0) - goto success; + if ((cmdp = cmdlookup(name, 0)) != NULL && cmdp->rehash == 0) { + if (cmdp->cmdtype == CMDFUNCTION && act & DO_NOFUNC) + cmdp = NULL; + else + goto success; + } /* If %builtin not in path, check for builtin next */ if (builtinloc < 0 && (i = find_builtin(name, &spec)) >= 0) { INTOFF; cmdp = cmdlookup(name, 1); + if (cmdp->cmdtype == CMDFUNCTION) + cmdp = &loc_cmd; cmdp->cmdtype = CMDBUILTIN; cmdp->param.index = i; cmdp->special = spec; @@ -365,6 +371,8 @@ loop: goto loop; INTOFF; cmdp = cmdlookup(name, 1); + if (cmdp->cmdtype == CMDFUNCTION) + cmdp = &loc_cmd; cmdp->cmdtype = CMDBUILTIN; cmdp->param.index = i; cmdp->special = spec; @@ -414,6 +422,8 @@ loop: TRACE(("searchexec \"%s\" returns \"%s\"\n", name, fullname)); INTOFF; cmdp = cmdlookup(name, 1); + if (cmdp->cmdtype == CMDFUNCTION) + cmdp = &loc_cmd; cmdp->cmdtype = CMDNORMAL; cmdp->param.index = idx; INTON; @@ -421,9 +431,9 @@ loop: } /* We failed. If there was an entry for this command, delete it */ - if (cmdp) + if (cmdp && cmdp->cmdtype != CMDFUNCTION) delete_cmd_entry(); - if (printerr) { + if (act & DO_ERR) { if (e == ENOENT || e == ENOTDIR) outfmt(out2, "%s: not found\n", name); else Modified: head/bin/sh/exec.h ============================================================================== --- head/bin/sh/exec.h Sat Mar 6 16:45:55 2010 (r204799) +++ head/bin/sh/exec.h Sat Mar 6 16:57:53 2010 (r204800) @@ -57,6 +57,10 @@ struct cmdentry { }; +/* action to find_command() */ +#define DO_ERR 0x01 /* prints errors */ +#define DO_NOFUNC 0x02 /* don't return shell functions, for command */ + extern const char *pathopt; /* set by padvance */ extern int exerrno; /* last exec error */ Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sat Mar 6 16:45:55 2010 (r204799) +++ head/bin/sh/sh.1 Sat Mar 6 16:57:53 2010 (r204800) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd December 31, 2009 +.Dd March 6, 2010 .Dt SH 1 .Os .Sh NAME @@ -1571,10 +1571,12 @@ built-in command. .It Ic command Oo Fl p Oc Op Ar utility Op Ar argument ... .It Ic command Oo Fl v | V Oc Op Ar utility The first form of invocation executes the specified +.Ar utility , +ignoring shell functions in the search. +If .Ar utility -as a simple command (see the -.Sx Simple Commands -section). +is a special builtin, +it is executed as if it were a regular builtin. .Pp If the .Fl p Added: head/tools/regression/bin/sh/builtins/command8.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/command8.0 Sat Mar 6 16:57:53 2010 (r204800) @@ -0,0 +1,45 @@ +# $FreeBSD$ +IFS=, + +SPECIAL="break,\ + :,\ + continue,\ + . /dev/null,\ + eval,\ + exec,\ + export -p,\ + readonly -p,\ + set,\ + shift 0,\ + times,\ + trap,\ + unset foo" + +set -e + +# Check that special builtins can be executed via "command". + +set -- ${SPECIAL} +for cmd in "$@" +do + sh -c "v=:; while \$v; do v=false; command ${cmd}; done" >/dev/null +done + +while :; do + command break + echo Error on line $LINENO +done + +set p q r +command shift 2 +if [ $# -ne 1 ]; then + echo Error on line $LINENO +fi + +( + command exec >/dev/null + echo Error on line $LINENO +) + +set +e +! command shift 2 2>/dev/null Added: head/tools/regression/bin/sh/builtins/var-assign2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/var-assign2.0 Sat Mar 6 16:57:53 2010 (r204800) @@ -0,0 +1,55 @@ +# $FreeBSD$ +IFS=, + +SPECIAL="break,\ + :,\ + continue,\ + . /dev/null,\ + eval,\ + exec,\ + export -p,\ + readonly -p,\ + set,\ + shift 0,\ + times,\ + trap,\ + unset foo" + +UTILS="alias,\ + bg,\ + bind,\ + cd,\ + command echo,\ + echo,\ + false,\ + fc -l,\ + fg,\ + getopts a var,\ + hash,\ + jobs,\ + printf a,\ + pwd,\ + read var < /dev/null,\ + test,\ + true,\ + type ls,\ + ulimit,\ + umask,\ + unalias -a,\ + wait" + +set -e + +# With 'command', variable assignments affect the shell environment. + +set -- ${SPECIAL} +for cmd in "$@" +do + sh -c "VAR=0; VAR=1 command ${cmd}; exit \${VAR}" >/dev/null 2>&1 +done + +set -- ${UTILS} +for cmd in "$@" +do + sh -c "VAR=0; VAR=1 command ${cmd}; exit \${VAR}" >/dev/null 2>&1 +done Added: head/tools/regression/bin/sh/errors/redirection-error3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/errors/redirection-error3.0 Sat Mar 6 16:57:53 2010 (r204800) @@ -0,0 +1,54 @@ +# $FreeBSD$ +IFS=, + +SPECIAL="break,\ + :,\ + continue,\ + . /dev/null,\ + eval,\ + exec,\ + export -p,\ + readonly -p,\ + set,\ + shift,\ + times,\ + trap,\ + unset foo" + +UTILS="alias,\ + bg,\ + bind,\ + cd,\ + command echo,\ + echo,\ + false,\ + fc -l,\ + fg,\ + getopts a -a,\ + hash,\ + jobs,\ + printf a,\ + pwd,\ + read var < /dev/null,\ + test,\ + true,\ + type ls,\ + ulimit,\ + umask,\ + unalias -a,\ + wait" + +# When used with 'command', neither special built-in utilities nor other +# utilities must abort on a redirection error. + +set -- ${SPECIAL} +for cmd in "$@" +do + sh -c "command ${cmd} > /; exit 0" 2>/dev/null || exit 1 +done + +set -- ${UTILS} +for cmd in "$@" +do + sh -c "command ${cmd} > /; exit 0" 2>/dev/null || exit 1 +done From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 17:09:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 068B0106566B; Sat, 6 Mar 2010 17:09:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA7208FC15; Sat, 6 Mar 2010 17:09:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26H9MHN084570; Sat, 6 Mar 2010 17:09:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26H9M7T084567; Sat, 6 Mar 2010 17:09:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003061709.o26H9M7T084567@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 6 Mar 2010 17:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204801 - in head: bin/sh tools/regression/bin/sh/builtins X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 17:09:23 -0000 Author: jilles Date: Sat Mar 6 17:09:22 2010 New Revision: 204801 URL: http://svn.freebsd.org/changeset/base/204801 Log: sh: Make sure to popredir() even if a special builtin caused an error. Added: head/tools/regression/bin/sh/builtins/command9.0 (contents, props changed) Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sat Mar 6 16:57:53 2010 (r204800) +++ head/bin/sh/eval.c Sat Mar 6 17:09:22 2010 (r204801) @@ -914,6 +914,9 @@ cmddone: backcmd->nleft = memout.nextc - memout.buf; memout.buf = NULL; } + if (cmdentry.u.index != EXECCMD && + (e == -1 || e == EXERROR || e == EXEXEC)) + popredir(); if (e != -1) { if ((e != EXERROR && e != EXEXEC) || cmdentry.special) @@ -922,8 +925,6 @@ cmddone: if (flags != EV_BACKCMD) FORCEINTON; } - if (cmdentry.u.index != EXECCMD) - popredir(); } else { #ifdef DEBUG trputs("normal command: "); trargs(argv); Added: head/tools/regression/bin/sh/builtins/command9.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/command9.0 Sat Mar 6 17:09:22 2010 (r204801) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$({ command eval shift x 2>/dev/null; } >/dev/null; echo hi)" = hi' + +exit $((failures > 0)) From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 17:31:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C8531065674; Sat, 6 Mar 2010 17:31:10 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C6528FC0C; Sat, 6 Mar 2010 17:31:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26HVAab089440; Sat, 6 Mar 2010 17:31:10 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26HVA5F089437; Sat, 6 Mar 2010 17:31:10 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003061731.o26HVA5F089437@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 6 Mar 2010 17:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204802 - in head: bin/sh tools/regression/bin/sh/builtins X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 17:31:10 -0000 Author: jilles Date: Sat Mar 6 17:31:09 2010 New Revision: 204802 URL: http://svn.freebsd.org/changeset/base/204802 Log: sh: Make sure to popredir() even if a function caused an error. Added: head/tools/regression/bin/sh/builtins/command10.0 (contents, props changed) Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sat Mar 6 17:09:22 2010 (r204801) +++ head/bin/sh/eval.c Sat Mar 6 17:31:09 2010 (r204802) @@ -813,7 +813,6 @@ evalcommand(union node *cmd, int flags, #ifdef DEBUG trputs("Shell function: "); trargs(argv); #endif - redirect(cmd->ncmd.redirect, REDIR_PUSH); saveparam = shellparam; shellparam.malloc = 0; shellparam.reset = 1; @@ -831,6 +830,8 @@ evalcommand(union node *cmd, int flags, else { freeparam(&shellparam); shellparam = saveparam; + if (exception == EXERROR || exception == EXEXEC) + popredir(); } unreffunc(cmdentry.u.func); poplocalvars(); @@ -841,6 +842,7 @@ evalcommand(union node *cmd, int flags, } handler = &jmploc; funcnest++; + redirect(cmd->ncmd.redirect, REDIR_PUSH); INTON; for (sp = varlist.list ; sp ; sp = sp->next) mklocal(sp->text); Added: head/tools/regression/bin/sh/builtins/command10.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/command10.0 Sat Mar 6 17:31:09 2010 (r204802) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$(f() { shift x; }; { command eval f 2>/dev/null; } >/dev/null; echo hi)" = hi' + +exit $((failures > 0)) From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 19:21:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26094106566B; Sat, 6 Mar 2010 19:21:58 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15E998FC08; Sat, 6 Mar 2010 19:21:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26JLv3B014115; Sat, 6 Mar 2010 19:21:57 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26JLv36014114; Sat, 6 Mar 2010 19:21:57 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201003061921.o26JLv36014114@svn.freebsd.org> From: "Andrey A. Chernov" Date: Sat, 6 Mar 2010 19:21:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204803 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 19:21:58 -0000 Author: ache Date: Sat Mar 6 19:21:57 2010 New Revision: 204803 URL: http://svn.freebsd.org/changeset/base/204803 Log: 1) Rewrite input processing to not exit with error on the first EILSEQ found in the input data but fallback to "binary equal" check instead. POSIX says: "The input file shall be a text file", nothing more, so the text file with illegal sequence is valid input. BTW, GNU sort does not fails on EILSEQ too. 2) Speedup input processing a bit in complex cases like skipping fields, chars or ignore case. 3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file" and POSIX uniq(1) description). Modified: head/usr.bin/uniq/uniq.c Modified: head/usr.bin/uniq/uniq.c ============================================================================== --- head/usr.bin/uniq/uniq.c Sat Mar 6 17:31:09 2010 (r204802) +++ head/usr.bin/uniq/uniq.c Sat Mar 6 19:21:57 2010 (r204803) @@ -60,31 +60,25 @@ static const char rcsid[] = #include #include -#define INITLINELEN (LINE_MAX + 1) -#define MAXLINELEN ((SIZE_MAX / sizeof(wchar_t)) / 2) - -int cflag, dflag, uflag; +int cflag, dflag, uflag, iflag; int numchars, numfields, repeats; FILE *file(const char *, const char *); -wchar_t *getline(wchar_t *, size_t *, FILE *); -void show(FILE *, wchar_t *); +wchar_t *convert(wchar_t *, const char *); +char *getlinemax(char *, FILE *); +void show(FILE *, const char *); wchar_t *skip(wchar_t *); void obsolete(char *[]); static void usage(void); -int wcsicoll(wchar_t *, wchar_t *); int main (int argc, char *argv[]) { - wchar_t *t1, *t2; + wchar_t *tprev, *tthis, *wprev, *wthis, *wp; FILE *ifp, *ofp; - int ch, b1; - size_t prevbuflen, thisbuflen; - wchar_t *prevline, *thisline; - char *p; + int ch, comp; + char *prevline, *thisline, *p; const char *ifn; - int iflag = 0, comp; (void) setlocale(LC_ALL, ""); @@ -139,48 +133,47 @@ main (int argc, char *argv[]) if (argc > 1) ofp = file(argv[1], "w"); - prevbuflen = INITLINELEN; - thisbuflen = INITLINELEN; - prevline = malloc(prevbuflen * sizeof(*prevline)); - thisline = malloc(thisbuflen * sizeof(*thisline)); - if (prevline == NULL || thisline == NULL) + prevline = malloc(LINE_MAX); + thisline = malloc(LINE_MAX); + wprev = malloc(LINE_MAX * sizeof(*wprev)); + wthis = malloc(LINE_MAX * sizeof(*wthis)); + if (prevline == NULL || thisline == NULL || + wprev == NULL || wthis == NULL) err(1, "malloc"); - if ((prevline = getline(prevline, &prevbuflen, ifp)) == NULL) { + if ((prevline = getlinemax(prevline, ifp)) == NULL) { if (ferror(ifp)) err(1, "%s", ifn); exit(0); } + tprev = convert(wprev, prevline); + if (!cflag && uflag && dflag) show(ofp, prevline); - while ((thisline = getline(thisline, &thisbuflen, ifp)) != NULL) { - /* If requested get the chosen fields + character offsets. */ - if (numfields || numchars) { - t1 = skip(thisline); - t2 = skip(prevline); - } else { - t1 = thisline; - t2 = prevline; - } + while ((thisline = getlinemax(thisline, ifp)) != NULL) { + tthis = convert(wthis, thisline); - /* If different, print; set previous to new value. */ - if (iflag) - comp = wcsicoll(t1, t2); + if (tthis == NULL && tprev == NULL) + comp = strcmp(thisline, prevline); + else if (tthis == NULL || tprev == NULL) + comp = 1; else - comp = wcscoll(t1, t2); + comp = wcscoll(tthis, tprev); if (comp) { + /* If different, print; set previous to new value. */ if (cflag || !dflag || !uflag) show(ofp, prevline); - t1 = prevline; - b1 = prevbuflen; + p = prevline; + wp = wprev; prevline = thisline; - prevbuflen = thisbuflen; + wprev = wthis; + tprev = tthis; if (!cflag && uflag && dflag) show(ofp, prevline); - thisline = t1; - thisbuflen = b1; + thisline = p; + wthis = wp; repeats = 0; } else ++repeats; @@ -192,44 +185,61 @@ main (int argc, char *argv[]) exit(0); } -wchar_t * -getline(wchar_t *buf, size_t *buflen, FILE *fp) +char * +getlinemax(char *buf, FILE *fp) { size_t bufpos; - wint_t ch; + int ch; bufpos = 0; - while ((ch = getwc(fp)) != WEOF && ch != '\n') { - if (bufpos + 1 >= *buflen) { - *buflen = *buflen * 2; - if (*buflen > MAXLINELEN) - errx(1, - "Maximum line buffer length (%zu) exceeded", - MAXLINELEN); - buf = reallocf(buf, *buflen * sizeof(*buf)); - if (buf == NULL) - err(1, "reallocf"); - } + while ((ch = getc(fp)) != EOF && ch != '\n') { buf[bufpos++] = ch; + if (bufpos >= LINE_MAX) + errx(1, "Maximum line length (%zu) exceeded", + LINE_MAX); } buf[bufpos] = '\0'; return (bufpos != 0 || ch == '\n' ? buf : NULL); } +wchar_t * +convert(wchar_t *buf, const char *str) +{ + size_t n; + wchar_t *p, *ret; + + if ((n = mbstowcs(buf, str, LINE_MAX)) == LINE_MAX) + errx(1, "Maximum line length (%zu) exceeded", LINE_MAX); + else if (n != (size_t)-1) { + /* If requested get the chosen fields + character offsets. */ + if (numfields || numchars) + ret = skip(buf); + else + ret = buf; + if (iflag) { + for (p = ret; *p != L'\0'; p++) + *p = towlower(*p); + } + } else + ret = NULL; + + return (ret); +} + /* * show -- * Output a line depending on the flags and number of repetitions * of the line. */ void -show(FILE *ofp, wchar_t *str) +show(FILE *ofp, const char *str) { if (cflag) - (void)fprintf(ofp, "%4d %ls\n", repeats + 1, str); + (void)fprintf(ofp, "%4d %s\n", repeats + 1, str); if ((dflag && repeats) || (uflag && !repeats)) - (void)fprintf(ofp, "%ls\n", str); + (void)fprintf(ofp, "%s\n", str); } wchar_t * @@ -237,13 +247,14 @@ skip(wchar_t *str) { int nchars, nfields; - for (nfields = 0; *str != '\0' && nfields++ != numfields; ) { + for (nfields = 0; *str != L'\0' && nfields++ != numfields; ) { while (iswblank(*str)) str++; - while (*str != '\0' && !iswblank(*str)) + while (*str != L'\0' && !iswblank(*str)) str++; } - for (nchars = numchars; nchars-- && *str; ++str); + for (nchars = numchars; nchars-- && *str != L'\0'; ++str) + ; return(str); } @@ -293,52 +304,3 @@ usage(void) "usage: uniq [-c | -d | -u] [-i] [-f fields] [-s chars] [input [output]]\n"); exit(1); } - -static size_t wcsicoll_l1_buflen = 0, wcsicoll_l2_buflen = 0; -static wchar_t *wcsicoll_l1_buf = NULL, *wcsicoll_l2_buf = NULL; - -int -wcsicoll(wchar_t *s1, wchar_t *s2) -{ - wchar_t *p; - size_t l1, l2; - size_t new_l1_buflen, new_l2_buflen; - - l1 = wcslen(s1) + 1; - l2 = wcslen(s2) + 1; - new_l1_buflen = wcsicoll_l1_buflen; - new_l2_buflen = wcsicoll_l2_buflen; - while (new_l1_buflen < l1) { - if (new_l1_buflen == 0) - new_l1_buflen = INITLINELEN; - else - new_l1_buflen *= 2; - } - while (new_l2_buflen < l2) { - if (new_l2_buflen == 0) - new_l2_buflen = INITLINELEN; - else - new_l2_buflen *= 2; - } - if (new_l1_buflen > wcsicoll_l1_buflen) { - wcsicoll_l1_buf = reallocf(wcsicoll_l1_buf, new_l1_buflen * sizeof(*wcsicoll_l1_buf)); - if (wcsicoll_l1_buf == NULL) - err(1, "reallocf"); - wcsicoll_l1_buflen = new_l1_buflen; - } - if (new_l2_buflen > wcsicoll_l2_buflen) { - wcsicoll_l2_buf = reallocf(wcsicoll_l2_buf, new_l2_buflen * sizeof(*wcsicoll_l2_buf)); - if (wcsicoll_l2_buf == NULL) - err(1, "reallocf"); - wcsicoll_l2_buflen = new_l2_buflen; - } - - for (p = wcsicoll_l1_buf; *s1; s1++) - *p++ = towlower(*s1); - *p = '\0'; - for (p = wcsicoll_l2_buf; *s2; s2++) - *p++ = towlower(*s2); - *p = '\0'; - - return (wcscoll(wcsicoll_l1_buf, wcsicoll_l2_buf)); -} From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 19:41:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64CEF1065673 for ; Sat, 6 Mar 2010 19:41:28 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id E1D708FC0A for ; Sat, 6 Mar 2010 19:41:27 +0000 (UTC) Received: (qmail 23257 invoked by uid 399); 6 Mar 2010 19:41:27 -0000 Received: from localhost (HELO ?192.168.0.145?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 6 Mar 2010 19:41:27 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B92AFE7.4040200@FreeBSD.org> Date: Sat, 06 Mar 2010 11:41:27 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Alexander Leidinger References: <201003051434.o25EYXBR024375@svn.freebsd.org> <20100306162535.000078b8@unknown> In-Reply-To: <20100306162535.000078b8@unknown> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204759 - in head: etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 19:41:28 -0000 On 3/6/2010 7:25 AM, Alexander Leidinger wrote: > On Fri, 5 Mar 2010 21:18:00 +0000 (UTC) Doug Barton > wrote: > >> On Fri, 5 Mar 2010, Alexander Leidinger wrote: >> >>> Author: netchild >>> Date: Fri Mar 5 14:34:33 2010 >>> New Revision: 204759 >>> URL: http://svn.freebsd.org/changeset/base/204759 >> >> I've got no comments on the jail-related stuff given that my >> knowledge of jails is almost non-existent. However I wish you had run >> your diff past freebsd-rc@ since if you had I (or someone else) could >> have let you know that the attached patch is a much cleaner way of >> implementing the bit about conditionalizing "parallel" execution >> (which, to the extent I understand the problem I agree with your >> solution of only doing it at when starting, FWIW). >> >> In general we try to avoid having any code in rc.d scripts run >> unconditionally. In this case it's harmless (although every cpu cycle >> counts) but in other cases it can cause problems, which is why as a >> general rule it's safer to avoid it altogether. > > I assume your version covers onestart, forcestart faststart and start > (I can imagine situations where a prestart should be different from a > preforcestart, but I doubt we differentiate in the code). The label to start is stripped in rc.subr (and a variable is set to indicate that it was present) before we get to processing start_precmd. > The reason why I chose the case was, that forcestart and onestart are > more interactive options. I could imagine that someone tells in the > future that it may be better to ignore the jail_parallel_start in those > cases. Can the one/force part be detected in the prestart? It could (by testing for the variable) but I would be resistant to the idea of overloading it like that. It's hard enough to get people to understand onestart as it is, I don't want to confuse them by having it do "magic" for one particular service. > The trick with command_args is neat, but it is a pitfall in case > someone wants to use it in the future. Wouldn't it be better to add the > ampersand to it instead of letting the ampersand replace the value? Yes, obviously if someone wants to use command_args for an additional purpose down the road changes will have to be made. It's not in use atm however, so IMO simpler is better. > Whatever your answers are, feel free to change what you want to change > (as long as the feature remains... my main concern is to solve the bugs, > not how to solve them). Okey dokey, thanks. :) Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 19:59:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1134C106564A; Sat, 6 Mar 2010 19:59:47 +0000 (UTC) (envelope-from simon@nitro.dk) Received: from mx.nitro.dk (unknown [77.75.165.90]) by mx1.freebsd.org (Postfix) with ESMTP id C5D028FC08; Sat, 6 Mar 2010 19:59:46 +0000 (UTC) Received: from frankie.nitro.dk (unknown [192.168.3.39]) by mx.nitro.dk (Postfix) with ESMTP id 0AFE42D4BB9; Sat, 6 Mar 2010 19:59:46 +0000 (UTC) Received: by frankie.nitro.dk (Postfix, from userid 2000) id 0060FE04AF; Sat, 6 Mar 2010 20:59:45 +0100 (CET) Date: Sat, 6 Mar 2010 20:59:45 +0100 From: "Simon L. Nielsen" To: Jung-uk Kim Message-ID: <20100306195944.GA2344@frankie.nitro.dk> References: <201003052139.o25LdGgc019587@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003052139.o25LdGgc019587@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204773 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/dispatcher sys/contrib/dev/acpica/events sys/cont... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 19:59:47 -0000 On 2010.03.05 21:39:16 +0000, Jung-uk Kim wrote: > Author: jkim > Date: Fri Mar 5 21:39:16 2010 > New Revision: 204773 > URL: http://svn.freebsd.org/changeset/base/204773 > > Log: > Merge ACPICA 20100304. I get a lot of messages like the following on the console at boot: [ACPI Debug] String [0xA] "COMB _STA " [ACPI Debug] String [0x6] "LDN: " [ACPI Debug] Integer 0x 5 [ACPI Debug] Integer 0x F I'm not sure if it's related to this import as the system in question was just upgraded from 8. You can see more details by logging into ref9-i386.freebsd.org. -- Simon L. Nielsen From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 20:03:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FF0C1065674; Sat, 6 Mar 2010 20:03:27 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 101188FC16; Sat, 6 Mar 2010 20:03:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26K3QmY023223; Sat, 6 Mar 2010 20:03:26 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26K3Q0w023221; Sat, 6 Mar 2010 20:03:26 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201003062003.o26K3Q0w023221@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 6 Mar 2010 20:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204804 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 20:03:27 -0000 Author: pjd Date: Sat Mar 6 20:03:26 2010 New Revision: 204804 URL: http://svn.freebsd.org/changeset/base/204804 Log: Remove racy assertion. Reported by: Attila Nagy Obtained from: OpenSolaris, Bug ID 6827260 MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Mar 6 19:21:57 2010 (r204803) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Mar 6 20:03:26 2010 (r204804) @@ -2502,7 +2502,6 @@ arc_read(zio_t *pio, spa_t *spa, blkptr_ uint32_t *arc_flags, const zbookmark_t *zb) { int err; - arc_buf_hdr_t *hdr = pbuf->b_hdr; ASSERT(!refcount_is_zero(&pbuf->b_hdr->b_refcnt)); ASSERT3U((char *)bp - (char *)pbuf->b_data, <, pbuf->b_hdr->b_size); @@ -2511,8 +2510,8 @@ arc_read(zio_t *pio, spa_t *spa, blkptr_ err = arc_read_nolock(pio, spa, bp, done, private, priority, zio_flags, arc_flags, zb); - ASSERT3P(hdr, ==, pbuf->b_hdr); rw_exit(&pbuf->b_lock); + return (err); } From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 20:55:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BC1A1065673; Sat, 6 Mar 2010 20:55:07 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 696198FC18; Sat, 6 Mar 2010 20:55:05 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA11137; Sat, 06 Mar 2010 22:55:03 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1No11a-000JaV-Ud; Sat, 06 Mar 2010 22:55:02 +0200 Message-ID: <4B92C125.2040001@freebsd.org> Date: Sat, 06 Mar 2010 22:55:01 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20100211) MIME-Version: 1.0 To: "Simon L. Nielsen" , Jung-uk Kim References: <201003052139.o25LdGgc019587@svn.freebsd.org> <20100306195944.GA2344@frankie.nitro.dk> In-Reply-To: <20100306195944.GA2344@frankie.nitro.dk> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204773 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/dispatcher sys/contrib/dev/acpica/events sys/cont... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 20:55:07 -0000 on 06/03/2010 21:59 Simon L. Nielsen said the following: > On 2010.03.05 21:39:16 +0000, Jung-uk Kim wrote: >> Author: jkim >> Date: Fri Mar 5 21:39:16 2010 >> New Revision: 204773 >> URL: http://svn.freebsd.org/changeset/base/204773 >> >> Log: >> Merge ACPICA 20100304. > > I get a lot of messages like the following on the console at boot: > > [ACPI Debug] String [0xA] "COMB _STA " > [ACPI Debug] String [0x6] "LDN: " > [ACPI Debug] Integer 0x 5 > [ACPI Debug] Integer 0x F > > I'm not sure if it's related to this import as the system in question > was just upgraded from 8. > > You can see more details by logging into ref9-i386.freebsd.org. > It looks like AcpiGbl_EnableAmlDebugObject = TRUE line in sys/dev/acpica/acpi.c was leaked into the commit by accident. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 21:22:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D0331065673; Sat, 6 Mar 2010 21:22:29 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C8ED8FC08; Sat, 6 Mar 2010 21:22:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26LMTtv040858; Sat, 6 Mar 2010 21:22:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26LMTD7040856; Sat, 6 Mar 2010 21:22:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003062122.o26LMTD7040856@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 6 Mar 2010 21:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204805 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 21:22:29 -0000 Author: bz Date: Sat Mar 6 21:22:28 2010 New Revision: 204805 URL: http://svn.freebsd.org/changeset/base/204805 Log: Rework reference counting in case we queue into the netisr, or overflow the netisr queue and fall back to the interface queue so that we can garuantee that the ifnet pointer stays valid. Formerly we ended up with reference counts <= 0 in case the netisr had returned ENOBUFS. The idea is to track any packet in the netisr queue and only change the refount on edge operations for the fallback interface queue. This also avoids problems in case the if_snd.ifq_len lies to us. Also rework refount assertions to make sure they trigger if we go below 1. Formerly a negative refence count did not trigger the assert as the refcount variable is u_int. Sponsored by: ISPsystem MFC after: 5 days Modified: head/sys/net/if_epair.c Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Sat Mar 6 20:03:26 2010 (r204804) +++ head/sys/net/if_epair.c Sat Mar 6 21:22:28 2010 (r204805) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2008 The FreeBSD Foundation - * Copyright (c) 2009 Bjoern A. Zeeb + * Copyright (c) 2009-2010 Bjoern A. Zeeb * All rights reserved. * * This software was developed by CK Software GmbH under sponsorship @@ -256,6 +256,9 @@ epair_nh_sintr(struct mbuf *m) (*ifp->if_input)(ifp, m); sc = ifp->if_softc; EPAIR_REFCOUNT_RELEASE(&sc->refcount); + EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, + ("%s: ifp=%p sc->refcount not >= 1: %d", + __func__, ifp, sc->refcount)); DPRINTF("ifp=%p refcount=%u\n", ifp, sc->refcount); } @@ -292,8 +295,16 @@ epair_nh_drainedcpu(u_int cpuid) IFQ_LOCK(&ifp->if_snd); if (IFQ_IS_EMPTY(&ifp->if_snd)) { + struct epair_softc *sc; + STAILQ_REMOVE(&epair_dpcpu->epair_ifp_drain_list, elm, epair_ifp_drain, ifp_next); + /* The cached ifp goes off the list. */ + sc = ifp->if_softc; + EPAIR_REFCOUNT_RELEASE(&sc->refcount); + EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, + ("%s: ifp=%p sc->refcount not >= 1: %d", + __func__, ifp, sc->refcount)); free(elm, M_EPAIR); } IFQ_UNLOCK(&ifp->if_snd); @@ -312,14 +323,50 @@ epair_nh_drainedcpu(u_int cpuid) /* * Network interface (`if') related functions. */ +static void +epair_remove_ifp_from_draining(struct ifnet *ifp) +{ + struct epair_dpcpu *epair_dpcpu; + struct epair_ifp_drain *elm, *tvar; + u_int cpuid; + + for (cpuid = 0; cpuid <= mp_maxid; cpuid++) { + if (CPU_ABSENT(cpuid)) + continue; + + epair_dpcpu = DPCPU_ID_PTR(cpuid, epair_dpcpu); + EPAIR_LOCK(epair_dpcpu); + STAILQ_FOREACH_SAFE(elm, &epair_dpcpu->epair_ifp_drain_list, + ifp_next, tvar) { + if (ifp == elm->ifp) { + struct epair_softc *sc; + + STAILQ_REMOVE( + &epair_dpcpu->epair_ifp_drain_list, elm, + epair_ifp_drain, ifp_next); + /* The cached ifp goes off the list. */ + sc = ifp->if_softc; + EPAIR_REFCOUNT_RELEASE(&sc->refcount); + EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, + ("%s: ifp=%p sc->refcount not >= 1: %d", + __func__, ifp, sc->refcount)); + free(elm, M_EPAIR); + } + } + EPAIR_UNLOCK(epair_dpcpu); + } +} + static int epair_add_ifp_for_draining(struct ifnet *ifp) { struct epair_dpcpu *epair_dpcpu; - struct epair_softc *sc = sc = ifp->if_softc; + struct epair_softc *sc; struct epair_ifp_drain *elm = NULL; + sc = ifp->if_softc; epair_dpcpu = DPCPU_ID_PTR(sc->cpuid, epair_dpcpu); + EPAIR_LOCK_ASSERT(epair_dpcpu); STAILQ_FOREACH(elm, &epair_dpcpu->epair_ifp_drain_list, ifp_next) if (elm->ifp == ifp) break; @@ -332,6 +379,8 @@ epair_add_ifp_for_draining(struct ifnet return (ENOMEM); elm->ifp = ifp; + /* Add a reference for the ifp pointer on the list. */ + EPAIR_REFCOUNT_AQUIRE(&sc->refcount); STAILQ_INSERT_TAIL(&epair_dpcpu->epair_ifp_drain_list, elm, ifp_next); return (0); @@ -395,13 +444,15 @@ epair_start_locked(struct ifnet *ifp) /* Someone else received the packet. */ oifp->if_ipackets++; } else { + /* The packet was freed already. */ epair_dpcpu->epair_drv_flags |= IFF_DRV_OACTIVE; ifp->if_drv_flags |= IFF_DRV_OACTIVE; - if (epair_add_ifp_for_draining(ifp)) { - ifp->if_oerrors++; - m_freem(m); - } + (void) epair_add_ifp_for_draining(ifp); + ifp->if_oerrors++; EPAIR_REFCOUNT_RELEASE(&sc->refcount); + EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, + ("%s: ifp=%p sc->refcount not >= 1: %d", + __func__, oifp, sc->refcount)); } } } @@ -524,9 +575,13 @@ epair_transmit_locked(struct ifnet *ifp, oifp->if_ipackets++; } else { /* The packet was freed already. */ - EPAIR_REFCOUNT_RELEASE(&sc->refcount); epair_dpcpu->epair_drv_flags |= IFF_DRV_OACTIVE; ifp->if_drv_flags |= IFF_DRV_OACTIVE; + ifp->if_oerrors++; + EPAIR_REFCOUNT_RELEASE(&sc->refcount); + EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, + ("%s: ifp=%p sc->refcount not >= 1: %d", + __func__, oifp, sc->refcount)); } return (error); @@ -548,22 +603,18 @@ epair_transmit(struct ifnet *ifp, struct static void epair_qflush(struct ifnet *ifp) { - struct epair_dpcpu *epair_dpcpu; struct epair_softc *sc; - struct ifaltq *ifq; sc = ifp->if_softc; - epair_dpcpu = DPCPU_ID_PTR(sc->cpuid, epair_dpcpu); - EPAIR_LOCK(epair_dpcpu); - ifq = &ifp->if_snd; - DPRINTF("ifp=%p sc refcnt=%u ifq_len=%u\n", - ifp, sc->refcount, ifq->ifq_len); + KASSERT(sc != NULL, ("%s: ifp=%p, epair_softc gone? sc=%p\n", + __func__, ifp, sc)); /* - * Instead of calling EPAIR_REFCOUNT_RELEASE(&sc->refcount); - * n times, just subtract for the cleanup. + * Remove this ifp from all backpointer lists. The interface will not + * usable for flushing anyway nor should it have anything to flush + * after if_qflush(). */ - sc->refcount -= ifq->ifq_len; - EPAIR_UNLOCK(epair_dpcpu); + epair_remove_ifp_from_draining(ifp); + if (sc->if_qflush) sc->if_qflush(ifp); } @@ -828,8 +879,8 @@ epair_clone_destroy(struct if_clone *ifc */ DPRINTF("sca refcnt=%u scb refcnt=%u\n", sca->refcount, scb->refcount); EPAIR_REFCOUNT_ASSERT(sca->refcount == 1 && scb->refcount == 1, - ("%s: sca->refcount!=1: %d || scb->refcount!=1: %d", - __func__, sca->refcount, scb->refcount)); + ("%s: ifp=%p sca->refcount!=1: %d || ifp=%p scb->refcount!=1: %d", + __func__, ifp, sca->refcount, oifp, scb->refcount)); /* * Get rid of our second half. From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 21:24:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6D11065672; Sat, 6 Mar 2010 21:24:12 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B8F38FC0C; Sat, 6 Mar 2010 21:24:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26LOBIx041257; Sat, 6 Mar 2010 21:24:11 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26LOBwU041254; Sat, 6 Mar 2010 21:24:11 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003062124.o26LOBwU041254@svn.freebsd.org> From: Robert Watson Date: Sat, 6 Mar 2010 21:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204806 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 21:24:12 -0000 Author: rwatson Date: Sat Mar 6 21:24:11 2010 New Revision: 204806 URL: http://svn.freebsd.org/changeset/base/204806 Log: Wrap use of rw_try_upgrade() on pcbinfo with macro INP_INFO_TRY_UPGRADE() to match other pcbinfo locking macros. MFC after: 1 week Modified: head/sys/netinet/in_pcb.h head/sys/netinet/tcp_input.c Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Sat Mar 6 21:22:28 2010 (r204805) +++ head/sys/netinet/in_pcb.h Sat Mar 6 21:24:11 2010 (r204806) @@ -376,6 +376,7 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_INFO_WLOCK(ipi) rw_wlock(&(ipi)->ipi_lock) #define INP_INFO_TRY_RLOCK(ipi) rw_try_rlock(&(ipi)->ipi_lock) #define INP_INFO_TRY_WLOCK(ipi) rw_try_wlock(&(ipi)->ipi_lock) +#define INP_INFO_TRY_UPGRADE(ipi) rw_try_upgrade(&(ipi)->ipi_lock) #define INP_INFO_RUNLOCK(ipi) rw_runlock(&(ipi)->ipi_lock) #define INP_INFO_WUNLOCK(ipi) rw_wunlock(&(ipi)->ipi_lock) #define INP_INFO_LOCK_ASSERT(ipi) rw_assert(&(ipi)->ipi_lock, RA_LOCKED) Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sat Mar 6 21:22:28 2010 (r204805) +++ head/sys/netinet/tcp_input.c Sat Mar 6 21:24:11 2010 (r204806) @@ -632,7 +632,7 @@ relocked: ("%s: INP_TIMEWAIT ti_locked %d", __func__, ti_locked)); if (ti_locked == TI_RLOCKED) { - if (rw_try_upgrade(&V_tcbinfo.ipi_lock) == 0) { + if (INP_INFO_TRY_UPGRADE(&V_tcbinfo) == 0) { in_pcbref(inp); INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); @@ -683,7 +683,7 @@ relocked: ("%s: upgrade check ti_locked %d", __func__, ti_locked)); if (ti_locked == TI_RLOCKED) { - if (rw_try_upgrade(&V_tcbinfo.ipi_lock) == 0) { + if (INP_INFO_TRY_UPGRADE(&V_tcbinfo) == 0) { in_pcbref(inp); INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 21:24:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB8FC106564A; Sat, 6 Mar 2010 21:24:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BBD58FC0A; Sat, 6 Mar 2010 21:24:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26LOWpd041360; Sat, 6 Mar 2010 21:24:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26LOWnG041358; Sat, 6 Mar 2010 21:24:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003062124.o26LOWnG041358@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 6 Mar 2010 21:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204807 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 21:24:32 -0000 Author: bz Date: Sat Mar 6 21:24:32 2010 New Revision: 204807 URL: http://svn.freebsd.org/changeset/base/204807 Log: Destroy UDP UMA zones (empty or not) upon network stack teardown to not leak them making the VM subsystem unhappy with every stoped vnet(*). We will still leak pages (especially as zones are marked NOFREE). (*) This will also keep vmstat -z more usable. Sponsored by: ISPsystem MFC after: 5 days Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sat Mar 6 21:24:11 2010 (r204806) +++ head/sys/netinet/udp_usrreq.c Sat Mar 6 21:24:32 2010 (r204807) @@ -245,6 +245,9 @@ udp_destroy(void) V_udbinfo.ipi_hashmask); hashdestroy(V_udbinfo.ipi_porthashbase, M_PCB, V_udbinfo.ipi_porthashmask); + + uma_zdestroy(V_udpcb_zone); + uma_zdestroy(V_udbinfo.ipi_zone); INP_INFO_LOCK_DESTROY(&V_udbinfo); } #endif From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 21:27:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B909B1065670; Sat, 6 Mar 2010 21:27:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A92CD8FC14; Sat, 6 Mar 2010 21:27:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26LRQl9042060; Sat, 6 Mar 2010 21:27:26 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26LRQ6J042057; Sat, 6 Mar 2010 21:27:26 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003062127.o26LRQ6J042057@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 6 Mar 2010 21:27:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204808 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 21:27:26 -0000 Author: bz Date: Sat Mar 6 21:27:26 2010 New Revision: 204808 URL: http://svn.freebsd.org/changeset/base/204808 Log: Introduce a function rn_detachhead() that will free the radix table root nodes. This is only needed (and available) in the virtualization case to free the resources when tearing down a virtual network stack. Sponsored by: ISPsystem Reviewed by: julian, zec MFC after: 5 days Modified: head/sys/net/radix.c head/sys/net/radix.h Modified: head/sys/net/radix.c ============================================================================== --- head/sys/net/radix.c Sat Mar 6 21:24:32 2010 (r204807) +++ head/sys/net/radix.c Sat Mar 6 21:27:26 2010 (r204808) @@ -1161,6 +1161,24 @@ rn_inithead(head, off) return (1); } +#ifdef VIMAGE +int +rn_detachhead(void **head) +{ + struct radix_node_head *rnh; + + KASSERT((head != NULL && *head != NULL), + ("%s: head already freed", __func__)); + rnh = *head; + + /* Free nodes. */ + Free(rnh); + + *head = NULL; + return (1); +} +#endif + void rn_init(int maxk) { Modified: head/sys/net/radix.h ============================================================================== --- head/sys/net/radix.h Sat Mar 6 21:24:32 2010 (r204807) +++ head/sys/net/radix.h Sat Mar 6 21:27:26 2010 (r204808) @@ -162,6 +162,9 @@ struct radix_node_head { void rn_init(int); int rn_inithead(void **, int); +#ifdef VIMAGE +int rn_detachhead(void **); +#endif int rn_refines(void *, void *); struct radix_node *rn_addmask(void *, int, int), From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 21:38:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD256106566B; Sat, 6 Mar 2010 21:38:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCBAB8FC13; Sat, 6 Mar 2010 21:38:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26LcV8h044634; Sat, 6 Mar 2010 21:38:31 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26LcVXU044632; Sat, 6 Mar 2010 21:38:31 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003062138.o26LcVXU044632@svn.freebsd.org> From: Robert Watson Date: Sat, 6 Mar 2010 21:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204809 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 21:38:31 -0000 Author: rwatson Date: Sat Mar 6 21:38:31 2010 New Revision: 204809 URL: http://svn.freebsd.org/changeset/base/204809 Log: Add a comment to tcp_usr_accept() to indicate why it is we acquire the tcbinfo lock there: r175612, which re-added it, masked a race between sonewconn(2) and accept(2) that could allow an incompletely initialized address on a newly-created socket on a listen queue to be exposed. Full details can be found in that commit message. MFC after: 1 week Sponsored by: Juniper Networks Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Sat Mar 6 21:27:26 2010 (r204808) +++ head/sys/netinet/tcp_usrreq.c Sat Mar 6 21:38:31 2010 (r204809) @@ -560,9 +560,15 @@ out: } /* - * Accept a connection. Essentially all the work is - * done at higher levels; just return the address - * of the peer, storing through addr. + * Accept a connection. Essentially all the work is done at higher levels; + * just return the address of the peer, storing through addr. + * + * The rationale for acquiring the tcbinfo lock here is somewhat complicated, + * and is described in detail in the commit log entry for r175612. Acquiring + * it delays an accept(2) racing with sonewconn(), which inserts the socket + * before the inpcb address/port fields are initialized. A better fix would + * prevent the socket from being placed in the listen queue until all fields + * are fully initialized. */ static int tcp_usr_accept(struct socket *so, struct sockaddr **nam) From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 22:04:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F11F11065670; Sat, 6 Mar 2010 22:04:45 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0D028FC12; Sat, 6 Mar 2010 22:04:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26M4juY050546; Sat, 6 Mar 2010 22:04:45 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26M4j7H050544; Sat, 6 Mar 2010 22:04:45 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003062204.o26M4j7H050544@svn.freebsd.org> From: Robert Watson Date: Sat, 6 Mar 2010 22:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204810 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 22:04:46 -0000 Author: rwatson Date: Sat Mar 6 22:04:45 2010 New Revision: 204810 URL: http://svn.freebsd.org/changeset/base/204810 Log: Remove unnecessary locking of divcbinfo lock from div_output(): this has not been required since FreeBSD 7.0 when the so_pcb pointer leading to inp was guaranteed to be stable when a valid socket reference is held (as it is in the output path). MFC after: 1 week Reviewed by: bz Sponsored by: Juniper Networks Modified: head/sys/netinet/ip_divert.c Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Sat Mar 6 21:38:31 2010 (r204809) +++ head/sys/netinet/ip_divert.c Sat Mar 6 22:04:45 2010 (r204810) @@ -385,7 +385,6 @@ div_output(struct socket *so, struct mbu struct inpcb *inp; dt->info |= IPFW_IS_DIVERT | IPFW_INFO_OUT; - INP_INFO_WLOCK(&V_divcbinfo); inp = sotoinpcb(so); INP_RLOCK(inp); /* @@ -396,7 +395,6 @@ div_output(struct socket *so, struct mbu ((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len)) { error = EINVAL; INP_RUNLOCK(inp); - INP_INFO_WUNLOCK(&V_divcbinfo); m_freem(m); } else { /* Convert fields to host order for ip_output() */ @@ -437,7 +435,6 @@ div_output(struct socket *so, struct mbu error = ENOBUFS; } INP_RUNLOCK(inp); - INP_INFO_WUNLOCK(&V_divcbinfo); if (error == ENOBUFS) { m_freem(m); return (error); From owner-svn-src-head@FreeBSD.ORG Sat Mar 6 22:38:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C2E51065674; Sat, 6 Mar 2010 22:38:39 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 158688FC0C; Sat, 6 Mar 2010 22:38:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26MccHC058112; Sat, 6 Mar 2010 22:38:38 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26MccmU058110; Sat, 6 Mar 2010 22:38:38 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201003062238.o26MccmU058110@svn.freebsd.org> From: "Andrey A. Chernov" Date: Sat, 6 Mar 2010 22:38:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204811 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 22:38:39 -0000 Author: ache Date: Sat Mar 6 22:38:38 2010 New Revision: 204811 URL: http://svn.freebsd.org/changeset/base/204811 Log: Remove vestiges of old %-format which prevents build on amd64 Modified: head/usr.bin/uniq/uniq.c Modified: head/usr.bin/uniq/uniq.c ============================================================================== --- head/usr.bin/uniq/uniq.c Sat Mar 6 22:04:45 2010 (r204810) +++ head/usr.bin/uniq/uniq.c Sat Mar 6 22:38:38 2010 (r204811) @@ -195,7 +195,7 @@ getlinemax(char *buf, FILE *fp) while ((ch = getc(fp)) != EOF && ch != '\n') { buf[bufpos++] = ch; if (bufpos >= LINE_MAX) - errx(1, "Maximum line length (%zu) exceeded", + errx(1, "Maximum line length (%d) exceeded", LINE_MAX); } buf[bufpos] = '\0'; @@ -210,7 +210,7 @@ convert(wchar_t *buf, const char *str) wchar_t *p, *ret; if ((n = mbstowcs(buf, str, LINE_MAX)) == LINE_MAX) - errx(1, "Maximum line length (%zu) exceeded", LINE_MAX); + errx(1, "Maximum line length (%d) exceeded", LINE_MAX); else if (n != (size_t)-1) { /* If requested get the chosen fields + character offsets. */ if (numfields || numchars)