From owner-svn-src-user@FreeBSD.ORG Sun Jun 16 06:56:18 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3B5D02E3; Sun, 16 Jun 2013 06:56:18 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 143AE1C94; Sun, 16 Jun 2013 06:56:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5G6uHEg009648; Sun, 16 Jun 2013 06:56:17 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5G6uH08009647; Sun, 16 Jun 2013 06:56:17 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201306160656.r5G6uH08009647@svn.freebsd.org> From: Peter Holm Date: Sun, 16 Jun 2013 06:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251800 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jun 2013 06:56:18 -0000 Author: pho Date: Sun Jun 16 06:56:17 2013 New Revision: 251800 URL: http://svnweb.freebsd.org/changeset/base/251800 Log: Added umtx(2) regression test for problem fixed with r251684. Added: user/pho/stress2/misc/rwlock_ronly.sh (contents, props changed) Added: user/pho/stress2/misc/rwlock_ronly.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/rwlock_ronly.sh Sun Jun 16 06:56:17 2013 (r251800) @@ -0,0 +1,82 @@ +#!/bin/sh + +# +# Copyright (c) 2013 Peter Holm +# 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$ +# + +# Test scenario by kib@ +# Demonstrate process looping in kernel mode. +# Fixed in r251684. + +dir=/tmp +odir=`pwd` +cd $dir +sed '1,/^EOF/d' < $odir/$0 > $dir/rwlock_ronly.c +cc -o rwlock_ronly -Wall -Wextra rwlock_ronly.c || exit 1 +rm -f rwlock_ronly.c +cd $odir + +/tmp/rwlock_ronly || echo OK + +rm -f /tmp/rwlock_ronly +exit + +EOF +/* $Id: rwlock_ronly.c,v 1.2 2013/06/10 04:44:08 kostik Exp kostik $ */ + +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + char *p; + struct urwlock *rw; + int error; + + p = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_ANON, -1, 0); + if (p == (char *)MAP_FAILED) + err(1, "mmap"); + + rw = (struct urwlock *)p; + rw->rw_state = URWLOCK_READ_WAITERS; + + error = mprotect(p, getpagesize(), PROT_READ); + if (error == -1) + err(1, "mprotect"); + + error = _umtx_op(p, UMTX_OP_RW_RDLOCK, 0, NULL, NULL); + if (error != 0) + err(1, "rdlock"); + + return (0); +} From owner-svn-src-user@FreeBSD.ORG Sun Jun 16 15:26:14 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D64D0B5E; Sun, 16 Jun 2013 15:26:14 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C39F31C7B; Sun, 16 Jun 2013 15:26:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5GFQEeF071031; Sun, 16 Jun 2013 15:26:14 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5GFQ73p070986; Sun, 16 Jun 2013 15:26:07 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306161526.r5GFQ73p070986@svn.freebsd.org> From: Attilio Rao Date: Sun, 16 Jun 2013 15:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251805 - in user/attilio/vmcontention: . bin/sh contrib/cvs contrib/llvm/lib/Target/X86 contrib/llvm/lib/Target/X86/AsmParser contrib/llvm/tools/clang/include/clang/Basic contrib/llvm/... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jun 2013 15:26:14 -0000 Author: attilio Date: Sun Jun 16 15:26:06 2013 New Revision: 251805 URL: http://svnweb.freebsd.org/changeset/base/251805 Log: MFC Added: user/attilio/vmcontention/sys/xen/hvm.h - copied unchanged from r251804, head/sys/xen/hvm.h - copied from r251804, head/sys/xen/interface/arch-arm/ user/attilio/vmcontention/sys/xen/interface/arch-arm.h - copied unchanged from r251804, head/sys/xen/interface/arch-arm.h - copied from r251804, head/sys/xen/interface/arch-ia64/ user/attilio/vmcontention/sys/xen/interface/io/fsif.h - copied unchanged from r251804, head/sys/xen/interface/io/fsif.h user/attilio/vmcontention/sys/xen/interface/io/libxenvchan.h - copied unchanged from r251804, head/sys/xen/interface/io/libxenvchan.h user/attilio/vmcontention/sys/xen/interface/io/usbif.h - copied unchanged from r251804, head/sys/xen/interface/io/usbif.h user/attilio/vmcontention/sys/xen/interface/io/vscsiif.h - copied unchanged from r251804, head/sys/xen/interface/io/vscsiif.h user/attilio/vmcontention/sys/xen/interface/mem_event.h - copied unchanged from r251804, head/sys/xen/interface/mem_event.h user/attilio/vmcontention/sys/xen/interface/tmem.h - copied unchanged from r251804, head/sys/xen/interface/tmem.h - copied from r251804, head/sys/xen/interface/xsm/ user/attilio/vmcontention/tools/regression/bin/sh/builtins/local2.0 - copied unchanged from r251804, head/tools/regression/bin/sh/builtins/local2.0 user/attilio/vmcontention/tools/regression/bin/sh/builtins/local3.0 - copied unchanged from r251804, head/tools/regression/bin/sh/builtins/local3.0 user/attilio/vmcontention/tools/tools/ath/ath_ee_9300_print/ - copied from r251804, head/tools/tools/ath/ath_ee_9300_print/ Directory Properties: user/attilio/vmcontention/sys/xen/interface/arch-arm/ (props changed) user/attilio/vmcontention/sys/xen/interface/arch-ia64/ (props changed) user/attilio/vmcontention/sys/xen/interface/xsm/ (props changed) Deleted: user/attilio/vmcontention/contrib/cvs/ user/attilio/vmcontention/gnu/usr.bin/cvs/ user/attilio/vmcontention/lib/libcompiler_rt/__sync_fetch_and_add_4.c user/attilio/vmcontention/lib/libcompiler_rt/__sync_fetch_and_and_4.c user/attilio/vmcontention/lib/libcompiler_rt/__sync_fetch_and_op_n.h user/attilio/vmcontention/lib/libcompiler_rt/__sync_fetch_and_or_4.c user/attilio/vmcontention/lib/libcompiler_rt/__sync_fetch_and_sub_4.c user/attilio/vmcontention/lib/libcompiler_rt/__sync_fetch_and_xor_4.c user/attilio/vmcontention/lib/libcompiler_rt/__sync_lock_test_and_set_4.c user/attilio/vmcontention/lib/libcompiler_rt/__sync_synchronize.c user/attilio/vmcontention/lib/libcompiler_rt/__sync_val_compare_and_swap_4.c user/attilio/vmcontention/lib/libcompiler_rt/__sync_val_compare_and_swap_n.h user/attilio/vmcontention/share/doc/psd/28.cvs/ user/attilio/vmcontention/sys/xen/interface/hvm/vmx_assist.h Modified: user/attilio/vmcontention/Makefile user/attilio/vmcontention/Makefile.inc1 user/attilio/vmcontention/ObsoleteFiles.inc user/attilio/vmcontention/UPDATING user/attilio/vmcontention/bin/sh/sh.1 user/attilio/vmcontention/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp user/attilio/vmcontention/contrib/llvm/lib/Target/X86/X86InstrInfo.td user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Basic/Targets.cpp user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp user/attilio/vmcontention/etc/inetd.conf user/attilio/vmcontention/etc/mtree/BSD.usr.dist user/attilio/vmcontention/gnu/usr.bin/Makefile user/attilio/vmcontention/lib/libcompiler_rt/Makefile user/attilio/vmcontention/sbin/camcontrol/fwdownload.c user/attilio/vmcontention/sbin/hastd/refcnt.h user/attilio/vmcontention/share/doc/psd/Makefile user/attilio/vmcontention/share/man/man4/filemon.4 user/attilio/vmcontention/share/man/man5/src.conf.5 user/attilio/vmcontention/share/man/man9/pci.9 user/attilio/vmcontention/share/misc/bsd-family-tree user/attilio/vmcontention/share/mk/bsd.own.mk user/attilio/vmcontention/share/mk/bsd.subdir.mk user/attilio/vmcontention/share/mk/sys.mk user/attilio/vmcontention/sys/amd64/amd64/genassym.c user/attilio/vmcontention/sys/amd64/amd64/pmap.c user/attilio/vmcontention/sys/amd64/include/pmap.h user/attilio/vmcontention/sys/amd64/include/xen/xen-os.h user/attilio/vmcontention/sys/amd64/vmm/io/vlapic.c user/attilio/vmcontention/sys/arm/arm/stdatomic.c user/attilio/vmcontention/sys/cam/ata/ata_da.c user/attilio/vmcontention/sys/cam/scsi/scsi_da.c user/attilio/vmcontention/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c user/attilio/vmcontention/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h user/attilio/vmcontention/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c user/attilio/vmcontention/sys/dev/ath/if_ath_btcoex.c user/attilio/vmcontention/sys/dev/ath/if_ath_lna_div.c user/attilio/vmcontention/sys/dev/ath/if_ath_lna_div.h user/attilio/vmcontention/sys/dev/bge/if_bge.c user/attilio/vmcontention/sys/dev/puc/pucdata.c user/attilio/vmcontention/sys/dev/rt/if_rt.c user/attilio/vmcontention/sys/dev/usb/net/if_aue.c user/attilio/vmcontention/sys/dev/usb/net/if_mos.c user/attilio/vmcontention/sys/dev/usb/net/if_rue.c user/attilio/vmcontention/sys/dev/usb/net/if_smsc.c user/attilio/vmcontention/sys/dev/usb/net/if_udav.c user/attilio/vmcontention/sys/dev/virtio/network/if_vtnet.c user/attilio/vmcontention/sys/dev/xen/blkfront/blkfront.c user/attilio/vmcontention/sys/dev/xen/blkfront/block.h user/attilio/vmcontention/sys/dev/xen/netfront/netfront.c user/attilio/vmcontention/sys/i386/include/xen/xen-os.h user/attilio/vmcontention/sys/kern/kern_event.c user/attilio/vmcontention/sys/kern/kern_hhook.c user/attilio/vmcontention/sys/kern/kern_khelp.c user/attilio/vmcontention/sys/mips/mips/stdatomic.c user/attilio/vmcontention/sys/net/if_vlan.c user/attilio/vmcontention/sys/net80211/ieee80211_var.h user/attilio/vmcontention/sys/sparc64/include/atomic.h user/attilio/vmcontention/sys/sparc64/sparc64/pmap.c user/attilio/vmcontention/sys/sys/cdefs.h user/attilio/vmcontention/sys/sys/hhook.h user/attilio/vmcontention/sys/sys/module_khelp.h user/attilio/vmcontention/sys/sys/stdatomic.h user/attilio/vmcontention/sys/xen/interface/arch-ia64.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/arch-x86/cpuid.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/arch-x86/hvm/save.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/arch-x86/xen-mca.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/arch-x86/xen-x86_32.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/arch-x86/xen-x86_64.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/arch-x86/xen.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/arch-x86_32.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/arch-x86_64.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/domctl.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/elfnote.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/event_channel.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/features.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/grant_table.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/hvm/hvm_info_table.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/hvm/hvm_op.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/hvm/ioreq.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/hvm/params.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/hvm/save.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/io/blkif.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/io/netif.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/io/pciif.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/io/protocols.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/io/ring.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/io/xs_wire.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/kexec.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/memory.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/nmi.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/physdev.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/platform.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/sched.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/sysctl.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/trace.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/vcpu.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/version.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/xen-compat.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/xen.h (contents, props changed) user/attilio/vmcontention/sys/xen/interface/xenoprof.h (contents, props changed) user/attilio/vmcontention/sys/xen/xenstore/xenstore.c user/attilio/vmcontention/tools/build/mk/OptionalObsoleteFiles.inc user/attilio/vmcontention/tools/build/options/WITHOUT_KERBEROS_SUPPORT user/attilio/vmcontention/tools/tools/ath/Makefile user/attilio/vmcontention/tools/tools/ath/athspectral/athspectral.c user/attilio/vmcontention/tools/tools/nanobsd/gateworks/common user/attilio/vmcontention/usr.sbin/bsdconfig/bsdconfig user/attilio/vmcontention/usr.sbin/bsdconfig/share/packages/packages.subr Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/contrib/llvm/ (props changed) user/attilio/vmcontention/contrib/llvm/tools/clang/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/share/man/man4/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/amd64/include/xen/ (props changed) user/attilio/vmcontention/sys/amd64/vmm/ (props changed) user/attilio/vmcontention/sys/xen/interface/ (props changed) user/attilio/vmcontention/sys/xen/interface/COPYING (props changed) user/attilio/vmcontention/sys/xen/interface/acm.h (props changed) user/attilio/vmcontention/sys/xen/interface/acm_ops.h (props changed) user/attilio/vmcontention/sys/xen/interface/arch-arm/hvm/ (props changed) user/attilio/vmcontention/sys/xen/interface/arch-ia64/hvm/ (props changed) user/attilio/vmcontention/sys/xen/interface/arch-powerpc.h (props changed) user/attilio/vmcontention/sys/xen/interface/arch-x86/ (props changed) user/attilio/vmcontention/sys/xen/interface/arch-x86/hvm/ (props changed) user/attilio/vmcontention/sys/xen/interface/callback.h (props changed) user/attilio/vmcontention/sys/xen/interface/dom0_ops.h (props changed) user/attilio/vmcontention/sys/xen/interface/elfstructs.h (props changed) user/attilio/vmcontention/sys/xen/interface/foreign/ (props changed) user/attilio/vmcontention/sys/xen/interface/foreign/Makefile (props changed) user/attilio/vmcontention/sys/xen/interface/foreign/mkchecker.py (props changed) user/attilio/vmcontention/sys/xen/interface/foreign/mkheader.py (props changed) user/attilio/vmcontention/sys/xen/interface/foreign/reference.size (props changed) user/attilio/vmcontention/sys/xen/interface/foreign/structs.py (props changed) user/attilio/vmcontention/sys/xen/interface/hvm/ (props changed) user/attilio/vmcontention/sys/xen/interface/hvm/e820.h (props changed) user/attilio/vmcontention/sys/xen/interface/io/ (props changed) user/attilio/vmcontention/sys/xen/interface/io/console.h (props changed) user/attilio/vmcontention/sys/xen/interface/io/fbif.h (props changed) user/attilio/vmcontention/sys/xen/interface/io/kbdif.h (props changed) user/attilio/vmcontention/sys/xen/interface/io/tpmif.h (props changed) user/attilio/vmcontention/sys/xen/interface/io/xenbus.h (props changed) user/attilio/vmcontention/sys/xen/interface/libelf.h (props changed) user/attilio/vmcontention/sys/xen/interface/xencomm.h (props changed) Modified: user/attilio/vmcontention/Makefile ============================================================================== --- user/attilio/vmcontention/Makefile Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/Makefile Sun Jun 16 15:26:06 2013 (r251805) @@ -209,6 +209,12 @@ cleanworld: # Handle the user-driven targets, using the source relative mk files. # +.if empty(.MAKEFLAGS:M-n) +# skip this for -n to avoid changing previous behavior of +# 'make -n buildworld' etc. +${TGTS}: .MAKE +.endif + ${TGTS}: ${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET} Modified: user/attilio/vmcontention/Makefile.inc1 ============================================================================== --- user/attilio/vmcontention/Makefile.inc1 Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/Makefile.inc1 Sun Jun 16 15:26:06 2013 (r251805) @@ -263,6 +263,13 @@ WMAKEENV= ${CROSSENV} \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} + +# make hierarchy +HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} +.if defined(NO_ROOT) +HMAKE+= PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT +.endif + .if ${MK_CDDL} == "no" WMAKEENV+= NO_CTF=1 .endif @@ -1367,12 +1374,7 @@ cross-tools: # hierarchy - ensure that all the needed directories are present # hierarchy hier: -.if defined(NO_ROOT) - cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} \ - -DNO_ROOT METALOG=${METALOG} distrib-dirs -.else - cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs -.endif + cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs # # libraries - build all libraries, and install them under ${DESTDIR}. @@ -1890,3 +1892,5 @@ _xi-links: xdev xdev-build xdev-install: @echo "*** Error: Both XDEV and XDEV_ARCH must be defined for \"${.TARGET}\" target" .endif + +buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE Modified: user/attilio/vmcontention/ObsoleteFiles.inc ============================================================================== --- user/attilio/vmcontention/ObsoleteFiles.inc Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/ObsoleteFiles.inc Sun Jun 16 15:26:06 2013 (r251805) @@ -38,6 +38,33 @@ # xargs -n1 | sort | uniq -d; # done +# 20130614: remove CVS from base +OLD_FILES+=usr/bin/cvs +OLD_FILES+=usr/bin/cvsbug +OLD_FILES+=usr/share/examples/cvs/contrib/README +OLD_FILES+=usr/share/examples/cvs/contrib/clmerge +OLD_FILES+=usr/share/examples/cvs/contrib/cln_hist +OLD_FILES+=usr/share/examples/cvs/contrib/commit_prep +OLD_FILES+=usr/share/examples/cvs/contrib/cvs2vendor +OLD_FILES+=usr/share/examples/cvs/contrib/cvs_acls +OLD_FILES+=usr/share/examples/cvs/contrib/cvscheck +OLD_FILES+=usr/share/examples/cvs/contrib/cvscheck.man +OLD_FILES+=usr/share/examples/cvs/contrib/cvshelp.man +OLD_FILES+=usr/share/examples/cvs/contrib/descend.man +OLD_FILES+=usr/share/examples/cvs/contrib/easy-import +OLD_FILES+=usr/share/examples/cvs/contrib/intro.doc +OLD_FILES+=usr/share/examples/cvs/contrib/log +OLD_FILES+=usr/share/examples/cvs/contrib/log_accum +OLD_FILES+=usr/share/examples/cvs/contrib/mfpipe +OLD_FILES+=usr/share/examples/cvs/contrib/rcs-to-cvs +OLD_FILES+=usr/share/examples/cvs/contrib/rcs2log +OLD_FILES+=usr/share/examples/cvs/contrib/rcslock +OLD_FILES+=usr/share/examples/cvs/contrib/sccs2rcs +OLD_FILES+=usr/share/info/cvs.info.gz +OLD_FILES+=usr/share/info/cvsclient.info.gz +OLD_FILES+=usr/share/man/man1/cvs.1.gz +OLD_FILES+=usr/share/man/man5/cvs.5.gz +OLD_FILES+=usr/share/man/man8/cvsbug.8.gz # 20130417: nfs fha moved from nfsserver to nfs OLD_FILES+=usr/include/nfsserver/nfs_fha.h # 20130411: new clang import which bumps version from 3.2 to 3.3. Modified: user/attilio/vmcontention/UPDATING ============================================================================== --- user/attilio/vmcontention/UPDATING Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/UPDATING Sun Jun 16 15:26:06 2013 (r251805) @@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130615: + CVS has been removed from the base system. An exact copy + of the code is available from the devel/cvs port. + 20130613: Some people report the following error after the switch to bmake: Modified: user/attilio/vmcontention/bin/sh/sh.1 ============================================================================== --- user/attilio/vmcontention/bin/sh/sh.1 Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/bin/sh/sh.1 Sun Jun 16 15:26:06 2013 (r251805) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd June 5, 2013 +.Dd June 14, 2013 .Dt SH 1 .Os .Sh NAME @@ -1036,6 +1036,9 @@ The current working directory as set by The file creation mask as set by .Ic umask . .It +Resource limits as set by +.Ic ulimit . +.It References to open files. .It Traps as set by Modified: user/attilio/vmcontention/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp ============================================================================== --- user/attilio/vmcontention/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp Sun Jun 16 15:26:06 2013 (r251805) @@ -2306,25 +2306,25 @@ MatchAndEmitInstruction(SMLoc IDLoc, uns unsigned Match1, Match2, Match3, Match4; Match1 = MatchInstructionImpl(Operands, Inst, ErrorInfoIgnore, - isParsingIntelSyntax()); + MatchingInlineAsm, isParsingIntelSyntax()); // If this returned as a missing feature failure, remember that. if (Match1 == Match_MissingFeature) ErrorInfoMissingFeature = ErrorInfoIgnore; Tmp[Base.size()] = Suffixes[1]; Match2 = MatchInstructionImpl(Operands, Inst, ErrorInfoIgnore, - isParsingIntelSyntax()); + MatchingInlineAsm, isParsingIntelSyntax()); // If this returned as a missing feature failure, remember that. if (Match2 == Match_MissingFeature) ErrorInfoMissingFeature = ErrorInfoIgnore; Tmp[Base.size()] = Suffixes[2]; Match3 = MatchInstructionImpl(Operands, Inst, ErrorInfoIgnore, - isParsingIntelSyntax()); + MatchingInlineAsm, isParsingIntelSyntax()); // If this returned as a missing feature failure, remember that. if (Match3 == Match_MissingFeature) ErrorInfoMissingFeature = ErrorInfoIgnore; Tmp[Base.size()] = Suffixes[3]; Match4 = MatchInstructionImpl(Operands, Inst, ErrorInfoIgnore, - isParsingIntelSyntax()); + MatchingInlineAsm, isParsingIntelSyntax()); // If this returned as a missing feature failure, remember that. if (Match4 == Match_MissingFeature) ErrorInfoMissingFeature = ErrorInfoIgnore; Modified: user/attilio/vmcontention/contrib/llvm/lib/Target/X86/X86InstrInfo.td ============================================================================== --- user/attilio/vmcontention/contrib/llvm/lib/Target/X86/X86InstrInfo.td Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/contrib/llvm/lib/Target/X86/X86InstrInfo.td Sun Jun 16 15:26:06 2013 (r251805) @@ -884,12 +884,12 @@ def PUSHF64 : I<0x9C, RawFrm, (outs), let Defs = [EDI, ESI, EBP, EBX, EDX, ECX, EAX, ESP], Uses = [ESP], mayLoad = 1, neverHasSideEffects = 1, SchedRW = [WriteLoad] in { -def POPA32 : I<0x61, RawFrm, (outs), (ins), "popa{l|d}", [], IIC_POP_A>, +def POPA32 : I<0x61, RawFrm, (outs), (ins), "popa{l}", [], IIC_POP_A>, Requires<[In32BitMode]>; } let Defs = [ESP], Uses = [EDI, ESI, EBP, EBX, EDX, ECX, EAX, ESP], mayStore = 1, neverHasSideEffects = 1, SchedRW = [WriteStore] in { -def PUSHA32 : I<0x60, RawFrm, (outs), (ins), "pusha{l|d}", [], IIC_PUSH_A>, +def PUSHA32 : I<0x60, RawFrm, (outs), (ins), "pusha{l}", [], IIC_PUSH_A>, Requires<[In32BitMode]>; } @@ -1867,6 +1867,9 @@ def : MnemonicAlias<"pushf", "pushfl", def : MnemonicAlias<"pushf", "pushfq", "att">, Requires<[In64BitMode]>; def : MnemonicAlias<"pushfd", "pushfl", "att">; +def : MnemonicAlias<"popad", "popa", "intel">, Requires<[In32BitMode]>; +def : MnemonicAlias<"pushad", "pusha", "intel">, Requires<[In32BitMode]>; + def : MnemonicAlias<"repe", "rep", "att">; def : MnemonicAlias<"repz", "rep", "att">; def : MnemonicAlias<"repnz", "repne", "att">; @@ -1919,29 +1922,31 @@ def : MnemonicAlias<"fucomip", "fucompi def : MnemonicAlias<"fwait", "wait", "att">; -class CondCodeAlias +class CondCodeAlias : MnemonicAlias; + !strconcat(Prefix, NewCond, Suffix), VariantName>; /// IntegerCondCodeMnemonicAlias - This multiclass defines a bunch of /// MnemonicAlias's that canonicalize the condition code in a mnemonic, for /// example "setz" -> "sete". -multiclass IntegerCondCodeMnemonicAlias { - def C : CondCodeAlias; // setc -> setb - def Z : CondCodeAlias; // setz -> sete - def NA : CondCodeAlias; // setna -> setbe - def NB : CondCodeAlias; // setnb -> setae - def NC : CondCodeAlias; // setnc -> setae - def NG : CondCodeAlias; // setng -> setle - def NL : CondCodeAlias; // setnl -> setge - def NZ : CondCodeAlias; // setnz -> setne - def PE : CondCodeAlias; // setpe -> setp - def PO : CondCodeAlias; // setpo -> setnp - - def NAE : CondCodeAlias; // setnae -> setb - def NBE : CondCodeAlias; // setnbe -> seta - def NGE : CondCodeAlias; // setnge -> setl - def NLE : CondCodeAlias; // setnle -> setg +multiclass IntegerCondCodeMnemonicAlias { + def C : CondCodeAlias; // setc -> setb + def Z : CondCodeAlias; // setz -> sete + def NA : CondCodeAlias; // setna -> setbe + def NB : CondCodeAlias; // setnb -> setae + def NC : CondCodeAlias; // setnc -> setae + def NG : CondCodeAlias; // setng -> setle + def NL : CondCodeAlias; // setnl -> setge + def NZ : CondCodeAlias; // setnz -> setne + def PE : CondCodeAlias; // setpe -> setp + def PO : CondCodeAlias; // setpo -> setnp + + def NAE : CondCodeAlias; // setnae -> setb + def NBE : CondCodeAlias; // setnbe -> seta + def NGE : CondCodeAlias; // setnge -> setl + def NLE : CondCodeAlias; // setnle -> setg } // Aliases for set @@ -1949,9 +1954,11 @@ defm : IntegerCondCodeMnemonicAlias<"set // Aliases for j defm : IntegerCondCodeMnemonicAlias<"j", "">; // Aliases for cmov{w,l,q} -defm : IntegerCondCodeMnemonicAlias<"cmov", "w">; -defm : IntegerCondCodeMnemonicAlias<"cmov", "l">; -defm : IntegerCondCodeMnemonicAlias<"cmov", "q">; +defm : IntegerCondCodeMnemonicAlias<"cmov", "w", "att">; +defm : IntegerCondCodeMnemonicAlias<"cmov", "l", "att">; +defm : IntegerCondCodeMnemonicAlias<"cmov", "q", "att">; +// No size suffix for intel-style asm. +defm : IntegerCondCodeMnemonicAlias<"cmov", "", "intel">; //===----------------------------------------------------------------------===// Modified: user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def ============================================================================== --- user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Sun Jun 16 15:26:06 2013 (r251805) @@ -70,6 +70,8 @@ // f -> this is a libc/libm function without the '__builtin_' prefix. It can // be followed by ':headername:' to state which header this function // comes from. +// i -> this is a runtime library implemented function without the +// '__builtin_' prefix. It will be implemented in compiter-rt or libgcc. // p:N: -> this is a printf-like function whose Nth argument is the format // string. // P:N: -> similar to the p:N: attribute, but the function is like vprintf Modified: user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h ============================================================================== --- user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h Sun Jun 16 15:26:06 2013 (r251805) @@ -128,6 +128,13 @@ public: return strchr(GetRecord(ID).Attributes, 'f') != 0; } + /// \brief Determines whether this builtin is a predefined compiler-rt/libgcc + /// function, such as "__clear_cache", where we know the signature a + /// priori. + bool isPredefinedRuntimeFunction(unsigned ID) const { + return strchr(GetRecord(ID).Attributes, 'i') != 0; + } + /// \brief Determines whether this builtin has custom typechecking. bool hasCustomTypechecking(unsigned ID) const { return strchr(GetRecord(ID).Attributes, 't') != 0; Modified: user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def ============================================================================== --- user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def Sun Jun 16 15:26:06 2013 (r251805) @@ -15,4 +15,4 @@ // The format of this database matches clang/Basic/Builtins.def. // In libgcc -BUILTIN(__clear_cache, "vv*v*", "") +BUILTIN(__clear_cache, "vv*v*", "i") Modified: user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def ============================================================================== --- user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def Sun Jun 16 15:26:06 2013 (r251805) @@ -15,7 +15,7 @@ // The format of this database matches clang/Basic/Builtins.def. // In libgcc -BUILTIN(__clear_cache, "v.", "") +BUILTIN(__clear_cache, "v.", "i") BUILTIN(__builtin_thread_pointer, "v*", "") // Saturating arithmetic Modified: user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Basic/Targets.cpp ============================================================================== --- user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Sun Jun 16 15:26:06 2013 (r251805) @@ -3533,8 +3533,8 @@ class ARMTargetInfo : public TargetInfo // the kernel which on armv6 and newer uses ldrex and strex. The net result // is that if we assume the kernel is at least as recent as the hardware, // it is safe to use atomic instructions on armv6 and newer. - if (T.getOS() != llvm::Triple::Linux) - return false; + if (T.getOS() != llvm::Triple::Linux && T.getOS() != llvm::Triple::FreeBSD) + return false; StringRef ArchName = T.getArchName(); if (T.getArch() == llvm::Triple::arm) { if (!ArchName.startswith("armv")) Modified: user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp ============================================================================== --- user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Sun Jun 16 15:26:06 2013 (r251805) @@ -8671,7 +8671,8 @@ Decl *Sema::ActOnStartOfFunctionDef(Scop // Builtin functions cannot be defined. if (unsigned BuiltinID = FD->getBuiltinID()) { - if (!Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID)) { + if (!Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID) && + !Context.BuiltinInfo.isPredefinedRuntimeFunction(BuiltinID)) { Diag(FD->getLocation(), diag::err_builtin_definition) << FD; FD->setInvalidDecl(); } Modified: user/attilio/vmcontention/etc/inetd.conf ============================================================================== --- user/attilio/vmcontention/etc/inetd.conf Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/etc/inetd.conf Sun Jun 16 15:26:06 2013 (r251805) @@ -58,8 +58,8 @@ # --allow-root path correctly or you open a trivial to exploit but # deadly security hole. # -#cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/your/cvsroot/here pserver -#cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/your/cvsroot/here kserver +#cvspserver stream tcp nowait root /usr/local/bin/cvs cvs --allow-root=/your/cvsroot/here pserver +#cvspserver stream tcp nowait root /usr/local/bin/cvs cvs --allow-root=/your/cvsroot/here kserver # # RPC based services (you MUST have rpcbind running to use these) # Modified: user/attilio/vmcontention/etc/mtree/BSD.usr.dist ============================================================================== --- user/attilio/vmcontention/etc/mtree/BSD.usr.dist Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/etc/mtree/BSD.usr.dist Sun Jun 16 15:26:06 2013 (r251805) @@ -148,8 +148,6 @@ .. 27.nfsrfc .. - 28.cvs - .. .. smm 01.setup @@ -223,10 +221,6 @@ .. csh .. - cvs - contrib - .. - .. cvsup .. diskless Modified: user/attilio/vmcontention/gnu/usr.bin/Makefile ============================================================================== --- user/attilio/vmcontention/gnu/usr.bin/Makefile Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/gnu/usr.bin/Makefile Sun Jun 16 15:26:06 2013 (r251805) @@ -4,7 +4,6 @@ SUBDIR= ${_binutils} \ ${_cc} \ - ${_cvs} \ dialog \ diff \ diff3 \ @@ -26,10 +25,6 @@ _groff= groff .endif .endif -.if ${MK_CVS} != "no" -_cvs= cvs -.endif - .if ${MK_GPL_DTC} != "no" _dtc= dtc .endif Modified: user/attilio/vmcontention/lib/libcompiler_rt/Makefile ============================================================================== --- user/attilio/vmcontention/lib/libcompiler_rt/Makefile Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/lib/libcompiler_rt/Makefile Sun Jun 16 15:26:06 2013 (r251805) @@ -28,6 +28,7 @@ SRCF= absvdi2 \ ashlti3 \ ashrdi3 \ ashrti3 \ + clear_cache \ clzdi2 \ clzsi2 \ clzti2 \ @@ -125,11 +126,6 @@ SRCF= absvdi2 \ umoddi3 \ umodti3 -# Don't build clear_cache on ARM with clang as it is a builtin there. -.if ${MACHINE_CPUARCH} != "arm" || ${COMPILER_TYPE} != "clang" -SRCF+= clear_cache -.endif - # These are already shipped by libc.a on arm and mips .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" SRCF+= adddf3 \ @@ -158,14 +154,9 @@ SRCF+= divsi3 \ # FreeBSD-specific atomic intrinsics. .if ${MACHINE_CPUARCH} == "arm" -SRCF+= __sync_fetch_and_add_4 \ - __sync_fetch_and_and_4 \ - __sync_fetch_and_or_4 \ - __sync_fetch_and_sub_4 \ - __sync_fetch_and_xor_4 \ - __sync_lock_test_and_set_4 \ - __sync_synchronize \ - __sync_val_compare_and_swap_4 +.PATH: ${.CURDIR}/../../sys/arm/arm + +SRCF+= stdatomic .elif ${MACHINE_CPUARCH} == "mips" .PATH: ${.CURDIR}/../../sys/mips/mips Modified: user/attilio/vmcontention/sbin/camcontrol/fwdownload.c ============================================================================== --- user/attilio/vmcontention/sbin/camcontrol/fwdownload.c Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/sbin/camcontrol/fwdownload.c Sun Jun 16 15:26:06 2013 (r251805) @@ -370,17 +370,15 @@ fw_download_img(struct cam_device *cam_d } if (!sim_mode) { /* Execute the command. */ - if (cam_send_ccb(cam_dev, ccb) < 0) { + if (cam_send_ccb(cam_dev, ccb) < 0 || + (ccb->ccb_h.status & CAM_STATUS_MASK) != + CAM_REQ_CMP) { warnx("Error writing image to device"); if (printerrors) cam_error_print(cam_dev, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); goto bailout; } - if (ccb->ataio.res.status != 0 /*&& !last_pkt*/) { - cam_error_print(cam_dev, ccb, CAM_ESF_ALL, - CAM_EPF_ALL, stderr); - } } /* Prepare next round. */ pkt_count++; Modified: user/attilio/vmcontention/sbin/hastd/refcnt.h ============================================================================== --- user/attilio/vmcontention/sbin/hastd/refcnt.h Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/sbin/hastd/refcnt.h Sun Jun 16 15:26:06 2013 (r251805) @@ -32,24 +32,24 @@ #ifndef __REFCNT_H__ #define __REFCNT_H__ -#include +#include #include "pjdlog.h" -typedef unsigned int refcnt_t; +typedef atomic_uint refcnt_t; static __inline void refcnt_init(refcnt_t *count, unsigned int v) { - *count = v; + atomic_init(count, v); } static __inline void refcnt_acquire(refcnt_t *count) { - atomic_add_acq_int(count, 1); + atomic_fetch_add_explicit(count, 1, memory_order_acquire); } static __inline unsigned int @@ -58,7 +58,7 @@ refcnt_release(refcnt_t *count) unsigned int old; /* XXX: Should this have a rel membar? */ - old = atomic_fetchadd_int(count, -1); + old = atomic_fetch_sub(count, 1); PJDLOG_ASSERT(old > 0); return (old - 1); } Modified: user/attilio/vmcontention/share/doc/psd/Makefile ============================================================================== --- user/attilio/vmcontention/share/doc/psd/Makefile Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/share/doc/psd/Makefile Sun Jun 16 15:26:06 2013 (r251805) @@ -35,7 +35,6 @@ SUBDIR+=22.rpcgen \ 24.xdr \ 25.xdrrfc \ 26.rpcrfc \ - 27.nfsrpc \ - 28.cvs + 27.nfsrpc .include Modified: user/attilio/vmcontention/share/man/man4/filemon.4 ============================================================================== --- user/attilio/vmcontention/share/man/man4/filemon.4 Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/share/man/man4/filemon.4 Sun Jun 16 15:26:06 2013 (r251805) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 30, 2012 +.Dd June 14, 2013 .Dt FILEMON 4 .Os .Sh NAME @@ -126,6 +126,7 @@ is set to indicate the error. #include #include #include +#include static void open_filemon(void) @@ -133,29 +134,24 @@ open_filemon(void) pid_t child; int fm_fd, fm_log; - if ((fm_fd = open("/dev/filemon", O_RDWR)) == -1) + if ((fm_fd = open("/dev/filemon", O_RDWR | O_CLOEXEC)) == -1) err(1, "open(\e"/dev/filemon\e", O_RDWR)"); if ((fm_log = open("filemon.out", - O_CREAT | O_WRONLY | O_TRUNC, DEFFILEMODE)) == -1) + O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, DEFFILEMODE)) == -1) err(1, "open(filemon.out)"); if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) == -1) err(1, "Cannot set filemon log file descriptor"); - /* Set up these two fd's to close on exec. */ - (void)fcntl(fm_fd, F_SETFD, FD_CLOEXEC); - (void)fcntl(fm_log, F_SETFD, FD_CLOEXEC); if ((child = fork()) == 0) { child = getpid(); if (ioctl(fm_fd, FILEMON_SET_PID, &child) == -1) err(1, "Cannot set filemon PID"); /* Do something here. */ - return 0; } else { wait(&child); close(fm_fd); } - return 0; } .Ed .Pp Modified: user/attilio/vmcontention/share/man/man5/src.conf.5 ============================================================================== --- user/attilio/vmcontention/share/man/man5/src.conf.5 Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/share/man/man5/src.conf.5 Sun Jun 16 15:26:06 2013 (r251805) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb +.\" from FreeBSD: head/tools/build/options/makeman 251685 2013-06-13 13:05:08Z emaste .\" $FreeBSD$ -.Dd June 7, 2013 +.Dd June 15, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -387,9 +387,6 @@ similar to DWARF and the venerable stabs Set to not build .Xr ctm 1 and related utilities. -.It Va WITHOUT_CVS -.\" from FreeBSD: head/tools/build/options/WITHOUT_CVS 156932 2006-03-21 07:50:50Z ru -Set to not build CVS. .It Va WITHOUT_CXX .\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs Set to not build @@ -637,9 +634,8 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_KERBEROS_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler Set to build some programs without Kerberos support, like -.Xr cvs 1 , .Xr ssh 1 , .Xr telnet 1 , .Xr sshd 8 , @@ -685,10 +681,11 @@ Setting this variable will enable the LD .Xr dig 1 and .Xr host 1 . -When set, the following options are also in effect: +When set, it also enforces the following options: .Pp -.Bl -inset -compact -.It Va WITHOUT_BIND_UTILS +.Bl -item -compact +.It +.Va WITHOUT_BIND_UTILS .El .It Va WITHOUT_LEGACY_CONSOLE .\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 249966 2013-04-27 04:09:09Z eadler @@ -701,9 +698,9 @@ and On amd64, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. -.It Va WITHOUT_LIBCPLUSPLUS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim -Set to avoid building libcxxrt and libc++. +.It Va WITH_LIBCPLUSPLUS +.\" from FreeBSD: head/tools/build/options/WITH_LIBCPLUSPLUS 228082 2011-11-28 17:56:46Z dim +Set to build libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD .\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the Modified: user/attilio/vmcontention/share/man/man9/pci.9 ============================================================================== --- user/attilio/vmcontention/share/man/man9/pci.9 Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/share/man/man9/pci.9 Sun Jun 16 15:26:06 2013 (r251805) @@ -485,13 +485,13 @@ A driver is only allowed to use either M but not both. .Pp The -.Fn pci_count_msi +.Fn pci_msi_count function returns the maximum number of MSI messages supported by the device .Fa dev . If the device does not support MSI, then -.Fn pci_count_msi +.Fn pci_msi_count returns zero. .Pp The @@ -538,13 +538,13 @@ The function returns zero on success and an error on failure. .Pp The -.Fn pci_count_msix +.Fn pci_msix_count function returns the maximum number of MSI-X messages supported by the device .Fa dev . If the device does not support MSI-X, then -.Fn pci_count_msix +.Fn pci_msix_count returns zero. .Pp The Modified: user/attilio/vmcontention/share/misc/bsd-family-tree ============================================================================== --- user/attilio/vmcontention/share/misc/bsd-family-tree Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/share/misc/bsd-family-tree Sun Jun 16 15:26:06 2013 (r251805) @@ -638,6 +638,6 @@ Steven M. Schultz for providing 2.8BSD, -- Copyright (c) 1997-2012 Wolfram Schneider -URL: http://cvsweb.freebsd.org/src/share/misc/bsd-family-tree +URL: http://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree $FreeBSD$ Modified: user/attilio/vmcontention/share/mk/bsd.own.mk ============================================================================== --- user/attilio/vmcontention/share/mk/bsd.own.mk Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/share/mk/bsd.own.mk Sun Jun 16 15:26:06 2013 (r251805) @@ -272,7 +272,6 @@ __DEFAULT_YES_OPTIONS = \ CROSS_COMPILER \ CRYPT \ CTM \ - CVS \ CXX \ DICT \ DYNAMICROOT \ Modified: user/attilio/vmcontention/share/mk/bsd.subdir.mk ============================================================================== --- user/attilio/vmcontention/share/mk/bsd.subdir.mk Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/share/mk/bsd.subdir.mk Sun Jun 16 15:26:06 2013 (r251805) @@ -36,14 +36,14 @@ ____: DISTRIBUTION?= base .if !target(distribute) -distribute: +distribute: .MAKE .for dist in ${DISTRIBUTION} ${_+_}cd ${.CURDIR}; \ ${MAKE} install -DNO_SUBDIR DESTDIR=${DISTDIR}/${dist} SHARED=copies .endfor .endif -_SUBDIR: .USE +_SUBDIR: .USE .MAKE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) @${_+_}set -e; for entry in ${SUBDIR}; do \ if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ @@ -60,7 +60,7 @@ _SUBDIR: .USE done .endif -${SUBDIR}: .PHONY +${SUBDIR}: .PHONY .MAKE ${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \ cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \ else \ @@ -81,7 +81,7 @@ ${__stage}${__target}: ${__stage}${__target}: _SUBDIR .endif .endfor -${__target}: +${__target}: .MAKE ${_+_}set -e; cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} .endfor Modified: user/attilio/vmcontention/share/mk/sys.mk ============================================================================== --- user/attilio/vmcontention/share/mk/sys.mk Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/share/mk/sys.mk Sun Jun 16 15:26:06 2013 (r251805) @@ -95,7 +95,13 @@ ECHODIR ?= true .endif .endif -.if !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n" +.if defined(.PARSEDIR) +# _+_ appears to be a workaround for the special src .MAKE not working. +# setting it to + interferes with -N +_+_ ?= +.elif !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n" +# the check above matches only a single -n, so -n -n will result +# in _+_ = + _+_ ?= .else _+_ ?= + Modified: user/attilio/vmcontention/sys/amd64/amd64/genassym.c ============================================================================== --- user/attilio/vmcontention/sys/amd64/amd64/genassym.c Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/sys/amd64/amd64/genassym.c Sun Jun 16 15:26:06 2013 (r251805) @@ -109,7 +109,6 @@ ASSYM(addr_PML4map, addr_PML4map); ASSYM(addr_PML4pml4e, addr_PML4pml4e); ASSYM(PDESIZE, sizeof(pd_entry_t)); ASSYM(PTESIZE, sizeof(pt_entry_t)); -ASSYM(PTESHIFT, PTESHIFT); ASSYM(PAGE_SHIFT, PAGE_SHIFT); ASSYM(PAGE_MASK, PAGE_MASK); ASSYM(PDRSHIFT, PDRSHIFT); Modified: user/attilio/vmcontention/sys/amd64/amd64/pmap.c ============================================================================== --- user/attilio/vmcontention/sys/amd64/amd64/pmap.c Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/sys/amd64/amd64/pmap.c Sun Jun 16 15:26:06 2013 (r251805) @@ -320,9 +320,6 @@ static void _pmap_unwire_ptp(pmap_t pmap static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, vm_page_t *); static vm_offset_t pmap_kmem_choose(vm_offset_t addr); -CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t)); -CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); - /* * Move the kernel virtual free pointer to the next * 2MB. This is used to help improve performance Modified: user/attilio/vmcontention/sys/amd64/include/pmap.h ============================================================================== --- user/attilio/vmcontention/sys/amd64/include/pmap.h Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/sys/amd64/include/pmap.h Sun Jun 16 15:26:06 2013 (r251805) @@ -157,11 +157,6 @@ typedef u_int64_t pt_entry_t; typedef u_int64_t pdp_entry_t; typedef u_int64_t pml4_entry_t; -#define PML4ESHIFT (3) -#define PDPESHIFT (3) -#define PTESHIFT (3) -#define PDESHIFT (3) - /* * Address of current address space page table maps and directories. */ Modified: user/attilio/vmcontention/sys/amd64/include/xen/xen-os.h ============================================================================== --- user/attilio/vmcontention/sys/amd64/include/xen/xen-os.h Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/sys/amd64/include/xen/xen-os.h Sun Jun 16 15:26:06 2013 (r251805) @@ -13,16 +13,21 @@ #define CONFIG_X86_PAE #endif +#ifdef LOCORE +#define __ASSEMBLY__ +#endif + #if !defined(__XEN_INTERFACE_VERSION__) -/* - * Can update to a more recent version when we implement - * the hypercall page - */ -#define __XEN_INTERFACE_VERSION__ 0x00030204 +#define __XEN_INTERFACE_VERSION__ 0x00030208 #endif +#define GRANT_REF_INVALID 0xffffffff + #include +/* Everything below this point is not included by assembler (.S) files. */ +#ifndef __ASSEMBLY__ + /* Force a proper event-channel callback from Xen. */ void force_evtchn_callback(void); @@ -43,10 +48,6 @@ static inline void rep_nop(void) void *bootmem_alloc(unsigned int size); void bootmem_free(void *ptr, unsigned int size); - -/* Everything below this point is not included by assembler (.S) files. */ -#ifndef __ASSEMBLY__ - void printk(const char *fmt, ...); /* some function prototypes */ @@ -128,14 +129,14 @@ do { #else #endif -#ifndef mb -#define mb() __asm__ __volatile__("mfence":::"memory") +#ifndef xen_mb +#define xen_mb() mb() #endif -#ifndef rmb -#define rmb() __asm__ __volatile__("lfence":::"memory"); +#ifndef xen_rmb +#define xen_rmb() rmb() #endif -#ifndef wmb -#define wmb() barrier() +#ifndef xen_wmb +#define xen_wmb() wmb() #endif #ifdef SMP #define smp_mb() mb() Modified: user/attilio/vmcontention/sys/amd64/vmm/io/vlapic.c ============================================================================== --- user/attilio/vmcontention/sys/amd64/vmm/io/vlapic.c Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/sys/amd64/vmm/io/vlapic.c Sun Jun 16 15:26:06 2013 (r251805) @@ -465,7 +465,7 @@ lapic_process_icr(struct vlapic *vlapic, break; } - while ((i = cpusetobj_ffs(&dmask)) != 0) { + while ((i = CPU_FFS(&dmask)) != 0) { i--; CPU_CLR(i, &dmask); if (mode == APIC_DELMODE_FIXED) { Modified: user/attilio/vmcontention/sys/arm/arm/stdatomic.c ============================================================================== --- user/attilio/vmcontention/sys/arm/arm/stdatomic.c Sun Jun 16 10:48:47 2013 (r251804) +++ user/attilio/vmcontention/sys/arm/arm/stdatomic.c Sun Jun 16 15:26:06 2013 (r251805) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef _KERNEL #include "opt_global.h" @@ -41,7 +42,7 @@ __FBSDID("$FreeBSD$"); * Executing statements with interrupts disabled. */ -#ifndef SMP +#if defined(_KERNEL) && !defined(SMP) #define WITHOUT_INTERRUPTS(s) do { \ register_t regs; \ \ @@ -49,7 +50,7 @@ __FBSDID("$FreeBSD$"); do s while (0); \ intr_restore(regs); \ } while (0) -#endif /* !SMP */ +#endif /* _KERNEL && !SMP */ /* * Memory barriers. @@ -62,18 +63,30 @@ __FBSDID("$FreeBSD$"); * should make 's atomic_exchange_explicit() work reliably. */ +#if defined(_KERNEL) && !defined(SMP) static inline void do_sync(void) { -#if defined(_KERNEL) && !defined(SMP) __asm volatile ("" : : : "memory"); +} #elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) +static inline void +do_sync(void) +{ + __asm volatile ("dmb" : : : "memory"); -#else /* __ARM_ARCH_6__ */ +} +#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ + defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ + defined(__ARM_ARCH_6ZK__) +static inline void +do_sync(void) +{ + __asm volatile ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory"); -#endif } +#endif #if defined(__CLANG_ATOMICS) || defined(__GNUC_ATOMICS) @@ -88,11 +101,7 @@ do_sync(void) /* These systems should be supported by the compiler. */ -#elif defined(_KERNEL) - -#ifdef SMP -#error "On SMP systems we should have proper atomic operations." -#endif +#else /* __ARM_ARCH_5__ */ /* Clang doesn't allow us to reimplement builtins without this. */ #ifdef __clang__ @@ -103,10 +112,14 @@ do_sync(void) void __sync_synchronize(void) { - - do_sync(); } +#ifdef _KERNEL + +#ifdef SMP +#error "On SMP systems we should have proper atomic operations." +#endif + /* * On uniprocessor systems, we can perform the atomic operations by * disabling interrupts. @@ -182,20 +195,154 @@ EMIT_ALL_OPS_N(2, uint16_t) EMIT_ALL_OPS_N(4, uint32_t) EMIT_ALL_OPS_N(8, uint64_t) -#else /* !__ARM_ARCH_6__ && !__ARM_ARCH_7__ && !_KERNEL */ +#else /* !_KERNEL */ + +/* + * For userspace on uniprocessor systems, we can implement the atomic + * operations by using a Restartable Atomic Sequence. This makes the + * kernel restart the code from the beginning when interrupted. + */ + +#define EMIT_LOAD_N(N, uintN_t) \ +uintN_t \ +__atomic_load_##N(uintN_t *mem, int model __unused) \ +{ \ + \ + return (*mem); \ +} + +#define EMIT_STORE_N(N, uintN_t) \ +void \ +__atomic_store_##N(uintN_t *mem, uintN_t val, int model __unused) \ +{ \ + \ + *mem = val; \ +} + +#define EMIT_EXCHANGE_N(N, uintN_t, ldr, str) \ +uintN_t \ +__atomic_exchange_##N(uintN_t *mem, uintN_t val, int model __unused) \ +{ \ + uint32_t old, temp, ras_start; \ + \ + ras_start = ARM_RAS_START; \ + __asm volatile ( \ + /* Set up Restartable Atomic Sequence. */ \ + "1:" \ + "\tadr %2, 1b\n" \ + "\tstr %2, [%5]\n" \ + "\tadr %2, 2f\n" \ + "\tstr %2, [%5, #4]\n" \ + \ + "\t"ldr" %0, %4\n" /* Load old value. */ \ + "\t"str" %3, %1\n" /* Store new value. */ \ + \ + /* Tear down Restartable Atomic Sequence. */ \ + "2:" \ + "\tmov %2, #0x00000000\n" \ + "\tstr %2, [%5]\n" \ + "\tmov %2, #0xffffffff\n" \ + "\tstr %2, [%5, #4]\n" \ + : "=&r" (old), "=m" (*mem), "=&r" (temp) \ + : "r" (val), "m" (*mem), "r" (ras_start)); \ + return (old); \ +} + +#define EMIT_COMPARE_EXCHANGE_N(N, uintN_t, ldr, streq) \ +_Bool \ +__atomic_compare_exchange_##N(uintN_t *mem, uintN_t *pexpected, \ + uintN_t desired, int success __unused, int failure __unused) \ +{ \ + uint32_t expected, old, temp, ras_start; \ + \ + expected = *pexpected; \ + ras_start = ARM_RAS_START; \ + __asm volatile ( \ + /* Set up Restartable Atomic Sequence. */ \ + "1:" \ + "\tadr %2, 1b\n" \ + "\tstr %2, [%6]\n" \ + "\tadr %2, 2f\n" \ + "\tstr %2, [%6, #4]\n" \ + \ + "\t"ldr" %0, %5\n" /* Load old value. */ \ + "\tcmp %0, %3\n" /* Compare to expected value. */\ + "\t"streq" %4, %1\n" /* Store new value. */ \ + \ + /* Tear down Restartable Atomic Sequence. */ \ + "2:" \ + "\tmov %2, #0x00000000\n" \ + "\tstr %2, [%6]\n" \ + "\tmov %2, #0xffffffff\n" \ + "\tstr %2, [%6, #4]\n" \ + : "=&r" (old), "=m" (*mem), "=&r" (temp) \ + : "r" (expected), "r" (desired), "m" (*mem), \ + "r" (ras_start)); \ + if (old == expected) { \ + return (1); \ + } else { \ + *pexpected = old; \ + return (0); \ + } \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sun Jun 16 15:35:21 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3E2B2EB2; Sun, 16 Jun 2013 15:35:21 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2BF5A1CAD; Sun, 16 Jun 2013 15:35:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5GFZLKT074083; Sun, 16 Jun 2013 15:35:21 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5GFZEDS074039; Sun, 16 Jun 2013 15:35:14 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306161535.r5GFZEDS074039@svn.freebsd.org> From: Attilio Rao Date: Sun, 16 Jun 2013 15:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251806 - in user/attilio/vmobj-readlock: . bin/sh contrib/cvs contrib/llvm/lib/Target/X86 contrib/llvm/lib/Target/X86/AsmParser contrib/llvm/tools/clang/include/clang/Basic contrib/llv... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jun 2013 15:35:21 -0000 Author: attilio Date: Sun Jun 16 15:35:13 2013 New Revision: 251806 URL: http://svnweb.freebsd.org/changeset/base/251806 Log: MFC Added: user/attilio/vmobj-readlock/sys/xen/hvm.h - copied unchanged from r251805, user/attilio/vmcontention/sys/xen/hvm.h - copied from r251805, user/attilio/vmcontention/sys/xen/interface/arch-arm/ user/attilio/vmobj-readlock/sys/xen/interface/arch-arm.h - copied unchanged from r251805, user/attilio/vmcontention/sys/xen/interface/arch-arm.h - copied from r251805, user/attilio/vmcontention/sys/xen/interface/arch-ia64/ user/attilio/vmobj-readlock/sys/xen/interface/io/fsif.h - copied unchanged from r251805, user/attilio/vmcontention/sys/xen/interface/io/fsif.h user/attilio/vmobj-readlock/sys/xen/interface/io/libxenvchan.h - copied unchanged from r251805, user/attilio/vmcontention/sys/xen/interface/io/libxenvchan.h user/attilio/vmobj-readlock/sys/xen/interface/io/usbif.h - copied unchanged from r251805, user/attilio/vmcontention/sys/xen/interface/io/usbif.h user/attilio/vmobj-readlock/sys/xen/interface/io/vscsiif.h - copied unchanged from r251805, user/attilio/vmcontention/sys/xen/interface/io/vscsiif.h user/attilio/vmobj-readlock/sys/xen/interface/mem_event.h - copied unchanged from r251805, user/attilio/vmcontention/sys/xen/interface/mem_event.h user/attilio/vmobj-readlock/sys/xen/interface/tmem.h - copied unchanged from r251805, user/attilio/vmcontention/sys/xen/interface/tmem.h - copied from r251805, user/attilio/vmcontention/sys/xen/interface/xsm/ user/attilio/vmobj-readlock/tools/regression/bin/sh/builtins/local2.0 - copied unchanged from r251805, user/attilio/vmcontention/tools/regression/bin/sh/builtins/local2.0 user/attilio/vmobj-readlock/tools/regression/bin/sh/builtins/local3.0 - copied unchanged from r251805, user/attilio/vmcontention/tools/regression/bin/sh/builtins/local3.0 user/attilio/vmobj-readlock/tools/tools/ath/ath_ee_9300_print/ - copied from r251805, user/attilio/vmcontention/tools/tools/ath/ath_ee_9300_print/ Directory Properties: user/attilio/vmobj-readlock/sys/xen/interface/arch-arm/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-ia64/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/xsm/ (props changed) Deleted: user/attilio/vmobj-readlock/contrib/cvs/ user/attilio/vmobj-readlock/gnu/usr.bin/cvs/ user/attilio/vmobj-readlock/lib/libcompiler_rt/__sync_fetch_and_add_4.c user/attilio/vmobj-readlock/lib/libcompiler_rt/__sync_fetch_and_and_4.c user/attilio/vmobj-readlock/lib/libcompiler_rt/__sync_fetch_and_op_n.h user/attilio/vmobj-readlock/lib/libcompiler_rt/__sync_fetch_and_or_4.c user/attilio/vmobj-readlock/lib/libcompiler_rt/__sync_fetch_and_sub_4.c user/attilio/vmobj-readlock/lib/libcompiler_rt/__sync_fetch_and_xor_4.c user/attilio/vmobj-readlock/lib/libcompiler_rt/__sync_lock_test_and_set_4.c user/attilio/vmobj-readlock/lib/libcompiler_rt/__sync_synchronize.c user/attilio/vmobj-readlock/lib/libcompiler_rt/__sync_val_compare_and_swap_4.c user/attilio/vmobj-readlock/lib/libcompiler_rt/__sync_val_compare_and_swap_n.h user/attilio/vmobj-readlock/share/doc/psd/28.cvs/ user/attilio/vmobj-readlock/sys/xen/interface/hvm/vmx_assist.h Modified: user/attilio/vmobj-readlock/Makefile user/attilio/vmobj-readlock/Makefile.inc1 user/attilio/vmobj-readlock/ObsoleteFiles.inc user/attilio/vmobj-readlock/UPDATING user/attilio/vmobj-readlock/bin/sh/sh.1 user/attilio/vmobj-readlock/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp user/attilio/vmobj-readlock/contrib/llvm/lib/Target/X86/X86InstrInfo.td user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Basic/Targets.cpp user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp user/attilio/vmobj-readlock/etc/inetd.conf user/attilio/vmobj-readlock/etc/mtree/BSD.usr.dist user/attilio/vmobj-readlock/gnu/usr.bin/Makefile user/attilio/vmobj-readlock/lib/libcompiler_rt/Makefile user/attilio/vmobj-readlock/sbin/camcontrol/fwdownload.c user/attilio/vmobj-readlock/sbin/hastd/refcnt.h user/attilio/vmobj-readlock/share/doc/psd/Makefile user/attilio/vmobj-readlock/share/man/man4/filemon.4 user/attilio/vmobj-readlock/share/man/man5/src.conf.5 user/attilio/vmobj-readlock/share/man/man9/pci.9 user/attilio/vmobj-readlock/share/misc/bsd-family-tree user/attilio/vmobj-readlock/share/mk/bsd.own.mk user/attilio/vmobj-readlock/share/mk/bsd.subdir.mk user/attilio/vmobj-readlock/share/mk/sys.mk user/attilio/vmobj-readlock/sys/amd64/amd64/genassym.c user/attilio/vmobj-readlock/sys/amd64/amd64/pmap.c user/attilio/vmobj-readlock/sys/amd64/include/pmap.h user/attilio/vmobj-readlock/sys/amd64/include/xen/xen-os.h user/attilio/vmobj-readlock/sys/amd64/vmm/io/vlapic.c user/attilio/vmobj-readlock/sys/arm/arm/stdatomic.c user/attilio/vmobj-readlock/sys/cam/ata/ata_da.c user/attilio/vmobj-readlock/sys/cam/scsi/scsi_da.c user/attilio/vmobj-readlock/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c user/attilio/vmobj-readlock/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h user/attilio/vmobj-readlock/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c user/attilio/vmobj-readlock/sys/dev/ath/if_ath_btcoex.c user/attilio/vmobj-readlock/sys/dev/ath/if_ath_lna_div.c user/attilio/vmobj-readlock/sys/dev/ath/if_ath_lna_div.h user/attilio/vmobj-readlock/sys/dev/bge/if_bge.c user/attilio/vmobj-readlock/sys/dev/puc/pucdata.c user/attilio/vmobj-readlock/sys/dev/rt/if_rt.c user/attilio/vmobj-readlock/sys/dev/usb/net/if_aue.c user/attilio/vmobj-readlock/sys/dev/usb/net/if_mos.c user/attilio/vmobj-readlock/sys/dev/usb/net/if_rue.c user/attilio/vmobj-readlock/sys/dev/usb/net/if_smsc.c user/attilio/vmobj-readlock/sys/dev/usb/net/if_udav.c user/attilio/vmobj-readlock/sys/dev/virtio/network/if_vtnet.c user/attilio/vmobj-readlock/sys/dev/xen/blkfront/blkfront.c user/attilio/vmobj-readlock/sys/dev/xen/blkfront/block.h user/attilio/vmobj-readlock/sys/dev/xen/netfront/netfront.c user/attilio/vmobj-readlock/sys/i386/include/xen/xen-os.h user/attilio/vmobj-readlock/sys/kern/kern_event.c user/attilio/vmobj-readlock/sys/kern/kern_hhook.c user/attilio/vmobj-readlock/sys/kern/kern_khelp.c user/attilio/vmobj-readlock/sys/mips/mips/stdatomic.c user/attilio/vmobj-readlock/sys/net/if_vlan.c user/attilio/vmobj-readlock/sys/net80211/ieee80211_var.h user/attilio/vmobj-readlock/sys/sparc64/include/atomic.h user/attilio/vmobj-readlock/sys/sparc64/sparc64/pmap.c user/attilio/vmobj-readlock/sys/sys/cdefs.h user/attilio/vmobj-readlock/sys/sys/hhook.h user/attilio/vmobj-readlock/sys/sys/module_khelp.h user/attilio/vmobj-readlock/sys/sys/stdatomic.h user/attilio/vmobj-readlock/sys/xen/interface/arch-ia64.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-x86/cpuid.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-x86/hvm/save.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-x86/xen-mca.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-x86/xen-x86_32.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-x86/xen-x86_64.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-x86/xen.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-x86_32.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-x86_64.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/domctl.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/elfnote.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/event_channel.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/features.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/grant_table.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/hvm/hvm_info_table.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/hvm/hvm_op.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/hvm/ioreq.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/hvm/params.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/hvm/save.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/blkif.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/netif.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/pciif.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/protocols.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/ring.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/xs_wire.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/kexec.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/memory.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/nmi.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/physdev.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/platform.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/sched.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/sysctl.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/trace.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/vcpu.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/version.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/xen-compat.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/xen.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/interface/xenoprof.h (contents, props changed) user/attilio/vmobj-readlock/sys/xen/xenstore/xenstore.c user/attilio/vmobj-readlock/tools/build/mk/OptionalObsoleteFiles.inc user/attilio/vmobj-readlock/tools/build/options/WITHOUT_KERBEROS_SUPPORT user/attilio/vmobj-readlock/tools/tools/ath/Makefile user/attilio/vmobj-readlock/tools/tools/ath/athspectral/athspectral.c user/attilio/vmobj-readlock/tools/tools/nanobsd/gateworks/common user/attilio/vmobj-readlock/usr.sbin/bsdconfig/bsdconfig user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/packages/packages.subr Directory Properties: user/attilio/vmobj-readlock/ (props changed) user/attilio/vmobj-readlock/contrib/llvm/ (props changed) user/attilio/vmobj-readlock/contrib/llvm/tools/clang/ (props changed) user/attilio/vmobj-readlock/sbin/ (props changed) user/attilio/vmobj-readlock/share/man/man4/ (props changed) user/attilio/vmobj-readlock/sys/ (props changed) user/attilio/vmobj-readlock/sys/amd64/include/xen/ (props changed) user/attilio/vmobj-readlock/sys/amd64/vmm/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/COPYING (props changed) user/attilio/vmobj-readlock/sys/xen/interface/acm.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/acm_ops.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-arm/hvm/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-ia64/hvm/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-powerpc.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-x86/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/arch-x86/hvm/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/callback.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/dom0_ops.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/elfstructs.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/foreign/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/foreign/Makefile (props changed) user/attilio/vmobj-readlock/sys/xen/interface/foreign/mkchecker.py (props changed) user/attilio/vmobj-readlock/sys/xen/interface/foreign/mkheader.py (props changed) user/attilio/vmobj-readlock/sys/xen/interface/foreign/reference.size (props changed) user/attilio/vmobj-readlock/sys/xen/interface/foreign/structs.py (props changed) user/attilio/vmobj-readlock/sys/xen/interface/hvm/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/hvm/e820.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/ (props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/console.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/fbif.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/kbdif.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/tpmif.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/io/xenbus.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/libelf.h (props changed) user/attilio/vmobj-readlock/sys/xen/interface/xencomm.h (props changed) Modified: user/attilio/vmobj-readlock/Makefile ============================================================================== --- user/attilio/vmobj-readlock/Makefile Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/Makefile Sun Jun 16 15:35:13 2013 (r251806) @@ -209,6 +209,12 @@ cleanworld: # Handle the user-driven targets, using the source relative mk files. # +.if empty(.MAKEFLAGS:M-n) +# skip this for -n to avoid changing previous behavior of +# 'make -n buildworld' etc. +${TGTS}: .MAKE +.endif + ${TGTS}: ${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET} Modified: user/attilio/vmobj-readlock/Makefile.inc1 ============================================================================== --- user/attilio/vmobj-readlock/Makefile.inc1 Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/Makefile.inc1 Sun Jun 16 15:35:13 2013 (r251806) @@ -263,6 +263,13 @@ WMAKEENV= ${CROSSENV} \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} + +# make hierarchy +HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} +.if defined(NO_ROOT) +HMAKE+= PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT +.endif + .if ${MK_CDDL} == "no" WMAKEENV+= NO_CTF=1 .endif @@ -1367,12 +1374,7 @@ cross-tools: # hierarchy - ensure that all the needed directories are present # hierarchy hier: -.if defined(NO_ROOT) - cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} \ - -DNO_ROOT METALOG=${METALOG} distrib-dirs -.else - cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs -.endif + cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs # # libraries - build all libraries, and install them under ${DESTDIR}. @@ -1890,3 +1892,5 @@ _xi-links: xdev xdev-build xdev-install: @echo "*** Error: Both XDEV and XDEV_ARCH must be defined for \"${.TARGET}\" target" .endif + +buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE Modified: user/attilio/vmobj-readlock/ObsoleteFiles.inc ============================================================================== --- user/attilio/vmobj-readlock/ObsoleteFiles.inc Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/ObsoleteFiles.inc Sun Jun 16 15:35:13 2013 (r251806) @@ -38,6 +38,33 @@ # xargs -n1 | sort | uniq -d; # done +# 20130614: remove CVS from base +OLD_FILES+=usr/bin/cvs +OLD_FILES+=usr/bin/cvsbug +OLD_FILES+=usr/share/examples/cvs/contrib/README +OLD_FILES+=usr/share/examples/cvs/contrib/clmerge +OLD_FILES+=usr/share/examples/cvs/contrib/cln_hist +OLD_FILES+=usr/share/examples/cvs/contrib/commit_prep +OLD_FILES+=usr/share/examples/cvs/contrib/cvs2vendor +OLD_FILES+=usr/share/examples/cvs/contrib/cvs_acls +OLD_FILES+=usr/share/examples/cvs/contrib/cvscheck +OLD_FILES+=usr/share/examples/cvs/contrib/cvscheck.man +OLD_FILES+=usr/share/examples/cvs/contrib/cvshelp.man +OLD_FILES+=usr/share/examples/cvs/contrib/descend.man +OLD_FILES+=usr/share/examples/cvs/contrib/easy-import +OLD_FILES+=usr/share/examples/cvs/contrib/intro.doc +OLD_FILES+=usr/share/examples/cvs/contrib/log +OLD_FILES+=usr/share/examples/cvs/contrib/log_accum +OLD_FILES+=usr/share/examples/cvs/contrib/mfpipe +OLD_FILES+=usr/share/examples/cvs/contrib/rcs-to-cvs +OLD_FILES+=usr/share/examples/cvs/contrib/rcs2log +OLD_FILES+=usr/share/examples/cvs/contrib/rcslock +OLD_FILES+=usr/share/examples/cvs/contrib/sccs2rcs +OLD_FILES+=usr/share/info/cvs.info.gz +OLD_FILES+=usr/share/info/cvsclient.info.gz +OLD_FILES+=usr/share/man/man1/cvs.1.gz +OLD_FILES+=usr/share/man/man5/cvs.5.gz +OLD_FILES+=usr/share/man/man8/cvsbug.8.gz # 20130417: nfs fha moved from nfsserver to nfs OLD_FILES+=usr/include/nfsserver/nfs_fha.h # 20130411: new clang import which bumps version from 3.2 to 3.3. Modified: user/attilio/vmobj-readlock/UPDATING ============================================================================== --- user/attilio/vmobj-readlock/UPDATING Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/UPDATING Sun Jun 16 15:35:13 2013 (r251806) @@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130615: + CVS has been removed from the base system. An exact copy + of the code is available from the devel/cvs port. + 20130613: Some people report the following error after the switch to bmake: Modified: user/attilio/vmobj-readlock/bin/sh/sh.1 ============================================================================== --- user/attilio/vmobj-readlock/bin/sh/sh.1 Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/bin/sh/sh.1 Sun Jun 16 15:35:13 2013 (r251806) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd June 5, 2013 +.Dd June 14, 2013 .Dt SH 1 .Os .Sh NAME @@ -1036,6 +1036,9 @@ The current working directory as set by The file creation mask as set by .Ic umask . .It +Resource limits as set by +.Ic ulimit . +.It References to open files. .It Traps as set by Modified: user/attilio/vmobj-readlock/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp ============================================================================== --- user/attilio/vmobj-readlock/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp Sun Jun 16 15:35:13 2013 (r251806) @@ -2306,25 +2306,25 @@ MatchAndEmitInstruction(SMLoc IDLoc, uns unsigned Match1, Match2, Match3, Match4; Match1 = MatchInstructionImpl(Operands, Inst, ErrorInfoIgnore, - isParsingIntelSyntax()); + MatchingInlineAsm, isParsingIntelSyntax()); // If this returned as a missing feature failure, remember that. if (Match1 == Match_MissingFeature) ErrorInfoMissingFeature = ErrorInfoIgnore; Tmp[Base.size()] = Suffixes[1]; Match2 = MatchInstructionImpl(Operands, Inst, ErrorInfoIgnore, - isParsingIntelSyntax()); + MatchingInlineAsm, isParsingIntelSyntax()); // If this returned as a missing feature failure, remember that. if (Match2 == Match_MissingFeature) ErrorInfoMissingFeature = ErrorInfoIgnore; Tmp[Base.size()] = Suffixes[2]; Match3 = MatchInstructionImpl(Operands, Inst, ErrorInfoIgnore, - isParsingIntelSyntax()); + MatchingInlineAsm, isParsingIntelSyntax()); // If this returned as a missing feature failure, remember that. if (Match3 == Match_MissingFeature) ErrorInfoMissingFeature = ErrorInfoIgnore; Tmp[Base.size()] = Suffixes[3]; Match4 = MatchInstructionImpl(Operands, Inst, ErrorInfoIgnore, - isParsingIntelSyntax()); + MatchingInlineAsm, isParsingIntelSyntax()); // If this returned as a missing feature failure, remember that. if (Match4 == Match_MissingFeature) ErrorInfoMissingFeature = ErrorInfoIgnore; Modified: user/attilio/vmobj-readlock/contrib/llvm/lib/Target/X86/X86InstrInfo.td ============================================================================== --- user/attilio/vmobj-readlock/contrib/llvm/lib/Target/X86/X86InstrInfo.td Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/contrib/llvm/lib/Target/X86/X86InstrInfo.td Sun Jun 16 15:35:13 2013 (r251806) @@ -884,12 +884,12 @@ def PUSHF64 : I<0x9C, RawFrm, (outs), let Defs = [EDI, ESI, EBP, EBX, EDX, ECX, EAX, ESP], Uses = [ESP], mayLoad = 1, neverHasSideEffects = 1, SchedRW = [WriteLoad] in { -def POPA32 : I<0x61, RawFrm, (outs), (ins), "popa{l|d}", [], IIC_POP_A>, +def POPA32 : I<0x61, RawFrm, (outs), (ins), "popa{l}", [], IIC_POP_A>, Requires<[In32BitMode]>; } let Defs = [ESP], Uses = [EDI, ESI, EBP, EBX, EDX, ECX, EAX, ESP], mayStore = 1, neverHasSideEffects = 1, SchedRW = [WriteStore] in { -def PUSHA32 : I<0x60, RawFrm, (outs), (ins), "pusha{l|d}", [], IIC_PUSH_A>, +def PUSHA32 : I<0x60, RawFrm, (outs), (ins), "pusha{l}", [], IIC_PUSH_A>, Requires<[In32BitMode]>; } @@ -1867,6 +1867,9 @@ def : MnemonicAlias<"pushf", "pushfl", def : MnemonicAlias<"pushf", "pushfq", "att">, Requires<[In64BitMode]>; def : MnemonicAlias<"pushfd", "pushfl", "att">; +def : MnemonicAlias<"popad", "popa", "intel">, Requires<[In32BitMode]>; +def : MnemonicAlias<"pushad", "pusha", "intel">, Requires<[In32BitMode]>; + def : MnemonicAlias<"repe", "rep", "att">; def : MnemonicAlias<"repz", "rep", "att">; def : MnemonicAlias<"repnz", "repne", "att">; @@ -1919,29 +1922,31 @@ def : MnemonicAlias<"fucomip", "fucompi def : MnemonicAlias<"fwait", "wait", "att">; -class CondCodeAlias +class CondCodeAlias : MnemonicAlias; + !strconcat(Prefix, NewCond, Suffix), VariantName>; /// IntegerCondCodeMnemonicAlias - This multiclass defines a bunch of /// MnemonicAlias's that canonicalize the condition code in a mnemonic, for /// example "setz" -> "sete". -multiclass IntegerCondCodeMnemonicAlias { - def C : CondCodeAlias; // setc -> setb - def Z : CondCodeAlias; // setz -> sete - def NA : CondCodeAlias; // setna -> setbe - def NB : CondCodeAlias; // setnb -> setae - def NC : CondCodeAlias; // setnc -> setae - def NG : CondCodeAlias; // setng -> setle - def NL : CondCodeAlias; // setnl -> setge - def NZ : CondCodeAlias; // setnz -> setne - def PE : CondCodeAlias; // setpe -> setp - def PO : CondCodeAlias; // setpo -> setnp - - def NAE : CondCodeAlias; // setnae -> setb - def NBE : CondCodeAlias; // setnbe -> seta - def NGE : CondCodeAlias; // setnge -> setl - def NLE : CondCodeAlias; // setnle -> setg +multiclass IntegerCondCodeMnemonicAlias { + def C : CondCodeAlias; // setc -> setb + def Z : CondCodeAlias; // setz -> sete + def NA : CondCodeAlias; // setna -> setbe + def NB : CondCodeAlias; // setnb -> setae + def NC : CondCodeAlias; // setnc -> setae + def NG : CondCodeAlias; // setng -> setle + def NL : CondCodeAlias; // setnl -> setge + def NZ : CondCodeAlias; // setnz -> setne + def PE : CondCodeAlias; // setpe -> setp + def PO : CondCodeAlias; // setpo -> setnp + + def NAE : CondCodeAlias; // setnae -> setb + def NBE : CondCodeAlias; // setnbe -> seta + def NGE : CondCodeAlias; // setnge -> setl + def NLE : CondCodeAlias; // setnle -> setg } // Aliases for set @@ -1949,9 +1954,11 @@ defm : IntegerCondCodeMnemonicAlias<"set // Aliases for j defm : IntegerCondCodeMnemonicAlias<"j", "">; // Aliases for cmov{w,l,q} -defm : IntegerCondCodeMnemonicAlias<"cmov", "w">; -defm : IntegerCondCodeMnemonicAlias<"cmov", "l">; -defm : IntegerCondCodeMnemonicAlias<"cmov", "q">; +defm : IntegerCondCodeMnemonicAlias<"cmov", "w", "att">; +defm : IntegerCondCodeMnemonicAlias<"cmov", "l", "att">; +defm : IntegerCondCodeMnemonicAlias<"cmov", "q", "att">; +// No size suffix for intel-style asm. +defm : IntegerCondCodeMnemonicAlias<"cmov", "", "intel">; //===----------------------------------------------------------------------===// Modified: user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def ============================================================================== --- user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Sun Jun 16 15:35:13 2013 (r251806) @@ -70,6 +70,8 @@ // f -> this is a libc/libm function without the '__builtin_' prefix. It can // be followed by ':headername:' to state which header this function // comes from. +// i -> this is a runtime library implemented function without the +// '__builtin_' prefix. It will be implemented in compiter-rt or libgcc. // p:N: -> this is a printf-like function whose Nth argument is the format // string. // P:N: -> similar to the p:N: attribute, but the function is like vprintf Modified: user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h ============================================================================== --- user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h Sun Jun 16 15:35:13 2013 (r251806) @@ -128,6 +128,13 @@ public: return strchr(GetRecord(ID).Attributes, 'f') != 0; } + /// \brief Determines whether this builtin is a predefined compiler-rt/libgcc + /// function, such as "__clear_cache", where we know the signature a + /// priori. + bool isPredefinedRuntimeFunction(unsigned ID) const { + return strchr(GetRecord(ID).Attributes, 'i') != 0; + } + /// \brief Determines whether this builtin has custom typechecking. bool hasCustomTypechecking(unsigned ID) const { return strchr(GetRecord(ID).Attributes, 't') != 0; Modified: user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def ============================================================================== --- user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def Sun Jun 16 15:35:13 2013 (r251806) @@ -15,4 +15,4 @@ // The format of this database matches clang/Basic/Builtins.def. // In libgcc -BUILTIN(__clear_cache, "vv*v*", "") +BUILTIN(__clear_cache, "vv*v*", "i") Modified: user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def ============================================================================== --- user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def Sun Jun 16 15:35:13 2013 (r251806) @@ -15,7 +15,7 @@ // The format of this database matches clang/Basic/Builtins.def. // In libgcc -BUILTIN(__clear_cache, "v.", "") +BUILTIN(__clear_cache, "v.", "i") BUILTIN(__builtin_thread_pointer, "v*", "") // Saturating arithmetic Modified: user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Basic/Targets.cpp ============================================================================== --- user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Sun Jun 16 15:35:13 2013 (r251806) @@ -3533,8 +3533,8 @@ class ARMTargetInfo : public TargetInfo // the kernel which on armv6 and newer uses ldrex and strex. The net result // is that if we assume the kernel is at least as recent as the hardware, // it is safe to use atomic instructions on armv6 and newer. - if (T.getOS() != llvm::Triple::Linux) - return false; + if (T.getOS() != llvm::Triple::Linux && T.getOS() != llvm::Triple::FreeBSD) + return false; StringRef ArchName = T.getArchName(); if (T.getArch() == llvm::Triple::arm) { if (!ArchName.startswith("armv")) Modified: user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp ============================================================================== --- user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Sun Jun 16 15:35:13 2013 (r251806) @@ -8671,7 +8671,8 @@ Decl *Sema::ActOnStartOfFunctionDef(Scop // Builtin functions cannot be defined. if (unsigned BuiltinID = FD->getBuiltinID()) { - if (!Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID)) { + if (!Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID) && + !Context.BuiltinInfo.isPredefinedRuntimeFunction(BuiltinID)) { Diag(FD->getLocation(), diag::err_builtin_definition) << FD; FD->setInvalidDecl(); } Modified: user/attilio/vmobj-readlock/etc/inetd.conf ============================================================================== --- user/attilio/vmobj-readlock/etc/inetd.conf Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/etc/inetd.conf Sun Jun 16 15:35:13 2013 (r251806) @@ -58,8 +58,8 @@ # --allow-root path correctly or you open a trivial to exploit but # deadly security hole. # -#cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/your/cvsroot/here pserver -#cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/your/cvsroot/here kserver +#cvspserver stream tcp nowait root /usr/local/bin/cvs cvs --allow-root=/your/cvsroot/here pserver +#cvspserver stream tcp nowait root /usr/local/bin/cvs cvs --allow-root=/your/cvsroot/here kserver # # RPC based services (you MUST have rpcbind running to use these) # Modified: user/attilio/vmobj-readlock/etc/mtree/BSD.usr.dist ============================================================================== --- user/attilio/vmobj-readlock/etc/mtree/BSD.usr.dist Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/etc/mtree/BSD.usr.dist Sun Jun 16 15:35:13 2013 (r251806) @@ -148,8 +148,6 @@ .. 27.nfsrfc .. - 28.cvs - .. .. smm 01.setup @@ -223,10 +221,6 @@ .. csh .. - cvs - contrib - .. - .. cvsup .. diskless Modified: user/attilio/vmobj-readlock/gnu/usr.bin/Makefile ============================================================================== --- user/attilio/vmobj-readlock/gnu/usr.bin/Makefile Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/gnu/usr.bin/Makefile Sun Jun 16 15:35:13 2013 (r251806) @@ -4,7 +4,6 @@ SUBDIR= ${_binutils} \ ${_cc} \ - ${_cvs} \ dialog \ diff \ diff3 \ @@ -26,10 +25,6 @@ _groff= groff .endif .endif -.if ${MK_CVS} != "no" -_cvs= cvs -.endif - .if ${MK_GPL_DTC} != "no" _dtc= dtc .endif Modified: user/attilio/vmobj-readlock/lib/libcompiler_rt/Makefile ============================================================================== --- user/attilio/vmobj-readlock/lib/libcompiler_rt/Makefile Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/lib/libcompiler_rt/Makefile Sun Jun 16 15:35:13 2013 (r251806) @@ -28,6 +28,7 @@ SRCF= absvdi2 \ ashlti3 \ ashrdi3 \ ashrti3 \ + clear_cache \ clzdi2 \ clzsi2 \ clzti2 \ @@ -125,11 +126,6 @@ SRCF= absvdi2 \ umoddi3 \ umodti3 -# Don't build clear_cache on ARM with clang as it is a builtin there. -.if ${MACHINE_CPUARCH} != "arm" || ${COMPILER_TYPE} != "clang" -SRCF+= clear_cache -.endif - # These are already shipped by libc.a on arm and mips .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" SRCF+= adddf3 \ @@ -158,14 +154,9 @@ SRCF+= divsi3 \ # FreeBSD-specific atomic intrinsics. .if ${MACHINE_CPUARCH} == "arm" -SRCF+= __sync_fetch_and_add_4 \ - __sync_fetch_and_and_4 \ - __sync_fetch_and_or_4 \ - __sync_fetch_and_sub_4 \ - __sync_fetch_and_xor_4 \ - __sync_lock_test_and_set_4 \ - __sync_synchronize \ - __sync_val_compare_and_swap_4 +.PATH: ${.CURDIR}/../../sys/arm/arm + +SRCF+= stdatomic .elif ${MACHINE_CPUARCH} == "mips" .PATH: ${.CURDIR}/../../sys/mips/mips Modified: user/attilio/vmobj-readlock/sbin/camcontrol/fwdownload.c ============================================================================== --- user/attilio/vmobj-readlock/sbin/camcontrol/fwdownload.c Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/sbin/camcontrol/fwdownload.c Sun Jun 16 15:35:13 2013 (r251806) @@ -370,17 +370,15 @@ fw_download_img(struct cam_device *cam_d } if (!sim_mode) { /* Execute the command. */ - if (cam_send_ccb(cam_dev, ccb) < 0) { + if (cam_send_ccb(cam_dev, ccb) < 0 || + (ccb->ccb_h.status & CAM_STATUS_MASK) != + CAM_REQ_CMP) { warnx("Error writing image to device"); if (printerrors) cam_error_print(cam_dev, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); goto bailout; } - if (ccb->ataio.res.status != 0 /*&& !last_pkt*/) { - cam_error_print(cam_dev, ccb, CAM_ESF_ALL, - CAM_EPF_ALL, stderr); - } } /* Prepare next round. */ pkt_count++; Modified: user/attilio/vmobj-readlock/sbin/hastd/refcnt.h ============================================================================== --- user/attilio/vmobj-readlock/sbin/hastd/refcnt.h Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/sbin/hastd/refcnt.h Sun Jun 16 15:35:13 2013 (r251806) @@ -32,24 +32,24 @@ #ifndef __REFCNT_H__ #define __REFCNT_H__ -#include +#include #include "pjdlog.h" -typedef unsigned int refcnt_t; +typedef atomic_uint refcnt_t; static __inline void refcnt_init(refcnt_t *count, unsigned int v) { - *count = v; + atomic_init(count, v); } static __inline void refcnt_acquire(refcnt_t *count) { - atomic_add_acq_int(count, 1); + atomic_fetch_add_explicit(count, 1, memory_order_acquire); } static __inline unsigned int @@ -58,7 +58,7 @@ refcnt_release(refcnt_t *count) unsigned int old; /* XXX: Should this have a rel membar? */ - old = atomic_fetchadd_int(count, -1); + old = atomic_fetch_sub(count, 1); PJDLOG_ASSERT(old > 0); return (old - 1); } Modified: user/attilio/vmobj-readlock/share/doc/psd/Makefile ============================================================================== --- user/attilio/vmobj-readlock/share/doc/psd/Makefile Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/share/doc/psd/Makefile Sun Jun 16 15:35:13 2013 (r251806) @@ -35,7 +35,6 @@ SUBDIR+=22.rpcgen \ 24.xdr \ 25.xdrrfc \ 26.rpcrfc \ - 27.nfsrpc \ - 28.cvs + 27.nfsrpc .include Modified: user/attilio/vmobj-readlock/share/man/man4/filemon.4 ============================================================================== --- user/attilio/vmobj-readlock/share/man/man4/filemon.4 Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/share/man/man4/filemon.4 Sun Jun 16 15:35:13 2013 (r251806) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 30, 2012 +.Dd June 14, 2013 .Dt FILEMON 4 .Os .Sh NAME @@ -126,6 +126,7 @@ is set to indicate the error. #include #include #include +#include static void open_filemon(void) @@ -133,29 +134,24 @@ open_filemon(void) pid_t child; int fm_fd, fm_log; - if ((fm_fd = open("/dev/filemon", O_RDWR)) == -1) + if ((fm_fd = open("/dev/filemon", O_RDWR | O_CLOEXEC)) == -1) err(1, "open(\e"/dev/filemon\e", O_RDWR)"); if ((fm_log = open("filemon.out", - O_CREAT | O_WRONLY | O_TRUNC, DEFFILEMODE)) == -1) + O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, DEFFILEMODE)) == -1) err(1, "open(filemon.out)"); if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) == -1) err(1, "Cannot set filemon log file descriptor"); - /* Set up these two fd's to close on exec. */ - (void)fcntl(fm_fd, F_SETFD, FD_CLOEXEC); - (void)fcntl(fm_log, F_SETFD, FD_CLOEXEC); if ((child = fork()) == 0) { child = getpid(); if (ioctl(fm_fd, FILEMON_SET_PID, &child) == -1) err(1, "Cannot set filemon PID"); /* Do something here. */ - return 0; } else { wait(&child); close(fm_fd); } - return 0; } .Ed .Pp Modified: user/attilio/vmobj-readlock/share/man/man5/src.conf.5 ============================================================================== --- user/attilio/vmobj-readlock/share/man/man5/src.conf.5 Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/share/man/man5/src.conf.5 Sun Jun 16 15:35:13 2013 (r251806) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb +.\" from FreeBSD: head/tools/build/options/makeman 251685 2013-06-13 13:05:08Z emaste .\" $FreeBSD$ -.Dd June 7, 2013 +.Dd June 15, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -387,9 +387,6 @@ similar to DWARF and the venerable stabs Set to not build .Xr ctm 1 and related utilities. -.It Va WITHOUT_CVS -.\" from FreeBSD: head/tools/build/options/WITHOUT_CVS 156932 2006-03-21 07:50:50Z ru -Set to not build CVS. .It Va WITHOUT_CXX .\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs Set to not build @@ -637,9 +634,8 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_KERBEROS_SUPPORT -.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler Set to build some programs without Kerberos support, like -.Xr cvs 1 , .Xr ssh 1 , .Xr telnet 1 , .Xr sshd 8 , @@ -685,10 +681,11 @@ Setting this variable will enable the LD .Xr dig 1 and .Xr host 1 . -When set, the following options are also in effect: +When set, it also enforces the following options: .Pp -.Bl -inset -compact -.It Va WITHOUT_BIND_UTILS +.Bl -item -compact +.It +.Va WITHOUT_BIND_UTILS .El .It Va WITHOUT_LEGACY_CONSOLE .\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 249966 2013-04-27 04:09:09Z eadler @@ -701,9 +698,9 @@ and On amd64, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. -.It Va WITHOUT_LIBCPLUSPLUS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim -Set to avoid building libcxxrt and libc++. +.It Va WITH_LIBCPLUSPLUS +.\" from FreeBSD: head/tools/build/options/WITH_LIBCPLUSPLUS 228082 2011-11-28 17:56:46Z dim +Set to build libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD .\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the Modified: user/attilio/vmobj-readlock/share/man/man9/pci.9 ============================================================================== --- user/attilio/vmobj-readlock/share/man/man9/pci.9 Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/share/man/man9/pci.9 Sun Jun 16 15:35:13 2013 (r251806) @@ -485,13 +485,13 @@ A driver is only allowed to use either M but not both. .Pp The -.Fn pci_count_msi +.Fn pci_msi_count function returns the maximum number of MSI messages supported by the device .Fa dev . If the device does not support MSI, then -.Fn pci_count_msi +.Fn pci_msi_count returns zero. .Pp The @@ -538,13 +538,13 @@ The function returns zero on success and an error on failure. .Pp The -.Fn pci_count_msix +.Fn pci_msix_count function returns the maximum number of MSI-X messages supported by the device .Fa dev . If the device does not support MSI-X, then -.Fn pci_count_msix +.Fn pci_msix_count returns zero. .Pp The Modified: user/attilio/vmobj-readlock/share/misc/bsd-family-tree ============================================================================== --- user/attilio/vmobj-readlock/share/misc/bsd-family-tree Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/share/misc/bsd-family-tree Sun Jun 16 15:35:13 2013 (r251806) @@ -638,6 +638,6 @@ Steven M. Schultz for providing 2.8BSD, -- Copyright (c) 1997-2012 Wolfram Schneider -URL: http://cvsweb.freebsd.org/src/share/misc/bsd-family-tree +URL: http://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree $FreeBSD$ Modified: user/attilio/vmobj-readlock/share/mk/bsd.own.mk ============================================================================== --- user/attilio/vmobj-readlock/share/mk/bsd.own.mk Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/share/mk/bsd.own.mk Sun Jun 16 15:35:13 2013 (r251806) @@ -272,7 +272,6 @@ __DEFAULT_YES_OPTIONS = \ CROSS_COMPILER \ CRYPT \ CTM \ - CVS \ CXX \ DICT \ DYNAMICROOT \ Modified: user/attilio/vmobj-readlock/share/mk/bsd.subdir.mk ============================================================================== --- user/attilio/vmobj-readlock/share/mk/bsd.subdir.mk Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/share/mk/bsd.subdir.mk Sun Jun 16 15:35:13 2013 (r251806) @@ -36,14 +36,14 @@ ____: DISTRIBUTION?= base .if !target(distribute) -distribute: +distribute: .MAKE .for dist in ${DISTRIBUTION} ${_+_}cd ${.CURDIR}; \ ${MAKE} install -DNO_SUBDIR DESTDIR=${DISTDIR}/${dist} SHARED=copies .endfor .endif -_SUBDIR: .USE +_SUBDIR: .USE .MAKE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) @${_+_}set -e; for entry in ${SUBDIR}; do \ if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ @@ -60,7 +60,7 @@ _SUBDIR: .USE done .endif -${SUBDIR}: .PHONY +${SUBDIR}: .PHONY .MAKE ${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \ cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \ else \ @@ -81,7 +81,7 @@ ${__stage}${__target}: ${__stage}${__target}: _SUBDIR .endif .endfor -${__target}: +${__target}: .MAKE ${_+_}set -e; cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} .endfor Modified: user/attilio/vmobj-readlock/share/mk/sys.mk ============================================================================== --- user/attilio/vmobj-readlock/share/mk/sys.mk Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/share/mk/sys.mk Sun Jun 16 15:35:13 2013 (r251806) @@ -95,7 +95,13 @@ ECHODIR ?= true .endif .endif -.if !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n" +.if defined(.PARSEDIR) +# _+_ appears to be a workaround for the special src .MAKE not working. +# setting it to + interferes with -N +_+_ ?= +.elif !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n" +# the check above matches only a single -n, so -n -n will result +# in _+_ = + _+_ ?= .else _+_ ?= + Modified: user/attilio/vmobj-readlock/sys/amd64/amd64/genassym.c ============================================================================== --- user/attilio/vmobj-readlock/sys/amd64/amd64/genassym.c Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/sys/amd64/amd64/genassym.c Sun Jun 16 15:35:13 2013 (r251806) @@ -109,7 +109,6 @@ ASSYM(addr_PML4map, addr_PML4map); ASSYM(addr_PML4pml4e, addr_PML4pml4e); ASSYM(PDESIZE, sizeof(pd_entry_t)); ASSYM(PTESIZE, sizeof(pt_entry_t)); -ASSYM(PTESHIFT, PTESHIFT); ASSYM(PAGE_SHIFT, PAGE_SHIFT); ASSYM(PAGE_MASK, PAGE_MASK); ASSYM(PDRSHIFT, PDRSHIFT); Modified: user/attilio/vmobj-readlock/sys/amd64/amd64/pmap.c ============================================================================== --- user/attilio/vmobj-readlock/sys/amd64/amd64/pmap.c Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/sys/amd64/amd64/pmap.c Sun Jun 16 15:35:13 2013 (r251806) @@ -320,9 +320,6 @@ static void _pmap_unwire_ptp(pmap_t pmap static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, vm_page_t *); static vm_offset_t pmap_kmem_choose(vm_offset_t addr); -CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t)); -CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); - /* * Move the kernel virtual free pointer to the next * 2MB. This is used to help improve performance Modified: user/attilio/vmobj-readlock/sys/amd64/include/pmap.h ============================================================================== --- user/attilio/vmobj-readlock/sys/amd64/include/pmap.h Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/sys/amd64/include/pmap.h Sun Jun 16 15:35:13 2013 (r251806) @@ -157,11 +157,6 @@ typedef u_int64_t pt_entry_t; typedef u_int64_t pdp_entry_t; typedef u_int64_t pml4_entry_t; -#define PML4ESHIFT (3) -#define PDPESHIFT (3) -#define PTESHIFT (3) -#define PDESHIFT (3) - /* * Address of current address space page table maps and directories. */ Modified: user/attilio/vmobj-readlock/sys/amd64/include/xen/xen-os.h ============================================================================== --- user/attilio/vmobj-readlock/sys/amd64/include/xen/xen-os.h Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/sys/amd64/include/xen/xen-os.h Sun Jun 16 15:35:13 2013 (r251806) @@ -13,16 +13,21 @@ #define CONFIG_X86_PAE #endif +#ifdef LOCORE +#define __ASSEMBLY__ +#endif + #if !defined(__XEN_INTERFACE_VERSION__) -/* - * Can update to a more recent version when we implement - * the hypercall page - */ -#define __XEN_INTERFACE_VERSION__ 0x00030204 +#define __XEN_INTERFACE_VERSION__ 0x00030208 #endif +#define GRANT_REF_INVALID 0xffffffff + #include +/* Everything below this point is not included by assembler (.S) files. */ +#ifndef __ASSEMBLY__ + /* Force a proper event-channel callback from Xen. */ void force_evtchn_callback(void); @@ -43,10 +48,6 @@ static inline void rep_nop(void) void *bootmem_alloc(unsigned int size); void bootmem_free(void *ptr, unsigned int size); - -/* Everything below this point is not included by assembler (.S) files. */ -#ifndef __ASSEMBLY__ - void printk(const char *fmt, ...); /* some function prototypes */ @@ -128,14 +129,14 @@ do { #else #endif -#ifndef mb -#define mb() __asm__ __volatile__("mfence":::"memory") +#ifndef xen_mb +#define xen_mb() mb() #endif -#ifndef rmb -#define rmb() __asm__ __volatile__("lfence":::"memory"); +#ifndef xen_rmb +#define xen_rmb() rmb() #endif -#ifndef wmb -#define wmb() barrier() +#ifndef xen_wmb +#define xen_wmb() wmb() #endif #ifdef SMP #define smp_mb() mb() Modified: user/attilio/vmobj-readlock/sys/amd64/vmm/io/vlapic.c ============================================================================== --- user/attilio/vmobj-readlock/sys/amd64/vmm/io/vlapic.c Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/sys/amd64/vmm/io/vlapic.c Sun Jun 16 15:35:13 2013 (r251806) @@ -465,7 +465,7 @@ lapic_process_icr(struct vlapic *vlapic, break; } - while ((i = cpusetobj_ffs(&dmask)) != 0) { + while ((i = CPU_FFS(&dmask)) != 0) { i--; CPU_CLR(i, &dmask); if (mode == APIC_DELMODE_FIXED) { Modified: user/attilio/vmobj-readlock/sys/arm/arm/stdatomic.c ============================================================================== --- user/attilio/vmobj-readlock/sys/arm/arm/stdatomic.c Sun Jun 16 15:26:06 2013 (r251805) +++ user/attilio/vmobj-readlock/sys/arm/arm/stdatomic.c Sun Jun 16 15:35:13 2013 (r251806) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef _KERNEL #include "opt_global.h" @@ -41,7 +42,7 @@ __FBSDID("$FreeBSD$"); * Executing statements with interrupts disabled. */ -#ifndef SMP +#if defined(_KERNEL) && !defined(SMP) #define WITHOUT_INTERRUPTS(s) do { \ register_t regs; \ \ @@ -49,7 +50,7 @@ __FBSDID("$FreeBSD$"); do s while (0); \ intr_restore(regs); \ } while (0) -#endif /* !SMP */ +#endif /* _KERNEL && !SMP */ /* * Memory barriers. @@ -62,18 +63,30 @@ __FBSDID("$FreeBSD$"); * should make 's atomic_exchange_explicit() work reliably. */ +#if defined(_KERNEL) && !defined(SMP) static inline void do_sync(void) { -#if defined(_KERNEL) && !defined(SMP) __asm volatile ("" : : : "memory"); +} #elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) +static inline void +do_sync(void) +{ + __asm volatile ("dmb" : : : "memory"); -#else /* __ARM_ARCH_6__ */ +} +#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ + defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ + defined(__ARM_ARCH_6ZK__) +static inline void +do_sync(void) +{ + __asm volatile ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory"); -#endif } +#endif #if defined(__CLANG_ATOMICS) || defined(__GNUC_ATOMICS) @@ -88,11 +101,7 @@ do_sync(void) /* These systems should be supported by the compiler. */ -#elif defined(_KERNEL) - -#ifdef SMP -#error "On SMP systems we should have proper atomic operations." -#endif +#else /* __ARM_ARCH_5__ */ /* Clang doesn't allow us to reimplement builtins without this. */ #ifdef __clang__ @@ -103,10 +112,14 @@ do_sync(void) void __sync_synchronize(void) { - - do_sync(); } +#ifdef _KERNEL + +#ifdef SMP +#error "On SMP systems we should have proper atomic operations." +#endif + /* * On uniprocessor systems, we can perform the atomic operations by * disabling interrupts. @@ -182,20 +195,154 @@ EMIT_ALL_OPS_N(2, uint16_t) EMIT_ALL_OPS_N(4, uint32_t) EMIT_ALL_OPS_N(8, uint64_t) -#else /* !__ARM_ARCH_6__ && !__ARM_ARCH_7__ && !_KERNEL */ +#else /* !_KERNEL */ + +/* + * For userspace on uniprocessor systems, we can implement the atomic + * operations by using a Restartable Atomic Sequence. This makes the + * kernel restart the code from the beginning when interrupted. + */ + +#define EMIT_LOAD_N(N, uintN_t) \ +uintN_t \ +__atomic_load_##N(uintN_t *mem, int model __unused) \ +{ \ + \ + return (*mem); \ +} + +#define EMIT_STORE_N(N, uintN_t) \ +void \ +__atomic_store_##N(uintN_t *mem, uintN_t val, int model __unused) \ +{ \ + \ + *mem = val; \ +} + +#define EMIT_EXCHANGE_N(N, uintN_t, ldr, str) \ +uintN_t \ +__atomic_exchange_##N(uintN_t *mem, uintN_t val, int model __unused) \ +{ \ + uint32_t old, temp, ras_start; \ + \ + ras_start = ARM_RAS_START; \ + __asm volatile ( \ + /* Set up Restartable Atomic Sequence. */ \ + "1:" \ + "\tadr %2, 1b\n" \ + "\tstr %2, [%5]\n" \ + "\tadr %2, 2f\n" \ + "\tstr %2, [%5, #4]\n" \ + \ + "\t"ldr" %0, %4\n" /* Load old value. */ \ + "\t"str" %3, %1\n" /* Store new value. */ \ + \ + /* Tear down Restartable Atomic Sequence. */ \ + "2:" \ + "\tmov %2, #0x00000000\n" \ + "\tstr %2, [%5]\n" \ + "\tmov %2, #0xffffffff\n" \ + "\tstr %2, [%5, #4]\n" \ + : "=&r" (old), "=m" (*mem), "=&r" (temp) \ + : "r" (val), "m" (*mem), "r" (ras_start)); \ + return (old); \ +} + +#define EMIT_COMPARE_EXCHANGE_N(N, uintN_t, ldr, streq) \ +_Bool \ +__atomic_compare_exchange_##N(uintN_t *mem, uintN_t *pexpected, \ + uintN_t desired, int success __unused, int failure __unused) \ +{ \ + uint32_t expected, old, temp, ras_start; \ + \ + expected = *pexpected; \ + ras_start = ARM_RAS_START; \ + __asm volatile ( \ + /* Set up Restartable Atomic Sequence. */ \ + "1:" \ + "\tadr %2, 1b\n" \ + "\tstr %2, [%6]\n" \ + "\tadr %2, 2f\n" \ + "\tstr %2, [%6, #4]\n" \ + \ + "\t"ldr" %0, %5\n" /* Load old value. */ \ + "\tcmp %0, %3\n" /* Compare to expected value. */\ + "\t"streq" %4, %1\n" /* Store new value. */ \ + \ + /* Tear down Restartable Atomic Sequence. */ \ + "2:" \ + "\tmov %2, #0x00000000\n" \ + "\tstr %2, [%6]\n" \ + "\tmov %2, #0xffffffff\n" \ + "\tstr %2, [%6, #4]\n" \ + : "=&r" (old), "=m" (*mem), "=&r" (temp) \ + : "r" (expected), "r" (desired), "m" (*mem), \ + "r" (ras_start)); \ + if (old == expected) { \ + return (1); \ + } else { \ + *pexpected = old; \ + return (0); \ + } \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sun Jun 16 16:07:35 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 57105903; Sun, 16 Jun 2013 16:07:35 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 497B41DCC; Sun, 16 Jun 2013 16:07:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5GG7ZlC083913; Sun, 16 Jun 2013 16:07:35 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5GG7ZaT083912; Sun, 16 Jun 2013 16:07:35 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306161607.r5GG7ZaT083912@svn.freebsd.org> From: Attilio Rao Date: Sun, 16 Jun 2013 16:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251808 - user/attilio/vmobj-readlock/sys/kern X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jun 2013 16:07:35 -0000 Author: attilio Date: Sun Jun 16 16:07:34 2013 New Revision: 251808 URL: http://svnweb.freebsd.org/changeset/base/251808 Log: Style fix: avoid to duplicate checks when not necessary. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/kern/vfs_bio.c Modified: user/attilio/vmobj-readlock/sys/kern/vfs_bio.c ============================================================================== --- user/attilio/vmobj-readlock/sys/kern/vfs_bio.c Sun Jun 16 16:01:24 2013 (r251807) +++ user/attilio/vmobj-readlock/sys/kern/vfs_bio.c Sun Jun 16 16:07:34 2013 (r251808) @@ -1848,26 +1848,20 @@ vfs_vmio_release(struct buf *bp) */ vm_page_lock(m); vm_page_unwire(m, 0); + /* - * We don't mess with busy pages, it is - * the responsibility of the process that - * busied the pages to deal with them. - */ - if ((m->oflags & VPO_BUSY) == 0 && m->busy == 0 && - m->wire_count == 0) { - /* - * Might as well free the page if we can and it has - * no valid data. We also free the page if the - * buffer was used for direct I/O - */ - if ((bp->b_flags & B_ASYNC) == 0 && !m->valid) { + * Might as well free the page if we can and it has + * no valid data. We also free the page if the + * buffer was used for direct I/O + */ + if ((bp->b_flags & B_ASYNC) == 0 && !m->valid) { + if ((m->oflags & VPO_BUSY) == 0 && m->busy == 0 && + m->wire_count == 0) vm_page_free(m); - } else if (bp->b_flags & B_DIRECT) { - vm_page_try_to_free(m); - } else if (buf_vm_page_count_severe()) { - vm_page_try_to_cache(m); - } - } + } else if (bp->b_flags & B_DIRECT) + vm_page_try_to_free(m); + else if (buf_vm_page_count_severe()) + vm_page_try_to_cache(m); vm_page_unlock(m); } VM_OBJECT_WUNLOCK(bp->b_bufobj->bo_object); From owner-svn-src-user@FreeBSD.ORG Sun Jun 16 18:31:13 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F26B072C; Sun, 16 Jun 2013 18:31:12 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E467512C3; Sun, 16 Jun 2013 18:31:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5GIVCeQ031048; Sun, 16 Jun 2013 18:31:12 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5GIVCZ3031047; Sun, 16 Jun 2013 18:31:12 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306161831.r5GIVCZ3031047@svn.freebsd.org> From: Attilio Rao Date: Sun, 16 Jun 2013 18:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251813 - user/attilio/vmobj-readlock/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jun 2013 18:31:13 -0000 Author: attilio Date: Sun Jun 16 18:31:12 2013 New Revision: 251813 URL: http://svnweb.freebsd.org/changeset/base/251813 Log: Tentatively document the hard/soft busy logic. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/vm/vm_page.h Modified: user/attilio/vmobj-readlock/sys/vm/vm_page.h ============================================================================== --- user/attilio/vmobj-readlock/sys/vm/vm_page.h Sun Jun 16 18:27:53 2013 (r251812) +++ user/attilio/vmobj-readlock/sys/vm/vm_page.h Sun Jun 16 18:31:12 2013 (r251813) @@ -109,6 +109,17 @@ * contains the dirty field. In the machine-independent layer, * the implementation of read-modify-write operations on the * field is encapsulated in vm_page_clear_dirty_mask(). + * + * Page content access is regulated (mostly) by the busy mechanism. + * When the page content is changing (for example, during a page READ + * operation) the page owner must acquire an hard busy token. Similarly, + * when the page content is just being accessed for reading purposes + * (for example, during a page WRITE operation) the page owner must + * acquire a soft busy token. + * The hard busy mechanism is controlled using vm_page_busy() and + * vm_page_unbusy() interfaces. Likewise the soft busy mechanism is + * controlled through the usage of vm_page_io_start() and + * vm_page_io_finish(). */ #if PAGE_SIZE == 4096 From owner-svn-src-user@FreeBSD.ORG Mon Jun 17 08:49:09 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E1631B1; Mon, 17 Jun 2013 08:49:09 +0000 (UTC) (envelope-from peterj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D3CB613BE; Mon, 17 Jun 2013 08:49:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5H8n9P8001610; Mon, 17 Jun 2013 08:49:09 GMT (envelope-from peterj@svn.freebsd.org) Received: (from peterj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5H8n89J001608; Mon, 17 Jun 2013 08:49:08 GMT (envelope-from peterj@svn.freebsd.org) Message-Id: <201306170849.r5H8n89J001608@svn.freebsd.org> From: Peter Jeremy Date: Mon, 17 Jun 2013 08:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251835 - user/peterj X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 08:49:09 -0000 Author: peterj Date: Mon Jun 17 08:49:08 2013 New Revision: 251835 URL: http://svnweb.freebsd.org/changeset/base/251835 Log: Add a libm test tool that I developed as part of the FreeBSD numerics work. This program tests libm exception conditions listed in WG14/N1256 G.6 against the set of float, double and long double functions this program is linked against. Note that the libm can be incomplete - this program uses dlfunc(3) to identify which functions are present. It is intended to be portable across operating systems and architectures. Added: user/peterj/ user/peterj/README user/peterj/ctest.c (contents, props changed) Added: user/peterj/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/peterj/README Mon Jun 17 08:49:08 2013 (r251835) @@ -0,0 +1,6 @@ +My odds & ends + +ctest.c test libm exception conditions listed in WG14/N1256 G.6 + against a set of float, double and long double functions + +$FreeBSD$ Added: user/peterj/ctest.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/peterj/ctest.c Mon Jun 17 08:49:08 2013 (r251835) @@ -0,0 +1,1241 @@ +/*- + * Copyright (c) 2012 Peter Jeremy + * 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. + */ + +/* + * This program tests libm exception conditions listed in WG14/N1256 G.6 + * against the set of float, double and long double functions this program + * is linked against. Note that the libm can be incomplete - this program + * uses dlfunc(3) to identify which functions are present. + * + * It is intended to be portable across operating systems and architectures. + * + * Command line arguments: + * -v Verify that the various unions are the correct size and that the + * test table is sane rather than performing the tests. + * -r List each function being tested and the arguments being passed. + * + * Default: Only report missing functions and incorrect results. + */ + +#ifdef __FreeBSD +#include +__FBSDID("$FreeBSD$"); +#endif +#include /* for [u]intNN_t */ +#include +#include +#include +#include +#include +#define __USE_GNU /* Linux is broken */ +#include + +#ifndef __FreeBSD +#define dlfunc(a,b) dlsym(a,b) +#endif + +/* long doubles differ between architectures so define appropriate structures for each family */ +#if defined(__i386__) || defined(__amd64__) +/* From FreeBSD: stable/8/lib/libc/amd64/_fpmath.h 175402 2008-01-17 16:39:07Z bde */ +#ifdef __amd64__ +union IEEEl2bits { + long double f; + struct Ieeel2bits { + uint32_t manl :32; + uint32_t manh :32; + uint32_t exp :15; + uint32_t sign :1; + uint32_t junkl :16; + uint32_t junkh :32; + } bits; + struct { + uint64_t man :64; + uint64_t expsign :16; + uint64_t junk :48; + } xbits; + uint64_t i; +}; +#else +union IEEEl2bits { + long double f; + struct Ieeel2bits { + uint32_t manl :32; + uint32_t manh :32; + uint32_t exp :15; + uint32_t sign :1; + uint32_t junkl :16; + } bits; + struct { + uint32_t manl :32; + uint32_t manh :32; + uint32_t expsign :16; + uint32_t junk :16; + } xbits; +}; +#endif + +/* Unlike all the other formats, the units bit is explicit for x87 */ +#define L_ZERO PACK3(0x0000, 0x00000000U, 0x00000000U) +#define L_ONE PACK3(0x3fff, 0x80000000U, 0x00000000U) +#define L_INF PACK3(0x7fff, 0x80000000U, 0x00000000U) +#define L_NAN PACK3(0x7fff, 0xc0000000U, 0x00000000U) +#define L_PI_4 PACK3(0x3ffe, 0xc90fdaa2U, 0x2168c235U) +#define L_PI_2 PACK3(0x3fff, 0xc90fdaa2U, 0x2168c235U) +#define L_3PI_4 PACK3(0x4000, 0x96cbe3f9U, 0x990e91a8U) +#define L_PI PACK3(0x4000, 0xc90fdaa2U, 0x2168c235U) + +/* + * On i386, sizeof(long double) is 12 but at least the Atom N270 only + * actually writes 10 bytes. Since the result validation is done + * using memcmp(), explicitly define the number of bytes to compare. + */ +#define sizeof_long_double 10 +#define INF_EXP 0x7fff +#elif defined(__arm__) +/* From FreeBSD: stable/8/lib/libc/arm/_fpmath.h 186461 2008-12-23 22:20:59Z marcel */ +/* Raspberry Pi is fully little-endian */ +union IEEEl2bits { + long double f; + struct Ieeel2bits { + uint32_t manl :32; + uint32_t manh :20; + uint32_t exp :11; + uint32_t sign :1; + } bits; + struct { + uint64_t man :52; + uint64_t expsign :12; + } xbits; + uint64_t i; +}; + +#define L_ZERO D_ZERO +#define L_ONE D_ONE +#define L_INF D_INF +#define L_NAN D_NAN +#define L_PI_4 D_PI_4 +#define L_PI_2 D_PI_2 +#define L_3PI_4 D_3PI_4 +#define L_PI D_PI + +#define sizeof_long_double sizeof(long double) +#define INF_EXP 0x7ff +#elif defined(__sparc) +/* From FreeBSD: stable/8/lib/libc/sparc64/_fpmath.h 175459 2008-01-18 21:25:51Z das */ +#define FP_BIG_ENDIAN + +union IEEEl2bits { + long double f; + struct Ieeel2bits { + uint32_t sign :1; + uint32_t exp :15; + uint32_t manhh :16; + uint32_t manhl :32; + uint32_t manlh :32; + uint32_t manll :32; + } bits; + struct { + uint64_t expsign :16; + uint64_t manh :48; + uint64_t manl :64; + } xbits; + uint64_t i[2]; +}; + +#define L_ZERO { 0, 0x0000, 0x0000, 0x00000000U, 0x00000000U, 0x00000000U } +#define L_ONE { 0, 0x3fff, 0x0000, 0x00000000U, 0x00000000U, 0x00000000U } +#define L_INF { 0, 0x7fff, 0x0000, 0x00000000U, 0x00000000U, 0x00000000U } +#define L_NAN { 0, 0x7fff, 0x8000, 0x00000000U, 0x00000000U, 0x00000000U } +#define L_PI_4 { 0, 0x3ffe, 0x921f, 0xb54442d1U, 0x8469898cU, 0xc51701b8U } +#define L_PI_2 { 0, 0x3fff, 0x921f, 0xb54442d1U, 0x8469898cU, 0xc51701b8U } +#define L_3PI_4 { 0, 0x4000, 0x2d97, 0xc7f3321dU, 0x234f2729U, 0x93d1414aU } +#define L_PI { 0, 0x4000, 0x921f, 0xb54442d1U, 0x8469898cU, 0xc51701b8U } + +#define sizeof_long_double sizeof(long double) +#define INF_EXP 0x7fff +#endif + +/* float and double are consistent across all architectures apart from endianness */ +union IEEEf2bits { + float f; + uint32_t i; + struct Ieeef2bits { +#ifndef FP_BIG_ENDIAN + uint32_t man :23; + uint32_t exp :8; + uint32_t sign :1; +#else + uint32_t sign :1; + uint32_t exp :8; + uint32_t man :23; +#endif + } bits; +}; + +union IEEEd2bits { + double f; + uint64_t i; + struct Ieeed2bits { +#ifndef FP_BIG_ENDIAN + uint32_t manl :32; + uint32_t manh :20; + uint32_t exp :11; + uint32_t sign :1; +#else /* _BIG_ENDIAN */ + uint32_t sign :1; + uint32_t exp :11; + uint32_t manh :20; + uint32_t manl :32; +#endif + } bits; + struct { +#ifndef FP_BIG_ENDIAN + uint64_t man :52; + uint64_t expsign :12; +#else /* _BIG_ENDIAN */ + uint64_t expsign :12; + uint64_t man :52; +#endif + } xbits; +}; + +typedef struct Ieeef2bits fbits; +typedef struct Ieeed2bits dbits; +typedef struct Ieeel2bits lbits; + +#ifdef FP_BIG_ENDIAN +#define PACK2(exp, man) { 0, exp, man } +#define PACK3(exp, manh, manl) { 0, exp, manh, manl } +#else +#define PACK2(exp, man) { man, exp } +#define PACK3(exp, manh, manl) { manl, manh, exp } +#endif + +#define F_ZERO PACK2(0x00, 0x000000) +#define F_ONE PACK2(0x7f, 0x000000) +#define F_INF PACK2(0xff, 0x000000) +#define F_NAN PACK2(0xff, 0x400000) +#define F_PI_4 PACK2(0x7e, 0x490fdb) +#define F_PI_2 PACK2(0x7f, 0x490fdb) +#define F_3PI_4 PACK2(0x80, 0x16cbe4) +#define F_PI PACK2(0x80, 0x490fdb) + +#define D_ZERO PACK3(0x000, 0x00000, 0x00000000U) +#define D_ONE PACK3(0x3ff, 0x00000, 0x00000000U) +#define D_INF PACK3(0x7ff, 0x00000, 0x00000000U) +#define D_NAN PACK3(0x7ff, 0x80000, 0x00000000U) +#define D_PI_4 PACK3(0x3fe, 0x921fb, 0x54442d18U) +#define D_PI_2 PACK3(0x3ff, 0x921fb, 0x54442d18U) +#define D_3PI_4 PACK3(0x400, 0x2d97c, 0x7f3321d2U) +#define D_PI PACK3(0x400, 0x921fb, 0x54442d18U) + +/* + * C99 specifies that complex numbers have the same representation as + * an array of two elements, where the first element is the real part + * and the second element is the imaginary part. + */ +typedef union { + float complex f; + union IEEEf2bits a[2]; +} float_complex; +typedef union { + double complex f; + union IEEEd2bits a[2]; +} double_complex; +typedef union { + long double complex f; + union IEEEl2bits a[2]; +} long_double_complex; +#define REALPART(z) ((z).a[0]) +#define IMAGPART(z) ((z).a[1]) + +typedef struct { + long_double_complex l; + double_complex d; + float_complex f; +} fpblock; + +/* + * The following is a formal copy of WG14/N1256 G.6. The executable functions are + * found via dlfunc() using the name. The arguments and expected result are strings + * defining the value(s). These strings optionally begin with '+' or '-', indicating + * that the value has that sign, if neither is specified, the value can have either + * sign. 'x' and 'y' represent any finite value (including zero if this is not + * separately specified). + * + * The exceptions and special conditions fields are currently ignored. + * + * The table is terminated by a NULL name. + */ +const struct test_c_c { + const char *tname; + const char *tare, *taim; /* arguments */ + const char *trre, *trim; /* expected result */ + const char *texc; /* exceptions */ + const char *spec; /* special conditions */ +} test_c_c[] = { + { "cacos", "0", "+0", "+π/2", "-0" }, + { "cacos", "0", "-0", "+π/2", "+0" }, + { "cacos", "0", "NaN", "+π/2", "NaN" }, + { "cacos", "+Inf", "+Inf", "+π/4", "-Inf" }, + { "cacos", "+Inf", "-Inf", "+π/4", "+Inf" }, + { "cacos", "-Inf", "+Inf", "+3π/4", "-Inf" }, + { "cacos", "-Inf", "-Inf", "+3π/4", "+Inf" }, + { "cacos", "Inf", "NaN", "NaN", "Inf" }, + { "cacos", "+Inf", "+y", "+0", "-Inf" }, + { "cacos", "+Inf", "-y", "+0", "+Inf" }, + { "cacos", "-Inf", "+y", "+π", "-Inf" }, + { "cacos", "-Inf", "-y", "+π", "+Inf" }, + { "cacos", "NaN", "+Inf", "NaN", "-Inf" }, + { "cacos", "NaN", "-Inf", "NaN", "+Inf" }, + { "cacos", "NaN", "NaN", "NaN", "NaN" }, + { "cacos", "NaN", "y", "NaN", "NaN", "[inv]" }, + { "cacos", "x", "+Inf", "+π/2", "-Inf" }, + { "cacos", "x", "-Inf", "+π/2", "+Inf" }, + { "cacos", "x", "NaN", "NaN", "NaN", "[inv]" }, + + { "cacosh", "0", "+0", "+0", "+π/2" }, + { "cacosh", "0", "-0", "+0", "-π/2" }, + { "cacosh", "+Inf", "+Inf", "+Inf", "+π/4" }, + { "cacosh", "+Inf", "-Inf", "+Inf", "-π/4" }, + { "cacosh", "-Inf", "+Inf", "+Inf", "+3π/4" }, + { "cacosh", "-Inf", "-Inf", "+Inf", "-3π/4" }, + { "cacosh", "Inf", "NaN", "+Inf", "NaN" }, + { "cacosh", "+Inf", "+y", "+Inf", "+0" }, + { "cacosh", "+Inf", "-y", "+Inf", "-0" }, + { "cacosh", "-Inf", "+y", "+Inf", "+π" }, + { "cacosh", "-Inf", "-y", "+Inf", "-π" }, + { "cacosh", "NaN", "Inf", "+Inf", "NaN" }, + { "cacosh", "NaN", "NaN", "NaN", "NaN" }, + { "cacosh", "NaN", "y", "NaN", "NaN", "[inv]" }, + { "cacosh", "x", "+Inf", "+Inf", "+π/2" }, + { "cacosh", "x", "-Inf", "+Inf", "-π/2" }, + { "cacosh", "x", "NaN", "NaN", "NaN", "[inv]" }, + + { "casin", "-0", "+0", "-0", "+0" }, + { "casin", "+0", "+0", "+0", "+0" }, + { "casin", "-0", "-0", "-0", "-0" }, + { "casin", "+0", "-0", "+0", "-0" }, + { "casin", "-Inf", "+Inf", "-π/4", "+Inf" }, + { "casin", "+Inf", "+Inf", "+π/4", "+Inf" }, + { "casin", "-Inf", "-Inf", "-π/4", "-Inf" }, + { "casin", "+Inf", "-Inf", "+π/4", "-Inf" }, + { "casin", "NaN", "+Inf", "NaN", "+Inf" }, + { "casin", "NaN", "-Inf", "NaN", "-Inf" }, + { "casin", "-y", "+Inf", "-0", "+Inf" }, + { "casin", "+y", "+Inf", "+0", "+Inf" }, + { "casin", "-y", "-Inf", "-0", "-Inf" }, + { "casin", "+y", "-Inf", "+0", "-Inf" }, + { "casin", "-0", "NaN", "-0", "NaN" }, + { "casin", "+0", "NaN", "+0", "NaN" }, + { "casin", "Inf", "NaN", "NaN", "Inf" }, + { "casin", "NaN", "NaN", "NaN", "NaN" }, + { "casin", "y", "NaN", "NaN", "NaN", "[inv]" }, + { "casin", "-Inf", "+x", "-π/2", "+Inf" }, + { "casin", "+Inf", "+x", "+π/2", "+Inf" }, + { "casin", "-Inf", "-x", "-π/2", "-Inf" }, + { "casin", "+Inf", "-x", "+π/2", "-Inf" }, + { "casin", "NaN", "x", "NaN", "NaN", "[inv]" }, + + { "casinh", "+0", "+0", "+0", "+0" }, + { "casinh", "+0", "-0", "+0", "-0" }, + { "casinh", "-0", "+0", "-0", "+0" }, + { "casinh", "-0", "-0", "-0", "-0" }, + { "casinh", "+Inf", "+Inf", "+Inf", "+π/4" }, + { "casinh", "+Inf", "-Inf", "+Inf", "-π/4" }, + { "casinh", "-Inf", "+Inf", "-Inf", "+π/4" }, + { "casinh", "-Inf", "-Inf", "-Inf", "-π/4" }, + { "casinh", "+Inf", "NaN", "+Inf", "NaN" }, + { "casinh", "-Inf", "NaN", "-Inf", "NaN" }, + { "casinh", "+Inf", "+y", "+Inf", "+0" }, + { "casinh", "+Inf", "-y", "+Inf", "-0" }, + { "casinh", "-Inf", "+y", "-Inf", "+0" }, + { "casinh", "-Inf", "-y", "-Inf", "-0" }, + { "casinh", "NaN", "+0", "NaN", "+0" }, + { "casinh", "NaN", "-0", "NaN", "-0" }, + { "casinh", "NaN", "Inf", "Inf", "NaN" }, + { "casinh", "NaN", "NaN", "NaN", "NaN" }, + { "casinh", "NaN", "y", "NaN", "NaN", "[inv]" }, + { "casinh", "+x", "+Inf", "+Inf", "+π/2" }, + { "casinh", "+x", "-Inf", "+Inf", "-π/2" }, + { "casinh", "-x", "+Inf", "-Inf", "+π/2" }, + { "casinh", "-x", "-Inf", "-Inf", "-π/2" }, + { "casinh", "x", "NaN", "NaN", "NaN", "[inv]" }, + + { "catan", "-0", "+0", "-0", "+0" }, + { "catan", "+0", "+0", "+0", "+0" }, + { "catan", "-0", "-0", "-0", "-0" }, + { "catan", "+0", "-0", "+0", "-0" }, + { "catan", "NaN", "+0", "NaN", "+0" }, + { "catan", "NaN", "-0", "NaN", "-0" }, + { "catan", "-0", "+1", "-0", "+Inf", "{div0}" }, + { "catan", "+0", "+1", "+0", "+Inf", "{div0}" }, + { "catan", "-0", "-1", "-0", "-Inf", "{div0}" }, + { "catan", "+0", "-1", "+0", "-Inf", "{div0}" }, + { "catan", "-Inf", "+Inf", "-π/2", "+0" }, + { "catan", "+Inf", "+Inf", "+π/2", "+0" }, + { "catan", "-Inf", "-Inf", "-π/2", "-0" }, + { "catan", "+Inf", "-Inf", "+π/2", "-0" }, + { "catan", "NaN", "+Inf", "NaN", "+0" }, + { "catan", "NaN", "-Inf", "NaN", "-0" }, + { "catan", "-y", "+Inf", "-π/2", "+0" }, + { "catan", "+y", "+Inf", "+π/2", "+0" }, + { "catan", "-Inf", "NaN", "-π/2", "0" }, + { "catan", "+Inf", "NaN", "+π/2", "0" }, + { "catan", "NaN", "NaN", "NaN", "NaN" }, + { "catan", "y", "NaN", "NaN", "NaN", "[inv]" }, + { "catan", "-Inf", "+x", "-π/2", "+0" }, + { "catan", "+Inf", "+x", "+π/2", "+0" }, + { "catan", "-Inf", "-x", "-π/2", "-0" }, + { "catan", "+Inf", "-x", "+π/2", "-0" }, + { "catan", "NaN", "x", "NaN", "NaN", "[inv]" }, + + { "catanh", "+0", "+0", "+0", "+0" }, + { "catanh", "+0", "-0", "+0", "-0" }, + { "catanh", "-0", "+0", "-0", "+0" }, + { "catanh", "-0", "-0", "-0", "-0" }, + { "catanh", "+0", "NaN", "+0", "NaN" }, + { "catanh", "-0", "NaN", "-0", "NaN" }, + { "catanh", "+1", "+0", "+Inf", "+0", "{div0}" }, + { "catanh", "+1", "-0", "+Inf", "-0", "{div0}" }, + { "catanh", "-1", "+0", "-Inf", "+0", "{div0}" }, + { "catanh", "-1", "-0", "-Inf", "-0", "{div0}" }, + { "catanh", "+Inf", "+Inf", "+0", "+π/2" }, + { "catanh", "+Inf", "-Inf", "+0", "-π/2" }, + { "catanh", "-Inf", "+Inf", "-0", "+π/2" }, + { "catanh", "-Inf", "-Inf", "-0", "-π/2" }, + { "catanh", "+Inf", "NaN", "+0", "NaN" }, + { "catanh", "-Inf", "NaN", "-0", "NaN" }, + { "catanh", "+Inf", "+y", "+0", "+π/2" }, + { "catanh", "+Inf", "-y", "+0", "-π/2" }, + { "catanh", "NaN", "+Inf", "0", "+π/2" }, + { "catanh", "NaN", "-Inf", "0", "-π/2" }, + { "catanh", "NaN", "NaN", "NaN", "NaN" }, + { "catanh", "NaN", "y", "NaN", "NaN", "[inv]" }, + { "catanh", "+x", "+Inf", "+0", "+π/2" }, + { "catanh", "+x", "-Inf", "+0", "-π/2" }, + { "catanh", "-x", "+Inf", "-0", "+π/2" }, + { "catanh", "-x", "-Inf", "-0", "-π/2" }, + { "catanh", "x", "NaN", "NaN", "NaN", "[inv]" }, + + { "ccos", "-0", "+0", "+1", "+0" }, + { "ccos", "+0", "+0", "+1", "-0" }, + { "ccos", "-0", "-0", "+1", "-0" }, + { "ccos", "+0", "-0", "+1", "+0" }, + { "ccos", "Inf", "0", "NaN", "0", "{inv}" }, + { "ccos", "NaN", "0", "NaN", "0" }, + { "ccos", "-0", "+Inf", "+Inf", "+0" }, + { "ccos", "+0", "+Inf", "+Inf", "-0" }, + { "ccos", "-0", "-Inf", "+Inf", "-0" }, + { "ccos", "+0", "-Inf", "+Inf", "+0" }, + { "ccos", "Inf", "Inf", "Inf", "NaN", "{inv}" }, + { "ccos", "NaN", "Inf", "+Inf", "NaN" }, + { "ccos", "x", "+Inf", "+Inf*cos(x)", "-Inf*sin(x)" }, + { "ccos", "x", "-Inf", "+Inf*cos(x)", "+Inf*sin(x)" }, + { "ccos", "0", "NaN", "NaN", "0" }, + { "ccos", "NaN", "NaN", "NaN", "NaN" }, + { "ccos", "y", "NaN", "NaN", "NaN", "[inv]" }, + { "ccos", "Inf", "x", "NaN", "NaN", "{inv}" }, + { "ccos", "NaN", "x", "NaN", "NaN", "[inv]" }, + + { "ccosh", "+0", "+0", "+1", "+0" }, + { "ccosh", "-0", "+0", "+1", "-0" }, + { "ccosh", "+0", "-0", "+1", "-0" }, + { "ccosh", "-0", "-0", "+1", "+0" }, + { "ccosh", "0", "Inf", "NaN", "0", "{inv}" }, + { "ccosh", "0", "NaN", "NaN", "0" }, + { "ccosh", "+Inf", "+0", "+Inf", "+0" }, + { "ccosh", "+Inf", "-0", "+Inf", "-0" }, + { "ccosh", "-Inf", "+0", "+Inf", "-0" }, + { "ccosh", "-Inf", "-0", "+Inf", "+0" }, + { "ccosh", "Inf", "Inf", "Inf", "NaN", "{inv}" }, + { "ccosh", "Inf", "NaN", "+Inf", "NaN" }, + { "ccosh", "+Inf", "y", "+Inf*cos(y)", "+Inf*sin(y)" }, + { "ccosh", "-Inf", "y", "+Inf*cos(y)", "-Inf*sin(y)" }, + { "ccosh", "NaN", "0", "NaN", "0" }, + { "ccosh", "NaN", "NaN", "NaN", "NaN" }, + { "ccosh", "NaN", "y", "NaN", "NaN", "[inv]" }, + { "ccosh", "x", "Inf", "NaN", "NaN", "{inv}" }, + { "ccosh", "x", "NaN", "NaN", "NaN", "[inv]" }, + + { "cexp", "0", "+0", "+1", "+0" }, + { "cexp", "0", "-0", "+1", "-0" }, + { "cexp", "+Inf", "+0", "+Inf", "+0" }, + { "cexp", "+Inf", "-0", "+Inf", "-0" }, + { "cexp", "+Inf", "Inf", "Inf", "NaN", "{inv}" }, + { "cexp", "-Inf", "Inf", "0", "0" }, + { "cexp", "+Inf", "NaN", "Inf", "NaN" }, + { "cexp", "-Inf", "NaN", "0", "0" }, + { "cexp", "+Inf", "y", "+Inf*cos(y)", "+Inf*sin(y)" }, + { "cexp", "-Inf", "y", "+0*cos(y)", "+0*sin(y)" }, + { "cexp", "NaN", "+0", "NaN", "+0" }, + { "cexp", "NaN", "-0", "NaN", "-0" }, + { "cexp", "NaN", "NaN", "NaN", "NaN" }, + { "cexp", "NaN", "y", "NaN", "NaN", "[inv]" }, + { "cexp", "x", "Inf", "NaN", "NaN", "{inv}" }, + { "cexp", "x", "NaN", "NaN", "NaN", "[inv]" }, + + { "clog", "+0", "+0", "-Inf", "+0", "{div0}" }, + { "clog", "+0", "-0", "-Inf", "-0", "{div0}" }, + { "clog", "-0", "+0", "-Inf", "+π", "{div0}" }, + { "clog", "-0", "-0", "-Inf", "-π", "{div0}" }, + { "clog", "+Inf", "+Inf", "+Inf", "+π/4" }, + { "clog", "+Inf", "-Inf", "+Inf", "-π/4" }, + { "clog", "-Inf", "+Inf", "+Inf", "+3π/4" }, + { "clog", "-Inf", "-Inf", "+Inf", "-3π/4" }, + { "clog", "Inf", "NaN", "+Inf", "NaN" }, + { "clog", "+Inf", "+y", "+Inf", "+0" }, + { "clog", "+Inf", "-y", "+Inf", "-0" }, + { "clog", "-Inf", "+y", "+Inf", "+π" }, + { "clog", "-Inf", "-y", "+Inf", "-π" }, + { "clog", "NaN", "Inf", "+Inf", "NaN" }, + { "clog", "NaN", "NaN", "NaN", "NaN" }, + { "clog", "NaN", "y", "NaN", "NaN", "[inv]" }, + { "clog", "x", "+Inf", "+Inf", "+π/2" }, + { "clog", "x", "-Inf", "+Inf", "-π/2" }, + { "clog", "x", "NaN", "NaN", "NaN", "[inv]" }, + + { "csin", "-0", "+0", "-0", "+0" }, + { "csin", "+0", "+0", "+0", "+0" }, + { "csin", "-0", "-0", "-0", "-0" }, + { "csin", "+0", "-0", "+0", "-0" }, + { "csin", "Inf", "0", "NaN", "0", "{inv}" }, + { "csin", "NaN", "0", "NaN", "0" }, + { "csin", "-0", "+Inf", "-0", "+Inf" }, + { "csin", "+0", "+Inf", "+0", "+Inf" }, + { "csin", "-0", "-Inf", "-0", "-Inf" }, + { "csin", "+0", "-Inf", "+0", "-Inf" }, + { "csin", "Inf", "Inf", "NaN", "Inf", "{inv}" }, + { "csin", "NaN", "Inf", "NaN", "Inf" }, + { "csin", "x", "+Inf", "+Inf*sin(x)", "+Inf*cos(x)" }, + { "csin", "x", "-Inf", "+Inf*sin(x)", "-Inf*cos(x)" }, + { "csin", "-0", "NaN", "-0", "NaN" }, + { "csin", "+0", "NaN", "+0", "NaN" }, + { "csin", "NaN", "NaN", "NaN", "NaN" }, + { "csin", "y", "NaN", "NaN", "NaN", "[inv]" }, + { "csin", "Inf", "x", "NaN", "NaN", "{inv}" }, + { "csin", "NaN", "x", "NaN", "NaN", "[inv]" }, + + { "csinh", "+0", "+0", "+0", "+0" }, + { "csinh", "+0", "-0", "+0", "-0" }, + { "csinh", "-0", "+0", "-0", "+0" }, + { "csinh", "-0", "-0", "-0", "-0" }, + { "csinh", "0", "Inf", "0", "NaN", "{inv}" }, + { "csinh", "0", "NaN", "0", "NaN" }, + { "csinh", "+Inf", "+0", "+Inf", "+0" }, + { "csinh", "+Inf", "-0", "+Inf", "-0" }, + { "csinh", "-Inf", "+0", "-Inf", "+0" }, + { "csinh", "-Inf", "-0", "-Inf", "-0" }, + { "csinh", "Inf", "Inf", "Inf", "NaN", "{inv}" }, + { "csinh", "Inf", "NaN", "Inf", "NaN" }, + { "csinh", "+Inf", "y", "+Inf*cos(y)", "+Inf*sin(y)" }, + { "csinh", "-Inf", "y", "-Inf*cos(y)", "+Inf*sin(y)" }, + { "csinh", "NaN", "+0", "NaN", "+0" }, + { "csinh", "NaN", "-0", "NaN", "-0" }, + { "csinh", "NaN", "NaN", "NaN", "NaN" }, + { "csinh", "NaN", "y", "NaN", "NaN", "[inv]" }, + { "csinh", "x", "Inf", "NaN", "NaN", "{inv}" }, + { "csinh", "x", "NaN", "NaN", "NaN", "[inv]" }, + + { "csqrt", "0", "+0", "+0", "+0" }, + { "csqrt", "0", "-0", "+0", "-0" }, + { "csqrt", "+Inf", "NaN", "+Inf", "NaN" }, + { "csqrt", "-Inf", "NaN", "NaN", "Inf" }, + { "csqrt", "+Inf", "+y", "+Inf", "+0" }, + { "csqrt", "+Inf", "-y", "+Inf", "-0" }, + { "csqrt", "-Inf", "+y", "+0", "+Inf" }, + { "csqrt", "-Inf", "-y", "+0", "-Inf" }, + { "csqrt", "NaN", "+Inf", "+Inf", "+Inf" }, + { "csqrt", "NaN", "-Inf", "+Inf", "-Inf" }, + { "csqrt", "NaN", "NaN", "NaN", "NaN" }, + { "csqrt", "NaN", "y", "NaN", "NaN", "[inv]" }, + { "csqrt", "x", "+Inf", "+Inf", "+Inf" }, + { "csqrt", "x", "-Inf", "+Inf", "-Inf" }, + { "csqrt", "x", "NaN", "NaN", "NaN", "[inv]" }, + + { "ctan", "-0", "+0", "-0", "+0" }, + { "ctan", "+0", "+0", "+0", "+0" }, + { "ctan", "-0", "-0", "-0", "-0" }, + { "ctan", "+0", "-0", "+0", "-0" }, + { "ctan", "Inf", "+Inf", "0", "+1" }, + { "ctan", "Inf", "-Inf", "0", "-1" }, + { "ctan", "NaN", "+Inf", "0", "+1" }, + { "ctan", "NaN", "-Inf", "0", "-1" }, + { "ctan", "x", "+Inf", "+0*sin(2*x)", "+1" }, + { "ctan", "x", "-Inf", "+0*sin(2*x)", "-1" }, + { "ctan", "-0", "NaN", "-0", "NaN" }, + { "ctan", "+0", "NaN", "+0", "NaN" }, + { "ctan", "NaN", "NaN", "NaN", "NaN" }, + { "ctan", "y", "NaN", "NaN", "NaN", "[inv]" }, + { "ctan", "Inf", "x", "NaN", "NaN", "{inv}" }, + { "ctan", "NaN", "x", "NaN", "NaN", "[inv]" }, + + { "ctanh", "+0", "+0", "+0", "+0" }, + { "ctanh", "+0", "-0", "+0", "-0" }, + { "ctanh", "-0", "+0", "-0", "+0" }, + { "ctanh", "-0", "-0", "-0", "-0" }, + { "ctanh", "+Inf", "Inf", "+1", "0" }, + { "ctanh", "-Inf", "Inf", "-1", "0" }, + { "ctanh", "+Inf", "NaN", "+1", "0" }, + { "ctanh", "-Inf", "NaN", "-1", "0" }, + { "ctanh", "+Inf", "y", "+1", "+0*sin(2*y)" }, + { "ctanh", "-Inf", "y", "-1", "+0*sin(2*y)" }, + { "ctanh", "NaN", "+0", "NaN", "+0" }, + { "ctanh", "NaN", "-0", "NaN", "-0" }, + { "ctanh", "NaN", "NaN", "NaN", "NaN" }, + { "ctanh", "NaN", "y", "NaN", "NaN", "[inv]" }, + { "ctanh", "x", "Inf", "NaN", "NaN", "{inv}" }, + { "ctanh", "x", "NaN", "NaN", "NaN", "[inv]" }, + + { NULL } +}; + +/* argument/result string */ +enum T_VAL { + T_ZERO, T_FIN, T_INF, T_NAN, T_ONE, T_PI_4, T_PI_2, T_3PI_4, T_PI, + T_COSX, T_COSY, T_SINX, T_SIN2X, T_SINY, T_SIN2Y, T_OINV, T_DIV0, T_INV, T_UNK }; + +/* Used to control state for iterating argument values */ +enum STATE { + S_COUNT = 32768, S_SSIN2X, S_SSINX, S_SSIN2Y, S_SSINY, S_SCOSX, S_SCOSY, S_NAN, + S_MASK = 0xffff, S_NEG = 0x80000, S_POS = 0x40000, S_MULT = 0x20000 }; + +/* Map string name to enum and bit pattern of value */ +struct t_val { + const char *v_name; /* String name */ + enum T_VAL v_val; /* Value */ + fbits v_fval; /* float constant */ + dbits v_dval; /* double constant */ + lbits v_lval; /* long double constant */ +}; + +/* Convert the name (without sign) to the constants */ +const struct t_val * +mapname(const char *in) +{ + static const struct t_val t_map[] = { + { "0", T_ZERO, F_ZERO, D_ZERO, L_ZERO }, + { "0*cos(y)", T_COSY, F_ZERO, D_ZERO, L_ZERO }, + { "0*sin(2*y)", T_SIN2Y,F_ZERO, D_ZERO, L_ZERO }, + { "0*sin(y)", T_SINY, F_ZERO, D_ZERO, L_ZERO }, + { "0*cos(x)", T_COSX, F_ZERO, D_ZERO, L_ZERO }, + { "0*sin(2*x)", T_SIN2X,F_ZERO, D_ZERO, L_ZERO }, + { "0*sin(x)", T_SINX, F_ZERO, D_ZERO, L_ZERO }, + { "1", T_ONE, F_ONE, D_ONE, L_ONE }, + { "3π/4", T_3PI_4,F_3PI_4,D_3PI_4,L_3PI_4 }, + { "Inf", T_INF, F_INF, D_INF, L_INF }, + { "Inf*cos(y)", T_COSY, F_INF, D_INF, L_INF }, + { "Inf*sin(y)", T_SINY, F_INF, D_INF, L_INF }, + { "Inf*cos(x)", T_COSX, F_INF, D_INF, L_INF }, + { "Inf*sin(x)", T_SINX, F_INF, D_INF, L_INF }, + { "NaN", T_NAN, F_NAN, D_NAN, L_NAN }, + { "[inv]", T_OINV }, + { "x", T_FIN, F_3PI_4,D_3PI_4,L_3PI_4 }, + { "y", T_FIN, F_3PI_4,D_3PI_4,L_3PI_4 }, + { "{div0}", T_DIV0 }, + { "{inv}", T_INV }, + { "π", T_PI, F_PI, D_PI, L_PI }, + { "π/2", T_PI_2, F_PI_2, D_PI_2, L_PI_2 }, + { "π/4", T_PI_4, F_PI_4, D_PI_4, L_PI_4 }, + { NULL, T_UNK } + }; + int i; + + for (i = 0; t_map[i].v_name != NULL; i++) { + if (strcmp(t_map[i].v_name, in) == 0) + break; + } + return (&t_map[i]); +} + +/* + * vdecode() and do_validate() form partial sanity checks on the arguments + * and results in test_c_c + */ +int +vdecode(const char *name, const char *n, int isarg) +{ + int sign; + int val; + int res; + + sign = (*n == '+' || *n == '-') ? *n++ : 0; + val = mapname(n)->v_val; + if (val > (isarg ? T_NAN : T_SIN2Y)) { + printf("%s invalid %s '%s'\n", name, (isarg ? "arg" : "res"), n - !!sign); + return (0); + } + if (!isarg) + return (0); + res = 0; + if (sign != '-') + res |= val + 1; + if (sign != '+') + res |= (val + 5) << 8; + return (res); +} + +/* validate test_c_c[] contents */ +void +do_validate() +{ + const struct test_c_c *ep, *sp; + int res1, res2, res3, res4; + int64_t mask, val; + + if (sizeof(float) != sizeof(struct Ieeef2bits) || sizeof(float) != sizeof(union IEEEf2bits) || sizeof(float complex) != sizeof(float_complex)) + printf("float: %zu %zu %zu %zu %zu\n", sizeof(float), sizeof(struct Ieeef2bits), sizeof(union IEEEf2bits), sizeof(float complex), sizeof(float_complex)); + if (sizeof(double) != sizeof(struct Ieeed2bits) || sizeof(double) != sizeof(union IEEEd2bits) || sizeof(double complex) != sizeof(double_complex)) + printf("double: %zu %zu %zu %zu %zu\n", sizeof(double), sizeof(struct Ieeed2bits), sizeof(union IEEEd2bits), sizeof(double complex), sizeof(double_complex)); + if (sizeof(long double) != sizeof(struct Ieeel2bits) || sizeof(long double) != sizeof(union IEEEl2bits) || sizeof(long double complex) != sizeof(long_double_complex)) + printf("long double: %zu %zu %zu %zu %zu\n", sizeof(long double), sizeof(struct Ieeel2bits), sizeof(union IEEEl2bits), sizeof(long double complex), sizeof(long_double_complex)); + + for (ep = test_c_c; ep->tname != NULL; ) { + mask = 0; + for (sp = ep; ep->tname != NULL && !strcmp(ep->tname, sp->tname); ep++) { + res1 = vdecode(ep->tname, ep->tare, 1); + res3 = res1 >> 8; + res1 &= 0xff; + res2 = vdecode(ep->tname, ep->taim, 2); + res4 = res2 >> 8; + res2 &= 0xff; + vdecode(ep->tname, ep->trre, 0); + vdecode(ep->tname, ep->trim, 0); + val = 0; + if (res1 > 0) { + if (res2 > 0) + val |= (int64_t)1 << (res1 + res2 * 8 - 9); + if (res4 > 0) + val |= (int64_t)1 << (res1 + res4 * 8 - 9); + } + if (res3 > 0) { + if (res2 > 0) + val |= (int64_t)1 << (res3 + res2 * 8 - 9); + if (res4 > 0) + val |= (int64_t)1 << (res3 + res4 * 8 - 9); + } + if (val & mask) + printf("%s duplicate '%s,%s' 0x%016jx 0x%016jx %x %x %x %x\n", + ep->tname, ep->tare, ep->taim, (intmax_t)mask, (intmax_t)val, res1, res3, res2, res4); + mask |= val; + } + } +} + +/* + * Lookup an argument or result string and initialise the state and value (in fp). + * + * n is the input string describing the argument or expectud result. + * state is used to return state information used to iterate through + * arguments or define result information, based on enum STATE + * fp is used to return the value associated with the input string. It contains + * float, double and long double complex numbers. A single invocation of + * decode will initialise either the real or imaginary parts of all 3. + * ixexp - zero if the input string is an argument, non-zero for result. + * ix is 0 for the real part or 1 for the imaginary part. + */ +int +decode(const char *n, int *state, fpblock *fp, int isexp, int ix) +{ + const struct t_val *val; + int sign; + + + sign = (*n == '+' || *n == '-') ? *n++ : 0; + val = mapname(n); + + fp->f.a[ix].bits = val->v_fval; + fp->d.a[ix].bits = val->v_dval; + fp->l.a[ix].bits = val->v_lval; + + /* Reject values not allowed as arguments */ + if (isexp == 0) { + switch (val->v_val) { + case T_FIN: + *state = S_MULT | S_COUNT | + ((sign == '+') ? S_POS : 0) | + ((sign == '-') ? S_NEG : 0); + if (sign == '-') { + fp->f.a[ix].bits.sign = 1; + fp->d.a[ix].bits.sign = 1; + fp->l.a[ix].bits.sign = 1; + } + return (0); + + case T_NAN: + *state = S_MASK; /*#### expand to more NaNs later */ + return (0); + + case T_ZERO: + case T_INF: + case T_ONE: + break; + + default: + return (1); + } + + switch (sign) { + case '-': + fp->f.a[ix].bits.sign = 1; + fp->d.a[ix].bits.sign = 1; + fp->l.a[ix].bits.sign = 1; + /* Fall thru */ + case '+': + *state = S_MASK; + break; + default: + *state = S_NEG; + break; + } + return (0); + } + + /* Process expected results */ + switch (val->v_val) { + case T_FIN: + case T_ZERO: + case T_INF: + case T_ONE: + case T_3PI_4: + case T_PI: + case T_PI_2: + case T_PI_4: + *state = 0; + break; + + case T_NAN: + *state = S_NAN; + return (0); + + case T_COSX: + *state = S_SCOSX; + break; + + case T_COSY: + *state = S_SCOSY; + break; + + case T_SIN2X: + *state = S_SSIN2X; + break; + + case T_SINX: + *state = S_SSINX; + break; + + case T_SIN2Y: + *state = S_SSIN2Y; + break; + + case T_SINY: + *state = S_SSINY; + break; + + case T_OINV: + case T_DIV0: + case T_INV: + case T_UNK: + default: + return (1); + } + + switch (sign) { + case '-': + fp->f.a[ix].bits.sign = 1; + fp->d.a[ix].bits.sign = 1; + fp->l.a[ix].bits.sign = 1; + break; + + case '+': + break; + + default: + *state |= S_NEG; + break; + } + + return (0); +} + +/* + * Verify the real or imaginary part (defined by "ix") of a return value + * (in "act") matches the expected value (in "exp") for an input value "arg" + * in the given state. check() needs to be called twice (with the results of + * each or'd together) to check a complex result. "act" is forced positive + * so that printing it with %e does not include a sign. The actual sign is + * returned as part of the return value. + * + * Returns a variety of information as a bit pattern: + * 00000007 - Value mismatch bits - L/D/F + * 00000070 - Sign (0 == -ve) of the real L/D/F actual results + * 00000700 - Sign (0 == -ve) of the imaginary L/D/F actual results + * 00077000 - Pairs of bits (LLDDFF) indicating sign to be printed for the expected real result + * 07700000 - Pairs of bits (LLDDFF) indicating sign to be printed for the expected imaginary result + * For the latter two, bitpairs are an index into thu string "??+-" + */ +int +check(const fpblock *arg, int ix, fpblock *act, const fpblock *exx, int state) +{ + int sf, sd, sl; + int asign, xsign; + + asign = (act->f.a[ix].bits.sign << 3) | + (act->d.a[ix].bits.sign << 4) | + (act->l.a[ix].bits.sign << 5); + if (ix) + asign <<= 3; + + /* Special case NaN */ + if (state == S_NAN) { + return ((isnan(act->f.a[ix].f) ? 0 : 1) | + (isnan(act->d.a[ix].f) ? 0 : 2) | + (isnan(act->l.a[ix].f) ? 0 : 4) | + asign); + } + + switch (state & S_MASK) { + default: + sf = sd = sl = 0; + break; + + case S_SSIN2X: + sf = signbit(sinf(arg->f.a[0].f * 2.0f)); + sd = signbit(sin(arg->d.a[0].f * 2.0)); + sl = signbit(sinl(arg->l.a[0].f * 2.0l)); + break; + + case S_SSINX: + sf = signbit(sinf(arg->f.a[0].f)); + sd = signbit(sin(arg->d.a[0].f)); + sl = signbit(sinl(arg->l.a[0].f)); + break; + + case S_SSIN2Y: + sf = signbit(sinf(arg->f.a[1].f * 2.0f)); + sd = signbit(sin(arg->d.a[1].f * 2.0)); + sl = signbit(sinl(arg->l.a[1].f * 2.0l)); + break; + + case S_SSINY: + sf = signbit(sinf(arg->f.a[1].f)); + sd = signbit(sin(arg->d.a[1].f)); + sl = signbit(sinl(arg->l.a[1].f)); + break; + + case S_SCOSX: + sf = signbit(cosf(arg->f.a[0].f)); + sd = signbit(cos(arg->d.a[0].f)); + sl = signbit(cosl(arg->l.a[0].f)); + break; + + case S_SCOSY: + sf = signbit(cosf(arg->f.a[1].f)); + sd = signbit(cos(arg->d.a[1].f)); + sl = signbit(cosl(arg->l.a[1].f)); + break; + } + + /* Ignore sign bit if we don't care */ + if (state & S_NEG) { + act->f.a[ix].bits.sign = 0; + act->d.a[ix].bits.sign = 0; + act->l.a[ix].bits.sign = 0; + xsign = 0; + } else { + /* + * s{f,d,l} indicates whether the signbit in the expected value should be + * inverted before comparison. To avoid altering it, flip the "actual" + * bit instead. The original signs are safely stored in asign. + */ + if (sf) + act->f.a[ix].bits.sign = ~act->f.a[ix].bits.sign; + if (sd) + act->d.a[ix].bits.sign = ~act->d.a[ix].bits.sign; + if (sl) + act->l.a[ix].bits.sign = ~act->l.a[ix].bits.sign; + + /* Calculate the sign to be displayed for the expected result */ + xsign = 00052000 | + ((!!sf ^ exx->f.a[ix].bits.sign) << 9) | + ((!!sd ^ exx->d.a[ix].bits.sign) << 11) | + ((!!sl ^ exx->l.a[ix].bits.sign) << 13); + if (ix) + xsign <<= 6; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Jun 17 08:53:55 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EA0A6351; Mon, 17 Jun 2013 08:53:55 +0000 (UTC) (envelope-from peterj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DCAC5147F; Mon, 17 Jun 2013 08:53:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5H8rtTB003893; Mon, 17 Jun 2013 08:53:55 GMT (envelope-from peterj@svn.freebsd.org) Received: (from peterj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5H8rtWp003891; Mon, 17 Jun 2013 08:53:55 GMT (envelope-from peterj@svn.freebsd.org) Message-Id: <201306170853.r5H8rtWp003891@svn.freebsd.org> From: Peter Jeremy Date: Mon, 17 Jun 2013 08:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251836 - user/peterj X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 08:53:56 -0000 Author: peterj Date: Mon Jun 17 08:53:55 2013 New Revision: 251836 URL: http://svnweb.freebsd.org/changeset/base/251836 Log: Initial work-in-progress commit of a cpow(3) implementation. This implements a subset of the desired special cases and then punts to the fallback: cpow(z, w) => cexp(w * clog(z)) Added: user/peterj/cpow.c (contents, props changed) Modified: user/peterj/README Modified: user/peterj/README ============================================================================== --- user/peterj/README Mon Jun 17 08:49:08 2013 (r251835) +++ user/peterj/README Mon Jun 17 08:53:55 2013 (r251836) @@ -1,6 +1,6 @@ My odds & ends +cpow.c Complex pow() implementation. This is a work-in-progress. + ctest.c test libm exception conditions listed in WG14/N1256 G.6 against a set of float, double and long double functions - -$FreeBSD$ Added: user/peterj/cpow.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/peterj/cpow.c Mon Jun 17 08:53:55 2013 (r251836) @@ -0,0 +1,240 @@ +/*- + * Copyright (c) 2012 Peter Jeremy + * 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 "math_private.h" + +/* + * Raise a complex number to a complex power. + * + * Algorithmetically: + * cpow(z, w) = z ** w = cexp(w * clog(z)) + * cpow(rz + I*iz, rw + I*iw) = cexp((rw + I*iw) * clog(rz + I*iz)) + * Let: rad = hypot(rz, iz) + * th = atan2(iz, rz) + * clog(rz + I*iz) = log(hypot(rz, iz)) + I*atan2(iz, rz) + * = log(rad) + I*th + * then: + * cpow(rz + I*iz, rw + I*iw) = cexp((rw + I*iw) * (log(rad) + I*th)) + * = cexp((rw*log(rad) - iw*th) + I*(rw*th + iw*log(rad))) + * = exp(rw*log(rad)) / exp(iw*th) * cis(rw*th + iw*log(rad)) + * = pow(rad, rw) / exp(iw*th) * cis(rw*th + iw*log(rad)) + * + * cexp(x + I*y) = exp(x) * cis(y) + * clog(x + I*y) = log(hypot(x, y)) + I*atan2(y, x) + * + * Special cases: + * iw = 0: + * = pow(rad, rw) * cis(rw*th) + * rw = 0 + * + * There are no special exceptions defined for cpow(), instead implementations + * raise exceptions as appropriate for the calculations. WG14/N1256 explicitly + * allows implementations to return cexp(y * clog(x)) but this loses precision + * roughly equal to the number of bits in the floating point type's exponent. + * + * Special cases & exceptions: + * 'int' integer + * 'rat' rational + * 'odd' odd integer + * 'ANY' includes NaN + * z.r z.i w.r w.i + * ±0 0 odd<0 0 ±Inf + I*0, Div0 [F.9.4.4] + * ±0 0 <0,!odd 0 +Inf + I*0, Div0 [F.9.4.4] + * ±0 0 odd>0 0 ±0 + I*0 [F.9.4.4] + * ±0 0 >0,!odd 0 +0 + I*0 [F.9.4.4] + * -1 0 ±Inf 0 +1 + I*0 [F.9.4.4] # + * +1 0 ANY ANY +1 + I*0 [F.9.4.4] # + * ANY ANY ±0 0 +1 + I*0 [F.9.4.4]+ + * <0 0 !int 0 NaN + I*0, Invalid [F.9.4.4]* + * |z|<1 -Inf 0 +Inf + I*0 [F.9.4.4]+ # + * |z|>1 -Inf 0 +0 + I*0 [F.9.4.4]+ # + * |z|<1 +Inf 0 +0 + I*0 [F.9.4.4]+ # + * |z|>1 +Inf 0 +Inf + I*0 [F.9.4.4]+ # + * -Inf 0 odd<0 0 -0 + I*0 [F.9.4.4] + * -Inf 0 <0,!odd 0 +0 + I*0 [F.9.4.4] + * -Inf 0 odd>0 0 -Inf + I*0 [F.9.4.4] + * -Inf 0 >0,!odd 0 +Inf + I*0 [F.9.4.4] + * +Inf 0 <0 0 +0 + I*0 [F.9.4.4] + * +Inf 0 >0 0 +Inf + I*0 [F.9.4.4] + * ? ? x Inf NaN + I*NaN, Invalid [G.6.3.1] + * ? ? x NaN NaN + I*NaN, optInvalid [G.6.3.1] + * + * Special cases (evaluated in order): + * 0. +1 ** (anything) is 1 + * 1. (anything) ** 0 is 1 + * 2. (anything) ** 1 is itself + * 3. (anything) ** NAN is NAN + * 4. NAN ** (anything except 0) is NAN + * 5. (|x| > 1) ** +INF is +INF + * 6. (|x| > 1) ** -INF is +0 + * 7. (|x| < 1) ** +INF is +0 + * 8. (|x| < 1) ** -INF is +INF + * 9. (|x| == 1) ** +-INF is NAN +#* 10. +0 ** (+anything except 0, NAN) is +0 +#* 11. -0 ** (+anything except 0, NAN, odd integer) is +0 +#* 12. +0 ** (-anything except 0, NAN) is +INF +#* 13. -0 ** (-anything except 0, NAN, odd integer) is +INF +#* 14. -0 ** (odd integer) = -( +0 ** (odd integer) ) +#* 15. +INF ** (+anything except 0,NAN) is +INF +#* 16. +INF ** (-anything except 0,NAN) is +0 +#* 17. -INF ** (anything) = -0 ** (-anything) +#* 18. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer) +#* 19. (-anything except 0 and inf) ** (non-integer) is NAN +^ '#' means it's not implemented yet + * + */ +double complex +cpow(double complex z, double complex w) +{ + double iw, iz, rw, rz; /* Imaginary & real parts of parameters */ + int32_t hiw, hiz, hrw, hrz; /* high words of imag & real parts */ + int32_t liw, liz, lrw, lrz; /* low words of imag & real parts */ + int32_t miw, miz, mrw, mrz; /* masked high words */ + double rad, th; /* z in polar form */ + double t1; + int32_t hrad, lrad; /* breakdown of rad */ + int32_t j, k, wisint; + + rw = creal(w); + iw = cimag(w); + EXTRACT_WORDS(hrw, lrw, rw); + EXTRACT_WORDS(hiw, liw, iw); + mrw = 0x7fffffff & hrw; + miw = 0x7fffffff & hiw; + + rz = creal(z); + iz = cimag(z); + EXTRACT_WORDS(hrz, lrz, rz); + EXTRACT_WORDS(hiz, liz, iz); + mrz = 0x7fffffff & hrz; + miz = 0x7fffffff & hiz; + + /* +1 ±I*0 ** ANY is +1 +I*0 */ + if (((hrz - 0x3ff00000) | lrz | miz | liz) == 0) + return(cpack(1.0, 0.0)); + + if ((miw | liw) == 0) { /* w is real */ + /* (anything) ** 0 is +1 */ + if ((mrw | lrw) == 0) + return (cpack(1.0, 0.0)); + + /* (anything) ** +1 is itself */ + if (((hrw - 0x3ff00000) | lrw) == 0) + return (z); + + /* Use csqrt() for (anything) ** +0.5 */ + if (((hrw - 0x3fe00000) | lrw) == 0) + return (csqrt(z)); + + /* Use pow() for (positive real) ** real */ + if (hrz >= 0 && (miz | liz) == 0) + return (cpack(pow(rz, rw), 0.0)); + + rad = cabs(z); /*### can be Inf even though z is finite */ + EXTRACT_WORDS(hrad, lrad, rad); + + /* NAN ** (anything except 0) is NAN */ + if (hrad > 0x7ff00000 || (hrad == 0x7ff00000 && lrad != 0)) + return (cpack(rad, rad)); + + if (((mrw - 0x7ff00000) | lrw) == 0) { /* Inf */ + /* (Anything != +1 on the unit circle) ** Inf is NaN */ + if (((hrad - 0x3ff00000) | lrad) == 0) /* 1 */ + return (cpack(NAN, NAN)); + + /* + * (Anything inside the unit circle) ** -Inf is +Inf. + * (Anything outside the unit circle) ** +Inf is +Inf. + */ + if ((hrad < 0x3ff00000) == (hrw < 0)) + return (cpack(INFINITY, 0.0)); + + /* + * Anything inside the unit circle ** +Inf is +0. + * Anything outside the unit circle ** -Inf is +0. + */ + return (cpack(0.0, 0.0)); + } + + /* (anything) ** NaN is NaN */ + if (mrw >= 0x7ff00000) + return (cpack(rz + rw, iz + rw)); + + /* + * At this point, the exponent is a real, finite number + * and the base is a, possibly infinite, number, excluding + * positive reals. + */ + + /* Determine if the exponent is an odd integer: + * wisint = 0 ... w is not an integer + * wisint = 1 ... w is an odd int + * wisint = 2 ... w is an even int + */ + wisint = 0; + if (mrw >= 0x43400000) /* must be even integer */ + wisint = 2; + else if (mrw >= 0x3ff00000) { + k = (mrw >> 20) - 0x3ff; /* exponent */ + if (k > 20) { + j = lrw >> (52 - k); + if ((j << (52 - k)) == lrw) + wisint = 2 - (j & 1); + } else if (lrw == 0) { + j = mrw >> (20 - k); + if ((j << (20 - k)) == mrw) + wisint = 2 - (j & 1); + } + } + + /*###### Special case w is a small integer */ + + /*######*/ + rad = pow(rad, rw); + th = atan2(iz, rz) * rw; + return (cpack(rad * cos(th), rad * sin(th))); + } + + /* w is not pure real */ + + rad = cabs(z); /*### can be Inf even though z is finite */ + EXTRACT_WORDS(hrad, lrad, rad); + + /* NAN ** (anything except 0) is NAN */ + if (hrad > 0x7ff00000 || (hrad == 0x7ff00000 && lrad == 0)) + return (cpack(rad, rad)); + + /*######*/ + th = atan2(iz, rz); + t1 = rw * th + iw * log(rad); + rad = pow(rad, rw) / exp(iw * th); + return (cpack(rad * cos(t1), rad * sin(t1))); +} From owner-svn-src-user@FreeBSD.ORG Mon Jun 17 21:36:29 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B4E47FD4; Mon, 17 Jun 2013 21:36:29 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A7CF51152; Mon, 17 Jun 2013 21:36:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5HLaTkZ051653; Mon, 17 Jun 2013 21:36:29 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5HLaTgb051652; Mon, 17 Jun 2013 21:36:29 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201306172136.r5HLaTgb051652@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 17 Jun 2013 21:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251870 - user/des/tinderbox X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 21:36:29 -0000 Author: des Date: Mon Jun 17 21:36:29 2013 New Revision: 251870 URL: http://svnweb.freebsd.org/changeset/base/251870 Log: Ignore ignored errors. Modified: user/des/tinderbox/tbmaster.pl Modified: user/des/tinderbox/tbmaster.pl ============================================================================== --- user/des/tinderbox/tbmaster.pl Mon Jun 17 21:30:46 2013 (r251869) +++ user/des/tinderbox/tbmaster.pl Mon Jun 17 21:36:29 2013 (r251870) @@ -382,7 +382,8 @@ sub tinderbox($$$) { @lines = (); next; } - if (/^\*\*\*( \[.*?\])? (Error code|Stopped|Signal)/) { + if (/^\*\*\*( \[.*?\])? (Error code|Stopped|Signal)/ && + !/\(ignored\)/) { $error = 1; } if (@lines > $BACKLOG && !$error) { From owner-svn-src-user@FreeBSD.ORG Tue Jun 18 15:15:55 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3F4A6D95; Tue, 18 Jun 2013 15:15:55 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2E917105B; Tue, 18 Jun 2013 15:15:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5IFFtAI000637; Tue, 18 Jun 2013 15:15:55 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5IFFsFQ000631; Tue, 18 Jun 2013 15:15:54 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306181515.r5IFFsFQ000631@svn.freebsd.org> From: Attilio Rao Date: Tue, 18 Jun 2013 15:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251948 - in user/attilio/vmcontention: . contrib/apr contrib/apr-util contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/po contrib/dialog/samples contr... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 15:15:55 -0000 Author: attilio Date: Tue Jun 18 15:15:53 2013 New Revision: 251948 URL: http://svnweb.freebsd.org/changeset/base/251948 Log: MFC Added: user/attilio/vmcontention/contrib/apr/ - copied from r251946, head/contrib/apr/ user/attilio/vmcontention/contrib/apr-util/ - copied from r251946, head/contrib/apr-util/ user/attilio/vmcontention/contrib/dialog/buildlist.c - copied unchanged from r251946, head/contrib/dialog/buildlist.c user/attilio/vmcontention/contrib/dialog/po/an.po - copied unchanged from r251946, head/contrib/dialog/po/an.po user/attilio/vmcontention/contrib/dialog/po/ia.po - copied unchanged from r251946, head/contrib/dialog/po/ia.po user/attilio/vmcontention/contrib/dialog/rangebox.c - copied unchanged from r251946, head/contrib/dialog/rangebox.c user/attilio/vmcontention/contrib/dialog/samples/buildlist - copied unchanged from r251946, head/contrib/dialog/samples/buildlist user/attilio/vmcontention/contrib/dialog/samples/buildlist2 - copied unchanged from r251946, head/contrib/dialog/samples/buildlist2 user/attilio/vmcontention/contrib/dialog/samples/checklist12 - copied unchanged from r251946, head/contrib/dialog/samples/checklist12 user/attilio/vmcontention/contrib/dialog/samples/dft-cancel - copied unchanged from r251946, head/contrib/dialog/samples/dft-cancel user/attilio/vmcontention/contrib/dialog/samples/dft-extra - copied unchanged from r251946, head/contrib/dialog/samples/dft-extra user/attilio/vmcontention/contrib/dialog/samples/dft-help - copied unchanged from r251946, head/contrib/dialog/samples/dft-help user/attilio/vmcontention/contrib/dialog/samples/dft-no - copied unchanged from r251946, head/contrib/dialog/samples/dft-no user/attilio/vmcontention/contrib/dialog/samples/fselect0 - copied unchanged from r251946, head/contrib/dialog/samples/fselect0 user/attilio/vmcontention/contrib/dialog/samples/menubox12 - copied unchanged from r251946, head/contrib/dialog/samples/menubox12 user/attilio/vmcontention/contrib/dialog/samples/rangebox - copied unchanged from r251946, head/contrib/dialog/samples/rangebox user/attilio/vmcontention/contrib/dialog/samples/rangebox2 - copied unchanged from r251946, head/contrib/dialog/samples/rangebox2 user/attilio/vmcontention/contrib/dialog/samples/rangebox3 - copied unchanged from r251946, head/contrib/dialog/samples/rangebox3 user/attilio/vmcontention/contrib/dialog/samples/rangebox4 - copied unchanged from r251946, head/contrib/dialog/samples/rangebox4 user/attilio/vmcontention/contrib/dialog/samples/treeview - copied unchanged from r251946, head/contrib/dialog/samples/treeview user/attilio/vmcontention/contrib/dialog/samples/treeview2 - copied unchanged from r251946, head/contrib/dialog/samples/treeview2 user/attilio/vmcontention/contrib/dialog/samples/with-dquotes - copied unchanged from r251946, head/contrib/dialog/samples/with-dquotes user/attilio/vmcontention/contrib/dialog/samples/with-squotes - copied unchanged from r251946, head/contrib/dialog/samples/with-squotes user/attilio/vmcontention/contrib/dialog/treeview.c - copied unchanged from r251946, head/contrib/dialog/treeview.c user/attilio/vmcontention/contrib/serf/ - copied from r251946, head/contrib/serf/ user/attilio/vmcontention/contrib/sqlite3/ - copied from r251946, head/contrib/sqlite3/ user/attilio/vmcontention/contrib/subversion/ - copied from r251946, head/contrib/subversion/ user/attilio/vmcontention/sys/cam/cam_compat.c - copied unchanged from r251946, head/sys/cam/cam_compat.c user/attilio/vmcontention/sys/cam/cam_compat.h - copied unchanged from r251946, head/sys/cam/cam_compat.h user/attilio/vmcontention/usr.bin/svn/ - copied from r251946, head/usr.bin/svn/ Deleted: user/attilio/vmcontention/contrib/dialog/samples/copifuncs/admin.funcs user/attilio/vmcontention/contrib/dialog/samples/copifuncs/common.funcs user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.funcs user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifman1 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifman2 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifmcfg2 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifmcfg4 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifmcfg5 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifpoll1 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifpoll2 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifreq1 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifreq2 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.rcnews user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.sendifm1 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.sendifm2 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.trnrc user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.wheel user/attilio/vmcontention/contrib/dialog/samples/copifuncs/ifpatch user/attilio/vmcontention/contrib/dialog/samples/copismall user/attilio/vmcontention/contrib/dialog/samples/dselect user/attilio/vmcontention/contrib/dialog/samples/install/FDISK.TEST user/attilio/vmcontention/contrib/dialog/samples/install/makefile.in user/attilio/vmcontention/contrib/dialog/samples/install/setup.c user/attilio/vmcontention/contrib/dialog/samples/install/setup.help user/attilio/vmcontention/contrib/dialog/samples/valgrind.log user/attilio/vmcontention/gnu/usr.bin/gdb/libgdb/frame-unwind.diff user/attilio/vmcontention/share/man/man9/vfs_mount.9 Modified: user/attilio/vmcontention/ObsoleteFiles.inc user/attilio/vmcontention/UPDATING user/attilio/vmcontention/contrib/dialog/CHANGES user/attilio/vmcontention/contrib/dialog/VERSION user/attilio/vmcontention/contrib/dialog/aclocal.m4 user/attilio/vmcontention/contrib/dialog/argv.c user/attilio/vmcontention/contrib/dialog/arrows.c user/attilio/vmcontention/contrib/dialog/buttons.c user/attilio/vmcontention/contrib/dialog/calendar.c user/attilio/vmcontention/contrib/dialog/checklist.c user/attilio/vmcontention/contrib/dialog/columns.c user/attilio/vmcontention/contrib/dialog/config.guess user/attilio/vmcontention/contrib/dialog/config.sub user/attilio/vmcontention/contrib/dialog/configure user/attilio/vmcontention/contrib/dialog/configure.in user/attilio/vmcontention/contrib/dialog/dialog-config.in user/attilio/vmcontention/contrib/dialog/dialog.1 user/attilio/vmcontention/contrib/dialog/dialog.3 user/attilio/vmcontention/contrib/dialog/dialog.c user/attilio/vmcontention/contrib/dialog/dialog.h user/attilio/vmcontention/contrib/dialog/dlg_colors.h user/attilio/vmcontention/contrib/dialog/dlg_keys.c user/attilio/vmcontention/contrib/dialog/dlg_keys.h user/attilio/vmcontention/contrib/dialog/editbox.c user/attilio/vmcontention/contrib/dialog/formbox.c user/attilio/vmcontention/contrib/dialog/fselect.c user/attilio/vmcontention/contrib/dialog/guage.c user/attilio/vmcontention/contrib/dialog/headers-sh.in user/attilio/vmcontention/contrib/dialog/help.c user/attilio/vmcontention/contrib/dialog/inputbox.c user/attilio/vmcontention/contrib/dialog/inputstr.c user/attilio/vmcontention/contrib/dialog/makefile.in user/attilio/vmcontention/contrib/dialog/menubox.c user/attilio/vmcontention/contrib/dialog/mixedform.c user/attilio/vmcontention/contrib/dialog/mixedgauge.c user/attilio/vmcontention/contrib/dialog/mouse.c user/attilio/vmcontention/contrib/dialog/mousewget.c user/attilio/vmcontention/contrib/dialog/msgbox.c user/attilio/vmcontention/contrib/dialog/package/debian/changelog user/attilio/vmcontention/contrib/dialog/package/dialog.spec user/attilio/vmcontention/contrib/dialog/pause.c user/attilio/vmcontention/contrib/dialog/po/cs.po user/attilio/vmcontention/contrib/dialog/po/el.po user/attilio/vmcontention/contrib/dialog/po/gl.po user/attilio/vmcontention/contrib/dialog/po/hr.po user/attilio/vmcontention/contrib/dialog/po/sr.po user/attilio/vmcontention/contrib/dialog/po/zh_TW.po user/attilio/vmcontention/contrib/dialog/prgbox.c user/attilio/vmcontention/contrib/dialog/progressbox.c user/attilio/vmcontention/contrib/dialog/rc.c user/attilio/vmcontention/contrib/dialog/rename.sh user/attilio/vmcontention/contrib/dialog/samples/README user/attilio/vmcontention/contrib/dialog/samples/debian.rc user/attilio/vmcontention/contrib/dialog/samples/dialog.py user/attilio/vmcontention/contrib/dialog/samples/form1 user/attilio/vmcontention/contrib/dialog/samples/inputmenu user/attilio/vmcontention/contrib/dialog/samples/inputmenu-stdout user/attilio/vmcontention/contrib/dialog/samples/inputmenu1 user/attilio/vmcontention/contrib/dialog/samples/inputmenu2 user/attilio/vmcontention/contrib/dialog/samples/inputmenu3 user/attilio/vmcontention/contrib/dialog/samples/inputmenu4 user/attilio/vmcontention/contrib/dialog/samples/killall user/attilio/vmcontention/contrib/dialog/samples/prgbox user/attilio/vmcontention/contrib/dialog/samples/prgbox2 user/attilio/vmcontention/contrib/dialog/samples/report-button user/attilio/vmcontention/contrib/dialog/samples/report-edit user/attilio/vmcontention/contrib/dialog/samples/report-string user/attilio/vmcontention/contrib/dialog/samples/report-tempfile user/attilio/vmcontention/contrib/dialog/samples/report-yesno user/attilio/vmcontention/contrib/dialog/samples/setup-edit user/attilio/vmcontention/contrib/dialog/samples/setup-tempfile user/attilio/vmcontention/contrib/dialog/samples/setup-utf8 user/attilio/vmcontention/contrib/dialog/samples/setup-vars user/attilio/vmcontention/contrib/dialog/samples/slackware.rc user/attilio/vmcontention/contrib/dialog/samples/sourcemage.rc user/attilio/vmcontention/contrib/dialog/samples/suse.rc user/attilio/vmcontention/contrib/dialog/samples/tailboxbg user/attilio/vmcontention/contrib/dialog/samples/tailboxbg1 user/attilio/vmcontention/contrib/dialog/samples/tailboxbg2 user/attilio/vmcontention/contrib/dialog/samples/testdata-8bit user/attilio/vmcontention/contrib/dialog/samples/wheel user/attilio/vmcontention/contrib/dialog/samples/whiptail.rc user/attilio/vmcontention/contrib/dialog/tailbox.c user/attilio/vmcontention/contrib/dialog/textbox.c user/attilio/vmcontention/contrib/dialog/timebox.c user/attilio/vmcontention/contrib/dialog/trace.c user/attilio/vmcontention/contrib/dialog/ui_getc.c user/attilio/vmcontention/contrib/dialog/util.c user/attilio/vmcontention/contrib/dialog/yesno.c user/attilio/vmcontention/contrib/gdb/gdb/dwarf2read.c user/attilio/vmcontention/contrib/gdb/gdb/frame-unwind.c user/attilio/vmcontention/contrib/wpa/src/utils/base64.h user/attilio/vmcontention/etc/rc.d/ntpdate user/attilio/vmcontention/gnu/lib/libdialog/Makefile user/attilio/vmcontention/gnu/lib/libdialog/dlg_config.h user/attilio/vmcontention/gnu/lib/libsupc++/Version.map user/attilio/vmcontention/gnu/usr.bin/dialog/Makefile user/attilio/vmcontention/gnu/usr.bin/gdb/libgdb/Makefile user/attilio/vmcontention/lib/libmemstat/memstat_uma.c user/attilio/vmcontention/release/release.sh user/attilio/vmcontention/share/man/man3/queue.3 user/attilio/vmcontention/share/man/man5/src.conf.5 user/attilio/vmcontention/share/man/man9/Makefile user/attilio/vmcontention/share/man/man9/kernel_mount.9 user/attilio/vmcontention/share/man/man9/vfsconf.9 user/attilio/vmcontention/share/misc/committers-ports.dot user/attilio/vmcontention/share/mk/bsd.lib.mk user/attilio/vmcontention/share/mk/bsd.own.mk user/attilio/vmcontention/sys/cam/cam_ccb.h user/attilio/vmcontention/sys/cam/cam_xpt.c user/attilio/vmcontention/sys/cam/scsi/scsi_pass.c user/attilio/vmcontention/sys/conf/files user/attilio/vmcontention/sys/dev/age/if_age.c user/attilio/vmcontention/sys/dev/ata/chipsets/ata-acerlabs.c user/attilio/vmcontention/sys/dev/puc/puc_bfe.h user/attilio/vmcontention/sys/dev/puc/puc_cfg.h user/attilio/vmcontention/sys/dev/vxge/vxge.h user/attilio/vmcontention/sys/dev/xen/blkfront/blkfront.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_alloc.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_balloc.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_bmap.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_dinode.h user/attilio/vmcontention/sys/fs/ext2fs/ext2fs.h user/attilio/vmcontention/sys/fs/ext2fs/fs.h user/attilio/vmcontention/sys/fs/ext2fs/inode.h user/attilio/vmcontention/sys/i386/include/xen/xenvar.h user/attilio/vmcontention/sys/i386/xen/xen_machdep.c user/attilio/vmcontention/sys/kern/kern_alq.c user/attilio/vmcontention/sys/modules/cam/Makefile user/attilio/vmcontention/sys/modules/linux/Makefile user/attilio/vmcontention/sys/net/if_lagg.c user/attilio/vmcontention/sys/powerpc/powerpc/busdma_machdep.c user/attilio/vmcontention/sys/sys/queue.h user/attilio/vmcontention/sys/sys/time.h user/attilio/vmcontention/sys/vm/uma.h user/attilio/vmcontention/sys/vm/uma_core.c user/attilio/vmcontention/sys/vm/uma_int.h user/attilio/vmcontention/sys/vm/vm_map.c user/attilio/vmcontention/sys/x86/x86/busdma_machdep.c user/attilio/vmcontention/sys/xen/evtchn/evtchn.c user/attilio/vmcontention/sys/xen/interface/foreign/structs.py user/attilio/vmcontention/tools/regression/lib/libc/nss/test-getaddr.c user/attilio/vmcontention/tools/regression/lib/libc/nss/test-getgr.c user/attilio/vmcontention/tools/regression/lib/libc/nss/test-gethostby.c user/attilio/vmcontention/tools/regression/lib/libc/nss/test-getproto.c user/attilio/vmcontention/tools/regression/lib/libc/nss/test-getpw.c user/attilio/vmcontention/tools/regression/lib/libc/nss/test-getrpc.c user/attilio/vmcontention/tools/regression/lib/libc/nss/test-getusershell.c user/attilio/vmcontention/tools/regression/lib/libc/nss/testutil.h user/attilio/vmcontention/usr.bin/Makefile user/attilio/vmcontention/usr.bin/calendar/calendars/calendar.freebsd user/attilio/vmcontention/usr.bin/csup/updater.h user/attilio/vmcontention/usr.bin/dtc/checking.cc user/attilio/vmcontention/usr.bin/dtc/dtc.1 user/attilio/vmcontention/usr.bin/sort/vsort.h user/attilio/vmcontention/usr.sbin/bsdconfig/console/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/console/console user/attilio/vmcontention/usr.sbin/bsdconfig/console/font user/attilio/vmcontention/usr.sbin/bsdconfig/console/include/messages.subr user/attilio/vmcontention/usr.sbin/bsdconfig/console/keymap user/attilio/vmcontention/usr.sbin/bsdconfig/console/repeat user/attilio/vmcontention/usr.sbin/bsdconfig/console/saver user/attilio/vmcontention/usr.sbin/bsdconfig/console/screenmap user/attilio/vmcontention/usr.sbin/bsdconfig/console/ttys user/attilio/vmcontention/usr.sbin/bsdconfig/diskmgmt/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/diskmgmt/diskmgmt user/attilio/vmcontention/usr.sbin/bsdconfig/docsinstall/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/dot/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/dot/dot user/attilio/vmcontention/usr.sbin/bsdconfig/examples/bsdconfigrc user/attilio/vmcontention/usr.sbin/bsdconfig/mouse/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/mouse/disable user/attilio/vmcontention/usr.sbin/bsdconfig/mouse/include/messages.subr user/attilio/vmcontention/usr.sbin/bsdconfig/mouse/mouse user/attilio/vmcontention/usr.sbin/bsdconfig/mouse/port user/attilio/vmcontention/usr.sbin/bsdconfig/mouse/type user/attilio/vmcontention/usr.sbin/bsdconfig/networking/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/networking/devices user/attilio/vmcontention/usr.sbin/bsdconfig/networking/include/messages.subr user/attilio/vmcontention/usr.sbin/bsdconfig/networking/networking user/attilio/vmcontention/usr.sbin/bsdconfig/packages/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/packages/packages user/attilio/vmcontention/usr.sbin/bsdconfig/password/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/security/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/security/kern_securelevel user/attilio/vmcontention/usr.sbin/bsdconfig/security/security user/attilio/vmcontention/usr.sbin/bsdconfig/share/dialog.subr user/attilio/vmcontention/usr.sbin/bsdconfig/startup/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/timezone/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/ttys/INDEX user/attilio/vmcontention/usr.sbin/bsdconfig/usermgmt/INDEX user/attilio/vmcontention/usr.sbin/bsdinstall/partedit/diskeditor.c Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/contrib/dialog/ (props changed) user/attilio/vmcontention/contrib/gdb/ (props changed) user/attilio/vmcontention/contrib/wpa/ (props changed) user/attilio/vmcontention/gnu/lib/ (props changed) user/attilio/vmcontention/gnu/usr.bin/gdb/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/usr.bin/calendar/ (props changed) user/attilio/vmcontention/usr.bin/csup/ (props changed) Modified: user/attilio/vmcontention/ObsoleteFiles.inc ============================================================================== --- user/attilio/vmcontention/ObsoleteFiles.inc Tue Jun 18 15:14:20 2013 (r251947) +++ user/attilio/vmcontention/ObsoleteFiles.inc Tue Jun 18 15:15:53 2013 (r251948) @@ -38,9 +38,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20130616: vfs_mounted.9 removed +OLD_FILES+=usr/share/man/man9/vfs_mount.9.gz # 20130614: remove CVS from base OLD_FILES+=usr/bin/cvs OLD_FILES+=usr/bin/cvsbug +OLD_FILES+=usr/share/doc/psd/28.cvs/paper.ascii.gz +OLD_DIRS+=usr/share/doc/psd/28.cvs OLD_FILES+=usr/share/examples/cvs/contrib/README OLD_FILES+=usr/share/examples/cvs/contrib/clmerge OLD_FILES+=usr/share/examples/cvs/contrib/cln_hist @@ -60,11 +64,16 @@ OLD_FILES+=usr/share/examples/cvs/contri OLD_FILES+=usr/share/examples/cvs/contrib/rcs2log OLD_FILES+=usr/share/examples/cvs/contrib/rcslock OLD_FILES+=usr/share/examples/cvs/contrib/sccs2rcs +OLD_DIRS+=usr/share/examples/cvs/contrib +OLD_DIRS+=usr/share/examples/cvs OLD_FILES+=usr/share/info/cvs.info.gz OLD_FILES+=usr/share/info/cvsclient.info.gz OLD_FILES+=usr/share/man/man1/cvs.1.gz OLD_FILES+=usr/share/man/man5/cvs.5.gz OLD_FILES+=usr/share/man/man8/cvsbug.8.gz +# 20130607: WITH_DEBUG_FILES added +OLD_FILES+=lib/libufs.so.6.symbols +OLD_FILES+=usr/lib32/libufs.so.6.symbols # 20130417: nfs fha moved from nfsserver to nfs OLD_FILES+=usr/include/nfsserver/nfs_fha.h # 20130411: new clang import which bumps version from 3.2 to 3.3. Modified: user/attilio/vmcontention/UPDATING ============================================================================== --- user/attilio/vmcontention/UPDATING Tue Jun 18 15:14:20 2013 (r251947) +++ user/attilio/vmcontention/UPDATING Tue Jun 18 15:15:53 2013 (r251948) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130618: + Fix a bug that allowed a tracing process (e.g. gdb) to write + to a memory-mapped file in the traced process's address space + even if neither the traced process nor the tracing process had + write access to that file. + 20130615: CVS has been removed from the base system. An exact copy of the code is available from the devel/cvs port. Modified: user/attilio/vmcontention/contrib/dialog/CHANGES ============================================================================== --- user/attilio/vmcontention/contrib/dialog/CHANGES Tue Jun 18 15:14:20 2013 (r251947) +++ user/attilio/vmcontention/contrib/dialog/CHANGES Tue Jun 18 15:15:53 2013 (r251948) @@ -1,9 +1,229 @@ --- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $ +-- $Id: CHANGES,v 1.458 2013/05/24 00:23:22 tom Exp $ -- Thomas E. Dickey This version of dialog was originally from a Debian snapshot. I've done this to it: +2013/05/23 + + modify ifdef in arrows.c to work around packages which use the + wide-character ncursesw headers with the ncurses library (report + by Aleksey Cheusov). + + correct workaround for xterm alternate-screen to work with/without + the fix made in ncurses that makes putp() always write to the + standard output (Debian #708829). + + improve limit-checks for checklist, in case the dialog is resized + (report by Ilya A Arkhipov). + + add --last-key option (adapted from patch by Jordi Pujol, Debian + #697607). + +2013/03/15 + + update zh_TW.po, add an.po from + http://translationproject.org/latest/dialog/ + +2012/12/30 - release 1.2 + + improve some older changelog entries to help with HTML'izing content. + + various fixes/improvments for scrollbar appearance. + + add mappings for some equivalent options provided by whiptail; + add configure option --disable-whiptail to allow suppressing these. + + add configure option --disable-Xdialog2 to allow suppressing the + newer features, i.e., for cdialog 1.2 + + add --no-items option, for consistency. + + add --no-tags option, like Xdialog. + + add buildlist, rangebox and treeview dialogs, like Xdialog. + + remove obsolete workaround for ncurses 4.2 scrolling in checklist + and menubox. + + improve dialog_helpfile() by preventing it from showing extra buttons + (suggested by xDog Walker). + + correct logic in formbox's scroll_next() function (report by xDog + Walker). + + fix a case with inputbox widget where preset input text is not shown + until moving the cursor within the text (report by xDog Walker). + + handle SIGCHLD in dialog_prgbox() to eliminate defunct processes + (report by xDog Walker). + + improve the way "hotkeys" are assigned to widget buttons by checking + if a given key has already been used in the row of buttons (Debian + #684933). + + amend fix for --trace parsing from 2012/07/03, which sometimes + skipped a parameter (report by xDog Walker). + + drop copismall and install files from samples, which were essentially + nonfunctional. + + correct secondary border colors in samples/slackware.rc and + samples/whiptail.rc + + update gl.po, add ia.po from + http://translationproject.org/latest/dialog/ + + fix various issues reported by coverity scan. + + miscellaneous configure script fixes/updates: + + require autoconf 2.52+patches + + support --datarootdir option + + check for clang compiler + + check for tinfo library when looking for ncurses + + add 3rd parameter to AC_DEFINE for autoheader + + remove unused macros from aclocal.m4 + + update config.guess, config.sub + +2012/07/06 + + modify samples/setup-tempfile to work with Tru64's shell. + + modify inputmenu sample scripts to make them more portable: + + use "id" rather than "$GROUPS", use sed to work with Solaris. + + use sed to split-up the rename results to work with HPUX. + + fix regression in msgbox (ArchLinux #30574) + +2012/07/03 + + modify prgbox widget to work with --extra-button, etc. + + add case values to several widgets to allow for mouse-clicks with + "--extra-button" and "--help-button" additions. + + correct timebox widget's exit code for "--extra-button" when handing + the "enter" key. + + modify msgbox widget to honor "--extra-button". + + corrected processing of "--trace" option, which did not update the + index into command-line to point past its value. + + add a check in dialog program for valid characters used in option, + e.g., to generate an error if a script attempts to add option value + using "=" rather than with whitespace. + + add new command-line option --default-button and library function + dlg_default_button() to retrieve the value set by the option + to provide a way to set the default button directly rather than + by combining --nook, etc. (patch by Zoltan Kelemen). + + amend include of unctrl.h to apply only to the case where curses.h + is included, to avoid conflict of ncurses' unctrl.h with a system + implementation (report by Martin Roedlach) + + add limit-check to dlg_toupper() in non-wide curses mode to work + when non-character values such as arrow-key codes are passed to + it (patch by Zoltan Kelemen). + + override timeout value, e.g., as set via --timeout command-line + option in pause widget because that interferes with pause's behavior + (report by Jan Spitalnik). + + modify samples/inputmenu* to allow ":" in renamed text (report by + Andreas Stoewing). + + modify double-quoting to make it more consistent, i.e., checklist + output is quoted only when needed. This fixes the case where + single-quotes were used whether or not needed, but also modifies + older checklist behavior for double-quoting which always added those + (Debian #663664). + + correct exit-code used in inputmenu for "rename" button (Debian + #673041, forwarded from Ubuntu #333909, patch by Lebedev Vadim). + + update el.po and hr.po from + http://translationproject.org/latest/dialog/ + + use checkbashisms to clean up sample scripts. + +2012/02/15 + + modify menubox.c to use the same improvement as in checklist.c + + improve auto width computation for checklist widget by using + dlg_calc_list_width as in the non-auto case (Edho Arief). + + eliminate some bashisms in the sample scripts (Pedro Giffuni). + + makefile fixes from FreeBSD ports (Li-Wen Hsu): + + make --with-package option of configure script work. + + get LIBTOOL_VERSION from configure script, needed by + ${LIBTOOL_VERSION} in LIBTOOL_CREATE (LIB_CREATE in configure and + aclocal.m4) + + update cs.po and sr.po from + http://translationproject.org/latest/dialog/ + + updated configure script macros, improving CF_XOPEN_SOURCE among + other fixes. + +2011/10/20 + + fix --analyze warnings for clang versions 2.8, 2.9. + + add configure check for lint program. + + add check in dlg_getc() in case its window is freed as a side effect + of removing callbacks. + + fix logic in freeing subwindows (report by xDog Walker). + + fix a regression in logic distinguishing between inputmenu and menu + widgets (report by xDog Walker). + + minor fixes to library manpage. + +2011/10/18 + + modify header-sh.in to work around limit on sed script length on + HPUX. + + add a special case of parameter parsing for "--trace" to the + initialization done before calling init_dialog(), to allow users to + capture the initial state of the parameter list before any options + are processed and removed. This is only done if "--trace" is the + first option, otherwise it is handled in the common options as before + (report by xDog Walker). + + modify samples/testdata-8bit, discarding $1 from the parameter list + if it was used, so that the source'ing scripts can consistently use + "$@" to insert parameters before the widget, e.g., as an alternative + to using $DIALOGOPTS (report by xDog Walker). + + modify treatment of function pointers in menubox.c, make + dlg_renamed_menutext() and dlg_dummy_menutext() visible to library + users (request by xDog Walker). + + add dlg_count_real_columns(), use to modify centering for "--hline" + text to account for "\Z"s (report by xDog Walker). + + improve check in dlg_draw_arrows2() for conflict between the window + title and up-arrow marker to take into account that the given window + may not be the top-level window of the widget. + + change width of page up/down mouse areas in fselect panes to use the + full width of the panes rather than only the portion from the left + margin to the up/down arrow. + + add/use dlg_draw_box2() and dlg_draw_bottom_box2() to use the + secondary borders. + + modify rc-file read/write to accept/generate color values that refer + to previously-processed items in the color table. This reduces the + number of distinct colors that must be specified to set up a color + scheme. + + add color table entries for secondary borders, i.e., the ones that + are normally drawn with the dialog's text-colors (Debian #641168). + + modify fselect.c to scan the current directory if the input field + happens to be empty (Debian #640905). + + repeated the discussion of environment variables that can override + the exit-status values in the manpage's return-codes section + (Debian #642105). + + add an example to the manpage showing how to override the form + widget's keys used for field/button traversal (Debian #642108). + + modify call to dlg_register_window() in formbox.c so that the editing + bindings are attached to the form sub-window rather than the + top-level dialog window. Also change the name by which the editing + bindings are bound for editbox.c, fselect.c and inputbox.c, so that + the editing and navigation bindings can be different. + + correct logic in dlg_lookup_key() so that it matches the widget name + before using a binding from .dialogrc, allowing the inner/outer + windows of form and other editing widgets to have different bindings. + + modify dlg_register_window() to call dlg_dump_window_keys() after + its updates, via the --trace output, to supplement the manpage + description of key bindings (Debian #642108). + + add DLGK_FORM_PREV and DLGK_FORM_NEXT key-bindings to form.c, to + allow binding a single key to traverse both form-fields and buttons + (Debian #642108). + + modify dlg_parse_rc() to check for error return from + dlg_parse_bindkey(). + + add function dlg_dump_window_keys(), to help with debugging widgets. + + add CR, LF, TAB, FF and ESC to table of curses names to help make + key bindings more readable. + + update table of dialog key-names so that helpfile and trace are + dumped properly. + + correct dlg_dump_keys(), which was showing only the first item in + the matched binding table. + + save/restore window current position in dlg_update_mixedgauge(). + + pass return-code from pause_for_ok() from dlg_progressbox() when + pauseopt is set, rather than only DLG_OK. + + call setlocale() in init_dialog() rather than relying on on-demand + use within inputstr.c, since there are paths in textbox widget which + do not exercise the latter (report by xDog Walker). + + fix some places where checks for "\Z" were done without also checking + dialog_vars.colors (report by Moray Henderson). + + correct logic for DIALOGOPTS parsing so that the parse happens only + once unless memory leak checking is enabled (report by xDog Walker). + + remove an incorrect free() call in dlg_free_gauge() (report by xDog + Walker). + + modify dlg_trace_win() to log wide-characters (report by xDog Walker). + + make traces shorter by skipping repeated ERR's, but showing the + number skipped (report by xDog Walker). + + improve description in manpage to distinguish program box and + progress box from tailboxes (adapted from email by xDog Walker). + + modify dlg_trace_win() so that it looks for the topmost window in a + dialog. Because subwindows share space with the top window, tracing + the latter shows the whole widget (report by xDog Walker). + + expand tracing so that each window is traced before soliciting input, + making the ^T feature to print a window on demand partly redundant + (suggested by xDog Walker). + + cosmetic change in dialog.h to avoid "*/*" strings from comments next + to "*" (report by xDog Walker). + + ensure result from dlg_align_columns() has trailing null on each + string. Analysis was hindered by libc6's continuance of libc5's + early-1990s misfeature of clearing the result from malloc, noting + that libc6's documentation incorrectly claims that it does not do + this (report by xDog Walker). + 2011/07/07 + modify util.c to work better with old versions of ncurses: + suppress use of wchgat() before fix in 20060715 which is needed @@ -87,7 +307,7 @@ to it: + CF_XOPEN_SOURCE, workaround for cygwin to get ncurses' configure script to define _XOPEN_SOURCE_EXTENDED (cygwin's features.h doesn't do anything, so it needs a crutch). - + updated config.guess, config.sub + + update config.guess, config.sub 2011/03/02 + add --prgbox and --programbox (adapted from patch by David Boyd). @@ -155,7 +375,7 @@ to it: CF_ADD_LIBDIR for the curses-directory here, from CF_NCURSES_CPPFLAGS and CF_NCURSES_LDFLAGS, so it will work even with the default checking, e.g., no --with-ncurses, etc. - + updated config.guess, config.sub + + update config.guess, config.sub 2010/04/28 + several improvements to configure script: @@ -250,7 +470,7 @@ to it: libutf8 and libiconv. + update da.po, ru.po from http://translationproject.org/latest/dialog/ - + updated config.guess, config.sub + + update config.guess, config.sub 2008/08/19 + amend changes to quoting; by default, the checklist widget quotes its @@ -333,7 +553,7 @@ to it: ESC to be returned, quitting dialog (report by Reiner Huober). + add extern "C" declarations to dlg_keys.h so the corresponding function declarations are exported to C++ as C symbols. - + updated config.guess, config.sub + + update config.guess, config.sub 2007/06/04 + fix a memory leak in editbox.c @@ -395,7 +615,8 @@ to it: + use $(INSTALL_SCRIPT) for installing dialog-config (report by Santiago Vila). -2007/02/27 +2007/02/27 - release 1.1 + + mark as "dialog 1.1" + add dialog-config script, which provides applications with compile- and link-information for using the dialog library. + move calls to dlg_trim_string() out of loop in dialog.c, so each @@ -436,7 +657,7 @@ to it: CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS, CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC, CF_WITH_DMALLOC, CF_WITH_LIBTOOL and CF_XOPEN_SOURCE. - + updated config.guess, config.sub + + update config.guess, config.sub > adapted fixes from SuSE package (Werner Fink): + add some limit-checks in dlg_draw_shadow(). + make shadows resizable, using new dlg_move_window() in msgbox.c @@ -628,8 +849,7 @@ to it: + modify tailboxbg by resetting tty modes at the point where it forks a process to update the screen, rather than waiting until that process exits. This improves user feedback by making it apparent that dialog - is no longer processing input after that point (Redhat Bugzilla - #142538). + is no longer processing input after that point (Redhat #142538). + minor updates to some .po files using Babel Fish, comparing with lynx. + update es.po (Santiago Vila). + work around bug in NetBSD 1.6 curses which seems to be confused by @@ -815,8 +1035,7 @@ to it: before dialog is invoked (Debian #244746). + correct dlg_match_char() function, which was broken during rewrite to support wide-characters (Debian #244777). - + improved ru.po, uses UTF-8 charset (Leonid Kanter, Redhat Bugzilla - #119200). + + improved ru.po, uses UTF-8 charset (Leonid Kanter, Redhat #119200). + correct position of shadow drawn for dialogs, which appeared to work for most versions of curses (other than NetBSD) but would have been visible for certain color schemes (discussion with Julian Coleman). @@ -1147,7 +1366,7 @@ to it: the --stdout option does not work on HPUX but otherwise dialog works. + updated el.po (patch by kromJx ). -2002/05/19 +2002/05/19 - release 0.9b + add --no-collapse option to allow one to retain tabs and repeated blanks in a message box (request by Roberto Simoni). + use DLG_EXIT_ESC constant rather than -1's in several places. This @@ -1615,15 +1834,15 @@ to it: Santiago Vila : 1999/10/07 - + add a password dialog box. + + add a password dialog box (Debian #45964, patch by Joey Hess). + implement "--defaultno" option to specify if the default for - the yes/no box is "No". + the yes/no box is "No" (Debian #46076, patch by Joey Hess). 1999/03/10 + modify input.c to clear the input field to the right of the - given string (unclear: this seems redundant, since the - dialog is drawn in a new window). + given string, to help with screen-refresh 1998/12/08 - + check for list_height less than one in checklist.c + + check for list_height less than one in checklist.c (Debian + #22239). 1998/10/21 + use function wscrl() in preference to scroll() in checklist.c and menubox.c (unclear: in ncurses, scroll() is a macro that @@ -1633,12 +1852,14 @@ to it: that directory. 1998/09/12 + simplify menubox.c using new functions print_arrows() and - print_items(). - + add logic to handle KEY_NPAGE and KEY_PPAGE. - + change sample scripts to use Debian tempfile utility rather - than putting files into /tmp. - + change sample scripts to use 'dialog' from user's path rather - than in the parent directory as in the build directory. + print_items(). add logic to handle KEY_NPAGE and KEY_PPAGE + (Debian #26326). + + modifications to provide sample scripts (Debian #26211): + + change sample scripts to use Debian tempfile utility rather + than putting files into /tmp. + + change sample scripts to use 'dialog' from user's path + rather than in the parent directory as in the build + directory. + use the system copy of GPL rather than that in the build directory as an example for the textbox script. @@ -1664,16 +1885,16 @@ The relevant portions of the Debian chan 1998/05/24 + Replaced guage.c by the one in dialog 0.6z, which is known to work. - Fixes Bug #18284: unstable dialog. + Fixes Debian #18284: unstable dialog. 1997/12/16 + dialog.c: dialog_input_result printed with "%s" format. This was - Bug #9913, fixed by Bill Mitchell, but the change was lost. + Debian #9913, fixed by Bill Mitchell, but the change was lost. + Pristine source, .depend is not removed in clean target. Instead, it - is made zero lenght (otherwise it would not work *without* fakeroot). - + Added '^U' support in input box (Bug #9915, patch by joey@debian.org). - + Wrote patch to fix core-dumping problem (Bug #13170). Sven Rudolph + is made zero length (otherwise it would not work *without* fakeroot). + + Added '^U' support in input box (Debian #9915, patch by Joey Hess). + + Wrote patch to fix core-dumping problem (Debian #13170). Sven Rudolph : -- vile:fk=8bit Modified: user/attilio/vmcontention/contrib/dialog/VERSION ============================================================================== --- user/attilio/vmcontention/contrib/dialog/VERSION Tue Jun 18 15:14:20 2013 (r251947) +++ user/attilio/vmcontention/contrib/dialog/VERSION Tue Jun 18 15:15:53 2013 (r251948) @@ -1 +1 @@ -10:0:0 1.1 20110707 +11:1:0 1.2 20130523 Modified: user/attilio/vmcontention/contrib/dialog/aclocal.m4 ============================================================================== --- user/attilio/vmcontention/contrib/dialog/aclocal.m4 Tue Jun 18 15:14:20 2013 (r251947) +++ user/attilio/vmcontention/contrib/dialog/aclocal.m4 Tue Jun 18 15:15:53 2013 (r251948) @@ -1,7 +1,7 @@ dnl macros used for DIALOG configure script -dnl $Id: aclocal.m4,v 1.82 2011/06/28 22:48:31 tom Exp $ +dnl $Id: aclocal.m4,v 1.90 2012/12/02 20:07:30 tom Exp $ dnl --------------------------------------------------------------------------- -dnl Copyright 1999-2010,2011 -- Thomas E. Dickey +dnl Copyright 1999-2011,2012 -- Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -31,23 +31,21 @@ dnl see dnl http://invisible-island.net/autoconf/ dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- -dnl AM_GNU_GETTEXT version: 12 updated: 2010/06/19 07:02:11 +dnl AM_GNU_GETTEXT version: 13 updated: 2012/11/09 05:47:26 dnl -------------- dnl Usage: Just like AM_WITH_NLS, which see. AC_DEFUN([AM_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl + AC_REQUIRE([CF_PROG_CC])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) @@ -282,7 +280,7 @@ fi AC_SUBST($1)dnl ])dnl dnl --------------------------------------------------------------------------- -dnl AM_WITH_NLS version: 24 updated: 2010/06/20 09:24:28 +dnl AM_WITH_NLS version: 25 updated: 2012/10/06 08:57:51 dnl ----------- dnl Inserted as requested by gettext 0.10.40 dnl File from /usr/share/aclocal @@ -385,7 +383,7 @@ AC_DEFUN([AM_WITH_NLS], LIBS="$cf_save_LIBS_1" if test "$cf_cv_func_gettext" = yes ; then - AC_DEFINE(HAVE_LIBINTL_H) + AC_DEFINE(HAVE_LIBINTL_H,1,[Define to 1 if we have libintl.h]) dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU @@ -592,15 +590,30 @@ changequote([,])dnl AC_SUBST(GENCAT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56 -dnl ------------ -dnl Conditionally generate script according to whether we're using the release -dnl version of autoconf, or a patched version (using the ternary component as -dnl the patch-version). -define(CF_AC_PREREQ, -[CF_PREREQ_COMPARE( -AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), -AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1], [$2], [$3])])dnl +dnl CF_ACVERSION_CHECK version: 3 updated: 2012/10/03 18:39:53 +dnl ------------------ +dnl Conditionally generate script according to whether we're using a given autoconf. +dnl +dnl $1 = version to compare against +dnl $2 = code to use if AC_ACVERSION is at least as high as $1. +dnl $3 = code to use if AC_ACVERSION is older than $1. +define([CF_ACVERSION_CHECK], +[ +ifdef([m4_version_compare], +[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], +[CF_ACVERSION_COMPARE( +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), +AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl +dnl --------------------------------------------------------------------------- +dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53 +dnl -------------------- +dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1, +dnl MAJOR2, MINOR2, TERNARY2, +dnl PRINTABLE2, not FOUND, FOUND) +define([CF_ACVERSION_COMPARE], +[ifelse(builtin([eval], [$2 < $5]), 1, +[ifelse([$8], , ,[$8])], +[ifelse([$9], , ,[$9])])])dnl dnl --------------------------------------------------------------------------- dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42 dnl ------------- @@ -876,12 +889,6 @@ dnl Allow user to disable a normally-on AC_DEFUN([CF_ARG_DISABLE], [CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl dnl --------------------------------------------------------------------------- -dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31 -dnl ------------- -dnl Allow user to enable a normally-off option. -AC_DEFUN([CF_ARG_ENABLE], -[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl -dnl --------------------------------------------------------------------------- dnl CF_ARG_MSG_ENABLE version: 2 updated: 2000/07/29 19:32:03 dnl ----------------- dnl Verbose form of AC_ARG_ENABLE: @@ -927,7 +934,7 @@ ifelse([$3],,[ :]dnl ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_BUNDLED_INTL version: 16 updated: 2010/10/23 15:55:05 +dnl CF_BUNDLED_INTL version: 17 updated: 2012/10/06 08:57:51 dnl --------------- dnl Top-level macro for configuring an application with a bundled copy of dnl the intl and po directories for gettext. @@ -984,7 +991,7 @@ if test "$USE_NLS" = yes ; then [ --with-textdomain=PKG NLS text-domain (default is package name)], [NLS_TEXTDOMAIN=$withval], [NLS_TEXTDOMAIN=$PACKAGE]) - AC_DEFINE_UNQUOTED(NLS_TEXTDOMAIN,"$NLS_TEXTDOMAIN") + AC_DEFINE_UNQUOTED(NLS_TEXTDOMAIN,"$NLS_TEXTDOMAIN",[Define to the nls textdomain value]) AC_SUBST(NLS_TEXTDOMAIN) fi @@ -1004,7 +1011,7 @@ if test "$USE_INCLUDED_LIBINTL" = yes ; INTLDIR_MAKE="#" fi if test -z "$INTLDIR_MAKE"; then - AC_DEFINE(HAVE_LIBGETTEXT_H) + AC_DEFINE(HAVE_LIBGETTEXT_H,1,[Define to 1 if we have libgettext.h]) for cf_makefile in \ $srcdir/intl/Makefile.in \ $srcdir/intl/makefile.in @@ -1047,17 +1054,43 @@ dnl own code, except ENABLE_NLS, which i if test "$USE_INCLUDED_LIBINTL" = yes ; then if test "$nls_cv_force_use_gnu_gettext" = yes ; then - AC_DEFINE(HAVE_GETTEXT) + AC_DEFINE(HAVE_GETTEXT,1,[Define to 1 if we have gettext function]) elif test "$nls_cv_use_gnu_gettext" = yes ; then - AC_DEFINE(HAVE_GETTEXT) + AC_DEFINE(HAVE_GETTEXT,1,[Define to 1 if we have gettext function]) fi if test -n "$nls_cv_header_intl" ; then - AC_DEFINE(HAVE_LIBINTL_H) + AC_DEFINE(HAVE_LIBINTL_H,1,[Define to 1 if we have header-file for libintl]) fi fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59 +dnl CF_CC_ENV_FLAGS version: 1 updated: 2012/10/03 05:25:49 +dnl --------------- +dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content +dnl into CC. This will not help with broken scripts that wrap the compiler with +dnl options, but eliminates a more common category of user confusion. +AC_DEFUN([CF_CC_ENV_FLAGS], +[ +# This should have been defined by AC_PROG_CC +: ${CC:=cc} + +AC_MSG_CHECKING(\$CC variable) +case "$CC" in #(vi +*[[\ \ ]]-[[IUD]]*) + AC_MSG_RESULT(broken) + AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) + # humor him... + cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]]//'` + CC=`echo "$CC" | sed -e 's/[[ ]].*//'` + CF_ADD_CFLAGS($cf_flags) + ;; +*) + AC_MSG_RESULT(ok) + ;; +esac +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CHECK_CACHE version: 12 updated: 2012/10/02 20:55:03 dnl -------------- dnl Check if we're accidentally using a cache from a different machine. dnl Derive the system name, as a check for reusing the autoconf cache. @@ -1080,7 +1113,7 @@ else system_name="`(hostname) 2>/dev/null`" fi fi -test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name") +test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.]) AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"]) test -z "$system_name" && system_name="$cf_cv_system_name" @@ -1092,7 +1125,40 @@ if test ".$system_name" != ".$cf_cv_syst fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_CHTYPE version: 7 updated: 2010/10/23 15:54:49 +dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39 +dnl ----------------- +dnl Check if the given compiler is really clang. clang's C driver defines +dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does +dnl not ignore some gcc options. +dnl +dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to +dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from +dnl the wrappers for gcc and g++ warnings. +dnl +dnl $1 = GCC (default) or GXX +dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS +dnl $3 = CFLAGS (default) or CXXFLAGS +AC_DEFUN([CF_CLANG_COMPILER],[ +ifelse([$2],,CLANG_COMPILER,[$2])=no + +if test "$ifelse([$1],,[$1],GCC)" = yes ; then + AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler) + cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" + ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -Qunused-arguments" + AC_TRY_COMPILE([],[ +#ifdef __clang__ +#else +make an error +#endif +],[ifelse([$2],,CLANG_COMPILER,[$2])=yes +cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" +],[]) + ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS" + AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2])) +fi +]) +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_CHTYPE version: 8 updated: 2012/10/06 08:57:51 dnl ---------------- dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses). AC_DEFUN([CF_CURSES_CHTYPE], @@ -1104,14 +1170,14 @@ AC_CACHE_CHECK(for chtype typedef,cf_cv_ [cf_cv_chtype_decl=yes], [cf_cv_chtype_decl=no])]) if test $cf_cv_chtype_decl = yes ; then - AC_DEFINE(HAVE_TYPE_CHTYPE) + AC_DEFINE(HAVE_TYPE_CHTYPE,1,[Define to 1 if chtype is declared]) AC_CACHE_CHECK(if chtype is scalar or struct,cf_cv_chtype_type,[ AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], [chtype foo; long x = foo], [cf_cv_chtype_type=scalar], [cf_cv_chtype_type=struct])]) if test $cf_cv_chtype_type = scalar ; then - AC_DEFINE(TYPE_CHTYPE_IS_SCALAR) + AC_DEFINE(TYPE_CHTYPE_IS_SCALAR,1,[Define to 1 if chtype is a scaler/integer]) fi fi ])dnl @@ -1227,7 +1293,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 34 updated: 2011/04/09 14:51:08 +dnl CF_CURSES_LIBS version: 36 updated: 2012/07/07 21:02:48 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -1307,7 +1373,7 @@ if test ".$ac_cv_func_initscr" != .yes ; # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ - for cf_term_lib in $cf_check_list termcap termlib unknown + for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown do AC_CHECK_LIB($cf_term_lib,tgoto,[break]) done @@ -1351,7 +1417,7 @@ fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_TERM_H version: 9 updated: 2011/04/09 18:19:55 +dnl CF_CURSES_TERM_H version: 10 updated: 2012/10/06 08:57:51 dnl ---------------- dnl SVr4 curses should have term.h as well (where it puts the definitions of dnl the low-level interface). This may not be true in old/broken implementations, @@ -1410,18 +1476,18 @@ esac case $cf_cv_term_header in #(vi term.h) #(vi - AC_DEFINE(HAVE_TERM_H) + AC_DEFINE(HAVE_TERM_H,1,[Define to 1 if we have term.h]) ;; ncurses/term.h) #(vi - AC_DEFINE(HAVE_NCURSES_TERM_H) + AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h]) ;; ncursesw/term.h) - AC_DEFINE(HAVE_NCURSESW_TERM_H) + AC_DEFINE(HAVE_NCURSESW_TERM_H,1,[Define to 1 if we have ncursesw/term.h]) ;; esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_UNCTRL_H version: 1 updated: 2011/04/09 18:19:55 +dnl CF_CURSES_UNCTRL_H version: 2 updated: 2012/10/06 08:57:51 dnl ------------------ dnl Any X/Open curses implementation must have unctrl.h, but ncurses packages dnl may put it in a subdirectory (along with ncurses' other headers, of @@ -1465,18 +1531,18 @@ esac case $cf_cv_unctrl_header in #(vi unctrl.h) #(vi - AC_DEFINE(HAVE_UNCTRL_H) + AC_DEFINE(HAVE_UNCTRL_H,1,[Define to 1 if we have unctrl.h]) ;; ncurses/unctrl.h) #(vi - AC_DEFINE(HAVE_NCURSES_UNCTRL_H) + AC_DEFINE(HAVE_NCURSES_UNCTRL_H,1,[Define to 1 if we have ncurses/unctrl.h]) ;; ncursesw/unctrl.h) - AC_DEFINE(HAVE_NCURSESW_UNCTRL_H) + AC_DEFINE(HAVE_NCURSESW_UNCTRL_H,1,[Define to 1 if we have ncursesw/unctrl.h]) ;; esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_WACS_MAP version: 5 updated: 2011/01/15 11:28:59 +dnl CF_CURSES_WACS_MAP version: 6 updated: 2012/10/06 08:57:51 dnl ------------------ dnl Check for likely values of wacs_map[]. AC_DEFUN([CF_CURSES_WACS_MAP], @@ -1495,10 +1561,10 @@ AC_CACHE_CHECK(for wide alternate charac break]) done]) -test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map) +test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map,[Define to name of (n)curses wide-character array]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_WACS_SYMBOLS version: 1 updated: 2011/01/15 11:28:59 +dnl CF_CURSES_WACS_SYMBOLS version: 2 updated: 2012/10/06 08:57:51 dnl ---------------------- dnl Do a check to see if the WACS_xxx constants are defined compatibly with dnl X/Open Curses. In particular, NetBSD's implementation of the WACS_xxx @@ -1530,7 +1596,31 @@ else fi ]) -test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS) +test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS,1,[Define to 1 if (n)curses supports wide-character WACS_ symbols]) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WGETPARENT version: 3 updated: 2012/10/06 08:57:51 +dnl -------------------- +dnl Check for curses support for directly determining the parent of a given +dnl window. Some implementations make this difficult, so we provide for +dnl defining an application-specific function that gives this functionality. +dnl +dnl $1 = name of function to use if the feature is missing +AC_DEFUN([CF_CURSES_WGETPARENT],[ +CF_CURSES_FUNCS(wgetparent) +if test "x$cf_cv_func_wgetparent" != xyes +then + AC_MSG_CHECKING(if WINDOW has _parent member) + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], + [WINDOW *p = stdscr->_parent], + [cf_window__parent=yes], + [cf_window__parent=no]) + AC_MSG_RESULT($cf_window__parent) + if test "$cf_window__parent" = yes + then + AC_DEFINE(HAVE_WINDOW__PARENT,1,[Define to 1 if WINDOW struct has _parent member]) + fi +fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 @@ -1538,7 +1628,7 @@ dnl ---------- dnl "dirname" is not portable, so we fake it with a shell script. AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl dnl --------------------------------------------------------------------------- -dnl CF_DISABLE_ECHO version: 11 updated: 2009/12/13 13:16:57 +dnl CF_DISABLE_ECHO version: 12 updated: 2012/10/06 16:30:28 dnl --------------- dnl You can always use "make -n" to see the actual options, but it's hard to dnl pick out/analyze warning messages when the compile-line is long. @@ -1553,7 +1643,7 @@ dnl AC_DEFUN([CF_DISABLE_ECHO],[ AC_MSG_CHECKING(if you want to see long compiling messages) CF_ARG_DISABLE(echo, - [ --disable-echo display "compiling" commands], + [ --disable-echo do not display "compiling" commands], [ ECHO_LT='--silent' ECHO_LD='@echo linking [$]@;' @@ -1618,38 +1708,6 @@ if test "$cf_disable_rpath_hack" = no ; fi ]) dnl --------------------------------------------------------------------------- -dnl CF_FIND_HEADER version: 2 updated: 2007/07/29 11:32:00 -dnl -------------- -dnl Find a header file, searching for it if it is not already in the include -dnl path. -dnl -dnl $1 = the header filename -dnl $2 = the package name -dnl $3 = action to perform if successful -dnl $4 = action to perform if not successful -AC_DEFUN([CF_FIND_HEADER],[ -AC_CHECK_HEADER([$1], - cf_find_header=yes,[ - cf_find_header=no -CF_HEADER_PATH(cf_search,$2) -for cf_incdir in $cf_search -do - if test -f $cf_incdir/$1 ; then - CF_ADD_INCDIR($cf_incdir) - CF_VERBOSE(... found in $cf_incdir) - cf_find_header=yes - break - fi - CF_VERBOSE(... tested $cf_incdir) -done -]) -if test "$cf_find_header" = yes ; then -ifelse([$3],,:,[$3]) -ifelse([$4],,,[else -$4]) -fi -])dnl -dnl --------------------------------------------------------------------------- dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54 dnl --------------- dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We @@ -1830,7 +1888,7 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_WAIT version: 2 updated: 1997/10/21 19:45:33 +dnl CF_FUNC_WAIT version: 3 updated: 2012/10/06 08:57:51 dnl ------------ dnl Test for the presence of , 'union wait', arg-type of 'wait()' dnl and/or 'waitpid()'. @@ -1855,7 +1913,7 @@ if test $cf_cv_type_unionwait = yes; the [cf_cv_arg_union_wait=no]) ]) AC_MSG_RESULT($cf_cv_arg_union_wait) - test $cf_cv_arg_union_wait = yes && AC_DEFINE(WAIT_USES_UNION) + test $cf_cv_arg_union_wait = yes && AC_DEFINE(WAIT_USES_UNION,1,[Define to 1 if wait() uses a union parameter]) AC_MSG_CHECKING(if union wait can be used as waitpid-arg) AC_CACHE_VAL(cf_cv_arg_union_waitpid,[ @@ -1865,12 +1923,12 @@ if test $cf_cv_type_unionwait = yes; the [cf_cv_arg_union_waitpid=no]) ]) AC_MSG_RESULT($cf_cv_arg_union_waitpid) - test $cf_cv_arg_union_waitpid = yes && AC_DEFINE(WAITPID_USES_UNION) + test $cf_cv_arg_union_waitpid = yes && AC_DEFINE(WAITPID_USES_UNION,1,[Define to 1 if waitpid() uses a union parameter]) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32 +dnl CF_GCC_ATTRIBUTES version: 16 updated: 2012/10/02 20:55:03 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -1948,27 +2006,27 @@ EOF test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute) cat conftest.h >>confdefs.h case $cf_attribute in #(vi + noreturn) #(vi + AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc]) + ;; printf) #(vi - if test "$cf_printf_attribute" = no ; then - cat >>confdefs.h <>confdefs.h <>confdefs.h <>confdefs.h < conftest.$ac_ext < Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 73AA8281; Tue, 18 Jun 2013 15:22:18 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6322610BC; Tue, 18 Jun 2013 15:22:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5IFMIH9003297; Tue, 18 Jun 2013 15:22:18 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5IFMHfd003287; Tue, 18 Jun 2013 15:22:17 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306181522.r5IFMHfd003287@svn.freebsd.org> From: Attilio Rao Date: Tue, 18 Jun 2013 15:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251950 - in user/attilio/vmobj-readlock: . contrib/apr contrib/apr-util contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/po contrib/dialog/samples con... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 15:22:18 -0000 Author: attilio Date: Tue Jun 18 15:22:16 2013 New Revision: 251950 URL: http://svnweb.freebsd.org/changeset/base/251950 Log: MFC Added: user/attilio/vmobj-readlock/contrib/apr/ - copied from r251949, user/attilio/vmcontention/contrib/apr/ user/attilio/vmobj-readlock/contrib/apr-util/ - copied from r251949, user/attilio/vmcontention/contrib/apr-util/ user/attilio/vmobj-readlock/contrib/dialog/buildlist.c - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/buildlist.c user/attilio/vmobj-readlock/contrib/dialog/po/an.po - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/po/an.po user/attilio/vmobj-readlock/contrib/dialog/po/ia.po - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/po/ia.po user/attilio/vmobj-readlock/contrib/dialog/rangebox.c - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/rangebox.c user/attilio/vmobj-readlock/contrib/dialog/samples/buildlist - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/buildlist user/attilio/vmobj-readlock/contrib/dialog/samples/buildlist2 - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/buildlist2 user/attilio/vmobj-readlock/contrib/dialog/samples/checklist12 - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/checklist12 user/attilio/vmobj-readlock/contrib/dialog/samples/dft-cancel - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/dft-cancel user/attilio/vmobj-readlock/contrib/dialog/samples/dft-extra - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/dft-extra user/attilio/vmobj-readlock/contrib/dialog/samples/dft-help - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/dft-help user/attilio/vmobj-readlock/contrib/dialog/samples/dft-no - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/dft-no user/attilio/vmobj-readlock/contrib/dialog/samples/fselect0 - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/fselect0 user/attilio/vmobj-readlock/contrib/dialog/samples/menubox12 - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/menubox12 user/attilio/vmobj-readlock/contrib/dialog/samples/rangebox - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/rangebox user/attilio/vmobj-readlock/contrib/dialog/samples/rangebox2 - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/rangebox2 user/attilio/vmobj-readlock/contrib/dialog/samples/rangebox3 - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/rangebox3 user/attilio/vmobj-readlock/contrib/dialog/samples/rangebox4 - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/rangebox4 user/attilio/vmobj-readlock/contrib/dialog/samples/treeview - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/treeview user/attilio/vmobj-readlock/contrib/dialog/samples/treeview2 - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/treeview2 user/attilio/vmobj-readlock/contrib/dialog/samples/with-dquotes - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/with-dquotes user/attilio/vmobj-readlock/contrib/dialog/samples/with-squotes - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/samples/with-squotes user/attilio/vmobj-readlock/contrib/dialog/treeview.c - copied unchanged from r251949, user/attilio/vmcontention/contrib/dialog/treeview.c user/attilio/vmobj-readlock/contrib/serf/ - copied from r251949, user/attilio/vmcontention/contrib/serf/ user/attilio/vmobj-readlock/contrib/sqlite3/ - copied from r251949, user/attilio/vmcontention/contrib/sqlite3/ user/attilio/vmobj-readlock/contrib/subversion/ - copied from r251949, user/attilio/vmcontention/contrib/subversion/ user/attilio/vmobj-readlock/sys/cam/cam_compat.c - copied unchanged from r251949, user/attilio/vmcontention/sys/cam/cam_compat.c user/attilio/vmobj-readlock/sys/cam/cam_compat.h - copied unchanged from r251949, user/attilio/vmcontention/sys/cam/cam_compat.h user/attilio/vmobj-readlock/usr.bin/svn/ - copied from r251949, user/attilio/vmcontention/usr.bin/svn/ Deleted: user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/admin.funcs user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/common.funcs user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.funcs user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.ifman1 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.ifman2 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.ifmcfg2 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.ifmcfg4 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.ifmcfg5 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.ifpoll1 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.ifpoll2 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.ifreq1 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.ifreq2 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.rcnews user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.sendifm1 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.sendifm2 user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.trnrc user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/copi.wheel user/attilio/vmobj-readlock/contrib/dialog/samples/copifuncs/ifpatch user/attilio/vmobj-readlock/contrib/dialog/samples/copismall user/attilio/vmobj-readlock/contrib/dialog/samples/dselect user/attilio/vmobj-readlock/contrib/dialog/samples/install/FDISK.TEST user/attilio/vmobj-readlock/contrib/dialog/samples/install/makefile.in user/attilio/vmobj-readlock/contrib/dialog/samples/install/setup.c user/attilio/vmobj-readlock/contrib/dialog/samples/install/setup.help user/attilio/vmobj-readlock/contrib/dialog/samples/valgrind.log user/attilio/vmobj-readlock/gnu/usr.bin/gdb/libgdb/frame-unwind.diff user/attilio/vmobj-readlock/share/man/man9/vfs_mount.9 Modified: user/attilio/vmobj-readlock/ObsoleteFiles.inc user/attilio/vmobj-readlock/UPDATING user/attilio/vmobj-readlock/contrib/dialog/CHANGES user/attilio/vmobj-readlock/contrib/dialog/VERSION user/attilio/vmobj-readlock/contrib/dialog/aclocal.m4 user/attilio/vmobj-readlock/contrib/dialog/argv.c user/attilio/vmobj-readlock/contrib/dialog/arrows.c user/attilio/vmobj-readlock/contrib/dialog/buttons.c user/attilio/vmobj-readlock/contrib/dialog/calendar.c user/attilio/vmobj-readlock/contrib/dialog/checklist.c user/attilio/vmobj-readlock/contrib/dialog/columns.c user/attilio/vmobj-readlock/contrib/dialog/config.guess user/attilio/vmobj-readlock/contrib/dialog/config.sub user/attilio/vmobj-readlock/contrib/dialog/configure user/attilio/vmobj-readlock/contrib/dialog/configure.in user/attilio/vmobj-readlock/contrib/dialog/dialog-config.in user/attilio/vmobj-readlock/contrib/dialog/dialog.1 user/attilio/vmobj-readlock/contrib/dialog/dialog.3 user/attilio/vmobj-readlock/contrib/dialog/dialog.c user/attilio/vmobj-readlock/contrib/dialog/dialog.h user/attilio/vmobj-readlock/contrib/dialog/dlg_colors.h user/attilio/vmobj-readlock/contrib/dialog/dlg_keys.c user/attilio/vmobj-readlock/contrib/dialog/dlg_keys.h user/attilio/vmobj-readlock/contrib/dialog/editbox.c user/attilio/vmobj-readlock/contrib/dialog/formbox.c user/attilio/vmobj-readlock/contrib/dialog/fselect.c user/attilio/vmobj-readlock/contrib/dialog/guage.c user/attilio/vmobj-readlock/contrib/dialog/headers-sh.in user/attilio/vmobj-readlock/contrib/dialog/help.c user/attilio/vmobj-readlock/contrib/dialog/inputbox.c user/attilio/vmobj-readlock/contrib/dialog/inputstr.c user/attilio/vmobj-readlock/contrib/dialog/makefile.in user/attilio/vmobj-readlock/contrib/dialog/menubox.c user/attilio/vmobj-readlock/contrib/dialog/mixedform.c user/attilio/vmobj-readlock/contrib/dialog/mixedgauge.c user/attilio/vmobj-readlock/contrib/dialog/mouse.c user/attilio/vmobj-readlock/contrib/dialog/mousewget.c user/attilio/vmobj-readlock/contrib/dialog/msgbox.c user/attilio/vmobj-readlock/contrib/dialog/package/debian/changelog user/attilio/vmobj-readlock/contrib/dialog/package/dialog.spec user/attilio/vmobj-readlock/contrib/dialog/pause.c user/attilio/vmobj-readlock/contrib/dialog/po/cs.po user/attilio/vmobj-readlock/contrib/dialog/po/el.po user/attilio/vmobj-readlock/contrib/dialog/po/gl.po user/attilio/vmobj-readlock/contrib/dialog/po/hr.po user/attilio/vmobj-readlock/contrib/dialog/po/sr.po user/attilio/vmobj-readlock/contrib/dialog/po/zh_TW.po user/attilio/vmobj-readlock/contrib/dialog/prgbox.c user/attilio/vmobj-readlock/contrib/dialog/progressbox.c user/attilio/vmobj-readlock/contrib/dialog/rc.c user/attilio/vmobj-readlock/contrib/dialog/rename.sh user/attilio/vmobj-readlock/contrib/dialog/samples/README user/attilio/vmobj-readlock/contrib/dialog/samples/debian.rc user/attilio/vmobj-readlock/contrib/dialog/samples/dialog.py user/attilio/vmobj-readlock/contrib/dialog/samples/form1 user/attilio/vmobj-readlock/contrib/dialog/samples/inputmenu user/attilio/vmobj-readlock/contrib/dialog/samples/inputmenu-stdout user/attilio/vmobj-readlock/contrib/dialog/samples/inputmenu1 user/attilio/vmobj-readlock/contrib/dialog/samples/inputmenu2 user/attilio/vmobj-readlock/contrib/dialog/samples/inputmenu3 user/attilio/vmobj-readlock/contrib/dialog/samples/inputmenu4 user/attilio/vmobj-readlock/contrib/dialog/samples/killall user/attilio/vmobj-readlock/contrib/dialog/samples/prgbox user/attilio/vmobj-readlock/contrib/dialog/samples/prgbox2 user/attilio/vmobj-readlock/contrib/dialog/samples/report-button user/attilio/vmobj-readlock/contrib/dialog/samples/report-edit user/attilio/vmobj-readlock/contrib/dialog/samples/report-string user/attilio/vmobj-readlock/contrib/dialog/samples/report-tempfile user/attilio/vmobj-readlock/contrib/dialog/samples/report-yesno user/attilio/vmobj-readlock/contrib/dialog/samples/setup-edit user/attilio/vmobj-readlock/contrib/dialog/samples/setup-tempfile user/attilio/vmobj-readlock/contrib/dialog/samples/setup-utf8 user/attilio/vmobj-readlock/contrib/dialog/samples/setup-vars user/attilio/vmobj-readlock/contrib/dialog/samples/slackware.rc user/attilio/vmobj-readlock/contrib/dialog/samples/sourcemage.rc user/attilio/vmobj-readlock/contrib/dialog/samples/suse.rc user/attilio/vmobj-readlock/contrib/dialog/samples/tailboxbg user/attilio/vmobj-readlock/contrib/dialog/samples/tailboxbg1 user/attilio/vmobj-readlock/contrib/dialog/samples/tailboxbg2 user/attilio/vmobj-readlock/contrib/dialog/samples/testdata-8bit user/attilio/vmobj-readlock/contrib/dialog/samples/wheel user/attilio/vmobj-readlock/contrib/dialog/samples/whiptail.rc user/attilio/vmobj-readlock/contrib/dialog/tailbox.c user/attilio/vmobj-readlock/contrib/dialog/textbox.c user/attilio/vmobj-readlock/contrib/dialog/timebox.c user/attilio/vmobj-readlock/contrib/dialog/trace.c user/attilio/vmobj-readlock/contrib/dialog/ui_getc.c user/attilio/vmobj-readlock/contrib/dialog/util.c user/attilio/vmobj-readlock/contrib/dialog/yesno.c user/attilio/vmobj-readlock/contrib/gdb/gdb/dwarf2read.c user/attilio/vmobj-readlock/contrib/gdb/gdb/frame-unwind.c user/attilio/vmobj-readlock/contrib/wpa/src/utils/base64.h user/attilio/vmobj-readlock/etc/rc.d/ntpdate user/attilio/vmobj-readlock/gnu/lib/libdialog/Makefile user/attilio/vmobj-readlock/gnu/lib/libdialog/dlg_config.h user/attilio/vmobj-readlock/gnu/lib/libsupc++/Version.map user/attilio/vmobj-readlock/gnu/usr.bin/dialog/Makefile user/attilio/vmobj-readlock/gnu/usr.bin/gdb/libgdb/Makefile user/attilio/vmobj-readlock/lib/libmemstat/memstat_uma.c user/attilio/vmobj-readlock/release/release.sh user/attilio/vmobj-readlock/share/man/man3/queue.3 user/attilio/vmobj-readlock/share/man/man5/src.conf.5 user/attilio/vmobj-readlock/share/man/man9/Makefile user/attilio/vmobj-readlock/share/man/man9/kernel_mount.9 user/attilio/vmobj-readlock/share/man/man9/vfsconf.9 user/attilio/vmobj-readlock/share/misc/committers-ports.dot user/attilio/vmobj-readlock/share/mk/bsd.lib.mk user/attilio/vmobj-readlock/share/mk/bsd.own.mk user/attilio/vmobj-readlock/sys/cam/cam_ccb.h user/attilio/vmobj-readlock/sys/cam/cam_xpt.c user/attilio/vmobj-readlock/sys/cam/scsi/scsi_pass.c user/attilio/vmobj-readlock/sys/conf/files user/attilio/vmobj-readlock/sys/dev/age/if_age.c user/attilio/vmobj-readlock/sys/dev/ata/chipsets/ata-acerlabs.c user/attilio/vmobj-readlock/sys/dev/puc/puc_bfe.h user/attilio/vmobj-readlock/sys/dev/puc/puc_cfg.h user/attilio/vmobj-readlock/sys/dev/vxge/vxge.h user/attilio/vmobj-readlock/sys/dev/xen/blkfront/blkfront.c user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_alloc.c user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_balloc.c user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_bmap.c user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_dinode.h user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2fs.h user/attilio/vmobj-readlock/sys/fs/ext2fs/fs.h user/attilio/vmobj-readlock/sys/fs/ext2fs/inode.h user/attilio/vmobj-readlock/sys/i386/include/xen/xenvar.h user/attilio/vmobj-readlock/sys/i386/xen/xen_machdep.c user/attilio/vmobj-readlock/sys/kern/kern_alq.c user/attilio/vmobj-readlock/sys/modules/cam/Makefile user/attilio/vmobj-readlock/sys/modules/linux/Makefile user/attilio/vmobj-readlock/sys/net/if_lagg.c user/attilio/vmobj-readlock/sys/powerpc/powerpc/busdma_machdep.c user/attilio/vmobj-readlock/sys/sys/queue.h user/attilio/vmobj-readlock/sys/sys/time.h user/attilio/vmobj-readlock/sys/vm/uma.h user/attilio/vmobj-readlock/sys/vm/uma_core.c user/attilio/vmobj-readlock/sys/vm/uma_int.h user/attilio/vmobj-readlock/sys/vm/vm_map.c user/attilio/vmobj-readlock/sys/x86/x86/busdma_machdep.c user/attilio/vmobj-readlock/sys/xen/evtchn/evtchn.c user/attilio/vmobj-readlock/sys/xen/interface/foreign/structs.py user/attilio/vmobj-readlock/tools/regression/lib/libc/nss/test-getaddr.c user/attilio/vmobj-readlock/tools/regression/lib/libc/nss/test-getgr.c user/attilio/vmobj-readlock/tools/regression/lib/libc/nss/test-gethostby.c user/attilio/vmobj-readlock/tools/regression/lib/libc/nss/test-getproto.c user/attilio/vmobj-readlock/tools/regression/lib/libc/nss/test-getpw.c user/attilio/vmobj-readlock/tools/regression/lib/libc/nss/test-getrpc.c user/attilio/vmobj-readlock/tools/regression/lib/libc/nss/test-getusershell.c user/attilio/vmobj-readlock/tools/regression/lib/libc/nss/testutil.h user/attilio/vmobj-readlock/usr.bin/Makefile user/attilio/vmobj-readlock/usr.bin/calendar/calendars/calendar.freebsd user/attilio/vmobj-readlock/usr.bin/csup/updater.h user/attilio/vmobj-readlock/usr.bin/dtc/checking.cc user/attilio/vmobj-readlock/usr.bin/dtc/dtc.1 user/attilio/vmobj-readlock/usr.bin/sort/vsort.h user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/console user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/font user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/include/messages.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/keymap user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/repeat user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/saver user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/screenmap user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/ttys user/attilio/vmobj-readlock/usr.sbin/bsdconfig/diskmgmt/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/diskmgmt/diskmgmt user/attilio/vmobj-readlock/usr.sbin/bsdconfig/docsinstall/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/dot/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/dot/dot user/attilio/vmobj-readlock/usr.sbin/bsdconfig/examples/bsdconfigrc user/attilio/vmobj-readlock/usr.sbin/bsdconfig/mouse/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/mouse/disable user/attilio/vmobj-readlock/usr.sbin/bsdconfig/mouse/include/messages.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/mouse/mouse user/attilio/vmobj-readlock/usr.sbin/bsdconfig/mouse/port user/attilio/vmobj-readlock/usr.sbin/bsdconfig/mouse/type user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/devices user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/include/messages.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/networking user/attilio/vmobj-readlock/usr.sbin/bsdconfig/packages/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/packages/packages user/attilio/vmobj-readlock/usr.sbin/bsdconfig/password/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/security/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/security/kern_securelevel user/attilio/vmobj-readlock/usr.sbin/bsdconfig/security/security user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/dialog.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/timezone/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/ttys/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdconfig/usermgmt/INDEX user/attilio/vmobj-readlock/usr.sbin/bsdinstall/partedit/diskeditor.c Directory Properties: user/attilio/vmobj-readlock/ (props changed) user/attilio/vmobj-readlock/contrib/dialog/ (props changed) user/attilio/vmobj-readlock/contrib/gdb/ (props changed) user/attilio/vmobj-readlock/contrib/wpa/ (props changed) user/attilio/vmobj-readlock/gnu/lib/ (props changed) user/attilio/vmobj-readlock/gnu/usr.bin/gdb/ (props changed) user/attilio/vmobj-readlock/sys/ (props changed) user/attilio/vmobj-readlock/sys/conf/ (props changed) user/attilio/vmobj-readlock/usr.bin/calendar/ (props changed) user/attilio/vmobj-readlock/usr.bin/csup/ (props changed) Modified: user/attilio/vmobj-readlock/ObsoleteFiles.inc ============================================================================== --- user/attilio/vmobj-readlock/ObsoleteFiles.inc Tue Jun 18 15:17:29 2013 (r251949) +++ user/attilio/vmobj-readlock/ObsoleteFiles.inc Tue Jun 18 15:22:16 2013 (r251950) @@ -38,9 +38,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20130616: vfs_mounted.9 removed +OLD_FILES+=usr/share/man/man9/vfs_mount.9.gz # 20130614: remove CVS from base OLD_FILES+=usr/bin/cvs OLD_FILES+=usr/bin/cvsbug +OLD_FILES+=usr/share/doc/psd/28.cvs/paper.ascii.gz +OLD_DIRS+=usr/share/doc/psd/28.cvs OLD_FILES+=usr/share/examples/cvs/contrib/README OLD_FILES+=usr/share/examples/cvs/contrib/clmerge OLD_FILES+=usr/share/examples/cvs/contrib/cln_hist @@ -60,11 +64,16 @@ OLD_FILES+=usr/share/examples/cvs/contri OLD_FILES+=usr/share/examples/cvs/contrib/rcs2log OLD_FILES+=usr/share/examples/cvs/contrib/rcslock OLD_FILES+=usr/share/examples/cvs/contrib/sccs2rcs +OLD_DIRS+=usr/share/examples/cvs/contrib +OLD_DIRS+=usr/share/examples/cvs OLD_FILES+=usr/share/info/cvs.info.gz OLD_FILES+=usr/share/info/cvsclient.info.gz OLD_FILES+=usr/share/man/man1/cvs.1.gz OLD_FILES+=usr/share/man/man5/cvs.5.gz OLD_FILES+=usr/share/man/man8/cvsbug.8.gz +# 20130607: WITH_DEBUG_FILES added +OLD_FILES+=lib/libufs.so.6.symbols +OLD_FILES+=usr/lib32/libufs.so.6.symbols # 20130417: nfs fha moved from nfsserver to nfs OLD_FILES+=usr/include/nfsserver/nfs_fha.h # 20130411: new clang import which bumps version from 3.2 to 3.3. Modified: user/attilio/vmobj-readlock/UPDATING ============================================================================== --- user/attilio/vmobj-readlock/UPDATING Tue Jun 18 15:17:29 2013 (r251949) +++ user/attilio/vmobj-readlock/UPDATING Tue Jun 18 15:22:16 2013 (r251950) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130618: + Fix a bug that allowed a tracing process (e.g. gdb) to write + to a memory-mapped file in the traced process's address space + even if neither the traced process nor the tracing process had + write access to that file. + 20130615: CVS has been removed from the base system. An exact copy of the code is available from the devel/cvs port. Modified: user/attilio/vmobj-readlock/contrib/dialog/CHANGES ============================================================================== --- user/attilio/vmobj-readlock/contrib/dialog/CHANGES Tue Jun 18 15:17:29 2013 (r251949) +++ user/attilio/vmobj-readlock/contrib/dialog/CHANGES Tue Jun 18 15:22:16 2013 (r251950) @@ -1,9 +1,229 @@ --- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $ +-- $Id: CHANGES,v 1.458 2013/05/24 00:23:22 tom Exp $ -- Thomas E. Dickey This version of dialog was originally from a Debian snapshot. I've done this to it: +2013/05/23 + + modify ifdef in arrows.c to work around packages which use the + wide-character ncursesw headers with the ncurses library (report + by Aleksey Cheusov). + + correct workaround for xterm alternate-screen to work with/without + the fix made in ncurses that makes putp() always write to the + standard output (Debian #708829). + + improve limit-checks for checklist, in case the dialog is resized + (report by Ilya A Arkhipov). + + add --last-key option (adapted from patch by Jordi Pujol, Debian + #697607). + +2013/03/15 + + update zh_TW.po, add an.po from + http://translationproject.org/latest/dialog/ + +2012/12/30 - release 1.2 + + improve some older changelog entries to help with HTML'izing content. + + various fixes/improvments for scrollbar appearance. + + add mappings for some equivalent options provided by whiptail; + add configure option --disable-whiptail to allow suppressing these. + + add configure option --disable-Xdialog2 to allow suppressing the + newer features, i.e., for cdialog 1.2 + + add --no-items option, for consistency. + + add --no-tags option, like Xdialog. + + add buildlist, rangebox and treeview dialogs, like Xdialog. + + remove obsolete workaround for ncurses 4.2 scrolling in checklist + and menubox. + + improve dialog_helpfile() by preventing it from showing extra buttons + (suggested by xDog Walker). + + correct logic in formbox's scroll_next() function (report by xDog + Walker). + + fix a case with inputbox widget where preset input text is not shown + until moving the cursor within the text (report by xDog Walker). + + handle SIGCHLD in dialog_prgbox() to eliminate defunct processes + (report by xDog Walker). + + improve the way "hotkeys" are assigned to widget buttons by checking + if a given key has already been used in the row of buttons (Debian + #684933). + + amend fix for --trace parsing from 2012/07/03, which sometimes + skipped a parameter (report by xDog Walker). + + drop copismall and install files from samples, which were essentially + nonfunctional. + + correct secondary border colors in samples/slackware.rc and + samples/whiptail.rc + + update gl.po, add ia.po from + http://translationproject.org/latest/dialog/ + + fix various issues reported by coverity scan. + + miscellaneous configure script fixes/updates: + + require autoconf 2.52+patches + + support --datarootdir option + + check for clang compiler + + check for tinfo library when looking for ncurses + + add 3rd parameter to AC_DEFINE for autoheader + + remove unused macros from aclocal.m4 + + update config.guess, config.sub + +2012/07/06 + + modify samples/setup-tempfile to work with Tru64's shell. + + modify inputmenu sample scripts to make them more portable: + + use "id" rather than "$GROUPS", use sed to work with Solaris. + + use sed to split-up the rename results to work with HPUX. + + fix regression in msgbox (ArchLinux #30574) + +2012/07/03 + + modify prgbox widget to work with --extra-button, etc. + + add case values to several widgets to allow for mouse-clicks with + "--extra-button" and "--help-button" additions. + + correct timebox widget's exit code for "--extra-button" when handing + the "enter" key. + + modify msgbox widget to honor "--extra-button". + + corrected processing of "--trace" option, which did not update the + index into command-line to point past its value. + + add a check in dialog program for valid characters used in option, + e.g., to generate an error if a script attempts to add option value + using "=" rather than with whitespace. + + add new command-line option --default-button and library function + dlg_default_button() to retrieve the value set by the option + to provide a way to set the default button directly rather than + by combining --nook, etc. (patch by Zoltan Kelemen). + + amend include of unctrl.h to apply only to the case where curses.h + is included, to avoid conflict of ncurses' unctrl.h with a system + implementation (report by Martin Roedlach) + + add limit-check to dlg_toupper() in non-wide curses mode to work + when non-character values such as arrow-key codes are passed to + it (patch by Zoltan Kelemen). + + override timeout value, e.g., as set via --timeout command-line + option in pause widget because that interferes with pause's behavior + (report by Jan Spitalnik). + + modify samples/inputmenu* to allow ":" in renamed text (report by + Andreas Stoewing). + + modify double-quoting to make it more consistent, i.e., checklist + output is quoted only when needed. This fixes the case where + single-quotes were used whether or not needed, but also modifies + older checklist behavior for double-quoting which always added those + (Debian #663664). + + correct exit-code used in inputmenu for "rename" button (Debian + #673041, forwarded from Ubuntu #333909, patch by Lebedev Vadim). + + update el.po and hr.po from + http://translationproject.org/latest/dialog/ + + use checkbashisms to clean up sample scripts. + +2012/02/15 + + modify menubox.c to use the same improvement as in checklist.c + + improve auto width computation for checklist widget by using + dlg_calc_list_width as in the non-auto case (Edho Arief). + + eliminate some bashisms in the sample scripts (Pedro Giffuni). + + makefile fixes from FreeBSD ports (Li-Wen Hsu): + + make --with-package option of configure script work. + + get LIBTOOL_VERSION from configure script, needed by + ${LIBTOOL_VERSION} in LIBTOOL_CREATE (LIB_CREATE in configure and + aclocal.m4) + + update cs.po and sr.po from + http://translationproject.org/latest/dialog/ + + updated configure script macros, improving CF_XOPEN_SOURCE among + other fixes. + +2011/10/20 + + fix --analyze warnings for clang versions 2.8, 2.9. + + add configure check for lint program. + + add check in dlg_getc() in case its window is freed as a side effect + of removing callbacks. + + fix logic in freeing subwindows (report by xDog Walker). + + fix a regression in logic distinguishing between inputmenu and menu + widgets (report by xDog Walker). + + minor fixes to library manpage. + +2011/10/18 + + modify header-sh.in to work around limit on sed script length on + HPUX. + + add a special case of parameter parsing for "--trace" to the + initialization done before calling init_dialog(), to allow users to + capture the initial state of the parameter list before any options + are processed and removed. This is only done if "--trace" is the + first option, otherwise it is handled in the common options as before + (report by xDog Walker). + + modify samples/testdata-8bit, discarding $1 from the parameter list + if it was used, so that the source'ing scripts can consistently use + "$@" to insert parameters before the widget, e.g., as an alternative + to using $DIALOGOPTS (report by xDog Walker). + + modify treatment of function pointers in menubox.c, make + dlg_renamed_menutext() and dlg_dummy_menutext() visible to library + users (request by xDog Walker). + + add dlg_count_real_columns(), use to modify centering for "--hline" + text to account for "\Z"s (report by xDog Walker). + + improve check in dlg_draw_arrows2() for conflict between the window + title and up-arrow marker to take into account that the given window + may not be the top-level window of the widget. + + change width of page up/down mouse areas in fselect panes to use the + full width of the panes rather than only the portion from the left + margin to the up/down arrow. + + add/use dlg_draw_box2() and dlg_draw_bottom_box2() to use the + secondary borders. + + modify rc-file read/write to accept/generate color values that refer + to previously-processed items in the color table. This reduces the + number of distinct colors that must be specified to set up a color + scheme. + + add color table entries for secondary borders, i.e., the ones that + are normally drawn with the dialog's text-colors (Debian #641168). + + modify fselect.c to scan the current directory if the input field + happens to be empty (Debian #640905). + + repeated the discussion of environment variables that can override + the exit-status values in the manpage's return-codes section + (Debian #642105). + + add an example to the manpage showing how to override the form + widget's keys used for field/button traversal (Debian #642108). + + modify call to dlg_register_window() in formbox.c so that the editing + bindings are attached to the form sub-window rather than the + top-level dialog window. Also change the name by which the editing + bindings are bound for editbox.c, fselect.c and inputbox.c, so that + the editing and navigation bindings can be different. + + correct logic in dlg_lookup_key() so that it matches the widget name + before using a binding from .dialogrc, allowing the inner/outer + windows of form and other editing widgets to have different bindings. + + modify dlg_register_window() to call dlg_dump_window_keys() after + its updates, via the --trace output, to supplement the manpage + description of key bindings (Debian #642108). + + add DLGK_FORM_PREV and DLGK_FORM_NEXT key-bindings to form.c, to + allow binding a single key to traverse both form-fields and buttons + (Debian #642108). + + modify dlg_parse_rc() to check for error return from + dlg_parse_bindkey(). + + add function dlg_dump_window_keys(), to help with debugging widgets. + + add CR, LF, TAB, FF and ESC to table of curses names to help make + key bindings more readable. + + update table of dialog key-names so that helpfile and trace are + dumped properly. + + correct dlg_dump_keys(), which was showing only the first item in + the matched binding table. + + save/restore window current position in dlg_update_mixedgauge(). + + pass return-code from pause_for_ok() from dlg_progressbox() when + pauseopt is set, rather than only DLG_OK. + + call setlocale() in init_dialog() rather than relying on on-demand + use within inputstr.c, since there are paths in textbox widget which + do not exercise the latter (report by xDog Walker). + + fix some places where checks for "\Z" were done without also checking + dialog_vars.colors (report by Moray Henderson). + + correct logic for DIALOGOPTS parsing so that the parse happens only + once unless memory leak checking is enabled (report by xDog Walker). + + remove an incorrect free() call in dlg_free_gauge() (report by xDog + Walker). + + modify dlg_trace_win() to log wide-characters (report by xDog Walker). + + make traces shorter by skipping repeated ERR's, but showing the + number skipped (report by xDog Walker). + + improve description in manpage to distinguish program box and + progress box from tailboxes (adapted from email by xDog Walker). + + modify dlg_trace_win() so that it looks for the topmost window in a + dialog. Because subwindows share space with the top window, tracing + the latter shows the whole widget (report by xDog Walker). + + expand tracing so that each window is traced before soliciting input, + making the ^T feature to print a window on demand partly redundant + (suggested by xDog Walker). + + cosmetic change in dialog.h to avoid "*/*" strings from comments next + to "*" (report by xDog Walker). + + ensure result from dlg_align_columns() has trailing null on each + string. Analysis was hindered by libc6's continuance of libc5's + early-1990s misfeature of clearing the result from malloc, noting + that libc6's documentation incorrectly claims that it does not do + this (report by xDog Walker). + 2011/07/07 + modify util.c to work better with old versions of ncurses: + suppress use of wchgat() before fix in 20060715 which is needed @@ -87,7 +307,7 @@ to it: + CF_XOPEN_SOURCE, workaround for cygwin to get ncurses' configure script to define _XOPEN_SOURCE_EXTENDED (cygwin's features.h doesn't do anything, so it needs a crutch). - + updated config.guess, config.sub + + update config.guess, config.sub 2011/03/02 + add --prgbox and --programbox (adapted from patch by David Boyd). @@ -155,7 +375,7 @@ to it: CF_ADD_LIBDIR for the curses-directory here, from CF_NCURSES_CPPFLAGS and CF_NCURSES_LDFLAGS, so it will work even with the default checking, e.g., no --with-ncurses, etc. - + updated config.guess, config.sub + + update config.guess, config.sub 2010/04/28 + several improvements to configure script: @@ -250,7 +470,7 @@ to it: libutf8 and libiconv. + update da.po, ru.po from http://translationproject.org/latest/dialog/ - + updated config.guess, config.sub + + update config.guess, config.sub 2008/08/19 + amend changes to quoting; by default, the checklist widget quotes its @@ -333,7 +553,7 @@ to it: ESC to be returned, quitting dialog (report by Reiner Huober). + add extern "C" declarations to dlg_keys.h so the corresponding function declarations are exported to C++ as C symbols. - + updated config.guess, config.sub + + update config.guess, config.sub 2007/06/04 + fix a memory leak in editbox.c @@ -395,7 +615,8 @@ to it: + use $(INSTALL_SCRIPT) for installing dialog-config (report by Santiago Vila). -2007/02/27 +2007/02/27 - release 1.1 + + mark as "dialog 1.1" + add dialog-config script, which provides applications with compile- and link-information for using the dialog library. + move calls to dlg_trim_string() out of loop in dialog.c, so each @@ -436,7 +657,7 @@ to it: CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS, CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC, CF_WITH_DMALLOC, CF_WITH_LIBTOOL and CF_XOPEN_SOURCE. - + updated config.guess, config.sub + + update config.guess, config.sub > adapted fixes from SuSE package (Werner Fink): + add some limit-checks in dlg_draw_shadow(). + make shadows resizable, using new dlg_move_window() in msgbox.c @@ -628,8 +849,7 @@ to it: + modify tailboxbg by resetting tty modes at the point where it forks a process to update the screen, rather than waiting until that process exits. This improves user feedback by making it apparent that dialog - is no longer processing input after that point (Redhat Bugzilla - #142538). + is no longer processing input after that point (Redhat #142538). + minor updates to some .po files using Babel Fish, comparing with lynx. + update es.po (Santiago Vila). + work around bug in NetBSD 1.6 curses which seems to be confused by @@ -815,8 +1035,7 @@ to it: before dialog is invoked (Debian #244746). + correct dlg_match_char() function, which was broken during rewrite to support wide-characters (Debian #244777). - + improved ru.po, uses UTF-8 charset (Leonid Kanter, Redhat Bugzilla - #119200). + + improved ru.po, uses UTF-8 charset (Leonid Kanter, Redhat #119200). + correct position of shadow drawn for dialogs, which appeared to work for most versions of curses (other than NetBSD) but would have been visible for certain color schemes (discussion with Julian Coleman). @@ -1147,7 +1366,7 @@ to it: the --stdout option does not work on HPUX but otherwise dialog works. + updated el.po (patch by kromJx ). -2002/05/19 +2002/05/19 - release 0.9b + add --no-collapse option to allow one to retain tabs and repeated blanks in a message box (request by Roberto Simoni). + use DLG_EXIT_ESC constant rather than -1's in several places. This @@ -1615,15 +1834,15 @@ to it: Santiago Vila : 1999/10/07 - + add a password dialog box. + + add a password dialog box (Debian #45964, patch by Joey Hess). + implement "--defaultno" option to specify if the default for - the yes/no box is "No". + the yes/no box is "No" (Debian #46076, patch by Joey Hess). 1999/03/10 + modify input.c to clear the input field to the right of the - given string (unclear: this seems redundant, since the - dialog is drawn in a new window). + given string, to help with screen-refresh 1998/12/08 - + check for list_height less than one in checklist.c + + check for list_height less than one in checklist.c (Debian + #22239). 1998/10/21 + use function wscrl() in preference to scroll() in checklist.c and menubox.c (unclear: in ncurses, scroll() is a macro that @@ -1633,12 +1852,14 @@ to it: that directory. 1998/09/12 + simplify menubox.c using new functions print_arrows() and - print_items(). - + add logic to handle KEY_NPAGE and KEY_PPAGE. - + change sample scripts to use Debian tempfile utility rather - than putting files into /tmp. - + change sample scripts to use 'dialog' from user's path rather - than in the parent directory as in the build directory. + print_items(). add logic to handle KEY_NPAGE and KEY_PPAGE + (Debian #26326). + + modifications to provide sample scripts (Debian #26211): + + change sample scripts to use Debian tempfile utility rather + than putting files into /tmp. + + change sample scripts to use 'dialog' from user's path + rather than in the parent directory as in the build + directory. + use the system copy of GPL rather than that in the build directory as an example for the textbox script. @@ -1664,16 +1885,16 @@ The relevant portions of the Debian chan 1998/05/24 + Replaced guage.c by the one in dialog 0.6z, which is known to work. - Fixes Bug #18284: unstable dialog. + Fixes Debian #18284: unstable dialog. 1997/12/16 + dialog.c: dialog_input_result printed with "%s" format. This was - Bug #9913, fixed by Bill Mitchell, but the change was lost. + Debian #9913, fixed by Bill Mitchell, but the change was lost. + Pristine source, .depend is not removed in clean target. Instead, it - is made zero lenght (otherwise it would not work *without* fakeroot). - + Added '^U' support in input box (Bug #9915, patch by joey@debian.org). - + Wrote patch to fix core-dumping problem (Bug #13170). Sven Rudolph + is made zero length (otherwise it would not work *without* fakeroot). + + Added '^U' support in input box (Debian #9915, patch by Joey Hess). + + Wrote patch to fix core-dumping problem (Debian #13170). Sven Rudolph : -- vile:fk=8bit Modified: user/attilio/vmobj-readlock/contrib/dialog/VERSION ============================================================================== --- user/attilio/vmobj-readlock/contrib/dialog/VERSION Tue Jun 18 15:17:29 2013 (r251949) +++ user/attilio/vmobj-readlock/contrib/dialog/VERSION Tue Jun 18 15:22:16 2013 (r251950) @@ -1 +1 @@ -10:0:0 1.1 20110707 +11:1:0 1.2 20130523 Modified: user/attilio/vmobj-readlock/contrib/dialog/aclocal.m4 ============================================================================== --- user/attilio/vmobj-readlock/contrib/dialog/aclocal.m4 Tue Jun 18 15:17:29 2013 (r251949) +++ user/attilio/vmobj-readlock/contrib/dialog/aclocal.m4 Tue Jun 18 15:22:16 2013 (r251950) @@ -1,7 +1,7 @@ dnl macros used for DIALOG configure script -dnl $Id: aclocal.m4,v 1.82 2011/06/28 22:48:31 tom Exp $ +dnl $Id: aclocal.m4,v 1.90 2012/12/02 20:07:30 tom Exp $ dnl --------------------------------------------------------------------------- -dnl Copyright 1999-2010,2011 -- Thomas E. Dickey +dnl Copyright 1999-2011,2012 -- Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -31,23 +31,21 @@ dnl see dnl http://invisible-island.net/autoconf/ dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- -dnl AM_GNU_GETTEXT version: 12 updated: 2010/06/19 07:02:11 +dnl AM_GNU_GETTEXT version: 13 updated: 2012/11/09 05:47:26 dnl -------------- dnl Usage: Just like AM_WITH_NLS, which see. AC_DEFUN([AM_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl + AC_REQUIRE([CF_PROG_CC])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) @@ -282,7 +280,7 @@ fi AC_SUBST($1)dnl ])dnl dnl --------------------------------------------------------------------------- -dnl AM_WITH_NLS version: 24 updated: 2010/06/20 09:24:28 +dnl AM_WITH_NLS version: 25 updated: 2012/10/06 08:57:51 dnl ----------- dnl Inserted as requested by gettext 0.10.40 dnl File from /usr/share/aclocal @@ -385,7 +383,7 @@ AC_DEFUN([AM_WITH_NLS], LIBS="$cf_save_LIBS_1" if test "$cf_cv_func_gettext" = yes ; then - AC_DEFINE(HAVE_LIBINTL_H) + AC_DEFINE(HAVE_LIBINTL_H,1,[Define to 1 if we have libintl.h]) dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU @@ -592,15 +590,30 @@ changequote([,])dnl AC_SUBST(GENCAT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56 -dnl ------------ -dnl Conditionally generate script according to whether we're using the release -dnl version of autoconf, or a patched version (using the ternary component as -dnl the patch-version). -define(CF_AC_PREREQ, -[CF_PREREQ_COMPARE( -AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), -AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1], [$2], [$3])])dnl +dnl CF_ACVERSION_CHECK version: 3 updated: 2012/10/03 18:39:53 +dnl ------------------ +dnl Conditionally generate script according to whether we're using a given autoconf. +dnl +dnl $1 = version to compare against +dnl $2 = code to use if AC_ACVERSION is at least as high as $1. +dnl $3 = code to use if AC_ACVERSION is older than $1. +define([CF_ACVERSION_CHECK], +[ +ifdef([m4_version_compare], +[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], +[CF_ACVERSION_COMPARE( +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), +AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl +dnl --------------------------------------------------------------------------- +dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53 +dnl -------------------- +dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1, +dnl MAJOR2, MINOR2, TERNARY2, +dnl PRINTABLE2, not FOUND, FOUND) +define([CF_ACVERSION_COMPARE], +[ifelse(builtin([eval], [$2 < $5]), 1, +[ifelse([$8], , ,[$8])], +[ifelse([$9], , ,[$9])])])dnl dnl --------------------------------------------------------------------------- dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42 dnl ------------- @@ -876,12 +889,6 @@ dnl Allow user to disable a normally-on AC_DEFUN([CF_ARG_DISABLE], [CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl dnl --------------------------------------------------------------------------- -dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31 -dnl ------------- -dnl Allow user to enable a normally-off option. -AC_DEFUN([CF_ARG_ENABLE], -[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl -dnl --------------------------------------------------------------------------- dnl CF_ARG_MSG_ENABLE version: 2 updated: 2000/07/29 19:32:03 dnl ----------------- dnl Verbose form of AC_ARG_ENABLE: @@ -927,7 +934,7 @@ ifelse([$3],,[ :]dnl ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_BUNDLED_INTL version: 16 updated: 2010/10/23 15:55:05 +dnl CF_BUNDLED_INTL version: 17 updated: 2012/10/06 08:57:51 dnl --------------- dnl Top-level macro for configuring an application with a bundled copy of dnl the intl and po directories for gettext. @@ -984,7 +991,7 @@ if test "$USE_NLS" = yes ; then [ --with-textdomain=PKG NLS text-domain (default is package name)], [NLS_TEXTDOMAIN=$withval], [NLS_TEXTDOMAIN=$PACKAGE]) - AC_DEFINE_UNQUOTED(NLS_TEXTDOMAIN,"$NLS_TEXTDOMAIN") + AC_DEFINE_UNQUOTED(NLS_TEXTDOMAIN,"$NLS_TEXTDOMAIN",[Define to the nls textdomain value]) AC_SUBST(NLS_TEXTDOMAIN) fi @@ -1004,7 +1011,7 @@ if test "$USE_INCLUDED_LIBINTL" = yes ; INTLDIR_MAKE="#" fi if test -z "$INTLDIR_MAKE"; then - AC_DEFINE(HAVE_LIBGETTEXT_H) + AC_DEFINE(HAVE_LIBGETTEXT_H,1,[Define to 1 if we have libgettext.h]) for cf_makefile in \ $srcdir/intl/Makefile.in \ $srcdir/intl/makefile.in @@ -1047,17 +1054,43 @@ dnl own code, except ENABLE_NLS, which i if test "$USE_INCLUDED_LIBINTL" = yes ; then if test "$nls_cv_force_use_gnu_gettext" = yes ; then - AC_DEFINE(HAVE_GETTEXT) + AC_DEFINE(HAVE_GETTEXT,1,[Define to 1 if we have gettext function]) elif test "$nls_cv_use_gnu_gettext" = yes ; then - AC_DEFINE(HAVE_GETTEXT) + AC_DEFINE(HAVE_GETTEXT,1,[Define to 1 if we have gettext function]) fi if test -n "$nls_cv_header_intl" ; then - AC_DEFINE(HAVE_LIBINTL_H) + AC_DEFINE(HAVE_LIBINTL_H,1,[Define to 1 if we have header-file for libintl]) fi fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59 +dnl CF_CC_ENV_FLAGS version: 1 updated: 2012/10/03 05:25:49 +dnl --------------- +dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content +dnl into CC. This will not help with broken scripts that wrap the compiler with +dnl options, but eliminates a more common category of user confusion. +AC_DEFUN([CF_CC_ENV_FLAGS], +[ +# This should have been defined by AC_PROG_CC +: ${CC:=cc} + +AC_MSG_CHECKING(\$CC variable) +case "$CC" in #(vi +*[[\ \ ]]-[[IUD]]*) + AC_MSG_RESULT(broken) + AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) + # humor him... + cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]]//'` + CC=`echo "$CC" | sed -e 's/[[ ]].*//'` + CF_ADD_CFLAGS($cf_flags) + ;; +*) + AC_MSG_RESULT(ok) + ;; +esac +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CHECK_CACHE version: 12 updated: 2012/10/02 20:55:03 dnl -------------- dnl Check if we're accidentally using a cache from a different machine. dnl Derive the system name, as a check for reusing the autoconf cache. @@ -1080,7 +1113,7 @@ else system_name="`(hostname) 2>/dev/null`" fi fi -test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name") +test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.]) AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"]) test -z "$system_name" && system_name="$cf_cv_system_name" @@ -1092,7 +1125,40 @@ if test ".$system_name" != ".$cf_cv_syst fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_CHTYPE version: 7 updated: 2010/10/23 15:54:49 +dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39 +dnl ----------------- +dnl Check if the given compiler is really clang. clang's C driver defines +dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does +dnl not ignore some gcc options. +dnl +dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to +dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from +dnl the wrappers for gcc and g++ warnings. +dnl +dnl $1 = GCC (default) or GXX +dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS +dnl $3 = CFLAGS (default) or CXXFLAGS +AC_DEFUN([CF_CLANG_COMPILER],[ +ifelse([$2],,CLANG_COMPILER,[$2])=no + +if test "$ifelse([$1],,[$1],GCC)" = yes ; then + AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler) + cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" + ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -Qunused-arguments" + AC_TRY_COMPILE([],[ +#ifdef __clang__ +#else +make an error +#endif +],[ifelse([$2],,CLANG_COMPILER,[$2])=yes +cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" +],[]) + ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS" + AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2])) +fi +]) +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_CHTYPE version: 8 updated: 2012/10/06 08:57:51 dnl ---------------- dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses). AC_DEFUN([CF_CURSES_CHTYPE], @@ -1104,14 +1170,14 @@ AC_CACHE_CHECK(for chtype typedef,cf_cv_ [cf_cv_chtype_decl=yes], [cf_cv_chtype_decl=no])]) if test $cf_cv_chtype_decl = yes ; then - AC_DEFINE(HAVE_TYPE_CHTYPE) + AC_DEFINE(HAVE_TYPE_CHTYPE,1,[Define to 1 if chtype is declared]) AC_CACHE_CHECK(if chtype is scalar or struct,cf_cv_chtype_type,[ AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], [chtype foo; long x = foo], [cf_cv_chtype_type=scalar], [cf_cv_chtype_type=struct])]) if test $cf_cv_chtype_type = scalar ; then - AC_DEFINE(TYPE_CHTYPE_IS_SCALAR) + AC_DEFINE(TYPE_CHTYPE_IS_SCALAR,1,[Define to 1 if chtype is a scaler/integer]) fi fi ])dnl @@ -1227,7 +1293,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 34 updated: 2011/04/09 14:51:08 +dnl CF_CURSES_LIBS version: 36 updated: 2012/07/07 21:02:48 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -1307,7 +1373,7 @@ if test ".$ac_cv_func_initscr" != .yes ; # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ - for cf_term_lib in $cf_check_list termcap termlib unknown + for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown do AC_CHECK_LIB($cf_term_lib,tgoto,[break]) done @@ -1351,7 +1417,7 @@ fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_TERM_H version: 9 updated: 2011/04/09 18:19:55 +dnl CF_CURSES_TERM_H version: 10 updated: 2012/10/06 08:57:51 dnl ---------------- dnl SVr4 curses should have term.h as well (where it puts the definitions of dnl the low-level interface). This may not be true in old/broken implementations, @@ -1410,18 +1476,18 @@ esac case $cf_cv_term_header in #(vi term.h) #(vi - AC_DEFINE(HAVE_TERM_H) + AC_DEFINE(HAVE_TERM_H,1,[Define to 1 if we have term.h]) ;; ncurses/term.h) #(vi - AC_DEFINE(HAVE_NCURSES_TERM_H) + AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h]) ;; ncursesw/term.h) - AC_DEFINE(HAVE_NCURSESW_TERM_H) + AC_DEFINE(HAVE_NCURSESW_TERM_H,1,[Define to 1 if we have ncursesw/term.h]) ;; esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_UNCTRL_H version: 1 updated: 2011/04/09 18:19:55 +dnl CF_CURSES_UNCTRL_H version: 2 updated: 2012/10/06 08:57:51 dnl ------------------ dnl Any X/Open curses implementation must have unctrl.h, but ncurses packages dnl may put it in a subdirectory (along with ncurses' other headers, of @@ -1465,18 +1531,18 @@ esac case $cf_cv_unctrl_header in #(vi unctrl.h) #(vi - AC_DEFINE(HAVE_UNCTRL_H) + AC_DEFINE(HAVE_UNCTRL_H,1,[Define to 1 if we have unctrl.h]) ;; ncurses/unctrl.h) #(vi - AC_DEFINE(HAVE_NCURSES_UNCTRL_H) + AC_DEFINE(HAVE_NCURSES_UNCTRL_H,1,[Define to 1 if we have ncurses/unctrl.h]) ;; ncursesw/unctrl.h) - AC_DEFINE(HAVE_NCURSESW_UNCTRL_H) + AC_DEFINE(HAVE_NCURSESW_UNCTRL_H,1,[Define to 1 if we have ncursesw/unctrl.h]) ;; esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_WACS_MAP version: 5 updated: 2011/01/15 11:28:59 +dnl CF_CURSES_WACS_MAP version: 6 updated: 2012/10/06 08:57:51 dnl ------------------ dnl Check for likely values of wacs_map[]. AC_DEFUN([CF_CURSES_WACS_MAP], @@ -1495,10 +1561,10 @@ AC_CACHE_CHECK(for wide alternate charac break]) done]) -test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map) +test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map,[Define to name of (n)curses wide-character array]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_WACS_SYMBOLS version: 1 updated: 2011/01/15 11:28:59 +dnl CF_CURSES_WACS_SYMBOLS version: 2 updated: 2012/10/06 08:57:51 dnl ---------------------- dnl Do a check to see if the WACS_xxx constants are defined compatibly with dnl X/Open Curses. In particular, NetBSD's implementation of the WACS_xxx @@ -1530,7 +1596,31 @@ else fi ]) -test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS) +test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS,1,[Define to 1 if (n)curses supports wide-character WACS_ symbols]) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WGETPARENT version: 3 updated: 2012/10/06 08:57:51 +dnl -------------------- +dnl Check for curses support for directly determining the parent of a given +dnl window. Some implementations make this difficult, so we provide for +dnl defining an application-specific function that gives this functionality. +dnl +dnl $1 = name of function to use if the feature is missing +AC_DEFUN([CF_CURSES_WGETPARENT],[ +CF_CURSES_FUNCS(wgetparent) +if test "x$cf_cv_func_wgetparent" != xyes +then + AC_MSG_CHECKING(if WINDOW has _parent member) + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], + [WINDOW *p = stdscr->_parent], + [cf_window__parent=yes], + [cf_window__parent=no]) + AC_MSG_RESULT($cf_window__parent) + if test "$cf_window__parent" = yes + then + AC_DEFINE(HAVE_WINDOW__PARENT,1,[Define to 1 if WINDOW struct has _parent member]) + fi +fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 @@ -1538,7 +1628,7 @@ dnl ---------- dnl "dirname" is not portable, so we fake it with a shell script. AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl dnl --------------------------------------------------------------------------- -dnl CF_DISABLE_ECHO version: 11 updated: 2009/12/13 13:16:57 +dnl CF_DISABLE_ECHO version: 12 updated: 2012/10/06 16:30:28 dnl --------------- dnl You can always use "make -n" to see the actual options, but it's hard to dnl pick out/analyze warning messages when the compile-line is long. @@ -1553,7 +1643,7 @@ dnl AC_DEFUN([CF_DISABLE_ECHO],[ AC_MSG_CHECKING(if you want to see long compiling messages) CF_ARG_DISABLE(echo, - [ --disable-echo display "compiling" commands], + [ --disable-echo do not display "compiling" commands], [ ECHO_LT='--silent' ECHO_LD='@echo linking [$]@;' @@ -1618,38 +1708,6 @@ if test "$cf_disable_rpath_hack" = no ; fi ]) dnl --------------------------------------------------------------------------- -dnl CF_FIND_HEADER version: 2 updated: 2007/07/29 11:32:00 -dnl -------------- -dnl Find a header file, searching for it if it is not already in the include -dnl path. -dnl -dnl $1 = the header filename -dnl $2 = the package name -dnl $3 = action to perform if successful -dnl $4 = action to perform if not successful -AC_DEFUN([CF_FIND_HEADER],[ -AC_CHECK_HEADER([$1], - cf_find_header=yes,[ - cf_find_header=no -CF_HEADER_PATH(cf_search,$2) -for cf_incdir in $cf_search -do - if test -f $cf_incdir/$1 ; then - CF_ADD_INCDIR($cf_incdir) - CF_VERBOSE(... found in $cf_incdir) - cf_find_header=yes - break - fi - CF_VERBOSE(... tested $cf_incdir) -done -]) -if test "$cf_find_header" = yes ; then -ifelse([$3],,:,[$3]) -ifelse([$4],,,[else -$4]) -fi -])dnl -dnl --------------------------------------------------------------------------- dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54 dnl --------------- dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We @@ -1830,7 +1888,7 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_WAIT version: 2 updated: 1997/10/21 19:45:33 +dnl CF_FUNC_WAIT version: 3 updated: 2012/10/06 08:57:51 dnl ------------ dnl Test for the presence of , 'union wait', arg-type of 'wait()' dnl and/or 'waitpid()'. @@ -1855,7 +1913,7 @@ if test $cf_cv_type_unionwait = yes; the [cf_cv_arg_union_wait=no]) ]) AC_MSG_RESULT($cf_cv_arg_union_wait) - test $cf_cv_arg_union_wait = yes && AC_DEFINE(WAIT_USES_UNION) + test $cf_cv_arg_union_wait = yes && AC_DEFINE(WAIT_USES_UNION,1,[Define to 1 if wait() uses a union parameter]) AC_MSG_CHECKING(if union wait can be used as waitpid-arg) AC_CACHE_VAL(cf_cv_arg_union_waitpid,[ @@ -1865,12 +1923,12 @@ if test $cf_cv_type_unionwait = yes; the [cf_cv_arg_union_waitpid=no]) ]) AC_MSG_RESULT($cf_cv_arg_union_waitpid) - test $cf_cv_arg_union_waitpid = yes && AC_DEFINE(WAITPID_USES_UNION) + test $cf_cv_arg_union_waitpid = yes && AC_DEFINE(WAITPID_USES_UNION,1,[Define to 1 if waitpid() uses a union parameter]) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32 +dnl CF_GCC_ATTRIBUTES version: 16 updated: 2012/10/02 20:55:03 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -1948,27 +2006,27 @@ EOF test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute) cat conftest.h >>confdefs.h case $cf_attribute in #(vi + noreturn) #(vi + AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc]) + ;; printf) #(vi - if test "$cf_printf_attribute" = no ; then - cat >>confdefs.h <>confdefs.h <>confdefs.h <>confdefs.h < conftest.$ac_ext < Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8BC8F39C; Tue, 18 Jun 2013 22:08:27 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7DC94179A; Tue, 18 Jun 2013 22:08:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5IM8RUf033227; Tue, 18 Jun 2013 22:08:27 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5IM8Rhg033226; Tue, 18 Jun 2013 22:08:27 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306182208.r5IM8Rhg033226@svn.freebsd.org> From: Attilio Rao Date: Tue, 18 Jun 2013 22:08:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251968 - user/attilio/vmobj-readlock/sys/kern X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 22:08:27 -0000 Author: attilio Date: Tue Jun 18 22:08:27 2013 New Revision: 251968 URL: http://svnweb.freebsd.org/changeset/base/251968 Log: Remove a bogus vm_page_wakeup_locked(). Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/kern/kern_exec.c Modified: user/attilio/vmobj-readlock/sys/kern/kern_exec.c ============================================================================== --- user/attilio/vmobj-readlock/sys/kern/kern_exec.c Tue Jun 18 21:44:35 2013 (r251967) +++ user/attilio/vmobj-readlock/sys/kern/kern_exec.c Tue Jun 18 22:08:27 2013 (r251968) @@ -974,7 +974,6 @@ exec_map_first_page(imgp) } vm_page_lock(ma[0]); vm_page_hold(ma[0]); - vm_page_wakeup_locked(ma[0]); vm_page_unlock(ma[0]); VM_OBJECT_WUNLOCK(object); From owner-svn-src-user@FreeBSD.ORG Tue Jun 18 22:18:05 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 026DD979; Tue, 18 Jun 2013 22:18:05 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E673817F0; Tue, 18 Jun 2013 22:18:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5IMI4g5036504; Tue, 18 Jun 2013 22:18:04 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5IMI11m036486; Tue, 18 Jun 2013 22:18:01 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306182218.r5IMI11m036486@svn.freebsd.org> From: Attilio Rao Date: Tue, 18 Jun 2013 22:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251969 - in user/attilio/vmcontention: contrib/bmake contrib/subversion/subversion/include contrib/subversion/subversion/libsvn_fs_fs contrib/subversion/subversion/libsvn_subr contrib/... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 22:18:05 -0000 Author: attilio Date: Tue Jun 18 22:18:01 2013 New Revision: 251969 URL: http://svnweb.freebsd.org/changeset/base/251969 Log: MFC Added: user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb.c - copied unchanged from r251968, head/sys/dev/ixgbe/ixgbe_dcb.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb.h - copied unchanged from r251968, head/sys/dev/ixgbe/ixgbe_dcb.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb_82598.c - copied unchanged from r251968, head/sys/dev/ixgbe/ixgbe_dcb_82598.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb_82598.h - copied unchanged from r251968, head/sys/dev/ixgbe/ixgbe_dcb_82598.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb_82599.c - copied unchanged from r251968, head/sys/dev/ixgbe/ixgbe_dcb_82599.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb_82599.h - copied unchanged from r251968, head/sys/dev/ixgbe/ixgbe_dcb_82599.h Modified: user/attilio/vmcontention/contrib/bmake/parse.c user/attilio/vmcontention/contrib/subversion/subversion/include/svn_version.h user/attilio/vmcontention/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h user/attilio/vmcontention/contrib/subversion/subversion/libsvn_subr/internal_statements.h user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-checks.h user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-metadata.h user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-queries.h user/attilio/vmcontention/sys/conf/files user/attilio/vmcontention/sys/dev/drm2/i915/i915_gem.c user/attilio/vmcontention/sys/dev/drm2/i915/intel_fb.c user/attilio/vmcontention/sys/dev/ixgbe/README user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82598.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82599.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_api.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_api.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_common.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_common.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_osdep.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_phy.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_phy.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_type.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_vf.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_x540.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_x540.h user/attilio/vmcontention/sys/dev/syscons/scvgarndr.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_dir.h user/attilio/vmcontention/sys/fs/ext2fs/ext2fs.h user/attilio/vmcontention/sys/modules/ixgbe/Makefile user/attilio/vmcontention/tools/build/mk/OptionalObsoleteFiles.inc user/attilio/vmcontention/usr.bin/svn/lib/libapr/apr.h user/attilio/vmcontention/usr.sbin/bsdconfig/console/console user/attilio/vmcontention/usr.sbin/bsdconfig/console/include/messages.subr user/attilio/vmcontention/usr.sbin/bsdconfig/startup/include/messages.subr user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcconf user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcdelete user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcvar user/attilio/vmcontention/usr.sbin/bsdconfig/startup/startup user/attilio/vmcontention/usr.sbin/bsdconfig/usermgmt/include/messages.subr user/attilio/vmcontention/usr.sbin/bsdconfig/usermgmt/usermgmt Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/contrib/bmake/ (props changed) user/attilio/vmcontention/contrib/subversion/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) Modified: user/attilio/vmcontention/contrib/bmake/parse.c ============================================================================== --- user/attilio/vmcontention/contrib/bmake/parse.c Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/contrib/bmake/parse.c Tue Jun 18 22:18:01 2013 (r251969) @@ -157,7 +157,7 @@ __RCSID("$NetBSD: parse.c,v 1.188 2013/0 * Structure for a file being read ("included file") */ typedef struct IFile { - const char *fname; /* name of file */ + char *fname; /* name of file */ int lineno; /* current line number in file */ int first_lineno; /* line number of start of text */ int cond_depth; /* 'if' nesting when file opened */ @@ -2344,7 +2344,7 @@ Parse_SetInput(const char *name, int lin * name of the include file so error messages refer to the right * place. */ - curFile->fname = name; + curFile->fname = bmake_strdup(name); curFile->lineno = line; curFile->first_lineno = line; curFile->nextbuf = nextbuf; @@ -2357,6 +2357,8 @@ Parse_SetInput(const char *name, int lin buf = curFile->nextbuf(curFile->nextbuf_arg, &len); if (buf == NULL) { /* Was all a waste of time ... */ + if (curFile->fname) + free(curFile->fname); free(curFile); return; } Modified: user/attilio/vmcontention/contrib/subversion/subversion/include/svn_version.h ============================================================================== --- user/attilio/vmcontention/contrib/subversion/subversion/include/svn_version.h Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/contrib/subversion/subversion/include/svn_version.h Tue Jun 18 22:18:01 2013 (r251969) @@ -95,7 +95,7 @@ extern "C" { * * Always change this at the same time as SVN_VER_NUMTAG. */ -#define SVN_VER_TAG " (Release Candidate 3)" +#define SVN_VER_TAG " (r1490375)" /** Number tag: a string describing the version. @@ -110,7 +110,7 @@ extern "C" { * * Always change this at the same time as SVN_VER_TAG. */ -#define SVN_VER_NUMTAG "-rc3" +#define SVN_VER_NUMTAG "" /** Revision number: The repository revision number of this release. Modified: user/attilio/vmcontention/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h ============================================================================== --- user/attilio/vmcontention/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h Tue Jun 18 22:18:01 2013 (r251969) @@ -1,4 +1,4 @@ -/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.8.0-rc3/subversion/libsvn_fs_fs/token-map.h. +/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_fs_fs/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 Modified: user/attilio/vmcontention/contrib/subversion/subversion/libsvn_subr/internal_statements.h ============================================================================== --- user/attilio/vmcontention/contrib/subversion/subversion/libsvn_subr/internal_statements.h Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/contrib/subversion/subversion/libsvn_subr/internal_statements.h Tue Jun 18 22:18:01 2013 (r251969) @@ -1,4 +1,4 @@ -/* This file is automatically generated from internal_statements.sql and .dist_sandbox/subversion-1.8.0-rc3/subversion/libsvn_subr/token-map.h. +/* This file is automatically generated from internal_statements.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_subr/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_INTERNAL_SAVEPOINT_SVN 0 Modified: user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-checks.h ============================================================================== --- user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-checks.h Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-checks.h Tue Jun 18 22:18:01 2013 (r251969) @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.8.0-rc3/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_VERIFICATION_TRIGGERS 0 Modified: user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-metadata.h ============================================================================== --- user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-metadata.h Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-metadata.h Tue Jun 18 22:18:01 2013 (r251969) @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.8.0-rc3/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 Modified: user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-queries.h ============================================================================== --- user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-queries.h Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/contrib/subversion/subversion/libsvn_wc/wc-queries.h Tue Jun 18 22:18:01 2013 (r251969) @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.0-rc3/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_SELECT_NODE_INFO 0 Modified: user/attilio/vmcontention/sys/conf/files ============================================================================== --- user/attilio/vmcontention/sys/conf/files Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/sys/conf/files Tue Jun 18 22:18:01 2013 (r251969) @@ -1685,6 +1685,12 @@ dev/ixgbe/ixgbe_82599.c optional ixgbe compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x540.c optional ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb.c optional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb_82598.c optional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb_82599.c optional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa Modified: user/attilio/vmcontention/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- user/attilio/vmcontention/sys/dev/drm2/i915/i915_gem.c Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/sys/dev/drm2/i915/i915_gem.c Tue Jun 18 22:18:01 2013 (r251969) @@ -1362,7 +1362,6 @@ unlocked_vmobj: cause = ret = 0; m = NULL; - if (i915_intr_pf) { ret = i915_mutex_lock_interruptible(dev); if (ret != 0) { @@ -1372,6 +1371,23 @@ unlocked_vmobj: } else DRM_LOCK(dev); + /* + * Since the object lock was dropped, other thread might have + * faulted on the same GTT address and instantiated the + * mapping for the page. Recheck. + */ + VM_OBJECT_WLOCK(vm_obj); + m = vm_page_lookup(vm_obj, OFF_TO_IDX(offset)); + if (m != NULL) { + if ((m->flags & VPO_BUSY) != 0) { + DRM_UNLOCK(dev); + vm_page_sleep(m, "915pee"); + goto retry; + } + goto have_page; + } else + VM_OBJECT_WUNLOCK(vm_obj); + /* Now bind it into the GTT if needed */ if (!obj->map_and_fenceable) { ret = i915_gem_object_unbind(obj); @@ -1425,8 +1441,9 @@ unlocked_vmobj: goto retry; } m->valid = VM_PAGE_BITS_ALL; - *mres = m; vm_page_insert(m, vm_obj, OFF_TO_IDX(offset)); +have_page: + *mres = m; vm_page_busy(m); CTR4(KTR_DRM, "fault %p %jx %x phys %x", gem_obj, offset, prot, Modified: user/attilio/vmcontention/sys/dev/drm2/i915/intel_fb.c ============================================================================== --- user/attilio/vmcontention/sys/dev/drm2/i915/intel_fb.c Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/sys/dev/drm2/i915/intel_fb.c Tue Jun 18 22:18:01 2013 (r251969) @@ -207,6 +207,8 @@ static void intel_fbdev_destroy(struct d } } +extern int sc_txtmouse_no_retrace_wait; + int intel_fbdev_init(struct drm_device *dev) { struct intel_fbdev *ifbdev; @@ -229,6 +231,7 @@ int intel_fbdev_init(struct drm_device * drm_fb_helper_single_add_all_connectors(&ifbdev->helper); drm_fb_helper_initial_config(&ifbdev->helper, 32); + sc_txtmouse_no_retrace_wait = 1; return 0; } Modified: user/attilio/vmcontention/sys/dev/ixgbe/README ============================================================================== --- user/attilio/vmcontention/sys/dev/ixgbe/README Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/sys/dev/ixgbe/README Tue Jun 18 22:18:01 2013 (r251969) @@ -2,7 +2,7 @@ FreeBSD Driver for Intel(R) Ethernet 10 ============================================================================ /*$FreeBSD$*/ -November 12, 2010 +Jun 18, 2013 Contents @@ -18,8 +18,8 @@ Contents Overview ======== -This file describes the FreeBSD* driver for the Intel(R) Ethernet 10 Gigabit -Family of Adapters. Driver has been developed for use with FreeBSD 7.2 or later. +This file describes the FreeBSD* driver for the +Intel(R) Ethernet 10 Gigabit Family of Adapters. For questions related to hardware requirements, refer to the documentation supplied with your Intel 10GbE adapter. All hardware requirements listed @@ -42,7 +42,7 @@ optics, or is an Intel(R) Ethernet Serve Intel optics and/or the direct attach cables listed below. When 82599-based SFP+ devices are connected back to back, they should be set to -the same Speed setting via Ethtool. Results may vary if you mix speed settings. +the same Speed setting. Results may vary if you mix speed settings. Supplier Type Part Numbers @@ -70,7 +70,12 @@ Finisar DUAL RATE 1G/10G SFP+ LR (No Avago DUAL RATE 1G/10G SFP+ LR (No Bail) AFCT-701SDZ-IN1 Finistar 1000BASE-T SFP FCLF8522P2BTL Avago 1000BASE-T SFP ABCU-5710RZ - + +NOTE: As of driver version 2.5.13 it is possible to allow the operation +of unsupported modules by setting the static variable 'allow_unsupported_sfp' +to TRUE and rebuilding the driver. If problems occur please assure that they +can be reproduced with fully supported optics first. + 82599-based adapters support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. @@ -224,14 +229,7 @@ all 10 Gigabit adapters. When there is a choice run on a 64bit OS rather than 32, it makes a significant difference in improvement. - The default scheduler SCHED_4BSD is not smart about SMP locality issues. - Significant improvement can be achieved by switching to the ULE scheduler. - - This is done by changing the entry in the config file from SCHED_4BSD to - SCHED_ULE. Note that this is only advisable on FreeBSD 7, on 6.X there have - been stability problems with ULE. - - The interface can generate high number of interrupts. To avoid running + The interface can generate a high number of interrupts. To avoid running into the limit set by the kernel, adjust hw.intr_storm_threshold setting using sysctl: @@ -242,12 +240,10 @@ all 10 Gigabit adapters. hw.intr_storm_threshold=9000 If you still see Interrupt Storm detected messages, increase the limit to a - higher number. - - Best throughput results are seen with a large MTU; use 9000 if possible. + higher number, or the detection can be disabled by setting it to 0. - The default number of descriptors is 1024, increasing this to 2K or even - 4K may improve performance in some workloads, but change carefully. + The default number of descriptors is 2048, increasing or descreasing + may improve performance in some workloads, but change carefully. Known Limitations @@ -284,7 +280,7 @@ issues download your adapter's user guid ---------------------------------------------------------- Some PCI-E x8 slots are actually configured as x4 slots. These slots have insufficient bandwidth for full 10Gbe line rate with dual port 10GbE devices. - The driver can detect this situation and will write the following message in + The driver will detect this situation and will write the following message in the system log: "PCI-Express bandwidth available for this card is not sufficient for optimal performance. For optimal performance a x8 PCI-Express slot is required." Modified: user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.c Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.c Tue Jun 18 22:18:01 2013 (r251969) @@ -32,6 +32,7 @@ ******************************************************************************/ /*$FreeBSD$*/ + #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_inet.h" #include "opt_inet6.h" @@ -47,7 +48,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.5.8 - HEAD"; +char ixgbe_driver_version[] = "2.5.13"; /********************************************************************* * PCI Device ID Table @@ -109,8 +110,7 @@ static void ixgbe_start(struct ifnet static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); #else /* ! IXGBE_LEGACY_TX */ static int ixgbe_mq_start(struct ifnet *, struct mbuf *); -static int ixgbe_mq_start_locked(struct ifnet *, - struct tx_ring *, struct mbuf *); +static int ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *); static void ixgbe_qflush(struct ifnet *); static void ixgbe_deferred_mq_start(void *, int); #endif /* IXGBE_LEGACY_TX */ @@ -122,6 +122,7 @@ static void ixgbe_media_status(struc static int ixgbe_media_change(struct ifnet *); static void ixgbe_identify_hardware(struct adapter *); static int ixgbe_allocate_pci_resources(struct adapter *); +static void ixgbe_get_slot_info(struct ixgbe_hw *); static int ixgbe_allocate_msix(struct adapter *); static int ixgbe_allocate_legacy(struct adapter *); static int ixgbe_allocate_queues(struct adapter *); @@ -149,7 +150,7 @@ static void ixgbe_setup_hw_rsc(struct rx static void ixgbe_enable_intr(struct adapter *); static void ixgbe_disable_intr(struct adapter *); static void ixgbe_update_stats_counters(struct adapter *); -static bool ixgbe_txeof(struct tx_ring *); +static void ixgbe_txeof(struct tx_ring *); static bool ixgbe_rxeof(struct ix_queue *); static void ixgbe_rx_checksum(u32, struct mbuf *, u32); static void ixgbe_set_promisc(struct adapter *); @@ -206,6 +207,9 @@ static void ixgbe_atr(struct tx_ring *, static void ixgbe_reinit_fdir(void *, int); #endif +/* Missing shared code prototype */ +extern void ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw); + /********************************************************************* * FreeBSD Device Interface Entry Points *********************************************************************/ @@ -291,6 +295,13 @@ static int ixgbe_rxd = PERFORM_RXD; TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); /* +** Defining this on will allow the use +** of unsupported SFP+ modules, note that +** doing so you are on your own :) +*/ +static int allow_unsupported_sfp = FALSE; + +/* ** HW RSC control: ** this feature only works with ** IPv4, and only on 82599 and later. @@ -507,6 +518,7 @@ ixgbe_attach(device_t dev) } /* Initialize the shared code */ + hw->allow_unsupported_sfp = allow_unsupported_sfp; error = ixgbe_init_shared_code(hw); if (error == IXGBE_ERR_SFP_NOT_PRESENT) { /* @@ -576,24 +588,10 @@ ixgbe_attach(device_t dev) adapter->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, ixgbe_unregister_vlan, adapter, EVENTHANDLER_PRI_FIRST); - /* Print PCIE bus type/speed/width info */ - ixgbe_get_bus_info(hw); - device_printf(dev,"PCI Express Bus: Speed %s %s\n", - ((hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0Gb/s": - (hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5Gb/s":"Unknown"), - (hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" : - (hw->bus.width == ixgbe_bus_width_pcie_x4) ? "Width x4" : - (hw->bus.width == ixgbe_bus_width_pcie_x1) ? "Width x1" : - ("Unknown")); - - if ((hw->bus.width <= ixgbe_bus_width_pcie_x4) && - (hw->bus.speed == ixgbe_bus_speed_2500)) { - device_printf(dev, "PCI-Express bandwidth available" - " for this card\n is not sufficient for" - " optimal performance.\n"); - device_printf(dev, "For optimal performance a x8 " - "PCIE, or x4 PCIE 2 slot is required.\n"); - } + /* + ** Check PCIE slot type/speed/width + */ + ixgbe_get_slot_info(hw); /* Set an initial default flow control value */ adapter->fc = ixgbe_fc_full; @@ -797,7 +795,7 @@ ixgbe_mq_start(struct ifnet *ifp, struct struct adapter *adapter = ifp->if_softc; struct ix_queue *que; struct tx_ring *txr; - int i = 0, err = 0; + int i, err = 0; /* Which queue to use */ if ((m->m_flags & M_FLOWID) != 0) @@ -808,40 +806,37 @@ ixgbe_mq_start(struct ifnet *ifp, struct txr = &adapter->tx_rings[i]; que = &adapter->queues[i]; + err = drbr_enqueue(ifp, txr->br, m); + if (err) + return (err); if (IXGBE_TX_TRYLOCK(txr)) { - err = ixgbe_mq_start_locked(ifp, txr, m); + err = ixgbe_mq_start_locked(ifp, txr); IXGBE_TX_UNLOCK(txr); - } else { - err = drbr_enqueue(ifp, txr->br, m); + } else taskqueue_enqueue(que->tq, &txr->txq_task); - } return (err); } static int -ixgbe_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m) +ixgbe_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr) { struct adapter *adapter = txr->adapter; struct mbuf *next; - int enqueued, err = 0; + int enqueued = 0, err = 0; if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) || - adapter->link_active == 0) { - if (m != NULL) - err = drbr_enqueue(ifp, txr->br, m); - return (err); - } - - enqueued = 0; - if (m != NULL) { - err = drbr_enqueue(ifp, txr->br, m); - if (err) { - return (err); - } - } + adapter->link_active == 0) + return (ENETDOWN); /* Process the queue */ +#if __FreeBSD_version < 901504 + next = drbr_dequeue(ifp, txr->br); + while (next != NULL) { + if ((err = ixgbe_xmit(txr, &next)) != 0) { + if (next != NULL) + err = drbr_enqueue(ifp, txr->br, next); +#else while ((next = drbr_peek(ifp, txr->br)) != NULL) { if ((err = ixgbe_xmit(txr, &next)) != 0) { if (next == NULL) { @@ -849,16 +844,20 @@ ixgbe_mq_start_locked(struct ifnet *ifp, } else { drbr_putback(ifp, txr->br, next); } +#endif break; } +#if __FreeBSD_version >= 901504 drbr_advance(ifp, txr->br); +#endif enqueued++; /* Send a copy of the frame to the BPF listener */ ETHER_BPF_MTAP(ifp, next); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) break; - if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) - ixgbe_txeof(txr); +#if __FreeBSD_version < 901504 + next = drbr_dequeue(ifp, txr->br); +#endif } if (enqueued > 0) { @@ -885,7 +884,7 @@ ixgbe_deferred_mq_start(void *arg, int p IXGBE_TX_LOCK(txr); if (!drbr_empty(ifp, txr->br)) - ixgbe_mq_start_locked(ifp, txr, NULL); + ixgbe_mq_start_locked(ifp, txr); IXGBE_TX_UNLOCK(txr); } @@ -1418,20 +1417,19 @@ ixgbe_handle_que(void *context, int pend ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX if (!drbr_empty(ifp, txr->br)) - ixgbe_mq_start_locked(ifp, txr, NULL); + ixgbe_mq_start_locked(ifp, txr); #else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgbe_start_locked(txr, ifp); #endif IXGBE_TX_UNLOCK(txr); - if (more) { - taskqueue_enqueue(que->tq, &que->que_task); - return; - } } /* Reenable this interrupt */ - ixgbe_enable_queue(adapter, que->msix); + if (que->res != NULL) + ixgbe_enable_queue(adapter, que->msix); + else + ixgbe_enable_intr(adapter); return; } @@ -1448,9 +1446,10 @@ ixgbe_legacy_irq(void *arg) struct ix_queue *que = arg; struct adapter *adapter = que->adapter; struct ixgbe_hw *hw = &adapter->hw; + struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = adapter->tx_rings; - bool more_tx, more_rx; - u32 reg_eicr, loop = MAX_LOOP; + bool more; + u32 reg_eicr; reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICR); @@ -1461,17 +1460,19 @@ ixgbe_legacy_irq(void *arg) return; } - more_rx = ixgbe_rxeof(que); + more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); - do { - more_tx = ixgbe_txeof(txr); - } while (loop-- && more_tx); + ixgbe_txeof(txr); +#ifdef IXGBE_LEGACY_TX + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + ixgbe_start_locked(txr, ifp); +#else + if (!drbr_empty(ifp, txr->br)) + ixgbe_mq_start_locked(ifp, txr); +#endif IXGBE_TX_UNLOCK(txr); - if (more_rx || more_tx) - taskqueue_enqueue(que->tq, &que->que_task); - /* Check for fan failure */ if ((hw->phy.media_type == ixgbe_media_type_copper) && (reg_eicr & IXGBE_EICR_GPI_SDP1)) { @@ -1484,7 +1485,10 @@ ixgbe_legacy_irq(void *arg) if (reg_eicr & IXGBE_EICR_LSC) taskqueue_enqueue(adapter->tq, &adapter->link_task); - ixgbe_enable_intr(adapter); + if (more) + taskqueue_enqueue(que->tq, &que->que_task); + else + ixgbe_enable_intr(adapter); return; } @@ -1499,29 +1503,26 @@ ixgbe_msix_que(void *arg) { struct ix_queue *que = arg; struct adapter *adapter = que->adapter; + struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = que->txr; struct rx_ring *rxr = que->rxr; - bool more_tx, more_rx; + bool more; u32 newitr = 0; ixgbe_disable_queue(adapter, que->msix); ++que->irqs; - more_rx = ixgbe_rxeof(que); + more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); - more_tx = ixgbe_txeof(txr); - /* - ** Make certain that if the stack - ** has anything queued the task gets - ** scheduled to handle it. - */ + ixgbe_txeof(txr); #ifdef IXGBE_LEGACY_TX - if (!IFQ_DRV_IS_EMPTY(&adapter->ifp->if_snd)) + if (!IFQ_DRV_IS_EMPTY(ifp->if_snd)) + ixgbe_start_locked(txr, ifp); #else - if (!drbr_empty(adapter->ifp, txr->br)) + if (!drbr_empty(ifp, txr->br)) + ixgbe_mq_start_locked(ifp, txr); #endif - more_tx = 1; IXGBE_TX_UNLOCK(txr); /* Do AIM now? */ @@ -1575,9 +1576,9 @@ ixgbe_msix_que(void *arg) rxr->packets = 0; no_calc: - if (more_tx || more_rx) + if (more) taskqueue_enqueue(que->tq, &que->que_task); - else /* Reenable this interrupt */ + else ixgbe_enable_queue(adapter, que->msix); return; } @@ -2062,7 +2063,7 @@ ixgbe_local_timer(void *arg) (paused == 0)) ++hung; else if (txr->queue_status == IXGBE_QUEUE_WORKING) - taskqueue_enqueue(que->tq, &que->que_task); + taskqueue_enqueue(que->tq, &txr->txq_task); } /* Only truely watchdog if all queues show hung */ if (hung == adapter->num_queues) @@ -2149,9 +2150,14 @@ ixgbe_stop(void *arg) ixgbe_reset_hw(hw); hw->adapter_stopped = FALSE; ixgbe_stop_adapter(hw); - /* Turn off the laser */ - if (hw->phy.multispeed_fiber) - ixgbe_disable_tx_laser(hw); + if (hw->mac.type == ixgbe_mac_82599EB) + ixgbe_stop_mac_link_on_d3_82599(hw); + /* Turn off the laser - noop with no optics */ + ixgbe_disable_tx_laser(hw); + + /* Update the stack */ + adapter->link_up = FALSE; + ixgbe_update_link_status(adapter); /* reprogram the RAR[0] in case user changed it. */ ixgbe_set_rar(&adapter->hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV); @@ -2603,7 +2609,11 @@ ixgbe_setup_interface(device_t dev, stru return (-1); } if_initname(ifp, device_get_name(dev), device_get_unit(dev)); +#if __FreeBSD_version < 1000025 + ifp->if_baudrate = 1000000000; +#else if_initbaudrate(ifp, IF_Gbps(10)); +#endif ifp->if_init = ixgbe_init; ifp->if_softc = adapter; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; @@ -2614,6 +2624,8 @@ ixgbe_setup_interface(device_t dev, stru #else ifp->if_start = ixgbe_start; IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 2); + ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 2; + IFQ_SET_READY(&ifp->if_snd); #endif ether_ifattach(ifp, adapter->hw.mac.addr); @@ -3557,7 +3569,7 @@ ixgbe_atr(struct tx_ring *txr, struct mb * tx_buffer is put back on the free queue. * **********************************************************************/ -static bool +static void ixgbe_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; @@ -3600,13 +3612,13 @@ ixgbe_txeof(struct tx_ring *txr) netmap_tx_irq(ifp, txr->me | (NETMAP_LOCKED_ENTER|NETMAP_LOCKED_EXIT)); } - return FALSE; + return; } #endif /* DEV_NETMAP */ if (txr->tx_avail == txr->num_desc) { txr->queue_status = IXGBE_QUEUE_IDLE; - return FALSE; + return; } /* Get work starting point */ @@ -3700,12 +3712,10 @@ ixgbe_txeof(struct tx_ring *txr) if ((!processed) && ((ticks - txr->watchdog_time) > IXGBE_WATCHDOG)) txr->queue_status = IXGBE_QUEUE_HUNG; - if (txr->tx_avail == txr->num_desc) { + if (txr->tx_avail == txr->num_desc) txr->queue_status = IXGBE_QUEUE_IDLE; - return (FALSE); - } - return TRUE; + return; } /********************************************************************* @@ -4387,6 +4397,7 @@ ixgbe_rxeof(struct ix_queue *que) if (netmap_rx_irq(ifp, rxr->me | NETMAP_LOCKED_ENTER, &processed)) return (FALSE); #endif /* DEV_NETMAP */ + for (i = rxr->next_to_check; count != 0;) { struct mbuf *sendmp, *mp; u32 rsc, ptype; @@ -4576,15 +4587,12 @@ next_desc: IXGBE_RX_UNLOCK(rxr); /* - ** We still have cleaning to do? - ** Schedule another interrupt if so. + ** Still have cleaning to do? */ - if ((staterr & IXGBE_RXD_STAT_DD) != 0) { - ixgbe_rearm_queues(adapter, (u64)(1 << que->msix)); + if ((staterr & IXGBE_RXD_STAT_DD) != 0) return (TRUE); - } - - return (FALSE); + else + return (FALSE); } @@ -4833,6 +4841,111 @@ ixgbe_write_pci_cfg(struct ixgbe_hw *hw, } /* +** Get the width and transaction speed of +** the slot this adapter is plugged into. +*/ +static void +ixgbe_get_slot_info(struct ixgbe_hw *hw) +{ + device_t dev = ((struct ixgbe_osdep *)hw->back)->dev; + struct ixgbe_mac_info *mac = &hw->mac; + u16 link; + u32 offset; + + /* For most devices simply call the shared code routine */ + if (hw->device_id != IXGBE_DEV_ID_82599_SFP_SF_QP) { + ixgbe_get_bus_info(hw); + goto display; + } + + /* + ** For the Quad port adapter we need to parse back + ** up the PCI tree to find the speed of the expansion + ** slot into which this adapter is plugged. A bit more work. + */ + dev = device_get_parent(device_get_parent(dev)); +#ifdef IXGBE_DEBUG + device_printf(dev, "parent pcib = %x,%x,%x\n", + pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev)); +#endif + dev = device_get_parent(device_get_parent(dev)); +#ifdef IXGBE_DEBUG + device_printf(dev, "slot pcib = %x,%x,%x\n", + pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev)); +#endif + /* Now get the PCI Express Capabilities offset */ + pci_find_cap(dev, PCIY_EXPRESS, &offset); + /* ...and read the Link Status Register */ + link = pci_read_config(dev, offset + PCIER_LINK_STA, 2); + switch (link & IXGBE_PCI_LINK_WIDTH) { + case IXGBE_PCI_LINK_WIDTH_1: + hw->bus.width = ixgbe_bus_width_pcie_x1; + break; + case IXGBE_PCI_LINK_WIDTH_2: + hw->bus.width = ixgbe_bus_width_pcie_x2; + break; + case IXGBE_PCI_LINK_WIDTH_4: + hw->bus.width = ixgbe_bus_width_pcie_x4; + break; + case IXGBE_PCI_LINK_WIDTH_8: + hw->bus.width = ixgbe_bus_width_pcie_x8; + break; + default: + hw->bus.width = ixgbe_bus_width_unknown; + break; + } + + switch (link & IXGBE_PCI_LINK_SPEED) { + case IXGBE_PCI_LINK_SPEED_2500: + hw->bus.speed = ixgbe_bus_speed_2500; + break; + case IXGBE_PCI_LINK_SPEED_5000: + hw->bus.speed = ixgbe_bus_speed_5000; + break; + case IXGBE_PCI_LINK_SPEED_8000: + hw->bus.speed = ixgbe_bus_speed_8000; + break; + default: + hw->bus.speed = ixgbe_bus_speed_unknown; + break; + } + + mac->ops.set_lan_id(hw); + +display: + device_printf(dev,"PCI Express Bus: Speed %s %s\n", + ((hw->bus.speed == ixgbe_bus_speed_8000) ? "8.0GT/s": + (hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0GT/s": + (hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5GT/s":"Unknown"), + (hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" : + (hw->bus.width == ixgbe_bus_width_pcie_x4) ? "Width x4" : + (hw->bus.width == ixgbe_bus_width_pcie_x1) ? "Width x1" : + ("Unknown")); + + if ((hw->device_id != IXGBE_DEV_ID_82599_SFP_SF_QP) && + ((hw->bus.width <= ixgbe_bus_width_pcie_x4) && + (hw->bus.speed == ixgbe_bus_speed_2500))) { + device_printf(dev, "PCI-Express bandwidth available" + " for this card\n is not sufficient for" + " optimal performance.\n"); + device_printf(dev, "For optimal performance a x8 " + "PCIE, or x4 PCIE Gen2 slot is required.\n"); + } + if ((hw->device_id == IXGBE_DEV_ID_82599_SFP_SF_QP) && + ((hw->bus.width <= ixgbe_bus_width_pcie_x8) && + (hw->bus.speed < ixgbe_bus_speed_8000))) { + device_printf(dev, "PCI-Express bandwidth available" + " for this card\n is not sufficient for" + " optimal performance.\n"); + device_printf(dev, "For optimal performance a x8 " + "PCIE Gen3 slot is required.\n"); + } + + return; +} + + +/* ** Setup the correct IVAR register for a particular MSIX interrupt ** (yes this is all very magic and confusing :) ** - entry is the register array entry @@ -5633,6 +5746,7 @@ ixgbe_set_advertise(SYSCTL_HANDLER_ARGS) /* ** Thermal Shutdown Trigger ** - cause a Thermal Overtemp IRQ +** - this now requires firmware enabling */ static int ixgbe_set_thermal_test(SYSCTL_HANDLER_ARGS) Modified: user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.h ============================================================================== --- user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.h Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.h Tue Jun 18 22:18:01 2013 (r251969) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2012, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -213,6 +213,7 @@ #define IXGBE_BULK_LATENCY 1200 #define IXGBE_LINK_ITR 2000 + /* ***************************************************************************** * vendor_info_array @@ -230,6 +231,7 @@ typedef struct _ixgbe_vendor_info_t { unsigned int index; } ixgbe_vendor_info_t; + /* This is used to get SFP+ module data */ struct ixgbe_i2c_req { u8 dev_addr; @@ -456,6 +458,7 @@ struct adapter { /* Multicast array memory */ u8 *mta; + /* Misc stats maintained by the driver */ unsigned long dropped_pkts; unsigned long mbuf_defrag_failed; @@ -467,6 +470,7 @@ struct adapter { struct ixgbe_hw_stats stats; }; + /* Precision Time Sync (IEEE 1588) defines */ #define ETHERTYPE_IEEE1588 0x88F7 #define PICOSECS_PER_TICK 20833 @@ -489,6 +493,10 @@ struct adapter { #define IXGBE_CORE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->core_mtx, MA_OWNED) #define IXGBE_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_mtx, MA_OWNED) +/* For backward compatibility */ +#if !defined(PCIER_LINK_STA) +#define PCIER_LINK_STA PCIR_EXPRESS_LINK_STA +#endif static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw) Modified: user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82598.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82598.c Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82598.c Tue Jun 18 22:18:01 2013 (r251969) @@ -166,6 +166,8 @@ s32 ixgbe_init_ops_82598(struct ixgbe_hw /* Manageability interface */ mac->ops.set_fw_drv_ver = NULL; + mac->ops.get_rtrup2tc = NULL; + return ret_val; } @@ -1115,10 +1117,19 @@ static s32 ixgbe_read_i2c_phy_82598(stru u16 sfp_addr = 0; u16 sfp_data = 0; u16 sfp_stat = 0; + u16 gssr; u32 i; DEBUGFUNC("ixgbe_read_i2c_phy_82598"); + if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1) + gssr = IXGBE_GSSR_PHY1_SM; + else + gssr = IXGBE_GSSR_PHY0_SM; + + if (hw->mac.ops.acquire_swfw_sync(hw, gssr) != IXGBE_SUCCESS) + return IXGBE_ERR_SWFW_SYNC; + if (hw->phy.type == ixgbe_phy_nl) { /* * NetLogic phy SDA/SCL registers are at addresses 0xC30A to @@ -1127,17 +1138,17 @@ static s32 ixgbe_read_i2c_phy_82598(stru */ sfp_addr = (dev_addr << 8) + byte_offset; sfp_addr = (sfp_addr | IXGBE_I2C_EEPROM_READ_MASK); - hw->phy.ops.write_reg(hw, - IXGBE_MDIO_PMA_PMD_SDA_SCL_ADDR, - IXGBE_MDIO_PMA_PMD_DEV_TYPE, - sfp_addr); + hw->phy.ops.write_reg_mdi(hw, + IXGBE_MDIO_PMA_PMD_SDA_SCL_ADDR, + IXGBE_MDIO_PMA_PMD_DEV_TYPE, + sfp_addr); /* Poll status */ for (i = 0; i < 100; i++) { - hw->phy.ops.read_reg(hw, - IXGBE_MDIO_PMA_PMD_SDA_SCL_STAT, - IXGBE_MDIO_PMA_PMD_DEV_TYPE, - &sfp_stat); + hw->phy.ops.read_reg_mdi(hw, + IXGBE_MDIO_PMA_PMD_SDA_SCL_STAT, + IXGBE_MDIO_PMA_PMD_DEV_TYPE, + &sfp_stat); sfp_stat = sfp_stat & IXGBE_I2C_EEPROM_STATUS_MASK; if (sfp_stat != IXGBE_I2C_EEPROM_STATUS_IN_PROGRESS) break; @@ -1151,8 +1162,8 @@ static s32 ixgbe_read_i2c_phy_82598(stru } /* Read data */ - hw->phy.ops.read_reg(hw, IXGBE_MDIO_PMA_PMD_SDA_SCL_DATA, - IXGBE_MDIO_PMA_PMD_DEV_TYPE, &sfp_data); + hw->phy.ops.read_reg_mdi(hw, IXGBE_MDIO_PMA_PMD_SDA_SCL_DATA, + IXGBE_MDIO_PMA_PMD_DEV_TYPE, &sfp_data); *eeprom_data = (u8)(sfp_data >> 8); } else { @@ -1160,6 +1171,7 @@ static s32 ixgbe_read_i2c_phy_82598(stru } out: + hw->mac.ops.release_swfw_sync(hw, gssr); return status; } Modified: user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82599.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82599.c Tue Jun 18 22:08:27 2013 (r251968) +++ user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82599.c Tue Jun 18 22:18:01 2013 (r251969) @@ -77,7 +77,7 @@ void ixgbe_init_mac_link_ops_82599(struc * and MNG not enabled */ if ((mac->ops.get_media_type(hw) == ixgbe_media_type_fiber) && - !(ixgbe_mng_enabled(hw))) { + !hw->mng_fw_enabled) { mac->ops.disable_tx_laser = &ixgbe_disable_tx_laser_multispeed_fiber; mac->ops.enable_tx_laser = @@ -180,11 +180,13 @@ s32 ixgbe_setup_sfp_modules_82599(struct goto setup_sfp_out; } - hw->eeprom.ops.read(hw, ++data_offset, &data_value); + if (hw->eeprom.ops.read(hw, ++data_offset, &data_value)) + goto setup_sfp_err; while (data_value != 0xffff) { IXGBE_WRITE_REG(hw, IXGBE_CORECTL, data_value); IXGBE_WRITE_FLUSH(hw); - hw->eeprom.ops.read(hw, ++data_offset, &data_value); + if (hw->eeprom.ops.read(hw, ++data_offset, &data_value)) + goto setup_sfp_err; } /* Release the semaphore */ @@ -229,6 +231,15 @@ s32 ixgbe_setup_sfp_modules_82599(struct setup_sfp_out: return ret_val; + +setup_sfp_err: + /* Release the semaphore */ + hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM); + /* Delay obtaining semaphore again to allow FW access */ + msec_delay(hw->eeprom.semaphore_delay); + ERROR_REPORT2(IXGBE_ERROR_INVALID_STATE, + "eeprom read at offset %d failed", data_offset); + return IXGBE_ERR_PHY; } /** @@ -314,6 +325,11 @@ s32 ixgbe_init_ops_82599(struct ixgbe_hw mac->ops.set_fw_drv_ver = &ixgbe_set_fw_drv_ver_generic; + mac->ops.get_rtrup2tc = &ixgbe_dcb_get_rtrup2tc_generic; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Jun 18 22:22:03 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 42828C05; Tue, 18 Jun 2013 22:22:03 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 326AC1822; Tue, 18 Jun 2013 22:22:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5IMM355038800; Tue, 18 Jun 2013 22:22:03 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5IMM02e038753; Tue, 18 Jun 2013 22:22:00 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306182222.r5IMM02e038753@svn.freebsd.org> From: Attilio Rao Date: Tue, 18 Jun 2013 22:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251970 - in user/attilio/vmobj-readlock: contrib/bmake contrib/subversion/subversion/include contrib/subversion/subversion/libsvn_fs_fs contrib/subversion/subversion/libsvn_subr contri... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 22:22:03 -0000 Author: attilio Date: Tue Jun 18 22:21:59 2013 New Revision: 251970 URL: http://svnweb.freebsd.org/changeset/base/251970 Log: MFC Added: user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_dcb.c - copied unchanged from r251969, user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_dcb.h - copied unchanged from r251969, user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb.h user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_dcb_82598.c - copied unchanged from r251969, user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb_82598.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_dcb_82598.h - copied unchanged from r251969, user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb_82598.h user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_dcb_82599.c - copied unchanged from r251969, user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb_82599.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_dcb_82599.h - copied unchanged from r251969, user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_dcb_82599.h Modified: user/attilio/vmobj-readlock/contrib/bmake/parse.c user/attilio/vmobj-readlock/contrib/subversion/subversion/include/svn_version.h user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_subr/internal_statements.h user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-checks.h user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-metadata.h user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-queries.h user/attilio/vmobj-readlock/sys/conf/files user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c user/attilio/vmobj-readlock/sys/dev/drm2/i915/intel_fb.c user/attilio/vmobj-readlock/sys/dev/ixgbe/README user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe.h user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_82598.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_82599.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_api.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_api.h user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_common.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_common.h user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_osdep.h user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_phy.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_phy.h user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_type.h user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_vf.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_x540.c user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_x540.h user/attilio/vmobj-readlock/sys/dev/syscons/scvgarndr.c user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_dir.h user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2fs.h user/attilio/vmobj-readlock/sys/modules/ixgbe/Makefile user/attilio/vmobj-readlock/tools/build/mk/OptionalObsoleteFiles.inc user/attilio/vmobj-readlock/usr.bin/svn/lib/libapr/apr.h user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/console user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/include/messages.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/include/messages.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/rcconf user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/rcdelete user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/rcvar user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/startup user/attilio/vmobj-readlock/usr.sbin/bsdconfig/usermgmt/include/messages.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/usermgmt/usermgmt Directory Properties: user/attilio/vmobj-readlock/ (props changed) user/attilio/vmobj-readlock/contrib/bmake/ (props changed) user/attilio/vmobj-readlock/contrib/subversion/ (props changed) user/attilio/vmobj-readlock/sys/ (props changed) user/attilio/vmobj-readlock/sys/conf/ (props changed) Modified: user/attilio/vmobj-readlock/contrib/bmake/parse.c ============================================================================== --- user/attilio/vmobj-readlock/contrib/bmake/parse.c Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/contrib/bmake/parse.c Tue Jun 18 22:21:59 2013 (r251970) @@ -157,7 +157,7 @@ __RCSID("$NetBSD: parse.c,v 1.188 2013/0 * Structure for a file being read ("included file") */ typedef struct IFile { - const char *fname; /* name of file */ + char *fname; /* name of file */ int lineno; /* current line number in file */ int first_lineno; /* line number of start of text */ int cond_depth; /* 'if' nesting when file opened */ @@ -2344,7 +2344,7 @@ Parse_SetInput(const char *name, int lin * name of the include file so error messages refer to the right * place. */ - curFile->fname = name; + curFile->fname = bmake_strdup(name); curFile->lineno = line; curFile->first_lineno = line; curFile->nextbuf = nextbuf; @@ -2357,6 +2357,8 @@ Parse_SetInput(const char *name, int lin buf = curFile->nextbuf(curFile->nextbuf_arg, &len); if (buf == NULL) { /* Was all a waste of time ... */ + if (curFile->fname) + free(curFile->fname); free(curFile); return; } Modified: user/attilio/vmobj-readlock/contrib/subversion/subversion/include/svn_version.h ============================================================================== --- user/attilio/vmobj-readlock/contrib/subversion/subversion/include/svn_version.h Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/contrib/subversion/subversion/include/svn_version.h Tue Jun 18 22:21:59 2013 (r251970) @@ -95,7 +95,7 @@ extern "C" { * * Always change this at the same time as SVN_VER_NUMTAG. */ -#define SVN_VER_TAG " (Release Candidate 3)" +#define SVN_VER_TAG " (r1490375)" /** Number tag: a string describing the version. @@ -110,7 +110,7 @@ extern "C" { * * Always change this at the same time as SVN_VER_TAG. */ -#define SVN_VER_NUMTAG "-rc3" +#define SVN_VER_NUMTAG "" /** Revision number: The repository revision number of this release. Modified: user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h ============================================================================== --- user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h Tue Jun 18 22:21:59 2013 (r251970) @@ -1,4 +1,4 @@ -/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.8.0-rc3/subversion/libsvn_fs_fs/token-map.h. +/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_fs_fs/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 Modified: user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_subr/internal_statements.h ============================================================================== --- user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_subr/internal_statements.h Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_subr/internal_statements.h Tue Jun 18 22:21:59 2013 (r251970) @@ -1,4 +1,4 @@ -/* This file is automatically generated from internal_statements.sql and .dist_sandbox/subversion-1.8.0-rc3/subversion/libsvn_subr/token-map.h. +/* This file is automatically generated from internal_statements.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_subr/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_INTERNAL_SAVEPOINT_SVN 0 Modified: user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-checks.h ============================================================================== --- user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-checks.h Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-checks.h Tue Jun 18 22:21:59 2013 (r251970) @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.8.0-rc3/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_VERIFICATION_TRIGGERS 0 Modified: user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-metadata.h ============================================================================== --- user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-metadata.h Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-metadata.h Tue Jun 18 22:21:59 2013 (r251970) @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.8.0-rc3/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 Modified: user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-queries.h ============================================================================== --- user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-queries.h Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/contrib/subversion/subversion/libsvn_wc/wc-queries.h Tue Jun 18 22:21:59 2013 (r251970) @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.0-rc3/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_SELECT_NODE_INFO 0 Modified: user/attilio/vmobj-readlock/sys/conf/files ============================================================================== --- user/attilio/vmobj-readlock/sys/conf/files Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/sys/conf/files Tue Jun 18 22:21:59 2013 (r251970) @@ -1685,6 +1685,12 @@ dev/ixgbe/ixgbe_82599.c optional ixgbe compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x540.c optional ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb.c optional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb_82598.c optional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb_82599.c optional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa Modified: user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c Tue Jun 18 22:21:59 2013 (r251970) @@ -1362,7 +1362,6 @@ unlocked_vmobj: cause = ret = 0; m = NULL; - if (i915_intr_pf) { ret = i915_mutex_lock_interruptible(dev); if (ret != 0) { @@ -1372,6 +1371,23 @@ unlocked_vmobj: } else DRM_LOCK(dev); + /* + * Since the object lock was dropped, other thread might have + * faulted on the same GTT address and instantiated the + * mapping for the page. Recheck. + */ + VM_OBJECT_WLOCK(vm_obj); + m = vm_page_lookup(vm_obj, OFF_TO_IDX(offset)); + if (m != NULL) { + if ((m->flags & VPO_BUSY) != 0) { + DRM_UNLOCK(dev); + vm_page_sleep(m, "915pee"); + goto retry; + } + goto have_page; + } else + VM_OBJECT_WUNLOCK(vm_obj); + /* Now bind it into the GTT if needed */ if (!obj->map_and_fenceable) { ret = i915_gem_object_unbind(obj); @@ -1428,8 +1444,9 @@ unlocked_vmobj: goto retry; } m->valid = VM_PAGE_BITS_ALL; - *mres = m; vm_page_insert(m, vm_obj, OFF_TO_IDX(offset)); +have_page: + *mres = m; vm_page_busy(m); CTR4(KTR_DRM, "fault %p %jx %x phys %x", gem_obj, offset, prot, Modified: user/attilio/vmobj-readlock/sys/dev/drm2/i915/intel_fb.c ============================================================================== --- user/attilio/vmobj-readlock/sys/dev/drm2/i915/intel_fb.c Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/sys/dev/drm2/i915/intel_fb.c Tue Jun 18 22:21:59 2013 (r251970) @@ -207,6 +207,8 @@ static void intel_fbdev_destroy(struct d } } +extern int sc_txtmouse_no_retrace_wait; + int intel_fbdev_init(struct drm_device *dev) { struct intel_fbdev *ifbdev; @@ -229,6 +231,7 @@ int intel_fbdev_init(struct drm_device * drm_fb_helper_single_add_all_connectors(&ifbdev->helper); drm_fb_helper_initial_config(&ifbdev->helper, 32); + sc_txtmouse_no_retrace_wait = 1; return 0; } Modified: user/attilio/vmobj-readlock/sys/dev/ixgbe/README ============================================================================== --- user/attilio/vmobj-readlock/sys/dev/ixgbe/README Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/sys/dev/ixgbe/README Tue Jun 18 22:21:59 2013 (r251970) @@ -2,7 +2,7 @@ FreeBSD Driver for Intel(R) Ethernet 10 ============================================================================ /*$FreeBSD$*/ -November 12, 2010 +Jun 18, 2013 Contents @@ -18,8 +18,8 @@ Contents Overview ======== -This file describes the FreeBSD* driver for the Intel(R) Ethernet 10 Gigabit -Family of Adapters. Driver has been developed for use with FreeBSD 7.2 or later. +This file describes the FreeBSD* driver for the +Intel(R) Ethernet 10 Gigabit Family of Adapters. For questions related to hardware requirements, refer to the documentation supplied with your Intel 10GbE adapter. All hardware requirements listed @@ -42,7 +42,7 @@ optics, or is an Intel(R) Ethernet Serve Intel optics and/or the direct attach cables listed below. When 82599-based SFP+ devices are connected back to back, they should be set to -the same Speed setting via Ethtool. Results may vary if you mix speed settings. +the same Speed setting. Results may vary if you mix speed settings. Supplier Type Part Numbers @@ -70,7 +70,12 @@ Finisar DUAL RATE 1G/10G SFP+ LR (No Avago DUAL RATE 1G/10G SFP+ LR (No Bail) AFCT-701SDZ-IN1 Finistar 1000BASE-T SFP FCLF8522P2BTL Avago 1000BASE-T SFP ABCU-5710RZ - + +NOTE: As of driver version 2.5.13 it is possible to allow the operation +of unsupported modules by setting the static variable 'allow_unsupported_sfp' +to TRUE and rebuilding the driver. If problems occur please assure that they +can be reproduced with fully supported optics first. + 82599-based adapters support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. @@ -224,14 +229,7 @@ all 10 Gigabit adapters. When there is a choice run on a 64bit OS rather than 32, it makes a significant difference in improvement. - The default scheduler SCHED_4BSD is not smart about SMP locality issues. - Significant improvement can be achieved by switching to the ULE scheduler. - - This is done by changing the entry in the config file from SCHED_4BSD to - SCHED_ULE. Note that this is only advisable on FreeBSD 7, on 6.X there have - been stability problems with ULE. - - The interface can generate high number of interrupts. To avoid running + The interface can generate a high number of interrupts. To avoid running into the limit set by the kernel, adjust hw.intr_storm_threshold setting using sysctl: @@ -242,12 +240,10 @@ all 10 Gigabit adapters. hw.intr_storm_threshold=9000 If you still see Interrupt Storm detected messages, increase the limit to a - higher number. - - Best throughput results are seen with a large MTU; use 9000 if possible. + higher number, or the detection can be disabled by setting it to 0. - The default number of descriptors is 1024, increasing this to 2K or even - 4K may improve performance in some workloads, but change carefully. + The default number of descriptors is 2048, increasing or descreasing + may improve performance in some workloads, but change carefully. Known Limitations @@ -284,7 +280,7 @@ issues download your adapter's user guid ---------------------------------------------------------- Some PCI-E x8 slots are actually configured as x4 slots. These slots have insufficient bandwidth for full 10Gbe line rate with dual port 10GbE devices. - The driver can detect this situation and will write the following message in + The driver will detect this situation and will write the following message in the system log: "PCI-Express bandwidth available for this card is not sufficient for optimal performance. For optimal performance a x8 PCI-Express slot is required." Modified: user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe.c ============================================================================== --- user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe.c Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe.c Tue Jun 18 22:21:59 2013 (r251970) @@ -32,6 +32,7 @@ ******************************************************************************/ /*$FreeBSD$*/ + #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_inet.h" #include "opt_inet6.h" @@ -47,7 +48,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.5.8 - HEAD"; +char ixgbe_driver_version[] = "2.5.13"; /********************************************************************* * PCI Device ID Table @@ -109,8 +110,7 @@ static void ixgbe_start(struct ifnet static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); #else /* ! IXGBE_LEGACY_TX */ static int ixgbe_mq_start(struct ifnet *, struct mbuf *); -static int ixgbe_mq_start_locked(struct ifnet *, - struct tx_ring *, struct mbuf *); +static int ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *); static void ixgbe_qflush(struct ifnet *); static void ixgbe_deferred_mq_start(void *, int); #endif /* IXGBE_LEGACY_TX */ @@ -122,6 +122,7 @@ static void ixgbe_media_status(struc static int ixgbe_media_change(struct ifnet *); static void ixgbe_identify_hardware(struct adapter *); static int ixgbe_allocate_pci_resources(struct adapter *); +static void ixgbe_get_slot_info(struct ixgbe_hw *); static int ixgbe_allocate_msix(struct adapter *); static int ixgbe_allocate_legacy(struct adapter *); static int ixgbe_allocate_queues(struct adapter *); @@ -149,7 +150,7 @@ static void ixgbe_setup_hw_rsc(struct rx static void ixgbe_enable_intr(struct adapter *); static void ixgbe_disable_intr(struct adapter *); static void ixgbe_update_stats_counters(struct adapter *); -static bool ixgbe_txeof(struct tx_ring *); +static void ixgbe_txeof(struct tx_ring *); static bool ixgbe_rxeof(struct ix_queue *); static void ixgbe_rx_checksum(u32, struct mbuf *, u32); static void ixgbe_set_promisc(struct adapter *); @@ -206,6 +207,9 @@ static void ixgbe_atr(struct tx_ring *, static void ixgbe_reinit_fdir(void *, int); #endif +/* Missing shared code prototype */ +extern void ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw); + /********************************************************************* * FreeBSD Device Interface Entry Points *********************************************************************/ @@ -291,6 +295,13 @@ static int ixgbe_rxd = PERFORM_RXD; TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); /* +** Defining this on will allow the use +** of unsupported SFP+ modules, note that +** doing so you are on your own :) +*/ +static int allow_unsupported_sfp = FALSE; + +/* ** HW RSC control: ** this feature only works with ** IPv4, and only on 82599 and later. @@ -507,6 +518,7 @@ ixgbe_attach(device_t dev) } /* Initialize the shared code */ + hw->allow_unsupported_sfp = allow_unsupported_sfp; error = ixgbe_init_shared_code(hw); if (error == IXGBE_ERR_SFP_NOT_PRESENT) { /* @@ -576,24 +588,10 @@ ixgbe_attach(device_t dev) adapter->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, ixgbe_unregister_vlan, adapter, EVENTHANDLER_PRI_FIRST); - /* Print PCIE bus type/speed/width info */ - ixgbe_get_bus_info(hw); - device_printf(dev,"PCI Express Bus: Speed %s %s\n", - ((hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0Gb/s": - (hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5Gb/s":"Unknown"), - (hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" : - (hw->bus.width == ixgbe_bus_width_pcie_x4) ? "Width x4" : - (hw->bus.width == ixgbe_bus_width_pcie_x1) ? "Width x1" : - ("Unknown")); - - if ((hw->bus.width <= ixgbe_bus_width_pcie_x4) && - (hw->bus.speed == ixgbe_bus_speed_2500)) { - device_printf(dev, "PCI-Express bandwidth available" - " for this card\n is not sufficient for" - " optimal performance.\n"); - device_printf(dev, "For optimal performance a x8 " - "PCIE, or x4 PCIE 2 slot is required.\n"); - } + /* + ** Check PCIE slot type/speed/width + */ + ixgbe_get_slot_info(hw); /* Set an initial default flow control value */ adapter->fc = ixgbe_fc_full; @@ -797,7 +795,7 @@ ixgbe_mq_start(struct ifnet *ifp, struct struct adapter *adapter = ifp->if_softc; struct ix_queue *que; struct tx_ring *txr; - int i = 0, err = 0; + int i, err = 0; /* Which queue to use */ if ((m->m_flags & M_FLOWID) != 0) @@ -808,40 +806,37 @@ ixgbe_mq_start(struct ifnet *ifp, struct txr = &adapter->tx_rings[i]; que = &adapter->queues[i]; + err = drbr_enqueue(ifp, txr->br, m); + if (err) + return (err); if (IXGBE_TX_TRYLOCK(txr)) { - err = ixgbe_mq_start_locked(ifp, txr, m); + err = ixgbe_mq_start_locked(ifp, txr); IXGBE_TX_UNLOCK(txr); - } else { - err = drbr_enqueue(ifp, txr->br, m); + } else taskqueue_enqueue(que->tq, &txr->txq_task); - } return (err); } static int -ixgbe_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m) +ixgbe_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr) { struct adapter *adapter = txr->adapter; struct mbuf *next; - int enqueued, err = 0; + int enqueued = 0, err = 0; if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) || - adapter->link_active == 0) { - if (m != NULL) - err = drbr_enqueue(ifp, txr->br, m); - return (err); - } - - enqueued = 0; - if (m != NULL) { - err = drbr_enqueue(ifp, txr->br, m); - if (err) { - return (err); - } - } + adapter->link_active == 0) + return (ENETDOWN); /* Process the queue */ +#if __FreeBSD_version < 901504 + next = drbr_dequeue(ifp, txr->br); + while (next != NULL) { + if ((err = ixgbe_xmit(txr, &next)) != 0) { + if (next != NULL) + err = drbr_enqueue(ifp, txr->br, next); +#else while ((next = drbr_peek(ifp, txr->br)) != NULL) { if ((err = ixgbe_xmit(txr, &next)) != 0) { if (next == NULL) { @@ -849,16 +844,20 @@ ixgbe_mq_start_locked(struct ifnet *ifp, } else { drbr_putback(ifp, txr->br, next); } +#endif break; } +#if __FreeBSD_version >= 901504 drbr_advance(ifp, txr->br); +#endif enqueued++; /* Send a copy of the frame to the BPF listener */ ETHER_BPF_MTAP(ifp, next); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) break; - if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) - ixgbe_txeof(txr); +#if __FreeBSD_version < 901504 + next = drbr_dequeue(ifp, txr->br); +#endif } if (enqueued > 0) { @@ -885,7 +884,7 @@ ixgbe_deferred_mq_start(void *arg, int p IXGBE_TX_LOCK(txr); if (!drbr_empty(ifp, txr->br)) - ixgbe_mq_start_locked(ifp, txr, NULL); + ixgbe_mq_start_locked(ifp, txr); IXGBE_TX_UNLOCK(txr); } @@ -1418,20 +1417,19 @@ ixgbe_handle_que(void *context, int pend ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX if (!drbr_empty(ifp, txr->br)) - ixgbe_mq_start_locked(ifp, txr, NULL); + ixgbe_mq_start_locked(ifp, txr); #else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgbe_start_locked(txr, ifp); #endif IXGBE_TX_UNLOCK(txr); - if (more) { - taskqueue_enqueue(que->tq, &que->que_task); - return; - } } /* Reenable this interrupt */ - ixgbe_enable_queue(adapter, que->msix); + if (que->res != NULL) + ixgbe_enable_queue(adapter, que->msix); + else + ixgbe_enable_intr(adapter); return; } @@ -1448,9 +1446,10 @@ ixgbe_legacy_irq(void *arg) struct ix_queue *que = arg; struct adapter *adapter = que->adapter; struct ixgbe_hw *hw = &adapter->hw; + struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = adapter->tx_rings; - bool more_tx, more_rx; - u32 reg_eicr, loop = MAX_LOOP; + bool more; + u32 reg_eicr; reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICR); @@ -1461,17 +1460,19 @@ ixgbe_legacy_irq(void *arg) return; } - more_rx = ixgbe_rxeof(que); + more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); - do { - more_tx = ixgbe_txeof(txr); - } while (loop-- && more_tx); + ixgbe_txeof(txr); +#ifdef IXGBE_LEGACY_TX + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + ixgbe_start_locked(txr, ifp); +#else + if (!drbr_empty(ifp, txr->br)) + ixgbe_mq_start_locked(ifp, txr); +#endif IXGBE_TX_UNLOCK(txr); - if (more_rx || more_tx) - taskqueue_enqueue(que->tq, &que->que_task); - /* Check for fan failure */ if ((hw->phy.media_type == ixgbe_media_type_copper) && (reg_eicr & IXGBE_EICR_GPI_SDP1)) { @@ -1484,7 +1485,10 @@ ixgbe_legacy_irq(void *arg) if (reg_eicr & IXGBE_EICR_LSC) taskqueue_enqueue(adapter->tq, &adapter->link_task); - ixgbe_enable_intr(adapter); + if (more) + taskqueue_enqueue(que->tq, &que->que_task); + else + ixgbe_enable_intr(adapter); return; } @@ -1499,29 +1503,26 @@ ixgbe_msix_que(void *arg) { struct ix_queue *que = arg; struct adapter *adapter = que->adapter; + struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = que->txr; struct rx_ring *rxr = que->rxr; - bool more_tx, more_rx; + bool more; u32 newitr = 0; ixgbe_disable_queue(adapter, que->msix); ++que->irqs; - more_rx = ixgbe_rxeof(que); + more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); - more_tx = ixgbe_txeof(txr); - /* - ** Make certain that if the stack - ** has anything queued the task gets - ** scheduled to handle it. - */ + ixgbe_txeof(txr); #ifdef IXGBE_LEGACY_TX - if (!IFQ_DRV_IS_EMPTY(&adapter->ifp->if_snd)) + if (!IFQ_DRV_IS_EMPTY(ifp->if_snd)) + ixgbe_start_locked(txr, ifp); #else - if (!drbr_empty(adapter->ifp, txr->br)) + if (!drbr_empty(ifp, txr->br)) + ixgbe_mq_start_locked(ifp, txr); #endif - more_tx = 1; IXGBE_TX_UNLOCK(txr); /* Do AIM now? */ @@ -1575,9 +1576,9 @@ ixgbe_msix_que(void *arg) rxr->packets = 0; no_calc: - if (more_tx || more_rx) + if (more) taskqueue_enqueue(que->tq, &que->que_task); - else /* Reenable this interrupt */ + else ixgbe_enable_queue(adapter, que->msix); return; } @@ -2062,7 +2063,7 @@ ixgbe_local_timer(void *arg) (paused == 0)) ++hung; else if (txr->queue_status == IXGBE_QUEUE_WORKING) - taskqueue_enqueue(que->tq, &que->que_task); + taskqueue_enqueue(que->tq, &txr->txq_task); } /* Only truely watchdog if all queues show hung */ if (hung == adapter->num_queues) @@ -2149,9 +2150,14 @@ ixgbe_stop(void *arg) ixgbe_reset_hw(hw); hw->adapter_stopped = FALSE; ixgbe_stop_adapter(hw); - /* Turn off the laser */ - if (hw->phy.multispeed_fiber) - ixgbe_disable_tx_laser(hw); + if (hw->mac.type == ixgbe_mac_82599EB) + ixgbe_stop_mac_link_on_d3_82599(hw); + /* Turn off the laser - noop with no optics */ + ixgbe_disable_tx_laser(hw); + + /* Update the stack */ + adapter->link_up = FALSE; + ixgbe_update_link_status(adapter); /* reprogram the RAR[0] in case user changed it. */ ixgbe_set_rar(&adapter->hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV); @@ -2603,7 +2609,11 @@ ixgbe_setup_interface(device_t dev, stru return (-1); } if_initname(ifp, device_get_name(dev), device_get_unit(dev)); +#if __FreeBSD_version < 1000025 + ifp->if_baudrate = 1000000000; +#else if_initbaudrate(ifp, IF_Gbps(10)); +#endif ifp->if_init = ixgbe_init; ifp->if_softc = adapter; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; @@ -2614,6 +2624,8 @@ ixgbe_setup_interface(device_t dev, stru #else ifp->if_start = ixgbe_start; IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 2); + ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 2; + IFQ_SET_READY(&ifp->if_snd); #endif ether_ifattach(ifp, adapter->hw.mac.addr); @@ -3557,7 +3569,7 @@ ixgbe_atr(struct tx_ring *txr, struct mb * tx_buffer is put back on the free queue. * **********************************************************************/ -static bool +static void ixgbe_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; @@ -3600,13 +3612,13 @@ ixgbe_txeof(struct tx_ring *txr) netmap_tx_irq(ifp, txr->me | (NETMAP_LOCKED_ENTER|NETMAP_LOCKED_EXIT)); } - return FALSE; + return; } #endif /* DEV_NETMAP */ if (txr->tx_avail == txr->num_desc) { txr->queue_status = IXGBE_QUEUE_IDLE; - return FALSE; + return; } /* Get work starting point */ @@ -3700,12 +3712,10 @@ ixgbe_txeof(struct tx_ring *txr) if ((!processed) && ((ticks - txr->watchdog_time) > IXGBE_WATCHDOG)) txr->queue_status = IXGBE_QUEUE_HUNG; - if (txr->tx_avail == txr->num_desc) { + if (txr->tx_avail == txr->num_desc) txr->queue_status = IXGBE_QUEUE_IDLE; - return (FALSE); - } - return TRUE; + return; } /********************************************************************* @@ -4387,6 +4397,7 @@ ixgbe_rxeof(struct ix_queue *que) if (netmap_rx_irq(ifp, rxr->me | NETMAP_LOCKED_ENTER, &processed)) return (FALSE); #endif /* DEV_NETMAP */ + for (i = rxr->next_to_check; count != 0;) { struct mbuf *sendmp, *mp; u32 rsc, ptype; @@ -4576,15 +4587,12 @@ next_desc: IXGBE_RX_UNLOCK(rxr); /* - ** We still have cleaning to do? - ** Schedule another interrupt if so. + ** Still have cleaning to do? */ - if ((staterr & IXGBE_RXD_STAT_DD) != 0) { - ixgbe_rearm_queues(adapter, (u64)(1 << que->msix)); + if ((staterr & IXGBE_RXD_STAT_DD) != 0) return (TRUE); - } - - return (FALSE); + else + return (FALSE); } @@ -4833,6 +4841,111 @@ ixgbe_write_pci_cfg(struct ixgbe_hw *hw, } /* +** Get the width and transaction speed of +** the slot this adapter is plugged into. +*/ +static void +ixgbe_get_slot_info(struct ixgbe_hw *hw) +{ + device_t dev = ((struct ixgbe_osdep *)hw->back)->dev; + struct ixgbe_mac_info *mac = &hw->mac; + u16 link; + u32 offset; + + /* For most devices simply call the shared code routine */ + if (hw->device_id != IXGBE_DEV_ID_82599_SFP_SF_QP) { + ixgbe_get_bus_info(hw); + goto display; + } + + /* + ** For the Quad port adapter we need to parse back + ** up the PCI tree to find the speed of the expansion + ** slot into which this adapter is plugged. A bit more work. + */ + dev = device_get_parent(device_get_parent(dev)); +#ifdef IXGBE_DEBUG + device_printf(dev, "parent pcib = %x,%x,%x\n", + pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev)); +#endif + dev = device_get_parent(device_get_parent(dev)); +#ifdef IXGBE_DEBUG + device_printf(dev, "slot pcib = %x,%x,%x\n", + pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev)); +#endif + /* Now get the PCI Express Capabilities offset */ + pci_find_cap(dev, PCIY_EXPRESS, &offset); + /* ...and read the Link Status Register */ + link = pci_read_config(dev, offset + PCIER_LINK_STA, 2); + switch (link & IXGBE_PCI_LINK_WIDTH) { + case IXGBE_PCI_LINK_WIDTH_1: + hw->bus.width = ixgbe_bus_width_pcie_x1; + break; + case IXGBE_PCI_LINK_WIDTH_2: + hw->bus.width = ixgbe_bus_width_pcie_x2; + break; + case IXGBE_PCI_LINK_WIDTH_4: + hw->bus.width = ixgbe_bus_width_pcie_x4; + break; + case IXGBE_PCI_LINK_WIDTH_8: + hw->bus.width = ixgbe_bus_width_pcie_x8; + break; + default: + hw->bus.width = ixgbe_bus_width_unknown; + break; + } + + switch (link & IXGBE_PCI_LINK_SPEED) { + case IXGBE_PCI_LINK_SPEED_2500: + hw->bus.speed = ixgbe_bus_speed_2500; + break; + case IXGBE_PCI_LINK_SPEED_5000: + hw->bus.speed = ixgbe_bus_speed_5000; + break; + case IXGBE_PCI_LINK_SPEED_8000: + hw->bus.speed = ixgbe_bus_speed_8000; + break; + default: + hw->bus.speed = ixgbe_bus_speed_unknown; + break; + } + + mac->ops.set_lan_id(hw); + +display: + device_printf(dev,"PCI Express Bus: Speed %s %s\n", + ((hw->bus.speed == ixgbe_bus_speed_8000) ? "8.0GT/s": + (hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0GT/s": + (hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5GT/s":"Unknown"), + (hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" : + (hw->bus.width == ixgbe_bus_width_pcie_x4) ? "Width x4" : + (hw->bus.width == ixgbe_bus_width_pcie_x1) ? "Width x1" : + ("Unknown")); + + if ((hw->device_id != IXGBE_DEV_ID_82599_SFP_SF_QP) && + ((hw->bus.width <= ixgbe_bus_width_pcie_x4) && + (hw->bus.speed == ixgbe_bus_speed_2500))) { + device_printf(dev, "PCI-Express bandwidth available" + " for this card\n is not sufficient for" + " optimal performance.\n"); + device_printf(dev, "For optimal performance a x8 " + "PCIE, or x4 PCIE Gen2 slot is required.\n"); + } + if ((hw->device_id == IXGBE_DEV_ID_82599_SFP_SF_QP) && + ((hw->bus.width <= ixgbe_bus_width_pcie_x8) && + (hw->bus.speed < ixgbe_bus_speed_8000))) { + device_printf(dev, "PCI-Express bandwidth available" + " for this card\n is not sufficient for" + " optimal performance.\n"); + device_printf(dev, "For optimal performance a x8 " + "PCIE Gen3 slot is required.\n"); + } + + return; +} + + +/* ** Setup the correct IVAR register for a particular MSIX interrupt ** (yes this is all very magic and confusing :) ** - entry is the register array entry @@ -5633,6 +5746,7 @@ ixgbe_set_advertise(SYSCTL_HANDLER_ARGS) /* ** Thermal Shutdown Trigger ** - cause a Thermal Overtemp IRQ +** - this now requires firmware enabling */ static int ixgbe_set_thermal_test(SYSCTL_HANDLER_ARGS) Modified: user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe.h ============================================================================== --- user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe.h Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe.h Tue Jun 18 22:21:59 2013 (r251970) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2012, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -213,6 +213,7 @@ #define IXGBE_BULK_LATENCY 1200 #define IXGBE_LINK_ITR 2000 + /* ***************************************************************************** * vendor_info_array @@ -230,6 +231,7 @@ typedef struct _ixgbe_vendor_info_t { unsigned int index; } ixgbe_vendor_info_t; + /* This is used to get SFP+ module data */ struct ixgbe_i2c_req { u8 dev_addr; @@ -456,6 +458,7 @@ struct adapter { /* Multicast array memory */ u8 *mta; + /* Misc stats maintained by the driver */ unsigned long dropped_pkts; unsigned long mbuf_defrag_failed; @@ -467,6 +470,7 @@ struct adapter { struct ixgbe_hw_stats stats; }; + /* Precision Time Sync (IEEE 1588) defines */ #define ETHERTYPE_IEEE1588 0x88F7 #define PICOSECS_PER_TICK 20833 @@ -489,6 +493,10 @@ struct adapter { #define IXGBE_CORE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->core_mtx, MA_OWNED) #define IXGBE_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_mtx, MA_OWNED) +/* For backward compatibility */ +#if !defined(PCIER_LINK_STA) +#define PCIER_LINK_STA PCIR_EXPRESS_LINK_STA +#endif static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw) Modified: user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_82598.c ============================================================================== --- user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_82598.c Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_82598.c Tue Jun 18 22:21:59 2013 (r251970) @@ -166,6 +166,8 @@ s32 ixgbe_init_ops_82598(struct ixgbe_hw /* Manageability interface */ mac->ops.set_fw_drv_ver = NULL; + mac->ops.get_rtrup2tc = NULL; + return ret_val; } @@ -1115,10 +1117,19 @@ static s32 ixgbe_read_i2c_phy_82598(stru u16 sfp_addr = 0; u16 sfp_data = 0; u16 sfp_stat = 0; + u16 gssr; u32 i; DEBUGFUNC("ixgbe_read_i2c_phy_82598"); + if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1) + gssr = IXGBE_GSSR_PHY1_SM; + else + gssr = IXGBE_GSSR_PHY0_SM; + + if (hw->mac.ops.acquire_swfw_sync(hw, gssr) != IXGBE_SUCCESS) + return IXGBE_ERR_SWFW_SYNC; + if (hw->phy.type == ixgbe_phy_nl) { /* * NetLogic phy SDA/SCL registers are at addresses 0xC30A to @@ -1127,17 +1138,17 @@ static s32 ixgbe_read_i2c_phy_82598(stru */ sfp_addr = (dev_addr << 8) + byte_offset; sfp_addr = (sfp_addr | IXGBE_I2C_EEPROM_READ_MASK); - hw->phy.ops.write_reg(hw, - IXGBE_MDIO_PMA_PMD_SDA_SCL_ADDR, - IXGBE_MDIO_PMA_PMD_DEV_TYPE, - sfp_addr); + hw->phy.ops.write_reg_mdi(hw, + IXGBE_MDIO_PMA_PMD_SDA_SCL_ADDR, + IXGBE_MDIO_PMA_PMD_DEV_TYPE, + sfp_addr); /* Poll status */ for (i = 0; i < 100; i++) { - hw->phy.ops.read_reg(hw, - IXGBE_MDIO_PMA_PMD_SDA_SCL_STAT, - IXGBE_MDIO_PMA_PMD_DEV_TYPE, - &sfp_stat); + hw->phy.ops.read_reg_mdi(hw, + IXGBE_MDIO_PMA_PMD_SDA_SCL_STAT, + IXGBE_MDIO_PMA_PMD_DEV_TYPE, + &sfp_stat); sfp_stat = sfp_stat & IXGBE_I2C_EEPROM_STATUS_MASK; if (sfp_stat != IXGBE_I2C_EEPROM_STATUS_IN_PROGRESS) break; @@ -1151,8 +1162,8 @@ static s32 ixgbe_read_i2c_phy_82598(stru } /* Read data */ - hw->phy.ops.read_reg(hw, IXGBE_MDIO_PMA_PMD_SDA_SCL_DATA, - IXGBE_MDIO_PMA_PMD_DEV_TYPE, &sfp_data); + hw->phy.ops.read_reg_mdi(hw, IXGBE_MDIO_PMA_PMD_SDA_SCL_DATA, + IXGBE_MDIO_PMA_PMD_DEV_TYPE, &sfp_data); *eeprom_data = (u8)(sfp_data >> 8); } else { @@ -1160,6 +1171,7 @@ static s32 ixgbe_read_i2c_phy_82598(stru } out: + hw->mac.ops.release_swfw_sync(hw, gssr); return status; } Modified: user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_82599.c ============================================================================== --- user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_82599.c Tue Jun 18 22:18:01 2013 (r251969) +++ user/attilio/vmobj-readlock/sys/dev/ixgbe/ixgbe_82599.c Tue Jun 18 22:21:59 2013 (r251970) @@ -77,7 +77,7 @@ void ixgbe_init_mac_link_ops_82599(struc * and MNG not enabled */ if ((mac->ops.get_media_type(hw) == ixgbe_media_type_fiber) && - !(ixgbe_mng_enabled(hw))) { + !hw->mng_fw_enabled) { mac->ops.disable_tx_laser = &ixgbe_disable_tx_laser_multispeed_fiber; mac->ops.enable_tx_laser = @@ -180,11 +180,13 @@ s32 ixgbe_setup_sfp_modules_82599(struct goto setup_sfp_out; } - hw->eeprom.ops.read(hw, ++data_offset, &data_value); + if (hw->eeprom.ops.read(hw, ++data_offset, &data_value)) + goto setup_sfp_err; while (data_value != 0xffff) { IXGBE_WRITE_REG(hw, IXGBE_CORECTL, data_value); IXGBE_WRITE_FLUSH(hw); - hw->eeprom.ops.read(hw, ++data_offset, &data_value); + if (hw->eeprom.ops.read(hw, ++data_offset, &data_value)) + goto setup_sfp_err; } /* Release the semaphore */ @@ -229,6 +231,15 @@ s32 ixgbe_setup_sfp_modules_82599(struct setup_sfp_out: return ret_val; + +setup_sfp_err: + /* Release the semaphore */ + hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM); + /* Delay obtaining semaphore again to allow FW access */ + msec_delay(hw->eeprom.semaphore_delay); + ERROR_REPORT2(IXGBE_ERROR_INVALID_STATE, + "eeprom read at offset %d failed", data_offset); + return IXGBE_ERR_PHY; } /** @@ -314,6 +325,11 @@ s32 ixgbe_init_ops_82599(struct ixgbe_hw mac->ops.set_fw_drv_ver = &ixgbe_set_fw_drv_ver_generic; + mac->ops.get_rtrup2tc = &ixgbe_dcb_get_rtrup2tc_generic; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Wed Jun 19 20:07:56 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EC5DB948; Wed, 19 Jun 2013 20:07:56 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DDB251C52; Wed, 19 Jun 2013 20:07:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5JK7usL055681; Wed, 19 Jun 2013 20:07:56 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5JK7uLv055680; Wed, 19 Jun 2013 20:07:56 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306192007.r5JK7uLv055680@svn.freebsd.org> From: Attilio Rao Date: Wed, 19 Jun 2013 20:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252004 - user/attilio/vmobj-readlock/sys/fs/tmpfs X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jun 2013 20:07:57 -0000 Author: attilio Date: Wed Jun 19 20:07:56 2013 New Revision: 252004 URL: http://svnweb.freebsd.org/changeset/base/252004 Log: kern_sendfile() doesn't sbusy the page any longer, so remove a "nomore" relevant piece of code. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/fs/tmpfs/tmpfs_vnops.c Modified: user/attilio/vmobj-readlock/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- user/attilio/vmobj-readlock/sys/fs/tmpfs/tmpfs_vnops.c Wed Jun 19 19:44:57 2013 (r252003) +++ user/attilio/vmobj-readlock/sys/fs/tmpfs/tmpfs_vnops.c Wed Jun 19 20:07:56 2013 (r252004) @@ -448,11 +448,6 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p VM_OBJECT_WLOCK(tobj); /* - * The kern_sendfile() code calls vn_rdwr() with the page - * soft-busied. Ignore the soft-busy state here. Parallel - * reads of the page content from disk are prevented by - * VPO_BUSY. - * * Although the tmpfs vnode lock is held here, it is * nonetheless safe to sleep waiting for a free page. The * pageout daemon does not need to acquire the tmpfs vnode @@ -460,7 +455,7 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p * type object. */ m = vm_page_grab(tobj, idx, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | - VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOBUSY); + VM_ALLOC_NOBUSY); if (m->valid != VM_PAGE_BITS_ALL) { vm_page_busy(m); if (vm_pager_has_page(tobj, idx, NULL, NULL)) { From owner-svn-src-user@FreeBSD.ORG Wed Jun 19 20:11:46 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EFE62C06; Wed, 19 Jun 2013 20:11:46 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E25C51C86; Wed, 19 Jun 2013 20:11:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5JKBkoV058108; Wed, 19 Jun 2013 20:11:46 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5JKBktL058107; Wed, 19 Jun 2013 20:11:46 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306192011.r5JKBktL058107@svn.freebsd.org> From: Attilio Rao Date: Wed, 19 Jun 2013 20:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252005 - user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jun 2013 20:11:47 -0000 Author: attilio Date: Wed Jun 19 20:11:46 2013 New Revision: 252005 URL: http://svnweb.freebsd.org/changeset/base/252005 Log: sendfile(2) doesn't soft busy anymore, remove yet another special case for it. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jun 19 20:07:56 2013 (r252004) +++ user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jun 19 20:11:46 2013 (r252005) @@ -495,7 +495,7 @@ mappedread_sf(vnode_t *vp, int nbytes, u int bytes = MIN(PAGESIZE, len); pp = vm_page_grab(obj, OFF_TO_IDX(start), VM_ALLOC_NOBUSY | - VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_IGN_SBUSY); + VM_ALLOC_NORMAL | VM_ALLOC_RETRY); if (pp->valid == 0) { vm_page_io_start(pp); zfs_vmobject_wunlock(obj); From owner-svn-src-user@FreeBSD.ORG Wed Jun 19 20:37:14 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A41D24E3; Wed, 19 Jun 2013 20:37:14 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 862391D8D; Wed, 19 Jun 2013 20:37:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5JKbESH065562; Wed, 19 Jun 2013 20:37:14 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5JKbDHE065557; Wed, 19 Jun 2013 20:37:13 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306192037.r5JKbDHE065557@svn.freebsd.org> From: Attilio Rao Date: Wed, 19 Jun 2013 20:37:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252006 - in user/attilio/vmobj-readlock/sys: kern vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jun 2013 20:37:14 -0000 Author: attilio Date: Wed Jun 19 20:37:13 2013 New Revision: 252006 URL: http://svnweb.freebsd.org/changeset/base/252006 Log: Rename the VM_PAGE_ALLOC_IGN_SBUSY into VM_PAGE_ALLOC_IGN_RBUSY in order to express the "read busy" concept (in accordance with r/w object lock). Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/kern/vfs_bio.c user/attilio/vmobj-readlock/sys/vm/vm_page.c user/attilio/vmobj-readlock/sys/vm/vm_page.h Modified: user/attilio/vmobj-readlock/sys/kern/vfs_bio.c ============================================================================== --- user/attilio/vmobj-readlock/sys/kern/vfs_bio.c Wed Jun 19 20:11:46 2013 (r252005) +++ user/attilio/vmobj-readlock/sys/kern/vfs_bio.c Wed Jun 19 20:37:13 2013 (r252006) @@ -3488,14 +3488,14 @@ allocbuf(struct buf *bp, int size) * matter which process we are. * * We can only test VPO_BUSY here. Blocking on - * m->busy might lead to a deadlock: - * vm_fault->getpages->cluster_read->allocbuf - * Thus, we specify VM_ALLOC_IGN_SBUSY. + * m->busy might lead to deadlocks once + * allocbuf() is called after pages are + * vfs_busy_pages(). */ m = vm_page_grab(obj, OFF_TO_IDX(bp->b_offset) + bp->b_npages, VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | VM_ALLOC_WIRED | - VM_ALLOC_RETRY | VM_ALLOC_IGN_SBUSY | + VM_ALLOC_RETRY | VM_ALLOC_IGN_RBUSY | VM_ALLOC_COUNT(desiredpages - bp->b_npages)); if (m->valid == 0) bp->b_flags &= ~B_CACHE; Modified: user/attilio/vmobj-readlock/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmobj-readlock/sys/vm/vm_page.c Wed Jun 19 20:11:46 2013 (r252005) +++ user/attilio/vmobj-readlock/sys/vm/vm_page.c Wed Jun 19 20:37:13 2013 (r252006) @@ -2425,7 +2425,7 @@ vm_page_grab(vm_object_t object, vm_pind retrylookup: if ((m = vm_page_lookup(object, pindex)) != NULL) { if ((m->oflags & VPO_BUSY) != 0 || - ((allocflags & VM_ALLOC_IGN_SBUSY) == 0 && m->busy != 0)) { + ((allocflags & VM_ALLOC_IGN_RBUSY) == 0 && m->busy != 0)) { /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -2449,7 +2449,7 @@ retrylookup: } } m = vm_page_alloc(object, pindex, allocflags & ~(VM_ALLOC_RETRY | - VM_ALLOC_IGN_SBUSY)); + VM_ALLOC_IGN_RBUSY)); if (m == NULL) { VM_OBJECT_WUNLOCK(object); VM_WAIT; Modified: user/attilio/vmobj-readlock/sys/vm/vm_page.h ============================================================================== --- user/attilio/vmobj-readlock/sys/vm/vm_page.h Wed Jun 19 20:11:46 2013 (r252005) +++ user/attilio/vmobj-readlock/sys/vm/vm_page.h Wed Jun 19 20:37:13 2013 (r252006) @@ -346,7 +346,7 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa) #define VM_ALLOC_NOBUSY 0x0200 /* Do not busy the page */ #define VM_ALLOC_IFCACHED 0x0400 /* Fail if the page is not cached */ #define VM_ALLOC_IFNOTCACHED 0x0800 /* Fail if the page is cached */ -#define VM_ALLOC_IGN_SBUSY 0x1000 /* vm_page_grab() only */ +#define VM_ALLOC_IGN_RBUSY 0x1000 /* vm_page_grab() only */ #define VM_ALLOC_NODUMP 0x2000 /* don't include in dump */ #define VM_ALLOC_COUNT_SHIFT 16 From owner-svn-src-user@FreeBSD.ORG Thu Jun 20 12:42:28 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 450BF80C; Thu, 20 Jun 2013 12:42:28 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 353BC13C0; Thu, 20 Jun 2013 12:42:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5KCgSoY014983; Thu, 20 Jun 2013 12:42:28 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5KCgR84014976; Thu, 20 Jun 2013 12:42:27 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306201242.r5KCgR84014976@svn.freebsd.org> From: Attilio Rao Date: Thu, 20 Jun 2013 12:42:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252029 - in user/attilio/vmcontention: contrib/apr/include etc lib/libthr/thread share/man/man5 sys/amd64/amd64 sys/amd64/vmm/io sys/cam sys/fs/ext2fs sys/geom/mirror sys/i386/i386 sys... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 12:42:28 -0000 Author: attilio Date: Thu Jun 20 12:42:27 2013 New Revision: 252029 URL: http://svnweb.freebsd.org/changeset/base/252029 Log: MFC Modified: user/attilio/vmcontention/contrib/apr/include/apr_general.h user/attilio/vmcontention/etc/network.subr user/attilio/vmcontention/lib/libthr/thread/thr_cancel.c user/attilio/vmcontention/share/man/man5/rc.conf.5 user/attilio/vmcontention/sys/amd64/amd64/exception.S user/attilio/vmcontention/sys/amd64/vmm/io/vlapic.c user/attilio/vmcontention/sys/cam/cam_compat.h user/attilio/vmcontention/sys/fs/ext2fs/ext2fs.h user/attilio/vmcontention/sys/geom/mirror/g_mirror.c user/attilio/vmcontention/sys/i386/i386/exception.s user/attilio/vmcontention/sys/kern/uipc_sockbuf.c user/attilio/vmcontention/sys/netinet/tcp_input.c user/attilio/vmcontention/sys/netinet/udp_usrreq.c user/attilio/vmcontention/sys/netinet6/icmp6.c user/attilio/vmcontention/sys/netinet6/ip6_forward.c user/attilio/vmcontention/sys/netinet6/ip6_mroute.c user/attilio/vmcontention/sys/netinet6/raw_ip6.c user/attilio/vmcontention/sys/netinet6/raw_ip6.h user/attilio/vmcontention/sys/netinet6/udp6_usrreq.c user/attilio/vmcontention/sys/netipsec/ah_var.h user/attilio/vmcontention/sys/netipsec/esp_var.h user/attilio/vmcontention/sys/netipsec/ipcomp_var.h user/attilio/vmcontention/sys/netipsec/ipip_var.h user/attilio/vmcontention/sys/netipsec/ipsec.c user/attilio/vmcontention/sys/netipsec/ipsec.h user/attilio/vmcontention/sys/netipsec/ipsec6.h user/attilio/vmcontention/sys/netipsec/ipsec_input.c user/attilio/vmcontention/sys/netipsec/ipsec_mbuf.c user/attilio/vmcontention/sys/netipsec/ipsec_output.c user/attilio/vmcontention/sys/netipsec/key.c user/attilio/vmcontention/sys/netipsec/keysock.c user/attilio/vmcontention/sys/netipsec/keysock.h user/attilio/vmcontention/sys/netipsec/xform_ah.c user/attilio/vmcontention/sys/netipsec/xform_esp.c user/attilio/vmcontention/sys/netipsec/xform_ipcomp.c user/attilio/vmcontention/sys/netipsec/xform_ipip.c user/attilio/vmcontention/sys/vm/uma_core.c user/attilio/vmcontention/usr.bin/Makefile user/attilio/vmcontention/usr.bin/svn/Makefile.inc user/attilio/vmcontention/usr.sbin/bsdconfig/bsdconfig user/attilio/vmcontention/usr.sbin/bsdconfig/networking/devices user/attilio/vmcontention/usr.sbin/bsdconfig/password/password user/attilio/vmcontention/usr.sbin/bsdconfig/security/include/messages.subr user/attilio/vmcontention/usr.sbin/bsdconfig/security/kern_securelevel user/attilio/vmcontention/usr.sbin/bsdconfig/security/security user/attilio/vmcontention/usr.sbin/bsdconfig/share/dialog.subr user/attilio/vmcontention/usr.sbin/bsdconfig/share/media/httpproxy.subr user/attilio/vmcontention/usr.sbin/bsdconfig/share/script.subr user/attilio/vmcontention/usr.sbin/bsdconfig/startup/misc user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcadd user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcconf user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcdelete user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcedit user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcvar user/attilio/vmcontention/usr.sbin/bsdconfig/startup/startup user/attilio/vmcontention/usr.sbin/bsdconfig/timezone/share/zones.subr user/attilio/vmcontention/usr.sbin/bsdconfig/timezone/timezone user/attilio/vmcontention/usr.sbin/bsdconfig/usermgmt/groupdel user/attilio/vmcontention/usr.sbin/bsdconfig/usermgmt/groupedit user/attilio/vmcontention/usr.sbin/bsdconfig/usermgmt/userdel user/attilio/vmcontention/usr.sbin/bsdconfig/usermgmt/useredit user/attilio/vmcontention/usr.sbin/bsdconfig/usermgmt/userinput Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/amd64/vmm/ (props changed) Modified: user/attilio/vmcontention/contrib/apr/include/apr_general.h ============================================================================== --- user/attilio/vmcontention/contrib/apr/include/apr_general.h Thu Jun 20 11:44:16 2013 (r252028) +++ user/attilio/vmcontention/contrib/apr/include/apr_general.h Thu Jun 20 12:42:27 2013 (r252029) @@ -76,7 +76,7 @@ typedef int apr_signum_t; * @return offset */ -#if defined(CRAY) || (defined(__arm) && !defined(LINUX)) +#if defined(CRAY) || (defined(__arm) && !defined(LINUX) && !defined(__FreeBSD__)) #ifdef __STDC__ #define APR_OFFSET(p_type,field) _Offsetof(p_type,field) #else Modified: user/attilio/vmcontention/etc/network.subr ============================================================================== --- user/attilio/vmcontention/etc/network.subr Thu Jun 20 11:44:16 2013 (r252028) +++ user/attilio/vmcontention/etc/network.subr Thu Jun 20 12:42:27 2013 (r252029) @@ -24,6 +24,10 @@ # # $FreeBSD$ # +IFCONFIG_CMD="/sbin/ifconfig" + +# Maximum number of addresses expanded from a address range specification. +_IPEXPANDMAX=31 # # Subroutines commonly used from network startup scripts. @@ -94,7 +98,7 @@ ifconfig_up() # ifconfig_IF ifconfig_args=`ifconfig_getargs $1` if [ -n "${ifconfig_args}" ]; then - eval ifconfig $1 ${ifconfig_args} + eval ${IFCONFIG_CMD} $1 ${ifconfig_args} _cfg=0 fi @@ -122,7 +126,7 @@ ifconfig_up() esac if [ -n "${_ipv6_opts}" ]; then - ifconfig $1 inet6 ${_ipv6_opts} + ${IFCONFIG_CMD} $1 inet6 ${_ipv6_opts} fi # ifconfig_IF_ipv6 @@ -136,8 +140,8 @@ ifconfig_up() ifconfig_args="inet6 ${ifconfig_args}" ;; esac - ifconfig $1 inet6 -ifdisabled - eval ifconfig $1 ${ifconfig_args} + ${IFCONFIG_CMD} $1 inet6 -ifdisabled + eval ${IFCONFIG_CMD} $1 ${ifconfig_args} _cfg=0 fi @@ -145,7 +149,7 @@ ifconfig_up() # ipv6_prefix_hostid_addr_common(). ifconfig_args=`get_if_var $1 ipv6_prefix_IF` if [ -n "${ifconfig_args}" ]; then - ifconfig $1 inet6 -ifdisabled + ${IFCONFIG_CMD} $1 inet6 -ifdisabled _cfg=0 fi @@ -154,14 +158,14 @@ ifconfig_up() if [ -n "${ifconfig_args}" ]; then warn "\$ipv6_ifconfig_$1 is obsolete." \ " Use ifconfig_$1_ipv6 instead." - ifconfig $1 inet6 -ifdisabled - eval ifconfig $1 inet6 ${ifconfig_args} + ${IFCONFIG_CMD} $1 inet6 -ifdisabled + eval ${IFCONFIG_CMD} $1 inet6 ${ifconfig_args} _cfg=0 fi fi if [ ${_cfg} -eq 0 ]; then - ifconfig $1 up + ${IFCONFIG_CMD} $1 up fi if wpaif $1; then @@ -171,7 +175,7 @@ ifconfig_up() if dhcpif $1; then if [ $_cfg -ne 0 ] ; then - ifconfig $1 up + ${IFCONFIG_CMD} $1 up fi if syncdhcpif $1; then /etc/rc.d/dhclient start $1 @@ -202,7 +206,7 @@ ifconfig_down() fi if ifexists $1; then - ifconfig $1 down + ${IFCONFIG_CMD} $1 down _cfg=0 fi @@ -539,7 +543,7 @@ ipv6_autoconfif() ifexists() { [ -z "$1" ] && return 1 - ifconfig -n $1 > /dev/null 2>&1 + ${IFCONFIG_CMD} -n $1 > /dev/null 2>&1 } # ipv4_up if @@ -554,11 +558,10 @@ ipv4_up() if [ "${_if}" = "lo0" ]; then ifconfig_args=`get_if_var ${_if} ifconfig_IF` if [ -z "${ifconfig_args}" ]; then - ifconfig ${_if} inet 127.0.0.1/8 alias + ${IFCONFIG_CMD} ${_if} inet 127.0.0.1/8 alias fi fi - ifalias_up ${_if} inet && _ret=0 - ipv4_addrs_common ${_if} alias && _ret=0 + ifalias ${_if} inet alias && _ret=0 return $_ret } @@ -575,7 +578,7 @@ ipv6_up() return 0 fi - ifalias_up ${_if} inet6 && _ret=0 + ifalias ${_if} inet6 alias && _ret=0 ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 ipv6_accept_rtadv_up ${_if} && _ret=0 @@ -591,7 +594,9 @@ ipv4_down() _ifs="^" _ret=1 - inetList="`ifconfig ${_if} | grep 'inet ' | tr "\n" "$_ifs"`" + ifalias ${_if} inet -alias && _ret=0 + + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr "\n" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" @@ -602,15 +607,12 @@ ipv4_down() _inet=`expr "$_inet" : '.*\(inet \([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'` IFS="$oldifs" - ifconfig ${_if} ${_inet} delete + ${IFCONFIG_CMD} ${_if} ${_inet} delete IFS="$_ifs" _ret=0 done IFS="$oldifs" - ifalias_down ${_if} inet && _ret=0 - ipv4_addrs_common ${_if} -alias && _ret=0 - return $_ret } @@ -629,9 +631,9 @@ ipv6_down() ipv6_accept_rtadv_down ${_if} && _ret=0 ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0 - ifalias_down ${_if} inet6 && _ret=0 + ifalias ${_if} inet6 -alias && _ret=0 - inetList="`ifconfig ${_if} | grep 'inet6 ' | tr "\n" "$_ifs"`" + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr "\n" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" @@ -642,7 +644,7 @@ ipv6_down() _inet6=`expr "$_inet6" : '.*\(inet6 \([0-9a-f:]*\)\).*'` IFS="$oldifs" - ifconfig ${_if} ${_inet6} -alias + ${IFCONFIG_CMD} ${_if} ${_inet6} -alias IFS="$_ifs" _ret=0 done @@ -651,234 +653,349 @@ ipv6_down() return $_ret } -# ipv4_addrs_common if action -# Evaluate the ifconfig_if_ipv4 arguments for interface $if and -# use $action to add or remove IPv4 addresses from $if. -ipv4_addrs_common() -{ - local _ret _if _action _cidr _cidr_addr - local _ipaddr _netmask _range _ipnet _iplow _iphigh _ipcount - _ret=1 - _if=$1 - _action=$2 - - # get ipv4-addresses - cidr_addr=`get_if_var $_if ipv4_addrs_IF` - - for _cidr in ${cidr_addr}; do - _ipaddr=${_cidr%%/*} - _netmask="/"${_cidr##*/} - _range=${_ipaddr##*.} - _ipnet=${_ipaddr%.*} - _iplow=${_range%-*} - _iphigh=${_range#*-} - - # clear netmask when removing aliases - if [ "${_action}" = "-alias" ]; then - _netmask="" - fi - - _ipcount=${_iplow} - while [ "${_ipcount}" -le "${_iphigh}" ]; do - eval "ifconfig ${_if} ${_action} ${_ipnet}.${_ipcount}${_netmask}" - _ipcount=$((${_ipcount}+1)) - _ret=0 - - # only the first ipaddr in a subnet need the real netmask - if [ "${_action}" != "-alias" ]; then - _netmask="/32" - fi - done - done - - return $_ret -} - -# ifalias_up if af -# Configure aliases for network interface $if. +# ifalias if af action +# Configure or remove aliases for network interface $if. # It returns 0 if at least one alias was configured or -# 1 if there were none. +# removed, or 1 if there were none. # -ifalias_up() +ifalias() { local _ret _ret=1 + afexists $2 || return $_ret + case "$2" in - inet) - _ret=`ifalias_ipv4_up "$1"` - ;; - inet6) - _ret=`ifalias_ipv6_up "$1"` + inet|inet6) + ifalias_af_common $1 $2 $3 && _ret=0 ;; esac return $_ret } -# ifalias_ipv4_up if -# Helper function for ifalias_up(). Handles IPv4. +# ifalias_expand_addr af action addr +# Expand address range ("N-M") specification in addr. +# "addr" must not include an address-family keyword. +# The results will include an address-family keyword. # -ifalias_ipv4_up() +ifalias_expand_addr() { - local _ret alias ifconfig_args - _ret=1 - - # ifconfig_IF_aliasN which starts with "inet" - alias=0 - while : ; do - ifconfig_args=`get_if_var $1 ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - inet\ *) - ifconfig $1 ${ifconfig_args} alias && _ret=0 - ;; - inet6\ *) - ;; - "") - break - ;; - *) - warn "\$ifconfig_$1_alias${alias} needs " \ - "\"inet\" keyword for an IPv4 address." - ifconfig $1 ${ifconfig_args} alias && _ret=0 - ;; - esac - alias=$((${alias} + 1)) - done - return $_ret + afexists $1 || return + ifalias_expand_addr_$1 $2 $3 } -# ifalias_ipv6_up if -# Helper function for ifalias_up(). Handles IPv6. +# ifalias_expand_addr_inet action addr +# Helper function for ifalias_expand_addr(). Handles IPv4. # -ifalias_ipv6_up() +ifalias_expand_addr_inet() { - local _ret alias ifconfig_args - _ret=1 + local _action _arg _cidr _cidr_addr + local _ipaddr _plen _range _iphead _iptail _iplow _iphigh _ipcount + local _retstr _c + _action=$1 + _arg=$2 + _retstr= - # ifconfig_IF_aliasN which starts with "inet6" - alias=0 - while : ; do - ifconfig_args=`get_if_var $1 ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - inet6\ *) - ifconfig $1 ${ifconfig_args} alias && _ret=0 - ;; - "") - break - ;; + case $_action:$_arg in + *:*--*) return ;; # invalid + tmp:*) echo $_arg && return ;; # already expanded + tmp:*-*) _action="alias" ;; # to be expanded + *:*-*) ;; # to be expanded + *:*) echo inet $_arg && return ;; # already expanded + esac + + for _cidr in $_arg; do + _ipaddr=${_cidr%%/*} + _plen=${_cidr##*/} + # When subnet prefix length is not specified, use /32. + case $_plen in + $_ipaddr) _plen=32 ;; # "/" character not found esac - alias=$((${alias} + 1)) - done - # backward compatibility: ipv6_ifconfig_IF_aliasN. - alias=0 - while : ; do - ifconfig_args=`get_if_var $1 ipv6_ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - "") - break + OIFS=$IFS + IFS=. set -- $_ipaddr + _range= + _iphead= + _iptail= + for _c in $@; do + case $_range:$_c in + :[0-9]*-[0-9]*) + _range=$_c ;; - *) - ifconfig $1 inet6 ${ifconfig_args} alias && _ret=0 - warn "\$ipv6_ifconfig_$1_alias${alias} is obsolete." \ - " Use ifconfig_$1_aliasN instead." + :*) + _iphead="${_iphead}${_iphead:+.}${_c}" ;; - esac - alias=$((${alias} + 1)) + *:*) + _iptail="${_iptail}${_iptail:+.}${_c}" + ;; + esac + done + IFS=$OIFS + _iplow=${_range%-*} + _iphigh=${_range#*-} + + # clear netmask when removing aliases + if [ "$_action" = "-alias" ]; then + _plen="" + fi + + _ipcount=$_iplow + while [ "$_ipcount" -le "$_iphigh" ]; do + _retstr="${_retstr} ${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail}${_plen:+/}${_plen}" + if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ]; then + warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed." + break + else + _ipcount=$(($_ipcount + 1)) + fi + # Forcibly set /32 for remaining aliases. + _plen=32 + done done - return $_ret + for _c in $_retstr; do + ifalias_expand_addr_inet $_action $_c + done } -# ifalias_down if af -# Remove aliases for network interface $if. -# It returns 0 if at least one alias was removed or -# 1 if there were none. +# ifalias_expand_addr_inet6 action addr +# Helper function for ifalias_expand_addr(). Handles IPv6. # -ifalias_down() -{ - local _ret - _ret=1 - - case "$2" in - inet) - _ret=`ifalias_ipv4_down "$1"` - ;; - inet6) - _ret=`ifalias_ipv6_down "$1"` - ;; +ifalias_expand_addr_inet6() +{ + local _action _arg _cidr _cidr_addr + local _ipaddr _plen _ipleft _ipright _iplow _iphigh _ipcount + local _ipv4part + local _retstr _c + _action=$1 + _arg=$2 + _retstr= + + case $_action:$_arg in + *:*--*) return ;; # invalid + tmp:*) echo $_arg && return ;; + tmp:*-*) _action="alias" ;; + *:*-*) ;; + *:*) echo inet6 $_arg && return ;; esac - return $_ret + for _cidr in $_arg; do + _ipaddr="${_cidr%%/*}" + _plen="${_cidr##*/}" + + case $_action:$_ipaddr:$_cidr in + -alias:*:*) unset _plen ;; + *:$_cidr:$_ipaddr) unset _plen ;; + esac + + if [ "${_ipaddr%:*.*.*.*}" = "$_ipaddr" ]; then + # Handle !v4mapped && !v4compat addresses. + + # The default prefix length is 64. + case $_ipaddr:$_cidr in + $_cidr:$_ipaddr) _plen="64" ;; + esac + _ipleft=${_ipaddr%-*} + _ipright=${_ipaddr#*-} + _iplow=${_ipleft##*:} + _iphigh=${_ipright%%:*} + _ipleft=${_ipleft%:*} + _ipright=${_ipright#*:} + + if [ "$_iphigh" = "$_ipright" ]; then + unset _ipright + else + _ipright=:$_ipright + fi + + if [ -n "$_iplow" -a -n "$_iphigh" ]; then + _iplow=$((0x$_iplow)) + _iphigh=$((0x$_iphigh)) + _ipcount=$_iplow + while [ $_ipcount -le $_iphigh ]; do + _r=`printf "%s:%04x%s%s" \ + $_ipleft $_ipcount $_ipright \ + ${_plen:+/}$_plen` + _retstr="$_retstr $_r" + if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ] + then + warn "Range specification is too large $(printf '(%s:%04x%s-%s:%04x%s)' $_ipleft $_iplow $_ipright $_ipleft $_iphigh $_ipright). $(printf '%s:%04x%s-%s:%04x%s' $_ipleft $_iplow $_ipright $_ipleft $_ipcount $_ipright) was processed." + break + else + _ipcount=$(($_ipcount + 1)) + fi + done + else + _retstr="${_ipaddr}${_plen:+/}${_plen}" + fi + + for _c in $_retstr; do + ifalias_expand_addr_inet6 $_action $_c + done + else + # v4mapped/v4compat should handle as an IPv4 alias + _ipv4part=${_ipaddr##*:} + + # Adjust prefix length if any. If not, set the + # default prefix length as 32. + case $_ipaddr:$_cidr in + $_cidr:$_ipaddr) _plen=32 ;; + *) _plen=$(($_plen - 96)) ;; + esac + + _retstr=`ifalias_expand_addr_inet \ + tmp ${_ipv4part}${_plen:+/}${_plen}` + for _c in $_retstr; do + ifalias_expand_addr_inet $_action $_c + done + fi + done } -# ifalias_ipv4_down if -# Helper function for ifalias_down(). Handles IPv4. +# ifalias_af_common_handler if af action args +# Helper function for ifalias_af_common(). # -ifalias_ipv4_down() +ifalias_af_common_handler() { - local _ret alias ifconfig_args + local _ret _if _af _action _args _c _tmpargs + _ret=1 + _if=$1 + _af=$2 + _action=$3 + shift 3 + _args=$* + + case $_args in + ${_af}\ *) ;; + *) return ;; + esac - # ifconfig_IF_aliasN which starts with "inet" - alias=0 - while : ; do - ifconfig_args=`get_if_var $1 ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - inet\ *) - ifconfig $1 ${ifconfig_args} -alias && _ret=0 + _tmpargs= + for _c in $_args; do + case $_c in + ${_af}) + case $_tmpargs in + ${_af}\ *-*) + ifalias_af_common_handler $_if $_af $_action \ + `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }` ;; - "") - break + ${_af}\ *) + ${IFCONFIG_CMD} $_if $_tmpargs $_action && _ret=0 ;; + esac + _tmpargs=$_af + ;; + *) + _tmpargs="$_tmpargs $_c" + ;; esac - alias=$((${alias} + 1)) done + # Process the last component if any. + if [ -n "$_tmpargs}" ]; then + case $_tmpargs in + ${_af}\ *-*) + ifalias_af_common_handler $_if $_af $_action \ + `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }` + ;; + ${_af}\ *) + ${IFCONFIG_CMD} $_if $_tmpargs $_action && _ret=0 + ;; + esac + fi return $_ret } -# ifalias_ipv6_down if -# Helper function for ifalias_down(). Handles IPv6. +# ifalias_af_common if af action +# Helper function for ifalias(). # -ifalias_ipv6_down() +ifalias_af_common() { - local _ret alias ifconfig_args + local _ret _if _af _action alias ifconfig_args _aliasn _c _tmpargs _iaf + _ret=1 + _aliasn= + _if=$1 + _af=$2 + _action=$3 - # ifconfig_IF_aliasN which starts with "inet6" + # ifconfig_IF_aliasN which starts with $_af alias=0 while : ; do - ifconfig_args=`get_if_var $1 ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - inet6\ *) - ifconfig $1 ${ifconfig_args} -alias && _ret=0 + ifconfig_args=`get_if_var $_if ifconfig_IF_alias${alias}` + _iaf= + case $ifconfig_args in + inet\ *) _iaf=inet ;; + inet6\ *) _iaf=inet6 ;; + ipx\ *) _iaf=ipx ;; + esac + + case ${_af}:${_action}:${_iaf}:"${ifconfig_args}" in + ${_af}:*:${_af}:*) + _aliasn="$_aliasn $ifconfig_args" ;; - "") + ${_af}:*:"":"") break ;; + inet:alias:"":*) + _aliasn="$_aliasn inet $ifconfig_args" + warn "\$ifconfig_${_if}_alias${alias} needs " \ + "\"inet\" keyword for an IPv4 address." esac - alias=$((${alias} + 1)) + alias=$(($alias + 1)) done # backward compatibility: ipv6_ifconfig_IF_aliasN. - alias=0 - while : ; do - ifconfig_args=`get_if_var $1 ipv6_ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - "") - break + case $_af in + inet6) + alias=0 + while : ; do + ifconfig_args=`get_if_var $_if ipv6_ifconfig_IF_alias${alias}` + case ${_action}:"${ifconfig_args}" in + *:"") + break + ;; + alias:*) + _aliasn="${_aliasn} inet6 ${ifconfig_args}" + warn "\$ipv6_ifconfig_${_if}_alias${alias} " \ + "is obsolete. Use ifconfig_$1_aliasN " \ + "instead." ;; - *) - ifconfig $1 inet6 ${ifconfig_args} -alias && _ret=0 - warn "\$ipv6_ifconfig_$1_alias${alias} is obsolete." \ - " Use ifconfig_$1_aliasN instead." + esac + alias=$(($alias + 1)) + done + esac + + # backward compatibility: ipv4_addrs_IF. + for _tmpargs in `get_if_var $_if ipv4_addrs_IF`; do + _aliasn="$_aliasn inet $_tmpargs" + done + + # Handle ifconfig_IF_aliases, ifconfig_IF_aliasN, and the others. + _tmpargs= + for _c in `get_if_var $_if ifconfig_IF_aliases` $_aliasn; do + case $_c in + inet|inet6|ipx) + case $_tmpargs in + ${_af}\ *) + eval ifalias_af_common_handler $_if $_af $_action $_tmpargs && _ret=0 ;; + esac + _tmpargs=$_c + ;; + *) + _tmpargs="$_tmpargs $_c" esac - alias=$((${alias} + 1)) done + # Process the last component + case $_tmpargs in + ${_af}\ *) + ifalias_af_common_handler $_if $_af $_action $_tmpargs && _ret=0 + ;; + esac return $_ret } @@ -899,14 +1016,32 @@ ipv6_prefix_hostid_addr_common() hostid=${hostid%\%*} for j in ${prefix}; do - address=$j\:${hostid} - ifconfig ${_if} inet6 ${address} prefixlen 64 ${_action} + # The default prefixlen is 64. + plen=${j#*/} + case $j:$plen in + $plen:$j) plen=64 ;; + *) j=${j%/*} ;; + esac + + # Normalize the last part by removing ":" + j=${j%:*} + j=${j%:} + OIFS=$IFS; IFS=":"; set -- $j; nj=$#; IFS=$OIFS + OIFS=$IFS; IFS=":"; set -- $hostid; nh=$#; IFS=$OIFS + if [ $(($nj + $nh)) -eq 8 ]; then + address=$j\:$hostid + else + address=$j\::$hostid + fi + + ${IFCONFIG_CMD} ${_if} inet6 ${address} \ + prefixlen $plen ${_action} # if I am a router, add subnet router # anycast address (RFC 2373). if checkyesno ipv6_gateway_enable; then - ifconfig ${_if} inet6 $j:: prefixlen 64 \ - ${_action} anycast + ${IFCONFIG_CMD} ${_if} inet6 $j:: \ + prefixlen $plen ${_action} anycast fi done fi @@ -918,7 +1053,7 @@ ipv6_prefix_hostid_addr_common() ipv6_accept_rtadv_up() { if ipv6_autoconfif $1; then - ifconfig $1 inet6 accept_rtadv up + ${IFCONFIG_CMD} $1 inet6 accept_rtadv up if ! checkyesno rtsold_enable; then rtsol ${rtsol_flags} $1 fi @@ -930,7 +1065,7 @@ ipv6_accept_rtadv_up() ipv6_accept_rtadv_down() { if ipv6_autoconfif $1; then - ifconfig $1 inet6 -accept_rtadv + ${IFCONFIG_CMD} $1 inet6 -accept_rtadv fi } @@ -975,7 +1110,7 @@ clone_up() # create_args_IF for ifn in ${cloned_interfaces}; do - ifconfig ${ifn} create `get_if_var ${ifn} create_args_IF` + ${IFCONFIG_CMD} ${ifn} create `get_if_var ${ifn} create_args_IF` if [ $? -eq 0 ]; then _list="${_list}${_prefix}${ifn}" [ -z "$_prefix" ] && _prefix=' ' @@ -995,7 +1130,7 @@ clone_down() _list= for ifn in ${cloned_interfaces}; do - ifconfig -n ${ifn} destroy + ${IFCONFIG_CMD} -n ${ifn} destroy if [ $? -eq 0 ]; then _list="${_list}${_prefix}${ifn}" [ -z "$_prefix" ] && _prefix=' ' @@ -1022,16 +1157,16 @@ childif_create() debug_flags="`get_if_var $child wlandebug_IF`" if expr $child : 'wlan[0-9][0-9]*$' >/dev/null 2>&1; then - ifconfig $child create ${create_args} && cfg=0 + ${IFCONFIG_CMD} $child create ${create_args} && cfg=0 if [ -n "${debug_flags}" ]; then wlandebug -i $child ${debug_flags} fi else - i=`ifconfig wlan create ${create_args}` + i=`${IFCONFIG_CMD} wlan create ${create_args}` if [ -n "${debug_flags}" ]; then wlandebug -i $i ${debug_flags} fi - ifconfig $i name $child && cfg=0 + ${IFCONFIG_CMD} $i name $child && cfg=0 fi if autoif $child; then ifn_start $child @@ -1049,14 +1184,14 @@ childif_create() if expr $child : '[1-9][0-9]*$' >/dev/null 2>&1; then child="${ifn}.${child}" create_args=`get_if_var $child create_args_IF` - ifconfig $child create ${create_args} && cfg=0 + ${IFCONFIG_CMD} $child create ${create_args} && cfg=0 else create_args="vlandev $ifn `get_if_var $child create_args_IF`" if expr $child : 'vlan[0-9][0-9]*$' >/dev/null 2>&1; then - ifconfig $child create ${create_args} && cfg=0 + ${IFCONFIG_CMD} $child create ${create_args} && cfg=0 else - i=`ifconfig vlan create ${create_args}` - ifconfig $i name $child && cfg=0 + i=`${IFCONFIG_CMD} vlan create ${create_args}` + ${IFCONFIG_CMD} $i name $child && cfg=0 fi fi if autoif $child; then @@ -1080,7 +1215,7 @@ childif_destroy() if ! ifexists $child; then continue fi - ifconfig -n $child destroy && cfg=0 + ${IFCONFIG_CMD} -n $child destroy && cfg=0 done child_vlans=`get_if_var $ifn vlans_IF` @@ -1091,7 +1226,7 @@ childif_destroy() if ! ifexists $child; then continue fi - ifconfig -n $child destroy && cfg=0 + ${IFCONFIG_CMD} -n $child destroy && cfg=0 done return ${cfg} @@ -1138,13 +1273,13 @@ gif_up() ;; *) if expr $i : 'gif[0-9][0-9]*$' >/dev/null 2>&1; then - ifconfig $i create >/dev/null 2>&1 + ${IFCONFIG_CMD} $i create >/dev/null 2>&1 else - gif=`ifconfig gif create` - ifconfig $gif name $i + gif=`${IFCONFIG_CMD} gif create` + ${IFCONFIG_CMD} $gif name $i fi - ifconfig $i tunnel ${peers} - ifconfig $i up + ${IFCONFIG_CMD} $i tunnel ${peers} + ${IFCONFIG_CMD} $i up ;; esac done @@ -1210,7 +1345,7 @@ ipx_up() # ifconfig_IF_ipx ifconfig_args=`_ifconfig_getargs $ifn ipx` if [ -n "${ifconfig_args}" ]; then - ifconfig ${ifn} ${ifconfig_args} + ${IFCONFIG_CMD} ${ifn} ${ifconfig_args} return 0 fi @@ -1227,7 +1362,7 @@ ipx_down() _if=$1 _ifs="^" _ret=1 - ipxList="`ifconfig ${_if} | grep 'ipx ' | tr "\n" "$_ifs"`" + ipxList="`${IFCONFIG_CMD} ${_if} | grep 'ipx ' | tr "\n" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" @@ -1238,7 +1373,7 @@ ipx_down() _ipx=`expr "$_ipx" : '.*\(ipx [0-9a-h]\{1,8\}H*\.[0-9a-h]\{1,12\}\).*'` IFS="$oldifs" - ifconfig ${_if} ${_ipx} delete + ${IFCONFIG_CMD} ${_if} ${_ipx} delete IFS="$_ifs" _ret=0 done @@ -1255,10 +1390,10 @@ ifnet_rename() local _if _ifname # ifconfig_IF_name - for _if in `ifconfig -l`; do + for _if in `${IFCONFIG_CMD} -l`; do _ifname=`get_if_var $_if ifconfig_IF_name` if [ ! -z "$_ifname" ]; then - ifconfig $_if name $_ifname + ${IFCONFIG_CMD} $_if name $_ifname fi done @@ -1290,7 +1425,7 @@ list_net_interfaces() _tmplist= case ${network_interfaces} in [Aa][Uu][Tt][Oo]) - _autolist="`ifconfig -l`" + _autolist="`${IFCONFIG_CMD} -l`" _lo= for _if in ${_autolist} ; do if autoif $_if; then @@ -1398,7 +1533,7 @@ is_wired_interface() { local media - case `ifconfig $1 2>/dev/null` in + case `${IFCONFIG_CMD} $1 2>/dev/null` in *media:?Ethernet*) media=Ethernet ;; esac @@ -1410,25 +1545,27 @@ is_wired_interface() # If flag is defined, tentative ones will be excluded. network6_getladdr() { - local proto addr rest - ifconfig $1 2>/dev/null | while read proto addr rest; do - case ${proto} in - inet6) - case ${addr} in - fe80::*) - if [ -z "$2" ]; then - echo ${addr} - return - fi - case ${rest} in - *tentative*) - continue - ;; - *) - echo ${addr} - return - esac - esac + local _if _flag proto addr rest + _if=$1 + _flag=$2 + + ${IFCONFIG_CMD} $_if 2>/dev/null | while read proto addr rest; do + case "${proto}/${addr}/${_flag}/${rest}" in + inet6/fe80::*//*) + echo ${addr} + ;; + inet6/fe80:://*tentative*) # w/o flag + sleep `${SYSCTL_N} net.inet6.ip6.dad_count` + network6_getladdr $_if $_flags + ;; + inet6/fe80::/*/*tentative*) # w/ flag + echo ${addr} + ;; + *) + continue + ;; esac + + return done } Modified: user/attilio/vmcontention/lib/libthr/thread/thr_cancel.c ============================================================================== --- user/attilio/vmcontention/lib/libthr/thread/thr_cancel.c Thu Jun 20 11:44:16 2013 (r252028) +++ user/attilio/vmcontention/lib/libthr/thread/thr_cancel.c Thu Jun 20 12:42:27 2013 (r252029) @@ -87,7 +87,8 @@ _pthread_setcancelstate(int state, int * break; case PTHREAD_CANCEL_ENABLE: curthread->cancel_enable = 1; - testcancel(curthread); + if (curthread->cancel_async) + testcancel(curthread); break; default: return (EINVAL); Modified: user/attilio/vmcontention/share/man/man5/rc.conf.5 ============================================================================== --- user/attilio/vmcontention/share/man/man5/rc.conf.5 Thu Jun 20 11:44:16 2013 (r252028) +++ user/attilio/vmcontention/share/man/man5/rc.conf.5 Thu Jun 20 12:42:27 2013 (r252029) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 9, 2013 +.Dd June 20, 2013 .Dt RC.CONF 5 .Os .Sh NAME @@ -1124,44 +1124,63 @@ Such keywords are removed before passing .Xr ifconfig 8 while the order of the other arguments is preserved. .Pp -One can configure more than one IPv4 address with the -.Va ipv4_addrs_ Ns Aq Ar interface -variable. -One or more IP addresses must be provided in Classless Inter-Domain -Routing (CIDR) address notation, whose last byte can be a range like -192.0.2.5-23/24. -In this case the address 192.0.2.5 will be configured with the +It is possible to add IP alias entries using +.Xr ifconfig 8 +syntax with the address family keyword such as +.Li inet . +Assuming that the interface in question was +.Li ed0 , +it might look something like this: +.Bd -literal +ifconfig_ed0_alias0="inet 127.0.0.253 netmask 0xffffffff" +ifconfig_ed0_alias1="inet 127.0.0.254 netmask 0xffffffff" +.Ed +.Pp +It also possible to configure multiple IP addresses in Classless +Inter-Domain Routing +.Pq CIDR +address notation, +whose each address component can be a range like +.Li inet 192.0.2.5-23/24 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Thu Jun 20 12:46:04 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3E7BA97E; Thu, 20 Jun 2013 12:46:04 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2D35D1468; Thu, 20 Jun 2013 12:46:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5KCk4WK015595; Thu, 20 Jun 2013 12:46:04 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5KCk3YR015586; Thu, 20 Jun 2013 12:46:03 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306201246.r5KCk3YR015586@svn.freebsd.org> From: Attilio Rao Date: Thu, 20 Jun 2013 12:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252030 - in user/attilio/vmobj-readlock: contrib/apr/include etc lib/libthr/thread share/man/man5 sys/amd64/amd64 sys/amd64/vmm/io sys/cam sys/fs/ext2fs sys/geom/mirror sys/i386/i386 s... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 12:46:04 -0000 Author: attilio Date: Thu Jun 20 12:46:03 2013 New Revision: 252030 URL: http://svnweb.freebsd.org/changeset/base/252030 Log: MFC Modified: user/attilio/vmobj-readlock/contrib/apr/include/apr_general.h user/attilio/vmobj-readlock/etc/network.subr user/attilio/vmobj-readlock/lib/libthr/thread/thr_cancel.c user/attilio/vmobj-readlock/share/man/man5/rc.conf.5 user/attilio/vmobj-readlock/sys/amd64/amd64/exception.S user/attilio/vmobj-readlock/sys/amd64/vmm/io/vlapic.c user/attilio/vmobj-readlock/sys/cam/cam_compat.h user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2fs.h user/attilio/vmobj-readlock/sys/geom/mirror/g_mirror.c user/attilio/vmobj-readlock/sys/i386/i386/exception.s user/attilio/vmobj-readlock/sys/kern/uipc_sockbuf.c user/attilio/vmobj-readlock/sys/netinet/tcp_input.c user/attilio/vmobj-readlock/sys/netinet/udp_usrreq.c user/attilio/vmobj-readlock/sys/netinet6/icmp6.c user/attilio/vmobj-readlock/sys/netinet6/ip6_forward.c user/attilio/vmobj-readlock/sys/netinet6/ip6_mroute.c user/attilio/vmobj-readlock/sys/netinet6/raw_ip6.c user/attilio/vmobj-readlock/sys/netinet6/raw_ip6.h user/attilio/vmobj-readlock/sys/netinet6/udp6_usrreq.c user/attilio/vmobj-readlock/sys/netipsec/ah_var.h user/attilio/vmobj-readlock/sys/netipsec/esp_var.h user/attilio/vmobj-readlock/sys/netipsec/ipcomp_var.h user/attilio/vmobj-readlock/sys/netipsec/ipip_var.h user/attilio/vmobj-readlock/sys/netipsec/ipsec.c user/attilio/vmobj-readlock/sys/netipsec/ipsec.h user/attilio/vmobj-readlock/sys/netipsec/ipsec6.h user/attilio/vmobj-readlock/sys/netipsec/ipsec_input.c user/attilio/vmobj-readlock/sys/netipsec/ipsec_mbuf.c user/attilio/vmobj-readlock/sys/netipsec/ipsec_output.c user/attilio/vmobj-readlock/sys/netipsec/key.c user/attilio/vmobj-readlock/sys/netipsec/keysock.c user/attilio/vmobj-readlock/sys/netipsec/keysock.h user/attilio/vmobj-readlock/sys/netipsec/xform_ah.c user/attilio/vmobj-readlock/sys/netipsec/xform_esp.c user/attilio/vmobj-readlock/sys/netipsec/xform_ipcomp.c user/attilio/vmobj-readlock/sys/netipsec/xform_ipip.c user/attilio/vmobj-readlock/sys/vm/uma_core.c user/attilio/vmobj-readlock/usr.bin/Makefile user/attilio/vmobj-readlock/usr.bin/svn/Makefile.inc user/attilio/vmobj-readlock/usr.sbin/bsdconfig/bsdconfig user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/devices user/attilio/vmobj-readlock/usr.sbin/bsdconfig/password/password user/attilio/vmobj-readlock/usr.sbin/bsdconfig/security/include/messages.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/security/kern_securelevel user/attilio/vmobj-readlock/usr.sbin/bsdconfig/security/security user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/dialog.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/httpproxy.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/script.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/misc user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/rcadd user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/rcconf user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/rcdelete user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/rcedit user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/rcvar user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/startup user/attilio/vmobj-readlock/usr.sbin/bsdconfig/timezone/share/zones.subr user/attilio/vmobj-readlock/usr.sbin/bsdconfig/timezone/timezone user/attilio/vmobj-readlock/usr.sbin/bsdconfig/usermgmt/groupdel user/attilio/vmobj-readlock/usr.sbin/bsdconfig/usermgmt/groupedit user/attilio/vmobj-readlock/usr.sbin/bsdconfig/usermgmt/userdel user/attilio/vmobj-readlock/usr.sbin/bsdconfig/usermgmt/useredit user/attilio/vmobj-readlock/usr.sbin/bsdconfig/usermgmt/userinput Directory Properties: user/attilio/vmobj-readlock/ (props changed) user/attilio/vmobj-readlock/sys/ (props changed) user/attilio/vmobj-readlock/sys/amd64/vmm/ (props changed) Modified: user/attilio/vmobj-readlock/contrib/apr/include/apr_general.h ============================================================================== --- user/attilio/vmobj-readlock/contrib/apr/include/apr_general.h Thu Jun 20 12:42:27 2013 (r252029) +++ user/attilio/vmobj-readlock/contrib/apr/include/apr_general.h Thu Jun 20 12:46:03 2013 (r252030) @@ -76,7 +76,7 @@ typedef int apr_signum_t; * @return offset */ -#if defined(CRAY) || (defined(__arm) && !defined(LINUX)) +#if defined(CRAY) || (defined(__arm) && !defined(LINUX) && !defined(__FreeBSD__)) #ifdef __STDC__ #define APR_OFFSET(p_type,field) _Offsetof(p_type,field) #else Modified: user/attilio/vmobj-readlock/etc/network.subr ============================================================================== --- user/attilio/vmobj-readlock/etc/network.subr Thu Jun 20 12:42:27 2013 (r252029) +++ user/attilio/vmobj-readlock/etc/network.subr Thu Jun 20 12:46:03 2013 (r252030) @@ -24,6 +24,10 @@ # # $FreeBSD$ # +IFCONFIG_CMD="/sbin/ifconfig" + +# Maximum number of addresses expanded from a address range specification. +_IPEXPANDMAX=31 # # Subroutines commonly used from network startup scripts. @@ -94,7 +98,7 @@ ifconfig_up() # ifconfig_IF ifconfig_args=`ifconfig_getargs $1` if [ -n "${ifconfig_args}" ]; then - eval ifconfig $1 ${ifconfig_args} + eval ${IFCONFIG_CMD} $1 ${ifconfig_args} _cfg=0 fi @@ -122,7 +126,7 @@ ifconfig_up() esac if [ -n "${_ipv6_opts}" ]; then - ifconfig $1 inet6 ${_ipv6_opts} + ${IFCONFIG_CMD} $1 inet6 ${_ipv6_opts} fi # ifconfig_IF_ipv6 @@ -136,8 +140,8 @@ ifconfig_up() ifconfig_args="inet6 ${ifconfig_args}" ;; esac - ifconfig $1 inet6 -ifdisabled - eval ifconfig $1 ${ifconfig_args} + ${IFCONFIG_CMD} $1 inet6 -ifdisabled + eval ${IFCONFIG_CMD} $1 ${ifconfig_args} _cfg=0 fi @@ -145,7 +149,7 @@ ifconfig_up() # ipv6_prefix_hostid_addr_common(). ifconfig_args=`get_if_var $1 ipv6_prefix_IF` if [ -n "${ifconfig_args}" ]; then - ifconfig $1 inet6 -ifdisabled + ${IFCONFIG_CMD} $1 inet6 -ifdisabled _cfg=0 fi @@ -154,14 +158,14 @@ ifconfig_up() if [ -n "${ifconfig_args}" ]; then warn "\$ipv6_ifconfig_$1 is obsolete." \ " Use ifconfig_$1_ipv6 instead." - ifconfig $1 inet6 -ifdisabled - eval ifconfig $1 inet6 ${ifconfig_args} + ${IFCONFIG_CMD} $1 inet6 -ifdisabled + eval ${IFCONFIG_CMD} $1 inet6 ${ifconfig_args} _cfg=0 fi fi if [ ${_cfg} -eq 0 ]; then - ifconfig $1 up + ${IFCONFIG_CMD} $1 up fi if wpaif $1; then @@ -171,7 +175,7 @@ ifconfig_up() if dhcpif $1; then if [ $_cfg -ne 0 ] ; then - ifconfig $1 up + ${IFCONFIG_CMD} $1 up fi if syncdhcpif $1; then /etc/rc.d/dhclient start $1 @@ -202,7 +206,7 @@ ifconfig_down() fi if ifexists $1; then - ifconfig $1 down + ${IFCONFIG_CMD} $1 down _cfg=0 fi @@ -539,7 +543,7 @@ ipv6_autoconfif() ifexists() { [ -z "$1" ] && return 1 - ifconfig -n $1 > /dev/null 2>&1 + ${IFCONFIG_CMD} -n $1 > /dev/null 2>&1 } # ipv4_up if @@ -554,11 +558,10 @@ ipv4_up() if [ "${_if}" = "lo0" ]; then ifconfig_args=`get_if_var ${_if} ifconfig_IF` if [ -z "${ifconfig_args}" ]; then - ifconfig ${_if} inet 127.0.0.1/8 alias + ${IFCONFIG_CMD} ${_if} inet 127.0.0.1/8 alias fi fi - ifalias_up ${_if} inet && _ret=0 - ipv4_addrs_common ${_if} alias && _ret=0 + ifalias ${_if} inet alias && _ret=0 return $_ret } @@ -575,7 +578,7 @@ ipv6_up() return 0 fi - ifalias_up ${_if} inet6 && _ret=0 + ifalias ${_if} inet6 alias && _ret=0 ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 ipv6_accept_rtadv_up ${_if} && _ret=0 @@ -591,7 +594,9 @@ ipv4_down() _ifs="^" _ret=1 - inetList="`ifconfig ${_if} | grep 'inet ' | tr "\n" "$_ifs"`" + ifalias ${_if} inet -alias && _ret=0 + + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr "\n" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" @@ -602,15 +607,12 @@ ipv4_down() _inet=`expr "$_inet" : '.*\(inet \([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'` IFS="$oldifs" - ifconfig ${_if} ${_inet} delete + ${IFCONFIG_CMD} ${_if} ${_inet} delete IFS="$_ifs" _ret=0 done IFS="$oldifs" - ifalias_down ${_if} inet && _ret=0 - ipv4_addrs_common ${_if} -alias && _ret=0 - return $_ret } @@ -629,9 +631,9 @@ ipv6_down() ipv6_accept_rtadv_down ${_if} && _ret=0 ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0 - ifalias_down ${_if} inet6 && _ret=0 + ifalias ${_if} inet6 -alias && _ret=0 - inetList="`ifconfig ${_if} | grep 'inet6 ' | tr "\n" "$_ifs"`" + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr "\n" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" @@ -642,7 +644,7 @@ ipv6_down() _inet6=`expr "$_inet6" : '.*\(inet6 \([0-9a-f:]*\)\).*'` IFS="$oldifs" - ifconfig ${_if} ${_inet6} -alias + ${IFCONFIG_CMD} ${_if} ${_inet6} -alias IFS="$_ifs" _ret=0 done @@ -651,234 +653,349 @@ ipv6_down() return $_ret } -# ipv4_addrs_common if action -# Evaluate the ifconfig_if_ipv4 arguments for interface $if and -# use $action to add or remove IPv4 addresses from $if. -ipv4_addrs_common() -{ - local _ret _if _action _cidr _cidr_addr - local _ipaddr _netmask _range _ipnet _iplow _iphigh _ipcount - _ret=1 - _if=$1 - _action=$2 - - # get ipv4-addresses - cidr_addr=`get_if_var $_if ipv4_addrs_IF` - - for _cidr in ${cidr_addr}; do - _ipaddr=${_cidr%%/*} - _netmask="/"${_cidr##*/} - _range=${_ipaddr##*.} - _ipnet=${_ipaddr%.*} - _iplow=${_range%-*} - _iphigh=${_range#*-} - - # clear netmask when removing aliases - if [ "${_action}" = "-alias" ]; then - _netmask="" - fi - - _ipcount=${_iplow} - while [ "${_ipcount}" -le "${_iphigh}" ]; do - eval "ifconfig ${_if} ${_action} ${_ipnet}.${_ipcount}${_netmask}" - _ipcount=$((${_ipcount}+1)) - _ret=0 - - # only the first ipaddr in a subnet need the real netmask - if [ "${_action}" != "-alias" ]; then - _netmask="/32" - fi - done - done - - return $_ret -} - -# ifalias_up if af -# Configure aliases for network interface $if. +# ifalias if af action +# Configure or remove aliases for network interface $if. # It returns 0 if at least one alias was configured or -# 1 if there were none. +# removed, or 1 if there were none. # -ifalias_up() +ifalias() { local _ret _ret=1 + afexists $2 || return $_ret + case "$2" in - inet) - _ret=`ifalias_ipv4_up "$1"` - ;; - inet6) - _ret=`ifalias_ipv6_up "$1"` + inet|inet6) + ifalias_af_common $1 $2 $3 && _ret=0 ;; esac return $_ret } -# ifalias_ipv4_up if -# Helper function for ifalias_up(). Handles IPv4. +# ifalias_expand_addr af action addr +# Expand address range ("N-M") specification in addr. +# "addr" must not include an address-family keyword. +# The results will include an address-family keyword. # -ifalias_ipv4_up() +ifalias_expand_addr() { - local _ret alias ifconfig_args - _ret=1 - - # ifconfig_IF_aliasN which starts with "inet" - alias=0 - while : ; do - ifconfig_args=`get_if_var $1 ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - inet\ *) - ifconfig $1 ${ifconfig_args} alias && _ret=0 - ;; - inet6\ *) - ;; - "") - break - ;; - *) - warn "\$ifconfig_$1_alias${alias} needs " \ - "\"inet\" keyword for an IPv4 address." - ifconfig $1 ${ifconfig_args} alias && _ret=0 - ;; - esac - alias=$((${alias} + 1)) - done - return $_ret + afexists $1 || return + ifalias_expand_addr_$1 $2 $3 } -# ifalias_ipv6_up if -# Helper function for ifalias_up(). Handles IPv6. +# ifalias_expand_addr_inet action addr +# Helper function for ifalias_expand_addr(). Handles IPv4. # -ifalias_ipv6_up() +ifalias_expand_addr_inet() { - local _ret alias ifconfig_args - _ret=1 + local _action _arg _cidr _cidr_addr + local _ipaddr _plen _range _iphead _iptail _iplow _iphigh _ipcount + local _retstr _c + _action=$1 + _arg=$2 + _retstr= - # ifconfig_IF_aliasN which starts with "inet6" - alias=0 - while : ; do - ifconfig_args=`get_if_var $1 ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - inet6\ *) - ifconfig $1 ${ifconfig_args} alias && _ret=0 - ;; - "") - break - ;; + case $_action:$_arg in + *:*--*) return ;; # invalid + tmp:*) echo $_arg && return ;; # already expanded + tmp:*-*) _action="alias" ;; # to be expanded + *:*-*) ;; # to be expanded + *:*) echo inet $_arg && return ;; # already expanded + esac + + for _cidr in $_arg; do + _ipaddr=${_cidr%%/*} + _plen=${_cidr##*/} + # When subnet prefix length is not specified, use /32. + case $_plen in + $_ipaddr) _plen=32 ;; # "/" character not found esac - alias=$((${alias} + 1)) - done - # backward compatibility: ipv6_ifconfig_IF_aliasN. - alias=0 - while : ; do - ifconfig_args=`get_if_var $1 ipv6_ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - "") - break + OIFS=$IFS + IFS=. set -- $_ipaddr + _range= + _iphead= + _iptail= + for _c in $@; do + case $_range:$_c in + :[0-9]*-[0-9]*) + _range=$_c ;; - *) - ifconfig $1 inet6 ${ifconfig_args} alias && _ret=0 - warn "\$ipv6_ifconfig_$1_alias${alias} is obsolete." \ - " Use ifconfig_$1_aliasN instead." + :*) + _iphead="${_iphead}${_iphead:+.}${_c}" ;; - esac - alias=$((${alias} + 1)) + *:*) + _iptail="${_iptail}${_iptail:+.}${_c}" + ;; + esac + done + IFS=$OIFS + _iplow=${_range%-*} + _iphigh=${_range#*-} + + # clear netmask when removing aliases + if [ "$_action" = "-alias" ]; then + _plen="" + fi + + _ipcount=$_iplow + while [ "$_ipcount" -le "$_iphigh" ]; do + _retstr="${_retstr} ${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail}${_plen:+/}${_plen}" + if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ]; then + warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed." + break + else + _ipcount=$(($_ipcount + 1)) + fi + # Forcibly set /32 for remaining aliases. + _plen=32 + done done - return $_ret + for _c in $_retstr; do + ifalias_expand_addr_inet $_action $_c + done } -# ifalias_down if af -# Remove aliases for network interface $if. -# It returns 0 if at least one alias was removed or -# 1 if there were none. +# ifalias_expand_addr_inet6 action addr +# Helper function for ifalias_expand_addr(). Handles IPv6. # -ifalias_down() -{ - local _ret - _ret=1 - - case "$2" in - inet) - _ret=`ifalias_ipv4_down "$1"` - ;; - inet6) - _ret=`ifalias_ipv6_down "$1"` - ;; +ifalias_expand_addr_inet6() +{ + local _action _arg _cidr _cidr_addr + local _ipaddr _plen _ipleft _ipright _iplow _iphigh _ipcount + local _ipv4part + local _retstr _c + _action=$1 + _arg=$2 + _retstr= + + case $_action:$_arg in + *:*--*) return ;; # invalid + tmp:*) echo $_arg && return ;; + tmp:*-*) _action="alias" ;; + *:*-*) ;; + *:*) echo inet6 $_arg && return ;; esac - return $_ret + for _cidr in $_arg; do + _ipaddr="${_cidr%%/*}" + _plen="${_cidr##*/}" + + case $_action:$_ipaddr:$_cidr in + -alias:*:*) unset _plen ;; + *:$_cidr:$_ipaddr) unset _plen ;; + esac + + if [ "${_ipaddr%:*.*.*.*}" = "$_ipaddr" ]; then + # Handle !v4mapped && !v4compat addresses. + + # The default prefix length is 64. + case $_ipaddr:$_cidr in + $_cidr:$_ipaddr) _plen="64" ;; + esac + _ipleft=${_ipaddr%-*} + _ipright=${_ipaddr#*-} + _iplow=${_ipleft##*:} + _iphigh=${_ipright%%:*} + _ipleft=${_ipleft%:*} + _ipright=${_ipright#*:} + + if [ "$_iphigh" = "$_ipright" ]; then + unset _ipright + else + _ipright=:$_ipright + fi + + if [ -n "$_iplow" -a -n "$_iphigh" ]; then + _iplow=$((0x$_iplow)) + _iphigh=$((0x$_iphigh)) + _ipcount=$_iplow + while [ $_ipcount -le $_iphigh ]; do + _r=`printf "%s:%04x%s%s" \ + $_ipleft $_ipcount $_ipright \ + ${_plen:+/}$_plen` + _retstr="$_retstr $_r" + if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ] + then + warn "Range specification is too large $(printf '(%s:%04x%s-%s:%04x%s)' $_ipleft $_iplow $_ipright $_ipleft $_iphigh $_ipright). $(printf '%s:%04x%s-%s:%04x%s' $_ipleft $_iplow $_ipright $_ipleft $_ipcount $_ipright) was processed." + break + else + _ipcount=$(($_ipcount + 1)) + fi + done + else + _retstr="${_ipaddr}${_plen:+/}${_plen}" + fi + + for _c in $_retstr; do + ifalias_expand_addr_inet6 $_action $_c + done + else + # v4mapped/v4compat should handle as an IPv4 alias + _ipv4part=${_ipaddr##*:} + + # Adjust prefix length if any. If not, set the + # default prefix length as 32. + case $_ipaddr:$_cidr in + $_cidr:$_ipaddr) _plen=32 ;; + *) _plen=$(($_plen - 96)) ;; + esac + + _retstr=`ifalias_expand_addr_inet \ + tmp ${_ipv4part}${_plen:+/}${_plen}` + for _c in $_retstr; do + ifalias_expand_addr_inet $_action $_c + done + fi + done } -# ifalias_ipv4_down if -# Helper function for ifalias_down(). Handles IPv4. +# ifalias_af_common_handler if af action args +# Helper function for ifalias_af_common(). # -ifalias_ipv4_down() +ifalias_af_common_handler() { - local _ret alias ifconfig_args + local _ret _if _af _action _args _c _tmpargs + _ret=1 + _if=$1 + _af=$2 + _action=$3 + shift 3 + _args=$* + + case $_args in + ${_af}\ *) ;; + *) return ;; + esac - # ifconfig_IF_aliasN which starts with "inet" - alias=0 - while : ; do - ifconfig_args=`get_if_var $1 ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - inet\ *) - ifconfig $1 ${ifconfig_args} -alias && _ret=0 + _tmpargs= + for _c in $_args; do + case $_c in + ${_af}) + case $_tmpargs in + ${_af}\ *-*) + ifalias_af_common_handler $_if $_af $_action \ + `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }` ;; - "") - break + ${_af}\ *) + ${IFCONFIG_CMD} $_if $_tmpargs $_action && _ret=0 ;; + esac + _tmpargs=$_af + ;; + *) + _tmpargs="$_tmpargs $_c" + ;; esac - alias=$((${alias} + 1)) done + # Process the last component if any. + if [ -n "$_tmpargs}" ]; then + case $_tmpargs in + ${_af}\ *-*) + ifalias_af_common_handler $_if $_af $_action \ + `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }` + ;; + ${_af}\ *) + ${IFCONFIG_CMD} $_if $_tmpargs $_action && _ret=0 + ;; + esac + fi return $_ret } -# ifalias_ipv6_down if -# Helper function for ifalias_down(). Handles IPv6. +# ifalias_af_common if af action +# Helper function for ifalias(). # -ifalias_ipv6_down() +ifalias_af_common() { - local _ret alias ifconfig_args + local _ret _if _af _action alias ifconfig_args _aliasn _c _tmpargs _iaf + _ret=1 + _aliasn= + _if=$1 + _af=$2 + _action=$3 - # ifconfig_IF_aliasN which starts with "inet6" + # ifconfig_IF_aliasN which starts with $_af alias=0 while : ; do - ifconfig_args=`get_if_var $1 ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - inet6\ *) - ifconfig $1 ${ifconfig_args} -alias && _ret=0 + ifconfig_args=`get_if_var $_if ifconfig_IF_alias${alias}` + _iaf= + case $ifconfig_args in + inet\ *) _iaf=inet ;; + inet6\ *) _iaf=inet6 ;; + ipx\ *) _iaf=ipx ;; + esac + + case ${_af}:${_action}:${_iaf}:"${ifconfig_args}" in + ${_af}:*:${_af}:*) + _aliasn="$_aliasn $ifconfig_args" ;; - "") + ${_af}:*:"":"") break ;; + inet:alias:"":*) + _aliasn="$_aliasn inet $ifconfig_args" + warn "\$ifconfig_${_if}_alias${alias} needs " \ + "\"inet\" keyword for an IPv4 address." esac - alias=$((${alias} + 1)) + alias=$(($alias + 1)) done # backward compatibility: ipv6_ifconfig_IF_aliasN. - alias=0 - while : ; do - ifconfig_args=`get_if_var $1 ipv6_ifconfig_IF_alias${alias}` - case "${ifconfig_args}" in - "") - break + case $_af in + inet6) + alias=0 + while : ; do + ifconfig_args=`get_if_var $_if ipv6_ifconfig_IF_alias${alias}` + case ${_action}:"${ifconfig_args}" in + *:"") + break + ;; + alias:*) + _aliasn="${_aliasn} inet6 ${ifconfig_args}" + warn "\$ipv6_ifconfig_${_if}_alias${alias} " \ + "is obsolete. Use ifconfig_$1_aliasN " \ + "instead." ;; - *) - ifconfig $1 inet6 ${ifconfig_args} -alias && _ret=0 - warn "\$ipv6_ifconfig_$1_alias${alias} is obsolete." \ - " Use ifconfig_$1_aliasN instead." + esac + alias=$(($alias + 1)) + done + esac + + # backward compatibility: ipv4_addrs_IF. + for _tmpargs in `get_if_var $_if ipv4_addrs_IF`; do + _aliasn="$_aliasn inet $_tmpargs" + done + + # Handle ifconfig_IF_aliases, ifconfig_IF_aliasN, and the others. + _tmpargs= + for _c in `get_if_var $_if ifconfig_IF_aliases` $_aliasn; do + case $_c in + inet|inet6|ipx) + case $_tmpargs in + ${_af}\ *) + eval ifalias_af_common_handler $_if $_af $_action $_tmpargs && _ret=0 ;; + esac + _tmpargs=$_c + ;; + *) + _tmpargs="$_tmpargs $_c" esac - alias=$((${alias} + 1)) done + # Process the last component + case $_tmpargs in + ${_af}\ *) + ifalias_af_common_handler $_if $_af $_action $_tmpargs && _ret=0 + ;; + esac return $_ret } @@ -899,14 +1016,32 @@ ipv6_prefix_hostid_addr_common() hostid=${hostid%\%*} for j in ${prefix}; do - address=$j\:${hostid} - ifconfig ${_if} inet6 ${address} prefixlen 64 ${_action} + # The default prefixlen is 64. + plen=${j#*/} + case $j:$plen in + $plen:$j) plen=64 ;; + *) j=${j%/*} ;; + esac + + # Normalize the last part by removing ":" + j=${j%:*} + j=${j%:} + OIFS=$IFS; IFS=":"; set -- $j; nj=$#; IFS=$OIFS + OIFS=$IFS; IFS=":"; set -- $hostid; nh=$#; IFS=$OIFS + if [ $(($nj + $nh)) -eq 8 ]; then + address=$j\:$hostid + else + address=$j\::$hostid + fi + + ${IFCONFIG_CMD} ${_if} inet6 ${address} \ + prefixlen $plen ${_action} # if I am a router, add subnet router # anycast address (RFC 2373). if checkyesno ipv6_gateway_enable; then - ifconfig ${_if} inet6 $j:: prefixlen 64 \ - ${_action} anycast + ${IFCONFIG_CMD} ${_if} inet6 $j:: \ + prefixlen $plen ${_action} anycast fi done fi @@ -918,7 +1053,7 @@ ipv6_prefix_hostid_addr_common() ipv6_accept_rtadv_up() { if ipv6_autoconfif $1; then - ifconfig $1 inet6 accept_rtadv up + ${IFCONFIG_CMD} $1 inet6 accept_rtadv up if ! checkyesno rtsold_enable; then rtsol ${rtsol_flags} $1 fi @@ -930,7 +1065,7 @@ ipv6_accept_rtadv_up() ipv6_accept_rtadv_down() { if ipv6_autoconfif $1; then - ifconfig $1 inet6 -accept_rtadv + ${IFCONFIG_CMD} $1 inet6 -accept_rtadv fi } @@ -975,7 +1110,7 @@ clone_up() # create_args_IF for ifn in ${cloned_interfaces}; do - ifconfig ${ifn} create `get_if_var ${ifn} create_args_IF` + ${IFCONFIG_CMD} ${ifn} create `get_if_var ${ifn} create_args_IF` if [ $? -eq 0 ]; then _list="${_list}${_prefix}${ifn}" [ -z "$_prefix" ] && _prefix=' ' @@ -995,7 +1130,7 @@ clone_down() _list= for ifn in ${cloned_interfaces}; do - ifconfig -n ${ifn} destroy + ${IFCONFIG_CMD} -n ${ifn} destroy if [ $? -eq 0 ]; then _list="${_list}${_prefix}${ifn}" [ -z "$_prefix" ] && _prefix=' ' @@ -1022,16 +1157,16 @@ childif_create() debug_flags="`get_if_var $child wlandebug_IF`" if expr $child : 'wlan[0-9][0-9]*$' >/dev/null 2>&1; then - ifconfig $child create ${create_args} && cfg=0 + ${IFCONFIG_CMD} $child create ${create_args} && cfg=0 if [ -n "${debug_flags}" ]; then wlandebug -i $child ${debug_flags} fi else - i=`ifconfig wlan create ${create_args}` + i=`${IFCONFIG_CMD} wlan create ${create_args}` if [ -n "${debug_flags}" ]; then wlandebug -i $i ${debug_flags} fi - ifconfig $i name $child && cfg=0 + ${IFCONFIG_CMD} $i name $child && cfg=0 fi if autoif $child; then ifn_start $child @@ -1049,14 +1184,14 @@ childif_create() if expr $child : '[1-9][0-9]*$' >/dev/null 2>&1; then child="${ifn}.${child}" create_args=`get_if_var $child create_args_IF` - ifconfig $child create ${create_args} && cfg=0 + ${IFCONFIG_CMD} $child create ${create_args} && cfg=0 else create_args="vlandev $ifn `get_if_var $child create_args_IF`" if expr $child : 'vlan[0-9][0-9]*$' >/dev/null 2>&1; then - ifconfig $child create ${create_args} && cfg=0 + ${IFCONFIG_CMD} $child create ${create_args} && cfg=0 else - i=`ifconfig vlan create ${create_args}` - ifconfig $i name $child && cfg=0 + i=`${IFCONFIG_CMD} vlan create ${create_args}` + ${IFCONFIG_CMD} $i name $child && cfg=0 fi fi if autoif $child; then @@ -1080,7 +1215,7 @@ childif_destroy() if ! ifexists $child; then continue fi - ifconfig -n $child destroy && cfg=0 + ${IFCONFIG_CMD} -n $child destroy && cfg=0 done child_vlans=`get_if_var $ifn vlans_IF` @@ -1091,7 +1226,7 @@ childif_destroy() if ! ifexists $child; then continue fi - ifconfig -n $child destroy && cfg=0 + ${IFCONFIG_CMD} -n $child destroy && cfg=0 done return ${cfg} @@ -1138,13 +1273,13 @@ gif_up() ;; *) if expr $i : 'gif[0-9][0-9]*$' >/dev/null 2>&1; then - ifconfig $i create >/dev/null 2>&1 + ${IFCONFIG_CMD} $i create >/dev/null 2>&1 else - gif=`ifconfig gif create` - ifconfig $gif name $i + gif=`${IFCONFIG_CMD} gif create` + ${IFCONFIG_CMD} $gif name $i fi - ifconfig $i tunnel ${peers} - ifconfig $i up + ${IFCONFIG_CMD} $i tunnel ${peers} + ${IFCONFIG_CMD} $i up ;; esac done @@ -1210,7 +1345,7 @@ ipx_up() # ifconfig_IF_ipx ifconfig_args=`_ifconfig_getargs $ifn ipx` if [ -n "${ifconfig_args}" ]; then - ifconfig ${ifn} ${ifconfig_args} + ${IFCONFIG_CMD} ${ifn} ${ifconfig_args} return 0 fi @@ -1227,7 +1362,7 @@ ipx_down() _if=$1 _ifs="^" _ret=1 - ipxList="`ifconfig ${_if} | grep 'ipx ' | tr "\n" "$_ifs"`" + ipxList="`${IFCONFIG_CMD} ${_if} | grep 'ipx ' | tr "\n" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" @@ -1238,7 +1373,7 @@ ipx_down() _ipx=`expr "$_ipx" : '.*\(ipx [0-9a-h]\{1,8\}H*\.[0-9a-h]\{1,12\}\).*'` IFS="$oldifs" - ifconfig ${_if} ${_ipx} delete + ${IFCONFIG_CMD} ${_if} ${_ipx} delete IFS="$_ifs" _ret=0 done @@ -1255,10 +1390,10 @@ ifnet_rename() local _if _ifname # ifconfig_IF_name - for _if in `ifconfig -l`; do + for _if in `${IFCONFIG_CMD} -l`; do _ifname=`get_if_var $_if ifconfig_IF_name` if [ ! -z "$_ifname" ]; then - ifconfig $_if name $_ifname + ${IFCONFIG_CMD} $_if name $_ifname fi done @@ -1290,7 +1425,7 @@ list_net_interfaces() _tmplist= case ${network_interfaces} in [Aa][Uu][Tt][Oo]) - _autolist="`ifconfig -l`" + _autolist="`${IFCONFIG_CMD} -l`" _lo= for _if in ${_autolist} ; do if autoif $_if; then @@ -1398,7 +1533,7 @@ is_wired_interface() { local media - case `ifconfig $1 2>/dev/null` in + case `${IFCONFIG_CMD} $1 2>/dev/null` in *media:?Ethernet*) media=Ethernet ;; esac @@ -1410,25 +1545,27 @@ is_wired_interface() # If flag is defined, tentative ones will be excluded. network6_getladdr() { - local proto addr rest - ifconfig $1 2>/dev/null | while read proto addr rest; do - case ${proto} in - inet6) - case ${addr} in - fe80::*) - if [ -z "$2" ]; then - echo ${addr} - return - fi - case ${rest} in - *tentative*) - continue - ;; - *) - echo ${addr} - return - esac - esac + local _if _flag proto addr rest + _if=$1 + _flag=$2 + + ${IFCONFIG_CMD} $_if 2>/dev/null | while read proto addr rest; do + case "${proto}/${addr}/${_flag}/${rest}" in + inet6/fe80::*//*) + echo ${addr} + ;; + inet6/fe80:://*tentative*) # w/o flag + sleep `${SYSCTL_N} net.inet6.ip6.dad_count` + network6_getladdr $_if $_flags + ;; + inet6/fe80::/*/*tentative*) # w/ flag + echo ${addr} + ;; + *) + continue + ;; esac + + return done } Modified: user/attilio/vmobj-readlock/lib/libthr/thread/thr_cancel.c ============================================================================== --- user/attilio/vmobj-readlock/lib/libthr/thread/thr_cancel.c Thu Jun 20 12:42:27 2013 (r252029) +++ user/attilio/vmobj-readlock/lib/libthr/thread/thr_cancel.c Thu Jun 20 12:46:03 2013 (r252030) @@ -87,7 +87,8 @@ _pthread_setcancelstate(int state, int * break; case PTHREAD_CANCEL_ENABLE: curthread->cancel_enable = 1; - testcancel(curthread); + if (curthread->cancel_async) + testcancel(curthread); break; default: return (EINVAL); Modified: user/attilio/vmobj-readlock/share/man/man5/rc.conf.5 ============================================================================== --- user/attilio/vmobj-readlock/share/man/man5/rc.conf.5 Thu Jun 20 12:42:27 2013 (r252029) +++ user/attilio/vmobj-readlock/share/man/man5/rc.conf.5 Thu Jun 20 12:46:03 2013 (r252030) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 9, 2013 +.Dd June 20, 2013 .Dt RC.CONF 5 .Os .Sh NAME @@ -1124,44 +1124,63 @@ Such keywords are removed before passing .Xr ifconfig 8 while the order of the other arguments is preserved. .Pp -One can configure more than one IPv4 address with the -.Va ipv4_addrs_ Ns Aq Ar interface -variable. -One or more IP addresses must be provided in Classless Inter-Domain -Routing (CIDR) address notation, whose last byte can be a range like -192.0.2.5-23/24. -In this case the address 192.0.2.5 will be configured with the +It is possible to add IP alias entries using +.Xr ifconfig 8 +syntax with the address family keyword such as +.Li inet . +Assuming that the interface in question was +.Li ed0 , +it might look something like this: +.Bd -literal +ifconfig_ed0_alias0="inet 127.0.0.253 netmask 0xffffffff" +ifconfig_ed0_alias1="inet 127.0.0.254 netmask 0xffffffff" +.Ed +.Pp +It also possible to configure multiple IP addresses in Classless +Inter-Domain Routing +.Pq CIDR +address notation, +whose each address component can be a range like +.Li inet 192.0.2.5-23/24 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Thu Jun 20 14:20:04 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1F70FA4C; Thu, 20 Jun 2013 14:20:04 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 11CF71C39; Thu, 20 Jun 2013 14:20:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5KEK3Fr045906; Thu, 20 Jun 2013 14:20:03 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5KEK3Gb045905; Thu, 20 Jun 2013 14:20:03 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306201420.r5KEK3Gb045905@svn.freebsd.org> From: Attilio Rao Date: Thu, 20 Jun 2013 14:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252031 - user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 14:20:04 -0000 Author: attilio Date: Thu Jun 20 14:20:03 2013 New Revision: 252031 URL: http://svnweb.freebsd.org/changeset/base/252031 Log: Reinser VM_ALLOC_IGN_RBUSY type of sleeping on vm_page_grab() for mappedread_sf: the page is going to be acquired only in read busing. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jun 20 12:46:03 2013 (r252030) +++ user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jun 20 14:20:03 2013 (r252031) @@ -495,7 +495,7 @@ mappedread_sf(vnode_t *vp, int nbytes, u int bytes = MIN(PAGESIZE, len); pp = vm_page_grab(obj, OFF_TO_IDX(start), VM_ALLOC_NOBUSY | - VM_ALLOC_NORMAL | VM_ALLOC_RETRY); + VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_IGN_RBUSY); if (pp->valid == 0) { vm_page_io_start(pp); zfs_vmobject_wunlock(obj); From owner-svn-src-user@FreeBSD.ORG Thu Jun 20 21:50:05 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F0BFA10D; Thu, 20 Jun 2013 21:50:05 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E1C4018F8; Thu, 20 Jun 2013 21:50:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5KLo5ad090336; Thu, 20 Jun 2013 21:50:05 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5KLo401090325; Thu, 20 Jun 2013 21:50:04 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306202150.r5KLo401090325@svn.freebsd.org> From: Attilio Rao Date: Thu, 20 Jun 2013 21:50:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252046 - in user/attilio/vmobj-readlock/sys: cddl/contrib/opensolaris/uts/common/fs/zfs dev/drm2/i915 dev/drm2/ttm fs/tmpfs kern vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 21:50:06 -0000 Author: attilio Date: Thu Jun 20 21:50:04 2013 New Revision: 252046 URL: http://svnweb.freebsd.org/changeset/base/252046 Log: When switching to atomics for handling the busy bit this means we cannot rely any-longer on the object lock to protect between the lookup/allocation, the sleep and the actual page busing. Busy the page also in read mode, directly in vm_page_alloc()/vm_page_grab() after the lookup/allocation is just performed. This will leave the behaviour consistent. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c user/attilio/vmobj-readlock/sys/dev/drm2/ttm/ttm_tt.c user/attilio/vmobj-readlock/sys/fs/tmpfs/tmpfs_vnops.c user/attilio/vmobj-readlock/sys/kern/kern_exec.c user/attilio/vmobj-readlock/sys/vm/vm_page.c user/attilio/vmobj-readlock/sys/vm/vm_page.h Modified: user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jun 20 21:38:08 2013 (r252045) +++ user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jun 20 21:50:04 2013 (r252046) @@ -349,17 +349,17 @@ page_busy(vnode_t *vp, int64_t start, in zfs_vmobject_wlock(obj); continue; } + vm_page_io_start(pp); } else pp = NULL; if (pp == NULL && alloc) pp = vm_page_alloc(obj, OFF_TO_IDX(start), VM_ALLOC_SYSTEM | VM_ALLOC_IFCACHED | - VM_ALLOC_NOBUSY); + VM_ALLOC_RBUSY); if (pp != NULL) { ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); - vm_page_io_start(pp); if (alloc) { vm_object_pip_add(obj, 1); pmap_remove_write(pp); @@ -494,10 +494,9 @@ mappedread_sf(vnode_t *vp, int nbytes, u for (start = uio->uio_loffset; len > 0; start += PAGESIZE) { int bytes = MIN(PAGESIZE, len); - pp = vm_page_grab(obj, OFF_TO_IDX(start), VM_ALLOC_NOBUSY | + pp = vm_page_grab(obj, OFF_TO_IDX(start), VM_ALLOC_RBUSY | VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_IGN_RBUSY); if (pp->valid == 0) { - vm_page_io_start(pp); zfs_vmobject_wunlock(obj); va = zfs_map_page(pp, &sf); error = dmu_read(os, zp->z_id, start, bytes, va, @@ -515,7 +514,8 @@ mappedread_sf(vnode_t *vp, int nbytes, u vm_page_activate(pp); } vm_page_unlock(pp); - } + } else + vm_page_io_finish(pp); if (error) break; uio->uio_resid -= bytes; Modified: user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c Thu Jun 20 21:38:08 2013 (r252045) +++ user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c Thu Jun 20 21:50:04 2013 (r252046) @@ -2507,10 +2507,8 @@ i915_gem_wire_page(vm_object_t object, v int rv; VM_OBJECT_ASSERT_WLOCKED(object); - m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | - VM_ALLOC_RETRY); + m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); if (m->valid != VM_PAGE_BITS_ALL) { - vm_page_busy(m); if (vm_pager_has_page(object, pindex, NULL, NULL)) { rv = vm_pager_get_pages(object, &m, 1, 0); m = vm_page_lookup(object, pindex); @@ -2527,7 +2525,6 @@ i915_gem_wire_page(vm_object_t object, v m->valid = VM_PAGE_BITS_ALL; m->dirty = 0; } - vm_page_wakeup(m); } vm_page_lock(m); vm_page_wire(m); Modified: user/attilio/vmobj-readlock/sys/dev/drm2/ttm/ttm_tt.c ============================================================================== --- user/attilio/vmobj-readlock/sys/dev/drm2/ttm/ttm_tt.c Thu Jun 20 21:38:08 2013 (r252045) +++ user/attilio/vmobj-readlock/sys/dev/drm2/ttm/ttm_tt.c Thu Jun 20 21:50:04 2013 (r252046) @@ -288,10 +288,8 @@ int ttm_tt_swapin(struct ttm_tt *ttm) VM_OBJECT_WLOCK(obj); vm_object_pip_add(obj, 1); for (i = 0; i < ttm->num_pages; ++i) { - from_page = vm_page_grab(obj, i, VM_ALLOC_NOBUSY | - VM_ALLOC_RETRY); + from_page = vm_page_grab(obj, i, VM_ALLOC_RETRY); if (from_page->valid != VM_PAGE_BITS_ALL) { - vm_page_busy(from_page); if (vm_pager_has_page(obj, i, NULL, NULL)) { rv = vm_pager_get_pages(obj, &from_page, 1, 0); if (rv != VM_PAGER_OK) { @@ -303,8 +301,8 @@ int ttm_tt_swapin(struct ttm_tt *ttm) } } else vm_page_zero_invalid(from_page, TRUE); - vm_page_wakeup(from_page); } + vm_page_wakeup(from_page); to_page = ttm->pages[i]; if (unlikely(to_page == NULL)) { ret = -ENOMEM; Modified: user/attilio/vmobj-readlock/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- user/attilio/vmobj-readlock/sys/fs/tmpfs/tmpfs_vnops.c Thu Jun 20 21:38:08 2013 (r252045) +++ user/attilio/vmobj-readlock/sys/fs/tmpfs/tmpfs_vnops.c Thu Jun 20 21:50:04 2013 (r252046) @@ -454,10 +454,8 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p * lock to page out tobj's pages because tobj is a OBJT_SWAP * type object. */ - m = vm_page_grab(tobj, idx, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | - VM_ALLOC_NOBUSY); + m = vm_page_grab(tobj, idx, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); if (m->valid != VM_PAGE_BITS_ALL) { - vm_page_busy(m); if (vm_pager_has_page(tobj, idx, NULL, NULL)) { rv = vm_pager_get_pages(tobj, &m, 1, 0); m = vm_page_lookup(tobj, idx); @@ -480,8 +478,8 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p } } else vm_page_zero_invalid(m, TRUE); - vm_page_wakeup(m); } + vm_page_wakeup(m); vm_page_io_start(m); VM_OBJECT_WUNLOCK(tobj); error = uiomove_fromphys(&m, offset, tlen, uio); @@ -571,10 +569,8 @@ tmpfs_mappedwrite(vm_object_t tobj, size tlen = MIN(PAGE_SIZE - offset, len); VM_OBJECT_WLOCK(tobj); - tpg = vm_page_grab(tobj, idx, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | - VM_ALLOC_RETRY); + tpg = vm_page_grab(tobj, idx, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); if (tpg->valid != VM_PAGE_BITS_ALL) { - vm_page_busy(tpg); if (vm_pager_has_page(tobj, idx, NULL, NULL)) { rv = vm_pager_get_pages(tobj, &tpg, 1, 0); tpg = vm_page_lookup(tobj, idx); @@ -597,8 +593,8 @@ tmpfs_mappedwrite(vm_object_t tobj, size } } else vm_page_zero_invalid(tpg, TRUE); - vm_page_wakeup(tpg); } + vm_page_wakeup(tpg); vm_page_io_start(tpg); VM_OBJECT_WUNLOCK(tobj); error = uiomove_fromphys(&tpg, offset, tlen, uio); Modified: user/attilio/vmobj-readlock/sys/kern/kern_exec.c ============================================================================== --- user/attilio/vmobj-readlock/sys/kern/kern_exec.c Thu Jun 20 21:38:08 2013 (r252045) +++ user/attilio/vmobj-readlock/sys/kern/kern_exec.c Thu Jun 20 21:50:04 2013 (r252046) @@ -937,10 +937,8 @@ exec_map_first_page(imgp) object->pg_color = 0; } #endif - ma[0] = vm_page_grab(object, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | - VM_ALLOC_RETRY); + ma[0] = vm_page_grab(object, 0, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); if (ma[0]->valid != VM_PAGE_BITS_ALL) { - vm_page_busy(ma[0]); initial_pagein = VM_INITIAL_PAGEIN; if (initial_pagein > object->size) initial_pagein = object->size; @@ -970,9 +968,9 @@ exec_map_first_page(imgp) VM_OBJECT_WUNLOCK(object); return (EIO); } - vm_page_wakeup(ma[0]); } vm_page_lock(ma[0]); + vm_page_wakeup_locked(ma[0]); vm_page_hold(ma[0]); vm_page_unlock(ma[0]); VM_OBJECT_WUNLOCK(object); Modified: user/attilio/vmobj-readlock/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmobj-readlock/sys/vm/vm_page.c Thu Jun 20 21:38:08 2013 (r252045) +++ user/attilio/vmobj-readlock/sys/vm/vm_page.c Thu Jun 20 21:50:04 2013 (r252046) @@ -1258,6 +1258,7 @@ vm_page_is_cached(vm_object_t object, vm * VM_ALLOC_NODUMP do not include the page in a kernel core dump * VM_ALLOC_NOOBJ page is not associated with an object and * should not have the flag VPO_BUSY set + * VM_ALLOC_RBUSY read busy the allocated page * VM_ALLOC_WIRED wire the allocated page * VM_ALLOC_ZERO prefer a zeroed page * @@ -1272,8 +1273,12 @@ vm_page_alloc(vm_object_t object, vm_pin int flags, req_class; mpred = 0; /* XXX: pacify gcc */ - KASSERT((object != NULL) == ((req & VM_ALLOC_NOOBJ) == 0), - ("vm_page_alloc: inconsistent object/req")); + KASSERT((object != NULL) == ((req & VM_ALLOC_NOOBJ) == 0) && + (object != NULL || (req & VM_ALLOC_RBUSY) == 0) && + ((req & (VM_ALLOC_NOBUSY | VM_ALLOC_RBUSY)) != + (VM_ALLOC_NOBUSY | VM_ALLOC_RBUSY)), + ("vm_page_alloc: inconsistent object(%p)/req(%x)", (void *)object, + req)); if (object != NULL) VM_OBJECT_ASSERT_WLOCKED(object); @@ -1398,8 +1403,10 @@ vm_page_alloc(vm_object_t object, vm_pin m->aflags = 0; m->oflags = object == NULL || (object->flags & OBJ_UNMANAGED) != 0 ? VPO_UNMANAGED : 0; - if ((req & (VM_ALLOC_NOBUSY | VM_ALLOC_NOOBJ)) == 0) + if ((req & (VM_ALLOC_NOBUSY | VM_ALLOC_NOOBJ | VM_ALLOC_RBUSY)) == 0) m->oflags |= VPO_BUSY; + if ((req & VM_ALLOC_RBUSY) != 0) + m->busy++; if (req & VM_ALLOC_WIRED) { /* * The page lock is not required for wiring a page until that @@ -1470,6 +1477,7 @@ vm_page_alloc(vm_object_t object, vm_pin * VM_ALLOC_NOBUSY do not set the flag VPO_BUSY on the page * VM_ALLOC_NOOBJ page is not associated with an object and * should not have the flag VPO_BUSY set + * VM_ALLOC_RBUSY read busy the allocated page * VM_ALLOC_WIRED wire the allocated page * VM_ALLOC_ZERO prefer a zeroed page * @@ -1485,8 +1493,12 @@ vm_page_alloc_contig(vm_object_t object, u_int flags, oflags; int req_class; - KASSERT((object != NULL) == ((req & VM_ALLOC_NOOBJ) == 0), - ("vm_page_alloc_contig: inconsistent object/req")); + KASSERT((object != NULL) == ((req & VM_ALLOC_NOOBJ) == 0) && + (object != NULL || (req & VM_ALLOC_RBUSY) == 0) && + ((req & (VM_ALLOC_NOBUSY | VM_ALLOC_RBUSY)) != + (VM_ALLOC_NOBUSY | VM_ALLOC_RBUSY)), + ("vm_page_alloc: inconsistent object(%p)/req(%x)", (void *)object, + req)); if (object != NULL) { VM_OBJECT_ASSERT_WLOCKED(object); KASSERT(object->type == OBJT_PHYS, @@ -1562,7 +1574,7 @@ retry: atomic_add_int(&cnt.v_wire_count, npages); oflags = VPO_UNMANAGED; if (object != NULL) { - if ((req & VM_ALLOC_NOBUSY) == 0) + if ((req & (VM_ALLOC_NOBUSY | VM_ALLOC_RBUSY)) == 0) oflags |= VPO_BUSY; if (object->memattr != VM_MEMATTR_DEFAULT && memattr == VM_MEMATTR_DEFAULT) @@ -1571,6 +1583,8 @@ retry: for (m = m_ret; m < &m_ret[npages]; m++) { m->aflags = 0; m->flags = (m->flags | PG_NODUMP) & flags; + if ((req & VM_ALLOC_RBUSY) != 0) + m->busy++; if ((req & VM_ALLOC_WIRED) != 0) m->wire_count = 1; /* Unmanaged pages don't use "act_count". */ @@ -2422,6 +2436,9 @@ vm_page_grab(vm_object_t object, vm_pind VM_OBJECT_ASSERT_WLOCKED(object); KASSERT((allocflags & VM_ALLOC_RETRY) != 0, ("vm_page_grab: VM_ALLOC_RETRY is required")); + KASSERT((allocflags & VM_ALLOC_RBUSY) == 0 || + (allocflags & VM_ALLOC_IGN_RBUSY) != 0, + ("vm_page_grab: VM_ALLOC_RBUSY/VM_ALLOC_IGN_RBUSY mismatch")); retrylookup: if ((m = vm_page_lookup(object, pindex)) != NULL) { if ((m->oflags & VPO_BUSY) != 0 || @@ -2443,8 +2460,11 @@ retrylookup: vm_page_wire(m); vm_page_unlock(m); } - if ((allocflags & VM_ALLOC_NOBUSY) == 0) + if ((allocflags & + (VM_ALLOC_NOBUSY | VM_ALLOC_RBUSY)) == 0) vm_page_busy(m); + if ((allocflags & VM_ALLOC_RBUSY) != 0) + vm_page_io_start(m); return (m); } } Modified: user/attilio/vmobj-readlock/sys/vm/vm_page.h ============================================================================== --- user/attilio/vmobj-readlock/sys/vm/vm_page.h Thu Jun 20 21:38:08 2013 (r252045) +++ user/attilio/vmobj-readlock/sys/vm/vm_page.h Thu Jun 20 21:50:04 2013 (r252046) @@ -348,6 +348,7 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa) #define VM_ALLOC_IFNOTCACHED 0x0800 /* Fail if the page is cached */ #define VM_ALLOC_IGN_RBUSY 0x1000 /* vm_page_grab() only */ #define VM_ALLOC_NODUMP 0x2000 /* don't include in dump */ +#define VM_ALLOC_RBUSY 0x4000 /* Read busy the page */ #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) From owner-svn-src-user@FreeBSD.ORG Thu Jun 20 22:01:37 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4613A5DA; Thu, 20 Jun 2013 22:01:37 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3816D1987; Thu, 20 Jun 2013 22:01:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5KM1bBL095499; Thu, 20 Jun 2013 22:01:37 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5KM1bLf095498; Thu, 20 Jun 2013 22:01:37 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306202201.r5KM1bLf095498@svn.freebsd.org> From: Attilio Rao Date: Thu, 20 Jun 2013 22:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252047 - user/attilio/vmobj-readlock/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 22:01:37 -0000 Author: attilio Date: Thu Jun 20 22:01:36 2013 New Revision: 252047 URL: http://svnweb.freebsd.org/changeset/base/252047 Log: Remove a comment that should be really be already well known and documented in a more general way. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/vm/swap_pager.c Modified: user/attilio/vmobj-readlock/sys/vm/swap_pager.c ============================================================================== --- user/attilio/vmobj-readlock/sys/vm/swap_pager.c Thu Jun 20 21:50:04 2013 (r252046) +++ user/attilio/vmobj-readlock/sys/vm/swap_pager.c Thu Jun 20 22:01:36 2013 (r252047) @@ -1461,12 +1461,6 @@ swap_pager_putpages(vm_object_t object, * Completion routine for asynchronous reads and writes from/to swap. * Also called manually by synchronous code to finish up a bp. * - * For READ operations, the pages are VPO_BUSY'd. For WRITE operations, - * the pages are vm_page_t->busy'd. For READ operations, we VPO_BUSY - * unbusy all pages except the 'main' request page. For WRITE - * operations, we vm_page_t->busy'd unbusy all pages ( we can do this - * because we marked them all VM_PAGER_PEND on return from putpages ). - * * This routine may not sleep. */ static void From owner-svn-src-user@FreeBSD.ORG Thu Jun 20 23:42:31 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0EFFDD77; Thu, 20 Jun 2013 23:42:31 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 001DB1CF1; Thu, 20 Jun 2013 23:42:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5KNgUef028098; Thu, 20 Jun 2013 23:42:30 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5KNgUNq028097; Thu, 20 Jun 2013 23:42:30 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306202342.r5KNgUNq028097@svn.freebsd.org> From: Attilio Rao Date: Thu, 20 Jun 2013 23:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252049 - user/attilio/vmobj-readlock/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 23:42:31 -0000 Author: attilio Date: Thu Jun 20 23:42:30 2013 New Revision: 252049 URL: http://svnweb.freebsd.org/changeset/base/252049 Log: vm_page_grab() always returns write-busied pages by default. vm_page_grab() already asserts for VPO_BUSY presence. Remove the unuseful check. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/vm/vm_glue.c Modified: user/attilio/vmobj-readlock/sys/vm/vm_glue.c ============================================================================== --- user/attilio/vmobj-readlock/sys/vm/vm_glue.c Thu Jun 20 22:50:08 2013 (r252048) +++ user/attilio/vmobj-readlock/sys/vm/vm_glue.c Thu Jun 20 23:42:30 2013 (r252049) @@ -555,7 +555,7 @@ vm_thread_swapin(struct thread *td) for (k = i; k < j; k++) ma[k] = vm_page_lookup(ksobj, k); vm_page_wakeup(ma[i]); - } else if (ma[i]->oflags & VPO_BUSY) + } else vm_page_wakeup(ma[i]); } VM_OBJECT_WUNLOCK(ksobj); From owner-svn-src-user@FreeBSD.ORG Fri Jun 21 06:11:04 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 19D3F381; Fri, 21 Jun 2013 06:11:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E7A2F1B2A; Fri, 21 Jun 2013 06:11:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5L6B3sh053736; Fri, 21 Jun 2013 06:11:03 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5L6B31D053735; Fri, 21 Jun 2013 06:11:03 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201306210611.r5L6B31D053735@svn.freebsd.org> From: Adrian Chadd Date: Fri, 21 Jun 2013 06:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252053 - user/adrian/net80211_amsdu_ff X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2013 06:11:04 -0000 Author: adrian Date: Fri Jun 21 06:11:03 2013 New Revision: 252053 URL: http://svnweb.freebsd.org/changeset/base/252053 Log: Create a branch to develop the per node/TID staging queue, updated FF support and AMSDU support in. Added: - copied from r252052, head/ Directory Properties: user/adrian/net80211_amsdu_ff/ (props changed) From owner-svn-src-user@FreeBSD.ORG Sat Jun 22 12:50:05 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B3A45937; Sat, 22 Jun 2013 12:50:05 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A696F1CC2; Sat, 22 Jun 2013 12:50:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5MCo59X026116; Sat, 22 Jun 2013 12:50:05 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5MCo538026115; Sat, 22 Jun 2013 12:50:05 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306221250.r5MCo538026115@svn.freebsd.org> From: Attilio Rao Date: Sat, 22 Jun 2013 12:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252095 - user/attilio/vmobj-readlock/sys/dev/drm2/i915 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 12:50:05 -0000 Author: attilio Date: Sat Jun 22 12:50:05 2013 New Revision: 252095 URL: http://svnweb.freebsd.org/changeset/base/252095 Log: - Remove an unuseful goto label - Fix locking for busy Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c Modified: user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c Sat Jun 22 05:32:45 2013 (r252094) +++ user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c Sat Jun 22 12:50:05 2013 (r252095) @@ -1356,9 +1356,8 @@ i915_gem_pager_fault(vm_object_t vm_obj, *mres = NULL; } else oldm = NULL; -retry: VM_OBJECT_WUNLOCK(vm_obj); -unlocked_vmobj: +retry: cause = ret = 0; m = NULL; @@ -1381,6 +1380,8 @@ unlocked_vmobj: if (m != NULL) { if ((m->flags & VPO_BUSY) != 0) { DRM_UNLOCK(dev); + vm_page_lock(m); + VM_OBJECT_WUNLOCK(vm_obj); vm_page_sleep(m, "915pee"); goto retry; } @@ -1440,7 +1441,6 @@ unlocked_vmobj: vm_page_lock(m); VM_OBJECT_WUNLOCK(vm_obj); vm_page_sleep(m, "915pbs"); - VM_OBJECT_WLOCK(vm_obj); goto retry; } m->valid = VM_PAGE_BITS_ALL; @@ -1468,7 +1468,7 @@ out: -ret, cause); if (ret == -EAGAIN || ret == -EIO || ret == -EINTR) { kern_yield(PRI_USER); - goto unlocked_vmobj; + goto retry; } VM_OBJECT_WLOCK(vm_obj); vm_object_pip_wakeup(vm_obj); From owner-svn-src-user@FreeBSD.ORG Sat Jun 22 13:11:27 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E0127DDA; Sat, 22 Jun 2013 13:11:27 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D27C61D77; Sat, 22 Jun 2013 13:11:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5MDBRAn034365; Sat, 22 Jun 2013 13:11:27 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5MDBRGX034364; Sat, 22 Jun 2013 13:11:27 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306221311.r5MDBRGX034364@svn.freebsd.org> From: Attilio Rao Date: Sat, 22 Jun 2013 13:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252096 - user/attilio/vmobj-readlock/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 13:11:27 -0000 Author: attilio Date: Sat Jun 22 13:11:27 2013 New Revision: 252096 URL: http://svnweb.freebsd.org/changeset/base/252096 Log: Complete further r252046. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/vm/swap_pager.c Modified: user/attilio/vmobj-readlock/sys/vm/swap_pager.c ============================================================================== --- user/attilio/vmobj-readlock/sys/vm/swap_pager.c Sat Jun 22 12:50:05 2013 (r252095) +++ user/attilio/vmobj-readlock/sys/vm/swap_pager.c Sat Jun 22 13:11:27 2013 (r252096) @@ -1708,8 +1708,7 @@ swp_pager_force_pagein(vm_object_t objec vm_page_t m; vm_object_pip_add(object, 1); - m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | - VM_ALLOC_NOBUSY); + m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); if (m->valid == VM_PAGE_BITS_ALL) { vm_object_pip_subtract(object, 1); vm_page_dirty(m); @@ -1721,7 +1720,6 @@ swp_pager_force_pagein(vm_object_t objec return; } - vm_page_busy(m); if (swap_pager_getpages(object, &m, 1, 0) != VM_PAGER_OK) panic("swap_pager_force_pagein: read from swap failed");/*XXX*/ vm_object_pip_subtract(object, 1); From owner-svn-src-user@FreeBSD.ORG Sat Jun 22 16:10:58 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0D751E57; Sat, 22 Jun 2013 16:10:58 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F417112CB; Sat, 22 Jun 2013 16:10:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5MGAvhv089244; Sat, 22 Jun 2013 16:10:57 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5MGAvVG089243; Sat, 22 Jun 2013 16:10:57 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306221610.r5MGAvVG089243@svn.freebsd.org> From: Attilio Rao Date: Sat, 22 Jun 2013 16:10:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252097 - user/attilio/vmobj-readlock/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 16:10:58 -0000 Author: attilio Date: Sat Jun 22 16:10:57 2013 New Revision: 252097 URL: http://svnweb.freebsd.org/changeset/base/252097 Log: Complete further r252046. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/vm/vm_glue.c Modified: user/attilio/vmobj-readlock/sys/vm/vm_glue.c ============================================================================== --- user/attilio/vmobj-readlock/sys/vm/vm_glue.c Sat Jun 22 13:11:27 2013 (r252096) +++ user/attilio/vmobj-readlock/sys/vm/vm_glue.c Sat Jun 22 16:10:57 2013 (r252097) @@ -241,10 +241,8 @@ vm_imgact_page_iostart(vm_object_t objec VM_OBJECT_WLOCK(object); pindex = OFF_TO_IDX(offset); - m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | - VM_ALLOC_NOBUSY); + m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); if (m->valid != VM_PAGE_BITS_ALL) { - vm_page_busy(m); ma[0] = m; rv = vm_pager_get_pages(object, ma, 1, 0); m = vm_page_lookup(object, pindex); @@ -257,8 +255,8 @@ vm_imgact_page_iostart(vm_object_t objec m = NULL; goto out; } - vm_page_wakeup(m); } + vm_page_wakeup(m); vm_page_io_start(m); out: VM_OBJECT_WUNLOCK(object);