From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 02:58:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72084C50; Sun, 1 Dec 2013 02:58:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5FE7A1A1C; Sun, 1 Dec 2013 02:58:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB12wnsS034257; Sun, 1 Dec 2013 02:58:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB12wn4o034256; Sun, 1 Dec 2013 02:58:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312010258.rB12wn4o034256@svn.freebsd.org> From: Eitan Adler Date: Sun, 1 Dec 2013 02:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258787 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 02:58:49 -0000 Author: eadler Date: Sun Dec 1 02:58:48 2013 New Revision: 258787 URL: http://svnweb.freebsd.org/changeset/base/258787 Log: r258780 should not have applied to .S files. Reported by: jmallett Modified: head/sys/arm/arm/cpufunc_asm_pj4b.S Modified: head/sys/arm/arm/cpufunc_asm_pj4b.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_pj4b.S Sat Nov 30 23:56:26 2013 (r258786) +++ head/sys/arm/arm/cpufunc_asm_pj4b.S Sun Dec 1 02:58:48 2013 (r258787) @@ -105,7 +105,7 @@ ENTRY(pj4b_config) orr r0, r0, #(1 << 27) /* Critical word first sequencing disable */ orr r0, r0, #(1 << 29) /* Disable MO device read / write */ orr r0, r0, #(1 << 30) /* L1 cache strict round-robin replacement policy*/ - orr r0, r0, #(1U << 31) /* Enable write evict */ + orr r0, r0, #(1 << 31) /* Enable write evict */ mcr p15, 1, r0, c15, c1, 2 #if defined(SMP) /* Set SMP mode in Auxiliary Control Register */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 03:53:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FA2BB1C; Sun, 1 Dec 2013 03:53:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3023D1D2D; Sun, 1 Dec 2013 03:53:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB13rNSF055020; Sun, 1 Dec 2013 03:53:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB13rML4055014; Sun, 1 Dec 2013 03:53:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312010353.rB13rML4055014@svn.freebsd.org> From: Adrian Chadd Date: Sun, 1 Dec 2013 03:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258788 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 03:53:23 -0000 Author: adrian Date: Sun Dec 1 03:53:21 2013 New Revision: 258788 URL: http://svnweb.freebsd.org/changeset/base/258788 Log: Migrate the sendfile_sync structure into a public(ish) API in preparation for extending and reusing it. The sendfile_sync wrapper is mostly just a "mbuf transaction" wrapper, used to indicate that the backing store for a group of mbufs has completed. It's only being used by sendfile for now and it's only implementing a sleep/wakeup rendezvous. However, there are other potential signaling paths (kqueue) and other potential uses (socket zero-copy write) where the same mechanism would also be useful. So, with that in mind: * extract the sendfile_sync code out into sf_sync_*() methods * teach the sf_sync_alloc method about the current config flag - it will eventually know about kqueue. * move the sendfile_sync code out of do_sendfile() - the only thing it now knows about is the sfs pointer. The guts of the sync rendezvous (setup, rendezvous/wait, free) is now done in the syscall wrapper. * .. and teach the 32-bit compat sendfile call the same. This should be a no-op. It's primarily preparation work for teaching the sendfile_sync about kqueue notification. Tested: * Peter Holm's sendfile stress / regression scripts Sponsored by: Netflix, Inc. Added: head/sys/sys/sf_sync.h (contents, props changed) Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_descrip.c head/sys/kern/uipc_syscalls.c head/sys/sys/file.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sun Dec 1 02:58:48 2013 (r258787) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sun Dec 1 03:53:21 2013 (r258788) @@ -83,6 +83,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #ifdef INET #include @@ -1653,12 +1656,14 @@ freebsd32_do_sendfile(struct thread *td, off_t offset; int error; off_t sbytes; + struct sendfile_sync *sfs; offset = PAIR32TO64(off_t, uap->offset); if (offset < 0) return (EINVAL); hdr_uio = trl_uio = NULL; + sfs = NULL; if (uap->hdtr != NULL) { error = copyin(uap->hdtr, &hdtr32, sizeof(hdtr32)); @@ -1692,8 +1697,21 @@ freebsd32_do_sendfile(struct thread *td, goto out; } + /* + * If we need to wait for completion, initialise the sfsync + * state here. + */ + if (uap->flags & SF_SYNC) + sfs = sf_sync_alloc(uap->flags & SF_SYNC); + error = fo_sendfile(fp, uap->s, hdr_uio, trl_uio, offset, - uap->nbytes, &sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); + uap->nbytes, &sbytes, uap->flags, compat ? SFK_COMPAT : 0, + sfs, td); + if (sfs != NULL) { + sf_sync_syscall_wait(sfs); + sf_sync_free(sfs); + } + fdrop(fp, td); if (uap->sbytes != NULL) copyout(&sbytes, uap->sbytes, sizeof(off_t)); Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Dec 1 02:58:48 2013 (r258787) +++ head/sys/kern/kern_descrip.c Sun Dec 1 03:53:21 2013 (r258788) @@ -3949,7 +3949,7 @@ badfo_chown(struct file *fp, uid_t uid, static int badfo_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, struct uio *trl_uio, off_t offset, size_t nbytes, off_t *sent, int flags, - int kflags, struct thread *td) + int kflags, struct sendfile_sync *sfs, struct thread *td) { return (EBADF); @@ -3988,7 +3988,7 @@ invfo_chown(struct file *fp, uid_t uid, int invfo_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, struct uio *trl_uio, off_t offset, size_t nbytes, off_t *sent, int flags, - int kflags, struct thread *td) + int kflags, struct sendfile_sync *sfs, struct thread *td) { return (EINVAL); Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sun Dec 1 02:58:48 2013 (r258787) +++ head/sys/kern/uipc_syscalls.c Sun Dec 1 03:53:21 2013 (r258788) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1844,12 +1845,6 @@ getsockaddr(namp, uaddr, len) return (error); } -struct sendfile_sync { - struct mtx mtx; - struct cv cv; - unsigned count; -}; - /* * Detach mapped page and release resources back to the system. */ @@ -1871,15 +1866,94 @@ sf_buf_mext(struct mbuf *mb, void *addr, if (m->wire_count == 0 && m->object == NULL) vm_page_free(m); vm_page_unlock(m); - if (addr == NULL) - return (EXT_FREE_OK); - sfs = addr; + if (addr != NULL) { + sfs = addr; + sf_sync_deref(sfs); + } + return (EXT_FREE_OK); +} + +void +sf_sync_deref(struct sendfile_sync *sfs) +{ + + if (sfs == NULL) + return; + mtx_lock(&sfs->mtx); KASSERT(sfs->count> 0, ("Sendfile sync botchup count == 0")); if (--sfs->count == 0) cv_signal(&sfs->cv); mtx_unlock(&sfs->mtx); - return (EXT_FREE_OK); +} + +/* + * Allocate a sendfile_sync state structure. + * + * For now this only knows about the "sleep" sync, but later it will + * grow various other personalities. + */ +struct sendfile_sync * +sf_sync_alloc(uint32_t flags) +{ + struct sendfile_sync *sfs; + + sfs = malloc(sizeof *sfs, M_TEMP, M_WAITOK | M_ZERO); + mtx_init(&sfs->mtx, "sendfile", NULL, MTX_DEF); + cv_init(&sfs->cv, "sendfile"); + sfs->flags = flags; + + return (sfs); +} + +/* + * Take a reference to a sfsync instance. + * + * This has to map 1:1 to free calls coming in via sf_buf_mext(), + * so typically this will be referenced once for each mbuf allocated. + */ +void +sf_sync_ref(struct sendfile_sync *sfs) +{ + + if (sfs == NULL) + return; + + mtx_lock(&sfs->mtx); + sfs->count++; + mtx_unlock(&sfs->mtx); +} + +void +sf_sync_syscall_wait(struct sendfile_sync *sfs) +{ + + if (sfs == NULL) + return; + + mtx_lock(&sfs->mtx); + if (sfs->count != 0) + cv_wait(&sfs->cv, &sfs->mtx); + KASSERT(sfs->count == 0, ("sendfile sync still busy")); + mtx_unlock(&sfs->mtx); +} + +void +sf_sync_free(struct sendfile_sync *sfs) +{ + + if (sfs == NULL) + return; + + /* + * XXX we should ensure that nothing else has this + * locked before freeing. + */ + mtx_lock(&sfs->mtx); + KASSERT(sfs->count == 0, ("sendfile sync still busy")); + cv_destroy(&sfs->cv); + mtx_destroy(&sfs->mtx); + free(sfs, M_TEMP); } /* @@ -1909,6 +1983,7 @@ do_sendfile(struct thread *td, struct se cap_rights_t rights; int error; off_t sbytes; + struct sendfile_sync *sfs; /* * File offset must be positive. If it goes beyond EOF @@ -1918,6 +1993,7 @@ do_sendfile(struct thread *td, struct se return (EINVAL); hdr_uio = trl_uio = NULL; + sfs = NULL; if (uap->hdtr != NULL) { error = copyin(uap->hdtr, &hdtr, sizeof(hdtr)); @@ -1947,9 +2023,31 @@ do_sendfile(struct thread *td, struct se goto out; } + /* + * If we need to wait for completion, initialise the sfsync + * state here. + */ + if (uap->flags & SF_SYNC) + sfs = sf_sync_alloc(uap->flags & SF_SYNC); + error = fo_sendfile(fp, uap->s, hdr_uio, trl_uio, uap->offset, - uap->nbytes, &sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); + uap->nbytes, &sbytes, uap->flags, compat ? SFK_COMPAT : 0, sfs, td); + + /* + * If appropriate, do the wait and free here. + */ + if (sfs != NULL) { + sf_sync_syscall_wait(sfs); + sf_sync_free(sfs); + } + + /* + * XXX Should we wait until the send has completed before freeing the source + * file handle? It's the previous behaviour, sure, but is it required? + * We've wired down the page references after all. + */ fdrop(fp, td); + if (uap->sbytes != NULL) { copyout(&sbytes, uap->sbytes, sizeof(off_t)); } @@ -2177,7 +2275,7 @@ kern_sendfile_getsock(struct thread *td, int vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, struct uio *trl_uio, off_t offset, size_t nbytes, off_t *sent, int flags, - int kflags, struct thread *td) + int kflags, struct sendfile_sync *sfs, struct thread *td) { struct file *sock_fp; struct vnode *vp; @@ -2187,7 +2285,6 @@ vn_sendfile(struct file *fp, int sockfd, struct sf_buf *sf; struct vm_page *pg; struct shmfd *shmfd; - struct sendfile_sync *sfs; struct vattr va; off_t off, xfsize, fsbytes, sbytes, rem, obj_size; int error, bsize, nd, hdrlen, mnw; @@ -2197,7 +2294,6 @@ vn_sendfile(struct file *fp, int sockfd, obj = NULL; so = NULL; m = NULL; - sfs = NULL; fsbytes = sbytes = 0; hdrlen = mnw = 0; rem = nbytes; @@ -2222,12 +2318,6 @@ vn_sendfile(struct file *fp, int sockfd, if (flags & SF_MNOWAIT) mnw = 1; - if (flags & SF_SYNC) { - sfs = malloc(sizeof *sfs, M_TEMP, M_WAITOK | M_ZERO); - mtx_init(&sfs->mtx, "sendfile", NULL, MTX_DEF); - cv_init(&sfs->cv, "sendfile"); - } - #ifdef MAC error = mac_socket_check_send(td->td_ucred, so); if (error != 0) @@ -2472,11 +2562,12 @@ retry_space: loopbytes += xfsize; off += xfsize; - if (sfs != NULL) { - mtx_lock(&sfs->mtx); - sfs->count++; - mtx_unlock(&sfs->mtx); - } + /* + * XXX eventually this should be a sfsync + * method call! + */ + if (sfs != NULL) + sf_sync_ref(sfs); } if (vp != NULL) @@ -2558,16 +2649,6 @@ out: if (m) m_freem(m); - if (sfs != NULL) { - mtx_lock(&sfs->mtx); - if (sfs->count != 0) - cv_wait(&sfs->cv, &sfs->mtx); - KASSERT(sfs->count == 0, ("sendfile sync still busy")); - cv_destroy(&sfs->cv); - mtx_destroy(&sfs->mtx); - free(sfs, M_TEMP); - } - if (error == ERESTART) error = EINTR; Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Sun Dec 1 02:58:48 2013 (r258787) +++ head/sys/sys/file.h Sun Dec 1 03:53:21 2013 (r258788) @@ -88,6 +88,9 @@ foffset_get(struct file *fp) return (foffset_lock(fp, FOF_NOLOCK)); } +/* XXX pollution? */ +struct sendfile_sync; + typedef int fo_rdwr_t(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td); @@ -107,7 +110,8 @@ typedef int fo_chown_t(struct file *fp, struct ucred *active_cred, struct thread *td); typedef int fo_sendfile_t(struct file *fp, int sockfd, struct uio *hdr_uio, struct uio *trl_uio, off_t offset, size_t nbytes, - off_t *sent, int flags, int kflags, struct thread *td); + off_t *sent, int flags, int kflags, + struct sendfile_sync *sfs, struct thread *td); typedef int fo_seek_t(struct file *fp, off_t offset, int whence, struct thread *td); typedef int fo_flags_t; @@ -368,11 +372,11 @@ fo_chown(struct file *fp, uid_t uid, gid static __inline int fo_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, struct uio *trl_uio, off_t offset, size_t nbytes, off_t *sent, int flags, - int kflags, struct thread *td) + int kflags, struct sendfile_sync *sfs, struct thread *td) { return ((*fp->f_ops->fo_sendfile)(fp, sockfd, hdr_uio, trl_uio, offset, - nbytes, sent, flags, kflags, td)); + nbytes, sent, flags, kflags, sfs, td)); } static __inline int Added: head/sys/sys/sf_sync.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/sf_sync.h Sun Dec 1 03:53:21 2013 (r258788) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2013 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_SF_SYNC_H_ +#define _SYS_SF_SYNC_H_ + +struct sendfile_sync { + uint32_t flags; + struct mtx mtx; + struct cv cv; + unsigned count; +}; + +extern struct sendfile_sync * sf_sync_alloc(uint32_t flags); +extern void sf_sync_syscall_wait(struct sendfile_sync *); +extern void sf_sync_free(struct sendfile_sync *); +extern void sf_sync_ref(struct sendfile_sync *); +extern void sf_sync_deref(struct sendfile_sync *); + +#endif /* !_SYS_SF_BUF_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 07:34:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65EE9679; Sun, 1 Dec 2013 07:34:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 378FE15E4; Sun, 1 Dec 2013 07:34:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB17YMNU028279; Sun, 1 Dec 2013 07:34:22 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB17YMWE028278; Sun, 1 Dec 2013 07:34:22 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201312010734.rB17YMWE028278@svn.freebsd.org> From: Kirk McKusick Date: Sun, 1 Dec 2013 07:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258789 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 07:34:22 -0000 Author: mckusick Date: Sun Dec 1 07:34:21 2013 New Revision: 258789 URL: http://svnweb.freebsd.org/changeset/base/258789 Log: We needlessly panic when trying to flush MKDIR_PARENT dependencies. We had previously tried to flush all MKDIR_PARENT dependencies (and all the NEWBLOCK pagedeps) by calling ffs_update(). However this will only resolve these dependencies in direct blocks. So very large directories with MKDIR_PARENT dependencies in indirect blocks had not yet gotten flushed. As the directory is in the midst of doing a complete sync, we simply defer the checking of the MKDIR_PARENT dependencies until the indirect blocks have been sync'ed. Reported by: Shawn Wallbridge of imaginaryforces.com Tested by: John-Mark Gurney PR: 183424 MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Sun Dec 1 03:53:21 2013 (r258788) +++ head/sys/ufs/ffs/ffs_softdep.c Sun Dec 1 07:34:21 2013 (r258789) @@ -12709,7 +12709,9 @@ flush_pagedep_deps(pvp, mp, diraddhdp) int error = 0; struct buf *bp; ino_t inum; + struct diraddhd unfinished; + LIST_INIT(&unfinished); ump = VFSTOUFS(mp); LOCK_OWNED(ump); restart: @@ -12728,8 +12730,20 @@ restart: */ if (dap != LIST_FIRST(diraddhdp)) continue; - if (dap->da_state & MKDIR_PARENT) - panic("flush_pagedep_deps: MKDIR_PARENT"); + /* + * All MKDIR_PARENT dependencies and all the + * NEWBLOCK pagedeps that are contained in direct + * blocks were resolved by doing above ffs_update. + * Pagedeps contained in indirect blocks may + * require a complete sync'ing of the directory. + * We are in the midst of doing a complete sync, + * so if they are not resolved in this pass we + * defer them for now as they will be sync'ed by + * our caller shortly. + */ + LIST_REMOVE(dap, da_pdlist); + LIST_INSERT_HEAD(&unfinished, dap, da_pdlist); + continue; } /* * A newly allocated directory must have its "." and @@ -12838,6 +12852,10 @@ retry: } if (error) ACQUIRE_LOCK(ump); + while ((dap = LIST_FIRST(&unfinished)) != NULL) { + LIST_REMOVE(dap, da_pdlist); + LIST_INSERT_HEAD(diraddhdp, dap, da_pdlist); + } return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 07:59:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB27EA3D; Sun, 1 Dec 2013 07:59:50 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 253F6169B; Sun, 1 Dec 2013 07:59:49 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rB17xiI7052730; Sun, 1 Dec 2013 09:59:44 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rB17xiI7052730 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rB17xiF5052729; Sun, 1 Dec 2013 09:59:44 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 1 Dec 2013 09:59:44 +0200 From: Konstantin Belousov To: Eitan Adler Subject: Re: svn commit: r258779 - in head/sys/dev: cesa drm drm2/i915 drm2/radeon hatm Message-ID: <20131201075944.GF59496@kib.kiev.ua> References: <201311302216.rAUMGcPA037268@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cIzV5r+THY7s5gYK" Content-Disposition: inline In-Reply-To: <201311302216.rAUMGcPA037268@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 07:59:50 -0000 --cIzV5r+THY7s5gYK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 30, 2013 at 10:16:38PM +0000, Eitan Adler wrote: > Author: eadler > Date: Sat Nov 30 22:16:37 2013 > New Revision: 258779 > URL: http://svnweb.freebsd.org/changeset/base/258779 >=20 > Log: > Similar to the (1 << 31) case it is not defined to do (2 << 30). >=20 > Modified: =2E.. > head/sys/dev/drm2/i915/i915_reg.h Revert the drm2/i915 changes from this and following commits now. You did not contacted obvious maintainer of the file. The changes are pointless and make the import of upstream changes harder; for i915_reg.h, much harder. Not to mention that the whole churn is not needed if the -fno-strict-overflow flag is used. --cIzV5r+THY7s5gYK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSmuxvAAoJEJDCuSvBvK1B0WoP/16VNLuzB5Wpo6h88JFkT6vZ XaaV4R5XhCbpW72Xq93PaOCONqNuNk7tnfYNLgzFMcQbzWrI1RlAO40d4K++AWBN p8SRg5RhHkaihEKs/Ze/8Wm5h2fTR/uDs/0xsQeQf02tkOQDVGyL/4fL2OcpVtAr MddB6t92AU/t4E4kXvLCzeMzbPvDaeQ67C7uJhr8aps5gSUNi3wDaUl9UMC/a2sV 0sbtfasMP4y5N7rCr/Tuz/s4umDhd5sbKdRc2a/uporVZN1RWVvB5ATdJWJpUiOw EYlGZVB0THNaqzn7jj9kz6Smt5vD70mnHhtveEZ65sTBRDuYDCOHPu9btozKpBaU 9I9bTSbwUXlcZZIbpwMvemgPeGASxMEWWShiXeQazvXkQq4NbxE3FViwkwVL+ZcK Vkr64M6XFkn79yKTg3zizZv7R+L/3rH3IN8ryipioC8oivQx2M0TrWH+8tWpbVi1 Yf4V4/LbM2+M4bS5PYmBYyxDL5SmGrQ0QsElCLfUSEQSRyh/pM+osyzzCCiIp92v Piix1H/2RDFSqSe8Fv9TrV1Z2EB7rR32xE23Kh8s6Bx3Ucz+yyBXSTn8hXt5J/r9 EcWDwSDtb1759u+WZ35w3lL51WwlVYbHBW/Y2x3TY60yl89tEZNzucAKkzhAHAXL rJhrYP+sOS4yBeebzt+l =YVrw -----END PGP SIGNATURE----- --cIzV5r+THY7s5gYK-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 08:13:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B62D0C3D; Sun, 1 Dec 2013 08:13:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A1BC31736; Sun, 1 Dec 2013 08:13:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB18DA76041730; Sun, 1 Dec 2013 08:13:10 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB18DANB041729; Sun, 1 Dec 2013 08:13:10 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312010813.rB18DANB041729@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 1 Dec 2013 08:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258790 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 08:13:10 -0000 Author: trasz Date: Sun Dec 1 08:13:10 2013 New Revision: 258790 URL: http://svnweb.freebsd.org/changeset/base/258790 Log: Fix hang on reboot with active iSCSI connections. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Sun Dec 1 07:34:21 2013 (r258789) +++ head/sys/dev/iscsi/iscsi.c Sun Dec 1 08:13:10 2013 (r258790) @@ -2110,10 +2110,12 @@ iscsi_load(void) sc->sc_cdev->si_drv1 = sc; /* - * XXX: For some reason this doesn't do its job; active sessions still hang out there - * after final sync, making the reboot effectively hang. + * Note that this needs to get run before dashutdown(). Otherwise, + * when rebooting with iSCSI session with outstanding requests, + * but disconnected, dashutdown() will hang on cam_periph_runccb(). */ - sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, iscsi_shutdown, sc, SHUTDOWN_PRI_DEFAULT); + sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, + iscsi_shutdown, sc, SHUTDOWN_PRI_FIRST); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 09:41:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E0AA931; Sun, 1 Dec 2013 09:41:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 28B161AFD; Sun, 1 Dec 2013 09:41:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB19f87a072082; Sun, 1 Dec 2013 09:41:08 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB19f7c6072073; Sun, 1 Dec 2013 09:41:07 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312010941.rB19f7c6072073@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 1 Dec 2013 09:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258791 - in head: . lib lib/libpjdlog share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 09:41:08 -0000 Author: pjd Date: Sun Dec 1 09:41:06 2013 New Revision: 258791 URL: http://svnweb.freebsd.org/changeset/base/258791 Log: Move my simple logging API to a separate library. It is now already used by hastctl(8), hastd(8) and auditdistd(8) and will soon be also used by casperd(8) and its services. There is no documentation and pjdlog.h header file is not installed in /usr/include/ to keep it private. Unfortunately we don't have /lib/private/ at this point, only /usr/lib/private/, so the library is installed in /lib/. Sponsored by: The FreeBSD Foundation Added: head/lib/libpjdlog/ head/lib/libpjdlog/Makefile (contents, props changed) head/lib/libpjdlog/pjdlog.c (contents, props changed) head/lib/libpjdlog/pjdlog.h (contents, props changed) Modified: head/Makefile.inc1 head/lib/Makefile head/share/mk/bsd.libnames.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Dec 1 08:13:10 2013 (r258790) +++ head/Makefile.inc1 Sun Dec 1 09:41:06 2013 (r258791) @@ -1505,7 +1505,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libradius lib/libsbuf lib/libtacplus \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libzfs_core} \ - lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ + lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ ${_secure_lib_libssh} ${_secure_lib_libssl} @@ -1521,6 +1521,8 @@ _lib_libthr= lib/libthr _ofed_lib= contrib/ofed/usr.lib/ .endif +lib/libpjdlog__L: lib/libutil__L + _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib ${_ofed_lib} .for _DIR in ${LOCAL_LIB_DIRS} .if exists(${.CURDIR}/${_DIR}/Makefile) Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sun Dec 1 08:13:10 2013 (r258790) +++ head/lib/Makefile Sun Dec 1 09:41:06 2013 (r258791) @@ -35,6 +35,8 @@ SUBDIR_ORDERED= ${_csu} \ libc_nonshared \ libbsm \ libauditd \ + libutil \ + libpjdlog \ libcompiler_rt \ libcrypt \ libelf \ @@ -49,7 +51,6 @@ SUBDIR_ORDERED= ${_csu} \ librpcsvc \ libsbuf \ libtacplus \ - libutil \ ${_libypclnt} \ ${_libcxxrt} \ ${_libcplusplus} Added: head/lib/libpjdlog/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpjdlog/Makefile Sun Dec 1 09:41:06 2013 (r258791) @@ -0,0 +1,21 @@ +# +# $FreeBSD$ +# + +SHLIBDIR?= /lib + +.include + +LIB= pjdlog +SRCS= pjdlog.c + +SHLIB_MAJOR= 0 + +CFLAGS+=-I${.CURDIR} + +DPADD= ${LIBUTIL} +LDADD= -lutil + +WARNS?= 6 + +.include Added: head/lib/libpjdlog/pjdlog.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpjdlog/pjdlog.c Sun Dec 1 09:41:06 2013 (r258791) @@ -0,0 +1,809 @@ +/*- + * Copyright (c) 2009-2010 The FreeBSD Foundation + * Copyright (c) 2011 Pawel Jakub Dawidek + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef notyet +#include +#endif + +#include "pjdlog.h" + +#ifndef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif + +#define PJDLOG_MAX_MSGSIZE 4096 + +#define PJDLOG_PREFIX_STACK 4 +#define PJDLOG_PREFIX_MAXSIZE 128 + +#define PJDLOG_NEVER_INITIALIZED 0 +#define PJDLOG_NOT_INITIALIZED 1 +#define PJDLOG_INITIALIZED 2 + +static int pjdlog_initialized = PJDLOG_NEVER_INITIALIZED; +static int pjdlog_mode, pjdlog_debug_level, pjdlog_sock; +static int pjdlog_prefix_current; +static char pjdlog_prefix[PJDLOG_PREFIX_STACK][PJDLOG_PREFIX_MAXSIZE]; + +static int +pjdlog_printf_arginfo_humanized_number(const struct printf_info *pi __unused, + size_t n, int *argt) +{ + + assert(n >= 1); + argt[0] = PA_INT | PA_FLAG_INTMAX; + return (1); +} + +static int +pjdlog_printf_render_humanized_number(struct __printf_io *io, + const struct printf_info *pi, const void * const *arg) +{ + char buf[5]; + intmax_t num; + int ret; + + num = *(const intmax_t *)arg[0]; + humanize_number(buf, sizeof(buf), (int64_t)num, "", HN_AUTOSCALE, + HN_NOSPACE | HN_DECIMAL); + ret = __printf_out(io, pi, buf, strlen(buf)); + __printf_flush(io); + return (ret); +} + +static int +pjdlog_printf_arginfo_sockaddr(const struct printf_info *pi __unused, + size_t n, int *argt) +{ + + assert(n >= 1); + argt[0] = PA_POINTER; + return (1); +} + +static int +pjdlog_printf_render_sockaddr_ip(struct __printf_io *io, + const struct printf_info *pi, const void * const *arg) +{ + const struct sockaddr_storage *ss; + char addr[MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN)]; + int ret; + + ss = *(const struct sockaddr_storage * const *)arg[0]; + switch (ss->ss_family) { + case AF_INET: + { + const struct sockaddr_in *sin; + + sin = (const struct sockaddr_in *)ss; + if (inet_ntop(ss->ss_family, &sin->sin_addr, addr, + sizeof(addr)) == NULL) { + PJDLOG_ABORT("inet_ntop(AF_INET) failed: %s.", + strerror(errno)); + } + break; + } + case AF_INET6: + { + const struct sockaddr_in6 *sin; + + sin = (const struct sockaddr_in6 *)ss; + if (inet_ntop(ss->ss_family, &sin->sin6_addr, addr, + sizeof(addr)) == NULL) { + PJDLOG_ABORT("inet_ntop(AF_INET6) failed: %s.", + strerror(errno)); + } + break; + } + default: + snprintf(addr, sizeof(addr), "[unsupported family %hhu]", + ss->ss_family); + break; + } + ret = __printf_out(io, pi, addr, strlen(addr)); + __printf_flush(io); + return (ret); +} + +static int +pjdlog_printf_render_sockaddr(struct __printf_io *io, + const struct printf_info *pi, const void * const *arg) +{ + const struct sockaddr_storage *ss; + char buf[PATH_MAX]; + int ret; + + ss = *(const struct sockaddr_storage * const *)arg[0]; + switch (ss->ss_family) { + case AF_UNIX: + { + const struct sockaddr_un *sun; + + sun = (const struct sockaddr_un *)ss; + if (sun->sun_path[0] == '\0') + snprintf(buf, sizeof(buf), "N/A"); + else + snprintf(buf, sizeof(buf), "%s", sun->sun_path); + break; + } + case AF_INET: + { + char addr[INET_ADDRSTRLEN]; + const struct sockaddr_in *sin; + unsigned int port; + + sin = (const struct sockaddr_in *)ss; + port = ntohs(sin->sin_port); + if (inet_ntop(ss->ss_family, &sin->sin_addr, addr, + sizeof(addr)) == NULL) { + PJDLOG_ABORT("inet_ntop(AF_INET) failed: %s.", + strerror(errno)); + } + snprintf(buf, sizeof(buf), "%s:%u", addr, port); + break; + } + case AF_INET6: + { + char addr[INET6_ADDRSTRLEN]; + const struct sockaddr_in6 *sin; + unsigned int port; + + sin = (const struct sockaddr_in6 *)ss; + port = ntohs(sin->sin6_port); + if (inet_ntop(ss->ss_family, &sin->sin6_addr, addr, + sizeof(addr)) == NULL) { + PJDLOG_ABORT("inet_ntop(AF_INET6) failed: %s.", + strerror(errno)); + } + snprintf(buf, sizeof(buf), "[%s]:%u", addr, port); + break; + } + default: + snprintf(buf, sizeof(buf), "[unsupported family %hhu]", + ss->ss_family); + break; + } + ret = __printf_out(io, pi, buf, strlen(buf)); + __printf_flush(io); + return (ret); +} + +void +pjdlog_init(int mode) +{ + int saved_errno; + + assert(pjdlog_initialized == PJDLOG_NEVER_INITIALIZED || + pjdlog_initialized == PJDLOG_NOT_INITIALIZED); +#ifdef notyet + assert(mode == PJDLOG_MODE_STD || mode == PJDLOG_MODE_SYSLOG || + mode == PJDLOG_MODE_SOCK); +#else + assert(mode == PJDLOG_MODE_STD || mode == PJDLOG_MODE_SYSLOG); +#endif + + saved_errno = errno; + + if (pjdlog_initialized == PJDLOG_NEVER_INITIALIZED) { + __use_xprintf = 1; + register_printf_render_std("T"); + register_printf_render('N', + pjdlog_printf_render_humanized_number, + pjdlog_printf_arginfo_humanized_number); + register_printf_render('I', + pjdlog_printf_render_sockaddr_ip, + pjdlog_printf_arginfo_sockaddr); + register_printf_render('S', + pjdlog_printf_render_sockaddr, + pjdlog_printf_arginfo_sockaddr); + } + + if (mode == PJDLOG_MODE_SYSLOG) + openlog(NULL, LOG_PID | LOG_NDELAY, LOG_LOCAL0); + pjdlog_mode = mode; + pjdlog_debug_level = 0; + pjdlog_prefix_current = 0; + pjdlog_prefix[0][0] = '\0'; + + pjdlog_initialized = PJDLOG_INITIALIZED; + pjdlog_sock = -1; + + errno = saved_errno; +} + +void +pjdlog_fini(void) +{ + int saved_errno; + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + + saved_errno = errno; + + if (pjdlog_mode == PJDLOG_MODE_SYSLOG) + closelog(); + + pjdlog_initialized = PJDLOG_NOT_INITIALIZED; + pjdlog_sock = -1; + + errno = saved_errno; +} + +/* + * Configure where the logs should go. + * By default they are send to stdout/stderr, but after going into background + * (eg. by calling daemon(3)) application is responsible for changing mode to + * PJDLOG_MODE_SYSLOG, so logs will be send to syslog. + */ +void +pjdlog_mode_set(int mode) +{ + int saved_errno; + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); +#ifdef notyet + assert(mode == PJDLOG_MODE_STD || mode == PJDLOG_MODE_SYSLOG || + mode == PJDLOG_MODE_SOCK); +#else + assert(mode == PJDLOG_MODE_STD || mode == PJDLOG_MODE_SYSLOG); +#endif + + if (pjdlog_mode == mode) + return; + + saved_errno = errno; + + if (mode == PJDLOG_MODE_SYSLOG) + openlog(NULL, LOG_PID | LOG_NDELAY, LOG_DAEMON); + else if (mode == PJDLOG_MODE_STD) + closelog(); + + if (mode != PJDLOG_MODE_SOCK) + pjdlog_sock = -1; + + pjdlog_mode = mode; + + errno = saved_errno; +} + + +/* + * Return current mode. + */ +int +pjdlog_mode_get(void) +{ + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + + return (pjdlog_mode); +} + +#ifdef notyet +/* + * Sets socket number to use for PJDLOG_MODE_SOCK mode. + */ +void +pjdlog_sock_set(int sock) +{ + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + assert(pjdlog_mode == PJDLOG_MODE_SOCK); + assert(sock >= 0); + + pjdlog_sock = sock; +} +#endif + +#ifdef notyet +/* + * Returns socket number used for PJDLOG_MODE_SOCK mode. + */ +int +pjdlog_sock_get(void) +{ + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + assert(pjdlog_mode == PJDLOG_MODE_SOCK); + assert(pjdlog_sock >= 0); + + return (pjdlog_sock); +} +#endif + +/* + * Set debug level. All the logs above the level specified here will be + * ignored. + */ +void +pjdlog_debug_set(int level) +{ + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + assert(level >= 0); + assert(level <= 127); + + pjdlog_debug_level = level; +} + +/* + * Return current debug level. + */ +int +pjdlog_debug_get(void) +{ + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + + return (pjdlog_debug_level); +} + +/* + * Set prefix that will be used before each log. + */ +void +pjdlog_prefix_set(const char *fmt, ...) +{ + va_list ap; + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + + va_start(ap, fmt); + pjdlogv_prefix_set(fmt, ap); + va_end(ap); +} + +/* + * Set prefix that will be used before each log. + */ +void +pjdlogv_prefix_set(const char *fmt, va_list ap) +{ + int saved_errno; + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + assert(fmt != NULL); + + saved_errno = errno; + + vsnprintf(pjdlog_prefix[pjdlog_prefix_current], + sizeof(pjdlog_prefix[pjdlog_prefix_current]), fmt, ap); + + errno = saved_errno; +} + +/* + * Get current prefix. + */ +const char * +pjdlog_prefix_get(void) +{ + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + + return (pjdlog_prefix[pjdlog_prefix_current]); +} + +/* + * Set new prefix and put the current one on the stack. + */ +void +pjdlog_prefix_push(const char *fmt, ...) +{ + va_list ap; + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + + va_start(ap, fmt); + pjdlogv_prefix_push(fmt, ap); + va_end(ap); +} + +/* + * Set new prefix and put the current one on the stack. + */ +void +pjdlogv_prefix_push(const char *fmt, va_list ap) +{ + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + assert(pjdlog_prefix_current < PJDLOG_PREFIX_STACK - 1); + + pjdlog_prefix_current++; + + pjdlogv_prefix_set(fmt, ap); +} + +/* + * Removes current prefix and recovers previous one from the stack. + */ +void +pjdlog_prefix_pop(void) +{ + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + assert(pjdlog_prefix_current > 0); + + pjdlog_prefix_current--; +} + +/* + * Convert log level into string. + */ +static const char * +pjdlog_level_to_string(int loglevel) +{ + + switch (loglevel) { + case LOG_EMERG: + return ("EMERG"); + case LOG_ALERT: + return ("ALERT"); + case LOG_CRIT: + return ("CRIT"); + case LOG_ERR: + return ("ERROR"); + case LOG_WARNING: + return ("WARNING"); + case LOG_NOTICE: + return ("NOTICE"); + case LOG_INFO: + return ("INFO"); + case LOG_DEBUG: + return ("DEBUG"); + } + assert(!"Invalid log level."); + abort(); /* XXX: gcc */ +} + +static int +vsnprlcat(char *str, size_t size, const char *fmt, va_list ap) +{ + size_t len; + + len = strlen(str); + assert(len < size); + return (vsnprintf(str + len, size - len, fmt, ap)); +} + +static int +snprlcat(char *str, size_t size, const char *fmt, ...) +{ + va_list ap; + int result; + + va_start(ap, fmt); + result = vsnprlcat(str, size, fmt, ap); + va_end(ap); + return (result); +} + +static void +pjdlogv_common_single_line(const char *func, const char *file, int line, + int loglevel, int debuglevel, int error, const char *msg) +{ + static char log[2 * PJDLOG_MAX_MSGSIZE]; + char *logp; + size_t logs; + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); +#ifdef notyet + assert(pjdlog_mode == PJDLOG_MODE_STD || + pjdlog_mode == PJDLOG_MODE_SYSLOG || + pjdlog_mode == PJDLOG_MODE_SOCK); +#else + assert(pjdlog_mode == PJDLOG_MODE_STD || + pjdlog_mode == PJDLOG_MODE_SYSLOG); +#endif + assert(pjdlog_mode != PJDLOG_MODE_SOCK || pjdlog_sock >= 0); + assert(loglevel == LOG_EMERG || loglevel == LOG_ALERT || + loglevel == LOG_CRIT || loglevel == LOG_ERR || + loglevel == LOG_WARNING || loglevel == LOG_NOTICE || + loglevel == LOG_INFO || loglevel == LOG_DEBUG); + assert(loglevel != LOG_DEBUG || debuglevel > 0); + assert(loglevel != LOG_DEBUG || debuglevel <= pjdlog_debug_level); + assert(debuglevel <= 127); + assert(error >= -1); + assert((file != NULL && line > 0) || + (func == NULL && file == NULL && line == 0)); + + switch (pjdlog_mode) { + case PJDLOG_MODE_STD: + case PJDLOG_MODE_SYSLOG: + logp = log; + logs = sizeof(log); + break; + case PJDLOG_MODE_SOCK: + logp = log + 4; + logs = sizeof(log) - 4; + break; + default: + assert(!"Invalid mode."); + } + + *logp = '\0'; + + if (pjdlog_mode != PJDLOG_MODE_SOCK) { + if (loglevel == LOG_DEBUG) { + /* Attach debuglevel if this is debug log. */ + snprlcat(logp, logs, "[%s%d] ", + pjdlog_level_to_string(loglevel), debuglevel); + } else { + snprlcat(logp, logs, "[%s] ", + pjdlog_level_to_string(loglevel)); + } + if (pjdlog_mode != PJDLOG_MODE_SYSLOG && + pjdlog_debug_level >= 1) { + snprlcat(logp, logs, "(pid=%d) ", getpid()); + } + } + /* Attach file, func, line if debuglevel is 2 or more. */ + if (pjdlog_debug_level >= 2 && file != NULL) { + if (func == NULL) + snprlcat(logp, logs, "(%s:%d) ", file, line); + else + snprlcat(logp, logs, "(%s:%d:%s) ", file, line, func); + } + + if (pjdlog_mode != PJDLOG_MODE_SOCK) { + snprlcat(logp, logs, "%s", + pjdlog_prefix[pjdlog_prefix_current]); + } + + strlcat(logp, msg, logs); + + /* Attach error description. */ + if (error != -1) + snprlcat(logp, logs, ": %s.", strerror(error)); + + switch (pjdlog_mode) { + case PJDLOG_MODE_STD: + fprintf(stderr, "%s\n", logp); + fflush(stderr); + break; + case PJDLOG_MODE_SYSLOG: + syslog(loglevel, "%s", logp); + break; +#ifdef notyet + case PJDLOG_MODE_SOCK: + { + char ack[2]; + uint16_t dlen; + + log[2] = loglevel; + log[3] = debuglevel; + dlen = strlen(logp) + 3; /* +3 = loglevel, debuglevel and terminating \0 */ + bcopy(&dlen, log, sizeof(dlen)); + if (robust_send(pjdlog_sock, log, (size_t)dlen + 2) == -1) /* +2 for size */ + assert(!"Unable to send log."); + if (robust_recv(pjdlog_sock, ack, sizeof(ack)) == -1) + assert(!"Unable to send log."); + break; + } +#endif + default: + assert(!"Invalid mode."); + } +} + +/* + * Common log routine, which can handle regular log level as well as debug + * level. We decide here where to send the logs (stdout/stderr or syslog). + */ +void +_pjdlogv_common(const char *func, const char *file, int line, int loglevel, + int debuglevel, int error, const char *fmt, va_list ap) +{ + char log[PJDLOG_MAX_MSGSIZE]; + char *logp, *curline; + const char *prvline; + int saved_errno; + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + assert(pjdlog_mode == PJDLOG_MODE_STD || + pjdlog_mode == PJDLOG_MODE_SYSLOG || + pjdlog_mode == PJDLOG_MODE_SOCK); + assert(pjdlog_mode != PJDLOG_MODE_SOCK || pjdlog_sock >= 0); + assert(loglevel == LOG_EMERG || loglevel == LOG_ALERT || + loglevel == LOG_CRIT || loglevel == LOG_ERR || + loglevel == LOG_WARNING || loglevel == LOG_NOTICE || + loglevel == LOG_INFO || loglevel == LOG_DEBUG); + assert(loglevel != LOG_DEBUG || debuglevel > 0); + assert(debuglevel <= 127); + assert(error >= -1); + + /* Ignore debug above configured level. */ + if (loglevel == LOG_DEBUG && debuglevel > pjdlog_debug_level) + return; + + saved_errno = errno; + + vsnprintf(log, sizeof(log), fmt, ap); + logp = log; + prvline = NULL; + + while ((curline = strsep(&logp, "\n")) != NULL) { + if (*curline == '\0') + continue; + if (prvline != NULL) { + pjdlogv_common_single_line(func, file, line, loglevel, + debuglevel, -1, prvline); + } + prvline = curline; + } + if (prvline == NULL) + prvline = ""; + pjdlogv_common_single_line(func, file, line, loglevel, debuglevel, + error, prvline); + + errno = saved_errno; +} + +/* + * Common log routine. + */ +void +_pjdlog_common(const char *func, const char *file, int line, int loglevel, + int debuglevel, int error, const char *fmt, ...) +{ + va_list ap; + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + + va_start(ap, fmt); + _pjdlogv_common(func, file, line, loglevel, debuglevel, error, fmt, ap); + va_end(ap); +} + +/* + * Log error, errno and exit. + */ +void +_pjdlogv_exit(const char *func, const char *file, int line, int exitcode, + int error, const char *fmt, va_list ap) +{ + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + + _pjdlogv_common(func, file, line, exitcode == 0 ? LOG_INFO : LOG_ERR, 0, + error, fmt, ap); + exit(exitcode); + /* NOTREACHED */ +} + +/* + * Log error, errno and exit. + */ +void +_pjdlog_exit(const char *func, const char *file, int line, int exitcode, + int error, const char *fmt, ...) +{ + va_list ap; + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + + va_start(ap, fmt); + _pjdlogv_exit(func, file, line, exitcode, error, fmt, ap); + /* NOTREACHED */ + va_end(ap); +} + +/* + * Log failure message and exit. + */ +void +_pjdlog_abort(const char *func, const char *file, int line, + int error, const char *failedexpr, const char *fmt, ...) +{ + va_list ap; + + assert(pjdlog_initialized == PJDLOG_INITIALIZED); + + /* + * Set pjdlog_debug_level to 2, so that file, line and func are + * included in log. This is fine as we will exit anyway. + */ + if (pjdlog_debug_level < 2) + pjdlog_debug_level = 2; + + /* + * When there is no message we pass __func__ as 'fmt'. + * It would be cleaner to pass NULL or "", but gcc generates a warning + * for both of those. + */ + if (fmt != func) { + va_start(ap, fmt); + _pjdlogv_common(func, file, line, LOG_CRIT, 0, -1, fmt, ap); + va_end(ap); + } + if (failedexpr == NULL) { + _pjdlog_common(func, file, line, LOG_CRIT, 0, -1, "Aborted."); + } else { + _pjdlog_common(func, file, line, LOG_CRIT, 0, -1, + "Assertion failed: (%s).", failedexpr); + } + if (error != -1) + _pjdlog_common(func, file, line, LOG_CRIT, 0, error, "Errno"); + abort(); +} + +#ifdef notyet +/* + * Receive log from the given socket. + */ +int +pjdlog_receive(int sock) +{ + char log[PJDLOG_MAX_MSGSIZE]; + int loglevel, debuglevel; + uint16_t dlen; + + if (robust_recv(sock, &dlen, sizeof(dlen)) == -1) + return (-1); + + PJDLOG_ASSERT(dlen > 0); + PJDLOG_ASSERT(dlen <= PJDLOG_MAX_MSGSIZE - 3); + + if (robust_recv(sock, log, (size_t)dlen) == -1) + return (-1); + + log[dlen - 1] = '\0'; + loglevel = log[0]; + debuglevel = log[1]; + _pjdlog_common(NULL, NULL, 0, loglevel, debuglevel, -1, "%s", log + 2); + + if (robust_send(sock, "ok", 2) == -1) + return (-1); + + return (0); +} +#endif Added: head/lib/libpjdlog/pjdlog.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpjdlog/pjdlog.h Sun Dec 1 09:41:06 2013 (r258791) @@ -0,0 +1,174 @@ +/*- + * Copyright (c) 2009-2010 The FreeBSD Foundation + * Copyright (c) 2011 Pawel Jakub Dawidek + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _PJDLOG_H_ +#define _PJDLOG_H_ + +#include + +#include +#include +#include +#include + +#define PJDLOG_MODE_STD 0 +#define PJDLOG_MODE_SYSLOG 1 +#define PJDLOG_MODE_SOCK 2 + +void pjdlog_init(int mode); +void pjdlog_fini(void); + +void pjdlog_mode_set(int mode); +int pjdlog_mode_get(void); + +#ifdef notyet +void pjdlog_sock_set(int sock); +int pjdlog_sock_get(void); +#endif + +void pjdlog_debug_set(int level); +int pjdlog_debug_get(void); + +void pjdlog_prefix_set(const char *fmt, ...) __printflike(1, 2); +void pjdlogv_prefix_set(const char *fmt, va_list ap) __printflike(1, 0); +const char *pjdlog_prefix_get(void); +void pjdlog_prefix_push(const char *fmt, ...) __printflike(1, 2); +void pjdlogv_prefix_push(const char *fmt, va_list ap) __printflike(1, 0); +void pjdlog_prefix_pop(void); + +void _pjdlogv_common(const char *func, const char *file, int line, int loglevel, + int debuglevel, int error, const char *fmt, va_list ap) __printflike(7, 0); +void _pjdlog_common(const char *func, const char *file, int line, int loglevel, + int debuglevel, int error, const char *fmt, ...) __printflike(7, 8); + +void _pjdlogv_exit(const char *func, const char *file, int line, int exitcode, + int error, const char *fmt, va_list ap) __printflike(6, 0) __dead2; +void _pjdlog_exit(const char *func, const char *file, int line, int exitcode, + int error, const char *fmt, ...) __printflike(6, 7) __dead2; + +void _pjdlog_abort(const char *func, const char *file, int line, int error, + const char *failedexpr, const char *fmt, ...) __printflike(6, 7) __dead2; + +#ifdef notyet +int pjdlog_receive(int sock); +#endif + +#define pjdlogv_common(loglevel, debuglevel, error, fmt, ap) \ + _pjdlogv_common(__func__, __FILE__, __LINE__, (loglevel), \ + (debuglevel), (error), (fmt), (ap)) +#define pjdlog_common(loglevel, debuglevel, error, ...) \ + _pjdlog_common(__func__, __FILE__, __LINE__, (loglevel), \ + (debuglevel), (error), __VA_ARGS__) + +#define pjdlogv(loglevel, fmt, ap) \ + pjdlogv_common((loglevel), 0, -1, (fmt), (ap)) +#define pjdlog(loglevel, ...) \ + pjdlog_common((loglevel), 0, -1, __VA_ARGS__) + +#define pjdlogv_emergency(fmt, ap) pjdlogv(LOG_EMERG, (fmt), (ap)) +#define pjdlog_emergency(...) pjdlog(LOG_EMERG, __VA_ARGS__) +#define pjdlogv_alert(fmt, ap) pjdlogv(LOG_ALERT, (fmt), (ap)) +#define pjdlog_alert(...) pjdlog(LOG_ALERT, __VA_ARGS__) +#define pjdlogv_critical(fmt, ap) pjdlogv(LOG_CRIT, (fmt), (ap)) +#define pjdlog_critical(...) pjdlog(LOG_CRIT, __VA_ARGS__) +#define pjdlogv_error(fmt, ap) pjdlogv(LOG_ERR, (fmt), (ap)) +#define pjdlog_error(...) pjdlog(LOG_ERR, __VA_ARGS__) +#define pjdlogv_warning(fmt, ap) pjdlogv(LOG_WARNING, (fmt), (ap)) +#define pjdlog_warning(...) pjdlog(LOG_WARNING, __VA_ARGS__) +#define pjdlogv_notice(fmt, ap) pjdlogv(LOG_NOTICE, (fmt), (ap)) +#define pjdlog_notice(...) pjdlog(LOG_NOTICE, __VA_ARGS__) +#define pjdlogv_info(fmt, ap) pjdlogv(LOG_INFO, (fmt), (ap)) +#define pjdlog_info(...) pjdlog(LOG_INFO, __VA_ARGS__) + +#define pjdlog_debug(debuglevel, ...) \ + pjdlog_common(LOG_DEBUG, (debuglevel), -1, __VA_ARGS__) +#define pjdlogv_debug(debuglevel, fmt, ap) \ + pjdlogv_common(LOG_DEBUG, (debuglevel), -1, (fmt), (ap)) + +#define pjdlog_errno(loglevel, ...) \ + pjdlog_common((loglevel), 0, (errno), __VA_ARGS__) +#define pjdlogv_errno(loglevel, fmt, ap) \ + pjdlogv_common((loglevel), 0, (errno), (fmt), (ap)) + +#define pjdlogv_exit(exitcode, fmt, ap) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 09:52:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11FD7AE1; Sun, 1 Dec 2013 09:52:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D95B71B73; Sun, 1 Dec 2013 09:52:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB19qcAc075502; Sun, 1 Dec 2013 09:52:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB19qcU2075501; Sun, 1 Dec 2013 09:52:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312010952.rB19qcU2075501@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 1 Dec 2013 09:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258792 - head/sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 09:52:39 -0000 Author: pjd Date: Sun Dec 1 09:52:38 2013 New Revision: 258792 URL: http://svnweb.freebsd.org/changeset/base/258792 Log: Remove trailing backslash. Modified: head/sbin/Makefile Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Sun Dec 1 09:41:06 2013 (r258791) +++ head/sbin/Makefile Sun Dec 1 09:52:38 2013 (r258792) @@ -72,7 +72,7 @@ SUBDIR=adjkerntz \ swapon \ sysctl \ tunefs \ - umount \ + umount .if ${MK_ATM} != "no" SUBDIR+= atm From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 11:59:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB78DC20; Sun, 1 Dec 2013 11:59:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AEF62109B; Sun, 1 Dec 2013 11:59: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 rB1BxbTh016678; Sun, 1 Dec 2013 11:59:37 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1Bxbhw016677; Sun, 1 Dec 2013 11:59:37 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201312011159.rB1Bxbhw016677@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 1 Dec 2013 11:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258793 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 11:59:37 -0000 Author: jilles Date: Sun Dec 1 11:59:37 2013 New Revision: 258793 URL: http://svnweb.freebsd.org/changeset/base/258793 Log: waitid(2): Do not tell userland programmers to include . Userland should get these definitions by including . Modified: head/lib/libc/sys/wait.2 Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Sun Dec 1 09:52:38 2013 (r258792) +++ head/lib/libc/sys/wait.2 Sun Dec 1 11:59:37 2013 (r258793) @@ -48,7 +48,7 @@ .Fn wait "int *status" .Ft pid_t .Fn waitpid "pid_t wpid" "int *status" "int options" -.In sys/signal.h +.In signal.h .Ft int .Fn waitid "idtype_t idtype" "id_t id" "siginfo_t *info" "int options" .In sys/time.h From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 12:24:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD1D5C2; Sun, 1 Dec 2013 12:24:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C73B711B3; Sun, 1 Dec 2013 12:24: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 rB1COvis026529; Sun, 1 Dec 2013 12:24:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1COvsR026528; Sun, 1 Dec 2013 12:24:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201312011224.rB1COvsR026528@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 1 Dec 2013 12:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258794 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 12:24:57 -0000 Author: jilles Date: Sun Dec 1 12:24:57 2013 New Revision: 258794 URL: http://svnweb.freebsd.org/changeset/base/258794 Log: chmod(2): Document S_ISVTX following SUSv3/SUSv4. S_ISTXT is non-standard. While here, also update fchmodat() standards entry to POSIX.1-2008. Modified: head/lib/libc/sys/chmod.2 Modified: head/lib/libc/sys/chmod.2 ============================================================================== --- head/lib/libc/sys/chmod.2 Sun Dec 1 11:59:37 2013 (r258793) +++ head/lib/libc/sys/chmod.2 Sun Dec 1 12:24:57 2013 (r258794) @@ -28,7 +28,7 @@ .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd December 1, 2013 .Dt CHMOD 2 .Os .Sh NAME @@ -139,21 +139,24 @@ defined in #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ -#ifndef __BSD_VISIBLE -#define S_ISTXT 0001000 /* sticky bit */ -#endif +#define S_ISVTX 0001000 /* sticky bit */ .Ed .Pp +The non-standard +.Dv S_ISTXT +is a synonym for +.Dv S_ISVTX . +.Pp The .Fx VM system totally ignores the sticky bit -.Pq Dv ISTXT +.Pq Dv S_ISVTX for executables. On UFS-based file systems (FFS, LFS) the sticky bit may only be set upon directories. .Pp If mode -.Dv ISTXT +.Dv S_ISVTX (the `sticky bit') is set on a directory, an unprivileged user may not delete or rename files of other users in that directory. @@ -296,12 +299,15 @@ The system call is expected to conform to .St -p1003.1-90 , except for the return of -.Er EFTYPE -and the use of -.Dv S_ISTXT . +.Er EFTYPE . +The +.Dv S_ISVTX +bit on directories is expected to conform to +.St -susv3 . The .Fn fchmodat -system call follows The Open Group Extended API Set 2 specification. +system call is expected to conform to +.St -p1003.1-2008 . .Sh HISTORY The .Fn chmod From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 12:28:25 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 780BB358; Sun, 1 Dec 2013 12:28:25 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4498311DB; Sun, 1 Dec 2013 12:28:24 +0000 (UTC) Received: from [192.168.0.89] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginm.net [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id rB1CSJlP020665 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 1 Dec 2013 12:28:21 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: svn commit: r258779 - in head/sys/dev: cesa drm drm2/i915 drm2/radeon hatm From: David Chisnall In-Reply-To: <20131201075944.GF59496@kib.kiev.ua> Date: Sun, 1 Dec 2013 12:28:14 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201311302216.rAUMGcPA037268@svn.freebsd.org> <20131201075944.GF59496@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1822) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Eitan Adler X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 12:28:25 -0000 On 1 Dec 2013, at 07:59, Konstantin Belousov = wrote: > Revert the drm2/i915 changes from this and following commits now. > You did not contacted obvious maintainer of the file. >=20 > The changes are pointless and make the import of upstream changes > harder; for i915_reg.h, much harder. >=20 > Not to mention that the whole churn is not needed if the > -fno-strict-overflow flag is used. If supporting code that is obviously wrong (as in this case, as the = compiler will happily tell you if you don't explicitly silence warnings) = is the justification for wanting -fno-strict-overflow, then this is a = very flimsy justification. David From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 15:06:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86FF8708; Sun, 1 Dec 2013 15:06:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73740190B; Sun, 1 Dec 2013 15:06:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1F6VW0081132; Sun, 1 Dec 2013 15:06:31 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1F6VlX081131; Sun, 1 Dec 2013 15:06:31 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201312011506.rB1F6VlX081131@svn.freebsd.org> From: Hiroki Sato Date: Sun, 1 Dec 2013 15:06:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258796 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 15:06:31 -0000 Author: hrs Date: Sun Dec 1 15:06:30 2013 New Revision: 258796 URL: http://svnweb.freebsd.org/changeset/base/258796 Log: - Prevent TARGET and TARGET_ARCH from being defined as empty when TARGET="" and/or TARGET_ARCH="" is specified. - Remove extra (). Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Sun Dec 1 14:03:03 2013 (r258795) +++ head/release/Makefile Sun Dec 1 15:06:30 2013 (r258796) @@ -29,11 +29,15 @@ PORTSDIR?= /usr/ports DOCDIR?= /usr/doc RELNOTES_LANG?= en_US.ISO8859-1 -TARGET?= ${MACHINE} +.if !defined(TARGET) || empty(TARGET) +TARGET= ${MACHINE} +.endif +.if !defined(TARGET_ARCH) || empty(TARGET_ARCH) .if ${TARGET} == ${MACHINE} -TARGET_ARCH?= ${MACHINE_ARCH} +TARGET_ARCH= ${MACHINE_ARCH} .else -TARGET_ARCH?= ${TARGET} +TARGET_ARCH= ${TARGET} +.endif .endif IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} DISTDIR= dist @@ -75,7 +79,7 @@ IMAGES= .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) RELEASE_TARGETS+= cdrom IMAGES+= disc1.iso bootonly.iso -. if(!defined(NODVD)) +. if !defined(NODVD) RELEASE_TARGETS+= dvdrom IMAGES+= dvd1.iso . endif From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 15:24:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B478FE7A; Sun, 1 Dec 2013 15:24:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A134B19E4; Sun, 1 Dec 2013 15:24: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 rB1FOZgo088129; Sun, 1 Dec 2013 15:24:35 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1FOZcF088128; Sun, 1 Dec 2013 15:24:35 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201312011524.rB1FOZcF088128@svn.freebsd.org> From: Hiroki Sato Date: Sun, 1 Dec 2013 15:24:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258797 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 15:24:35 -0000 Author: hrs Date: Sun Dec 1 15:24:35 2013 New Revision: 258797 URL: http://svnweb.freebsd.org/changeset/base/258797 Log: Use standard CLEANFILES/CLEANDIRS and clean target in bsd.obj.mk. Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Sun Dec 1 15:06:30 2013 (r258796) +++ head/release/Makefile Sun Dec 1 15:24:35 2013 (r258797) @@ -91,7 +91,12 @@ IMAGES+= memstick.img IMAGES+= mini-memstick.img .endif +CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} +CLEANDIRS= dist ftp release bootonly dvd +beforeclean: + chflags -R noschg . .include +clean: beforeclean base.txz: mkdir -p ${DISTDIR} @@ -233,15 +238,6 @@ release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -clean: - chflags -R noschg . - rm -rf dist ftp - rm -f packagesystem - rm -f *.txz MANIFEST - rm -f system - rm -rf release bootonly dvd - rm -f ${IMAGES} - install: .if defined(DESTDIR) && !empty(DESTDIR) mkdir -p ${DESTDIR} From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 16:02:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A51F6633; Sun, 1 Dec 2013 16:02:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 857381B33; Sun, 1 Dec 2013 16:02:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1G2NRi001480; Sun, 1 Dec 2013 16:02:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1G2Nap001475; Sun, 1 Dec 2013 16:02:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312011602.rB1G2Nap001475@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 1 Dec 2013 16:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258798 - in head/sys: conf dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 16:02:23 -0000 Author: nwhitehorn Date: Sun Dec 1 16:02:22 2013 New Revision: 258798 URL: http://svnweb.freebsd.org/changeset/base/258798 Log: Make uart_cpu_powerpc work on both FDT and OFW systems. This is the last remaining modification required to build kernels that work with both on PowerPC. Modified: head/sys/conf/files.powerpc head/sys/dev/uart/uart_cpu_powerpc.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Dec 1 15:24:35 2013 (r258797) +++ head/sys/conf/files.powerpc Sun Dec 1 16:02:22 2013 (r258798) @@ -63,8 +63,7 @@ dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc dev/tsec/if_tsec.c optional tsec dev/tsec/if_tsec_fdt.c optional tsec fdt -dev/uart/uart_cpu_fdt.c optional uart fdt -dev/uart/uart_cpu_powerpc.c optional uart aim +dev/uart/uart_cpu_powerpc.c optional uart dev/usb/controller/ehci_fsl.c optional ehci mpc85xx kern/kern_clocksource.c standard kern/subr_dummy_vdso_tc.c standard Modified: head/sys/dev/uart/uart_cpu_powerpc.c ============================================================================== --- head/sys/dev/uart/uart_cpu_powerpc.c Sun Dec 1 15:24:35 2013 (r258797) +++ head/sys/dev/uart/uart_cpu_powerpc.c Sun Dec 1 16:02:22 2013 (r258798) @@ -61,42 +61,96 @@ ofw_get_uart_console(phandle_t opts, pha input = OF_finddevice(buf); if (input == -1) return (ENXIO); - if (OF_getprop(opts, outputdev, buf, sizeof(buf)) == -1) - return (ENXIO); - if (OF_finddevice(buf) != input) - return (ENXIO); + + if (outputdev != NULL) { + if (OF_getprop(opts, outputdev, buf, sizeof(buf)) == -1) + return (ENXIO); + if (OF_finddevice(buf) != input) + return (ENXIO); + } *result = input; return (0); } +static int +ofw_get_console_phandle_path(phandle_t node, phandle_t *result, + const char *prop) +{ + union { + char buf[64]; + phandle_t ref; + } field; + phandle_t output; + ssize_t size; + + size = OF_getproplen(node, prop); + if (size == -1) + return (ENXIO); + OF_getprop(node, prop, &field, sizeof(field)); + + /* This property might be a phandle or might be a path. Hooray. */ + + output = -1; + if (field.buf[size - 1] == 0) + output = OF_finddevice(field.buf); + if (output == -1 && size == 4) + output = OF_xref_phandle(field.ref); + + if (output != -1) { + *result = output; + return (0); + } + + return (ENXIO); +} + int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { char buf[64]; struct uart_class *class; - phandle_t input, opts; + phandle_t input, opts, chosen; int error; class = &uart_z8530_class; if (class == NULL) return (ENXIO); - if ((opts = OF_finddevice("/options")) == -1) - return (ENXIO); + opts = OF_finddevice("/options"); + chosen = OF_finddevice("/chosen"); switch (devtype) { case UART_DEV_CONSOLE: - if (ofw_get_uart_console(opts, &input, "input-device", - "output-device")) { - /* - * At least some G5 Xserves require that we - * probe input-device-1 as well - */ - - if (ofw_get_uart_console(opts, &input, "input-device-1", - "output-device-1")) - return (ENXIO); + error = ENXIO; + if (chosen != -1 && error != 0) + error = ofw_get_uart_console(chosen, &input, + "stdout-path", NULL); + if (chosen != -1 && error != 0) + error = ofw_get_uart_console(chosen, &input, + "linux,stdout-path", NULL); + if (chosen != -1 && error != 0) + error = ofw_get_console_phandle_path(chosen, &input, + "stdout"); + if (chosen != -1 && error != 0) + error = ofw_get_uart_console(chosen, &input, + "stdin-path", NULL); + if (chosen != -1 && error != 0) + error = ofw_get_console_phandle_path(chosen, &input, + "stdin"); + if (opts != -1 && error != 0) + error = ofw_get_uart_console(opts, &input, + "input-device", "output-device"); + if (opts != -1 && error != 0) + error = ofw_get_uart_console(opts, &input, + "input-device-1", "output-device-1"); + if (error != 0) { + input = OF_finddevice("serial0"); /* Last ditch */ + if (input == -1) + error = (ENXIO); } + + if (error != 0) + return (error); break; case UART_DEV_DBGPORT: if (!getenv_string("hw.uart.dbgport", buf, sizeof(buf))) @@ -113,14 +167,14 @@ uart_cpu_getdev(int devtype, struct uart return (ENXIO); if (strcmp(buf, "serial") != 0) return (ENXIO); - if (OF_getprop(input, "name", buf, sizeof(buf)) == -1) + if (OF_getprop(input, "compatible", buf, sizeof(buf)) == -1) return (ENXIO); - if (strcmp(buf, "ch-a") == 0) { + if (strncmp(buf, "chrp,es", 7) == 0) { class = &uart_z8530_class; di->bas.regshft = 4; di->bas.chan = 1; - } else if (strcmp(buf,"serial") == 0) { + } else if (strcmp(buf,"ns16550") == 0 || strcmp(buf,"ns8250") == 0) { class = &uart_ns8250_class; di->bas.regshft = 0; di->bas.chan = 0; @@ -139,9 +193,12 @@ uart_cpu_getdev(int devtype, struct uart if (OF_getprop(input, "current-speed", &di->baudrate, sizeof(di->baudrate)) == -1) di->baudrate = 0; + OF_getprop(input, "reg-shift", &di->bas.regshft, + sizeof(di->bas.regshft)); di->databits = 8; di->stopbits = 1; di->parity = UART_PARITY_NONE; return (0); } + From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 17:00:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B37CF953; Sun, 1 Dec 2013 17:00:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 931D21003; Sun, 1 Dec 2013 17:00: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 rB1H0vxG022031; Sun, 1 Dec 2013 17:00:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1H0vck022030; Sun, 1 Dec 2013 17:00:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201312011700.rB1H0vck022030@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 1 Dec 2013 17:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258799 - head/bin/test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 17:00:57 -0000 Author: jilles Date: Sun Dec 1 17:00:57 2013 New Revision: 258799 URL: http://svnweb.freebsd.org/changeset/base/258799 Log: test: Simplify the code by unifying op_num and op_type. The global variable t_wp_op is no longer needed. Modified: head/bin/test/test.c Modified: head/bin/test/test.c ============================================================================== --- head/bin/test/test.c Sun Dec 1 16:02:22 2013 (r258798) +++ head/bin/test/test.c Sun Dec 1 17:00:57 2013 (r258799) @@ -67,9 +67,18 @@ error(const char *msg, ...) operand ::= */ +enum token_types { + UNOP = 0x100, + BINOP = 0x200, + BUNOP = 0x300, + BBINOP = 0x400, + PAREN = 0x500 +}; + enum token { EOI, - FILRD, + OPERAND, + FILRD = UNOP + 1, FILWR, FILEX, FILEXIST, @@ -85,13 +94,13 @@ enum token { FILSUID, FILSGID, FILSTCK, - FILNT, - FILOT, - FILEQ, - FILUID, - FILGID, STREZ, STRNZ, + FILUID, + FILGID, + FILNT = BINOP + 1, + FILOT, + FILEQ, STREQ, STRNE, STRLT, @@ -102,70 +111,62 @@ enum token { INTGT, INTLE, INTLT, - UNOT, - BAND, + UNOT = BUNOP + 1, + BAND = BBINOP + 1, BOR, - LPAREN, - RPAREN, - OPERAND + LPAREN = PAREN + 1, + RPAREN }; -enum token_types { - UNOP, - BINOP, - BUNOP, - BBINOP, - PAREN -}; +#define TOKEN_TYPE(token) ((token) & 0xff00) static struct t_op { char op_text[4]; - short op_num, op_type; + short op_num; } const ops [] = { - {"-r", FILRD, UNOP}, - {"-w", FILWR, UNOP}, - {"-x", FILEX, UNOP}, - {"-e", FILEXIST,UNOP}, - {"-f", FILREG, UNOP}, - {"-d", FILDIR, UNOP}, - {"-c", FILCDEV,UNOP}, - {"-b", FILBDEV,UNOP}, - {"-p", FILFIFO,UNOP}, - {"-u", FILSUID,UNOP}, - {"-g", FILSGID,UNOP}, - {"-k", FILSTCK,UNOP}, - {"-s", FILGZ, UNOP}, - {"-t", FILTT, UNOP}, - {"-z", STREZ, UNOP}, - {"-n", STRNZ, UNOP}, - {"-h", FILSYM, UNOP}, /* for backwards compat */ - {"-O", FILUID, UNOP}, - {"-G", FILGID, UNOP}, - {"-L", FILSYM, UNOP}, - {"-S", FILSOCK,UNOP}, - {"=", STREQ, BINOP}, - {"==", STREQ, BINOP}, - {"!=", STRNE, BINOP}, - {"<", STRLT, BINOP}, - {">", STRGT, BINOP}, - {"-eq", INTEQ, BINOP}, - {"-ne", INTNE, BINOP}, - {"-ge", INTGE, BINOP}, - {"-gt", INTGT, BINOP}, - {"-le", INTLE, BINOP}, - {"-lt", INTLT, BINOP}, - {"-nt", FILNT, BINOP}, - {"-ot", FILOT, BINOP}, - {"-ef", FILEQ, BINOP}, - {"!", UNOT, BUNOP}, - {"-a", BAND, BBINOP}, - {"-o", BOR, BBINOP}, - {"(", LPAREN, PAREN}, - {")", RPAREN, PAREN}, - {"", 0, 0} + {"-r", FILRD}, + {"-w", FILWR}, + {"-x", FILEX}, + {"-e", FILEXIST}, + {"-f", FILREG}, + {"-d", FILDIR}, + {"-c", FILCDEV}, + {"-b", FILBDEV}, + {"-p", FILFIFO}, + {"-u", FILSUID}, + {"-g", FILSGID}, + {"-k", FILSTCK}, + {"-s", FILGZ}, + {"-t", FILTT}, + {"-z", STREZ}, + {"-n", STRNZ}, + {"-h", FILSYM}, /* for backwards compat */ + {"-O", FILUID}, + {"-G", FILGID}, + {"-L", FILSYM}, + {"-S", FILSOCK}, + {"=", STREQ}, + {"==", STREQ}, + {"!=", STRNE}, + {"<", STRLT}, + {">", STRGT}, + {"-eq", INTEQ}, + {"-ne", INTNE}, + {"-ge", INTGE}, + {"-gt", INTGT}, + {"-le", INTLE}, + {"-lt", INTLT}, + {"-nt", FILNT}, + {"-ot", FILOT}, + {"-ef", FILEQ}, + {"!", UNOT}, + {"-a", BAND}, + {"-o", BOR}, + {"(", LPAREN}, + {")", RPAREN}, + {"", 0} }; -static struct t_op const *t_wp_op; static int nargc; static char **t_wp; static int parenlevel; @@ -295,10 +296,10 @@ primary(enum token n) parenlevel--; return res; } - if (t_wp_op && t_wp_op->op_type == UNOP) { + if (TOKEN_TYPE(n) == UNOP) { /* unary expression */ if (--nargc == 0) - syntax(t_wp_op->op_text, "argument expected"); + syntax(NULL, "argument expected"); /* impossible */ switch (n) { case STREZ: return strlen(*++t_wp) == 0; @@ -311,10 +312,8 @@ primary(enum token n) } } - if (t_lex(nargc > 0 ? t_wp[1] : NULL), t_wp_op && t_wp_op->op_type == - BINOP) { + if (TOKEN_TYPE(t_lex(nargc > 0 ? t_wp[1] : NULL)) == BINOP) return binop(); - } return strlen(*t_wp) > 0; } @@ -322,17 +321,17 @@ primary(enum token n) static int binop(void) { - const char *opnd1, *opnd2; - struct t_op const *op; + const char *opnd1, *op, *opnd2; + enum token n; opnd1 = *t_wp; - (void) t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL); - op = t_wp_op; + op = nargc > 0 ? t_wp[1] : NULL; + n = t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL); if ((opnd2 = nargc > 0 ? (--nargc, *++t_wp) : NULL) == NULL) - syntax(op->op_text, "argument expected"); + syntax(op, "argument expected"); - switch (op->op_num) { + switch (n) { case STREQ: return strcmp(opnd1, opnd2) == 0; case STRNE: @@ -424,22 +423,20 @@ t_lex(char *s) struct t_op const *op = ops; if (s == 0) { - t_wp_op = NULL; return EOI; } while (*op->op_text) { if (strcmp(s, op->op_text) == 0) { - if (((op->op_type == UNOP || op->op_type == BUNOP) + if (((TOKEN_TYPE(op->op_num) == UNOP || + TOKEN_TYPE(op->op_num) == BUNOP) && isunopoperand()) || (op->op_num == LPAREN && islparenoperand()) || (op->op_num == RPAREN && isrparenoperand())) break; - t_wp_op = op; return op->op_num; } op++; } - t_wp_op = NULL; return OPERAND; } @@ -458,7 +455,7 @@ isunopoperand(void) t = *(t_wp + 2); while (*op->op_text) { if (strcmp(s, op->op_text) == 0) - return op->op_type == BINOP && + return TOKEN_TYPE(op->op_num) == BINOP && (parenlevel == 0 || t[0] != ')' || t[1] != '\0'); op++; } @@ -480,7 +477,7 @@ islparenoperand(void) return 0; while (*op->op_text) { if (strcmp(s, op->op_text) == 0) - return op->op_type == BINOP; + return TOKEN_TYPE(op->op_num) == BINOP; op++; } return 0; From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 17:28:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC5DDEC7; Sun, 1 Dec 2013 17:28:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A840810F7; Sun, 1 Dec 2013 17:28: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 rB1HSTXn029819; Sun, 1 Dec 2013 17:28:29 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1HSTUb029817; Sun, 1 Dec 2013 17:28:29 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312011728.rB1HSTUb029817@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 1 Dec 2013 17:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258800 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 17:28:29 -0000 Author: nwhitehorn Date: Sun Dec 1 17:28:28 2013 New Revision: 258800 URL: http://svnweb.freebsd.org/changeset/base/258800 Log: The kernel stack guard pages are only below the stack pointer, not above. Prevent erroneous detection of stack overflows on legitimate faults on the page after this thread's stack. MFC after: 3 days Modified: head/sys/powerpc/aim/trap_subr32.S head/sys/powerpc/aim/trap_subr64.S Modified: head/sys/powerpc/aim/trap_subr32.S ============================================================================== --- head/sys/powerpc/aim/trap_subr32.S Sun Dec 1 17:00:57 2013 (r258799) +++ head/sys/powerpc/aim/trap_subr32.S Sun Dec 1 17:28:28 2013 (r258800) @@ -664,11 +664,12 @@ disitrap: stw %r31,(PC_TEMPSAVE+CPUSAVE_AIM_DSISR)(%r1) #ifdef KDB - /* Try and detect a kernel stack overflow */ + /* Try to detect a kernel stack overflow */ mfsrr1 %r31 mtcr %r31 bt 17,realtrap /* branch is user mode */ mfsprg1 %r31 /* get old SP */ + clrrwi %r31,%r31,11 /* Round SP down to nearest page */ sub. %r30,%r31,%r30 /* SP - DAR */ bge 1f neg %r30,%r30 /* modulo value */ Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Sun Dec 1 17:00:57 2013 (r258799) +++ head/sys/powerpc/aim/trap_subr64.S Sun Dec 1 17:28:28 2013 (r258800) @@ -569,11 +569,12 @@ disitrap: std %r31,(PC_TEMPSAVE+CPUSAVE_AIM_DSISR)(%r1) #ifdef KDB - /* Try and detect a kernel stack overflow */ + /* Try to detect a kernel stack overflow */ mfsrr1 %r31 mtcr %r31 bt 17,realtrap /* branch is user mode */ mfsprg1 %r31 /* get old SP */ + clrrdi %r31,%r31,11 /* Round SP down to nearest page */ sub. %r30,%r31,%r30 /* SP - DAR */ bge 1f neg %r30,%r30 /* modulo value */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 17:29:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2E71122; Sun, 1 Dec 2013 17:29:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8F4EF1109; Sun, 1 Dec 2013 17:29:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1HT7QE030000; Sun, 1 Dec 2013 17:29:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1HT7DE029999; Sun, 1 Dec 2013 17:29:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312011729.rB1HT7DE029999@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 1 Dec 2013 17:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258802 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 17:29:07 -0000 Author: nwhitehorn Date: Sun Dec 1 17:29:07 2013 New Revision: 258802 URL: http://svnweb.freebsd.org/changeset/base/258802 Log: Remove unnecessary double-setting of the thread's onfault state in copyinstr(). Modified: head/sys/powerpc/powerpc/copyinout.c Modified: head/sys/powerpc/powerpc/copyinout.c ============================================================================== --- head/sys/powerpc/powerpc/copyinout.c Sun Dec 1 17:29:00 2013 (r258801) +++ head/sys/powerpc/powerpc/copyinout.c Sun Dec 1 17:29:07 2013 (r258802) @@ -250,22 +250,11 @@ copyin(const void *udaddr, void *kaddr, int copyinstr(const void *udaddr, void *kaddr, size_t len, size_t *done) { - struct thread *td; - pmap_t pm; - faultbuf env; const char *up; char *kp; size_t l; int rv, c; - td = curthread; - pm = &td->td_proc->p_vmspace->vm_pmap; - - if (setfault(env)) { - td->td_pcb->pcb_onfault = NULL; - return (EFAULT); - } - kp = kaddr; up = udaddr; @@ -288,7 +277,6 @@ copyinstr(const void *udaddr, void *kadd *done = l; } - td->td_pcb->pcb_onfault = NULL; return (rv); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 19:03:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DDB7E74; Sun, 1 Dec 2013 19:03:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE19E15B0; Sun, 1 Dec 2013 19:03:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1J3KUP065364; Sun, 1 Dec 2013 19:03:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1J3KdX065363; Sun, 1 Dec 2013 19:03:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312011903.rB1J3KdX065363@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 1 Dec 2013 19:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258805 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 19:03:21 -0000 Author: nwhitehorn Date: Sun Dec 1 19:03:20 2013 New Revision: 258805 URL: http://svnweb.freebsd.org/changeset/base/258805 Log: Open Firmware mandates that certain cross-references, in particular those in /chosen, be ihandles. The ePAPR spec makes those cross-reference phandles, since FDT has no concept of ihandles. Have the OF FDT CI module interpret queries about ihandles as cross-reference phandles. Modified: head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Sun Dec 1 18:37:31 2013 (r258804) +++ head/sys/dev/ofw/ofw_fdt.c Sun Dec 1 19:03:20 2013 (r258805) @@ -207,7 +207,8 @@ static phandle_t ofw_fdt_instance_to_package(ofw_t ofw, ihandle_t instance) { - return (-1); + /* Where real OF uses ihandles in the tree, FDT uses xref phandles */ + return (OF_xref_phandle(instance)); } /* Get the length of a property of a package. */ @@ -350,8 +351,13 @@ ofw_fdt_finddevice(ofw_t ofw, const char static ssize_t ofw_fdt_instance_to_path(ofw_t ofw, ihandle_t instance, char *buf, size_t len) { + phandle_t phandle; - return (-1); + phandle = OF_instance_to_package(instance); + if (phandle == -1) + return (-1); + + return (OF_package_to_path(phandle, buf, len)); } /* Return the fully qualified pathname corresponding to a package. */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 19:05:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D55FFCA; Sun, 1 Dec 2013 19:05:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A2D015C1; Sun, 1 Dec 2013 19:05:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1J5X7g065739; Sun, 1 Dec 2013 19:05:33 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1J5XwN065738; Sun, 1 Dec 2013 19:05:33 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312011905.rB1J5XwN065738@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 1 Dec 2013 19:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258806 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 19:05:33 -0000 Author: nwhitehorn Date: Sun Dec 1 19:05:32 2013 New Revision: 258806 URL: http://svnweb.freebsd.org/changeset/base/258806 Log: Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use the right type. Modified: head/sys/dev/uart/uart_cpu_powerpc.c Modified: head/sys/dev/uart/uart_cpu_powerpc.c ============================================================================== --- head/sys/dev/uart/uart_cpu_powerpc.c Sun Dec 1 19:03:20 2013 (r258805) +++ head/sys/dev/uart/uart_cpu_powerpc.c Sun Dec 1 19:05:32 2013 (r258806) @@ -89,13 +89,13 @@ ofw_get_console_phandle_path(phandle_t n return (ENXIO); OF_getprop(node, prop, &field, sizeof(field)); - /* This property might be a phandle or might be a path. Hooray. */ + /* This property might be either a ihandle or path. Hooray. */ output = -1; if (field.buf[size - 1] == 0) output = OF_finddevice(field.buf); if (output == -1 && size == 4) - output = OF_xref_phandle(field.ref); + output = OF_instance_to_package(field.ref); if (output != -1) { *result = output; From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 19:43:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B2EA441; Sun, 1 Dec 2013 19:43:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 353B9175B; Sun, 1 Dec 2013 19:43: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 rB1JhIp1078696; Sun, 1 Dec 2013 19:43:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1JhGAv078680; Sun, 1 Dec 2013 19:43:16 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312011943.rB1JhGAv078680@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 1 Dec 2013 19:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258807 - in head/sys/powerpc: booke include mpc85xx ofw powermac powerpc ps3 pseries wii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 19:43:18 -0000 Author: nwhitehorn Date: Sun Dec 1 19:43:15 2013 New Revision: 258807 URL: http://svnweb.freebsd.org/changeset/base/258807 Log: Rearchitect platform memory map parsing to make it less Open Firmware-centric: - Keep the static list of regions in platform.c instead of ofw_machdep.c - Move various merging and sorting operations to platform.c as well - Move apple_hacks code out of ofw_machdep.c and into platform_powermac.c, where it belongs - Move CHRP-specific dynamic-reconfiguration memory parsing into platform_chrp.c instead of pretending it is shared code Modified: head/sys/powerpc/booke/platform_bare.c head/sys/powerpc/include/ofw_machdep.h head/sys/powerpc/mpc85xx/platform_mpc85xx.c head/sys/powerpc/ofw/ofw_machdep.c head/sys/powerpc/powermac/platform_powermac.c head/sys/powerpc/powerpc/platform.c head/sys/powerpc/powerpc/platform_if.m head/sys/powerpc/ps3/platform_ps3.c head/sys/powerpc/pseries/platform_chrp.c head/sys/powerpc/wii/platform_wii.c Modified: head/sys/powerpc/booke/platform_bare.c ============================================================================== --- head/sys/powerpc/booke/platform_bare.c Sun Dec 1 19:05:32 2013 (r258806) +++ head/sys/powerpc/booke/platform_bare.c Sun Dec 1 19:43:15 2013 (r258807) @@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$"); extern uint32_t *bootinfo; static int bare_probe(platform_t); -static void bare_mem_regions(platform_t, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz); +static void bare_mem_regions(platform_t, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz); static u_long bare_timebase_freq(platform_t, struct cpuref *cpuref); static void bare_reset(platform_t); @@ -80,8 +80,8 @@ bare_probe(platform_t plat) } void -bare_mem_regions(platform_t plat, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz) +bare_mem_regions(platform_t plat, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz) { ofw_mem_regions(phys, physsz, avail, availsz); Modified: head/sys/powerpc/include/ofw_machdep.h ============================================================================== --- head/sys/powerpc/include/ofw_machdep.h Sun Dec 1 19:05:32 2013 (r258806) +++ head/sys/powerpc/include/ofw_machdep.h Sun Dec 1 19:43:15 2013 (r258807) @@ -45,7 +45,7 @@ boolean_t OF_bootstrap(void); void OF_reboot(void); -void ofw_mem_regions(struct mem_region **, int *, struct mem_region **, int *); +void ofw_mem_regions(struct mem_region *, int *, struct mem_region *, int *); void ofw_quiesce(void); /* Must be called before VM is up! */ void ofw_save_trap_vec(char *); Modified: head/sys/powerpc/mpc85xx/platform_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/platform_mpc85xx.c Sun Dec 1 19:05:32 2013 (r258806) +++ head/sys/powerpc/mpc85xx/platform_mpc85xx.c Sun Dec 1 19:43:15 2013 (r258807) @@ -72,8 +72,8 @@ static int cpu, maxcpu; static int mpc85xx_probe(platform_t); static int mpc85xx_attach(platform_t); -static void mpc85xx_mem_regions(platform_t, struct mem_region **phys, - int *physsz, struct mem_region **avail, int *availsz); +static void mpc85xx_mem_regions(platform_t, struct mem_region *phys, + int *physsz, struct mem_region *avail, int *availsz); static u_long mpc85xx_timebase_freq(platform_t, struct cpuref *cpuref); static int mpc85xx_smp_first_cpu(platform_t, struct cpuref *cpuref); static int mpc85xx_smp_next_cpu(platform_t, struct cpuref *cpuref); @@ -201,8 +201,8 @@ mpc85xx_attach(platform_t plat) } void -mpc85xx_mem_regions(platform_t plat, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz) +mpc85xx_mem_regions(platform_t plat, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz) { ofw_mem_regions(phys, physsz, avail, availsz); Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Sun Dec 1 19:05:32 2013 (r258806) +++ head/sys/powerpc/ofw/ofw_machdep.c Sun Dec 1 19:43:15 2013 (r258807) @@ -61,11 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include -static struct mem_region OFmem[PHYS_AVAIL_SZ], OFavail[PHYS_AVAIL_SZ]; -static struct mem_region OFfree[PHYS_AVAIL_SZ]; - -static int apple_hacks; - #ifdef AIM extern register_t ofmsr[5]; extern void *openfirmware_entry; @@ -80,7 +75,7 @@ static int openfirmware(void *args); __inline void ofw_save_trap_vec(char *save_trap_vec) { - if (apple_hacks) + if (!ofw_real_mode) return; bcopy((void *)EXC_RST, save_trap_vec, EXC_LAST - EXC_RST); @@ -89,7 +84,7 @@ ofw_save_trap_vec(char *save_trap_vec) static __inline void ofw_restore_trap_vec(char *restore_trap_vec) { - if (apple_hacks) + if (!ofw_real_mode) return; bcopy(restore_trap_vec, (void *)EXC_RST, EXC_LAST - EXC_RST); @@ -104,7 +99,7 @@ register_t ofw_sprg0_save; static __inline void ofw_sprg_prepare(void) { - if (!apple_hacks) + if (ofw_real_mode) return; /* @@ -126,8 +121,10 @@ ofw_sprg_prepare(void) static __inline void ofw_sprg_restore(void) { - if (!apple_hacks) +#if 0 + if (ofw_real_mode) return; +#endif /* * Note that SPRG1-3 contents are irrelevant. They are scratch @@ -140,50 +137,6 @@ ofw_sprg_restore(void) } #endif -/* - * Memory region utilities: determine if two regions overlap, - * and merge two overlapping regions into one - */ -static int -memr_overlap(struct mem_region *r1, struct mem_region *r2) -{ - if ((r1->mr_start + r1->mr_size) < r2->mr_start || - (r2->mr_start + r2->mr_size) < r1->mr_start) - return (FALSE); - - return (TRUE); -} - -static void -memr_merge(struct mem_region *from, struct mem_region *to) -{ - vm_offset_t end; - end = ulmax(to->mr_start + to->mr_size, from->mr_start + from->mr_size); - to->mr_start = ulmin(from->mr_start, to->mr_start); - to->mr_size = end - to->mr_start; -} - -/* - * Quick sort callout for comparing memory regions. - */ -static int mr_cmp(const void *a, const void *b); - -static int -mr_cmp(const void *a, const void *b) -{ - const struct mem_region *regiona; - const struct mem_region *regionb; - - regiona = a; - regionb = b; - if (regiona->mr_start < regionb->mr_start) - return (-1); - else if (regiona->mr_start > regionb->mr_start) - return (1); - else - return (0); -} - static int parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output) { @@ -209,14 +162,6 @@ parse_ofw_memory(phandle_t node, const c size_cells = 1; /* - * On Apple hardware, address_cells is always 1 for "available", - * even when it is explicitly set to 2. All memory above 4 GB - * also needs to be added by hand to the available list. - */ - if (strcmp(prop, "available") == 0 && apple_hacks) - address_cells = 1; - - /* * Get memory. */ if (node == -1 || (sz = OF_getprop(node, prop, @@ -267,103 +212,9 @@ parse_ofw_memory(phandle_t node, const c } sz = j*sizeof(output[0]); - #ifdef __powerpc64__ - if (strcmp(prop, "available") == 0 && apple_hacks) { - /* Add in regions above 4 GB to the available list */ - struct mem_region himem[16]; - int hisz; - - hisz = parse_ofw_memory(node, "reg", himem); - for (i = 0; i < hisz/sizeof(himem[0]); i++) { - if (himem[i].mr_start > BUS_SPACE_MAXADDR_32BIT) { - output[j].mr_start = himem[i].mr_start; - output[j].mr_size = himem[i].mr_size; - j++; - } - } - sz = j*sizeof(output[0]); - } - #endif - return (sz); } -static int -parse_drconf_memory(int *msz, int *asz, struct mem_region *ofmem, - struct mem_region *ofavail) -{ - phandle_t phandle; - vm_offset_t base; - int i, idx, len, lasz, lmsz, res; - uint32_t lmb_size[2]; - unsigned long *dmem, flags; - - lmsz = *msz; - lasz = *asz; - - phandle = OF_finddevice("/ibm,dynamic-reconfiguration-memory"); - if (phandle == -1) - /* No drconf node, return. */ - return (0); - - res = OF_getprop(phandle, "ibm,lmb-size", lmb_size, sizeof(lmb_size)); - if (res == -1) - return (0); - printf("Logical Memory Block size: %d MB\n", lmb_size[1] >> 20); - - /* Parse the /ibm,dynamic-memory. - The first position gives the # of entries. The next two words - reflect the address of the memory block. The next four words are - the DRC index, reserved, list index and flags. - (see PAPR C.6.6.2 ibm,dynamic-reconfiguration-memory) - - #el Addr DRC-idx res list-idx flags - ------------------------------------------------- - | 4 | 8 | 4 | 4 | 4 | 4 |.... - ------------------------------------------------- - */ - - len = OF_getproplen(phandle, "ibm,dynamic-memory"); - if (len > 0) { - - /* We have to use a variable length array on the stack - since we have very limited stack space. - */ - cell_t arr[len/sizeof(cell_t)]; - - res = OF_getprop(phandle, "ibm,dynamic-memory", &arr, - sizeof(arr)); - if (res == -1) - return (0); - - /* Number of elements */ - idx = arr[0]; - - /* First address. */ - dmem = (void*)&arr[1]; - - for (i = 0; i < idx; i++) { - base = *dmem; - dmem += 2; - flags = *dmem; - /* Use region only if available and not reserved. */ - if ((flags & 0x8) && !(flags & 0x80)) { - ofmem[lmsz].mr_start = base; - ofmem[lmsz].mr_size = (vm_size_t)lmb_size[1]; - ofavail[lasz].mr_start = base; - ofavail[lasz].mr_size = (vm_size_t)lmb_size[1]; - lmsz++; - lasz++; - } - dmem++; - } - } - - *msz = lmsz; - *asz = lasz; - - return (1); -} /* * This is called during powerpc_init, before the system is really initialized. * It shall provide the total and the available regions of RAM. @@ -372,14 +223,12 @@ parse_drconf_memory(int *msz, int *asz, * to provide space for two additional entry beyond the terminating one. */ void -ofw_mem_regions(struct mem_region **memp, int *memsz, - struct mem_region **availp, int *availsz) +ofw_mem_regions(struct mem_region *memp, int *memsz, + struct mem_region *availp, int *availsz) { phandle_t phandle; - vm_offset_t maxphysaddr; - int asz, msz, fsz; - int i, j, res; - int still_merging; + int asz, msz; + int res; char name[31]; asz = msz = 0; @@ -394,72 +243,18 @@ ofw_mem_regions(struct mem_region **memp if (strncmp(name, "memory", sizeof(name)) != 0) continue; - res = parse_ofw_memory(phandle, "reg", &OFmem[msz]); + res = parse_ofw_memory(phandle, "reg", &memp[msz]); msz += res/sizeof(struct mem_region); if (OF_getproplen(phandle, "available") >= 0) res = parse_ofw_memory(phandle, "available", - &OFavail[asz]); + &availp[asz]); else - res = parse_ofw_memory(phandle, "reg", &OFavail[asz]); + res = parse_ofw_memory(phandle, "reg", &availp[asz]); asz += res/sizeof(struct mem_region); } - /* Check for memory in ibm,dynamic-reconfiguration-memory */ - parse_drconf_memory(&msz, &asz, OFmem, OFavail); - - qsort(OFmem, msz, sizeof(*OFmem), mr_cmp); - qsort(OFavail, asz, sizeof(*OFavail), mr_cmp); - - *memp = OFmem; *memsz = msz; - - /* - * On some firmwares (SLOF), some memory may be marked available that - * doesn't actually exist. This manifests as an extension of the last - * available segment past the end of physical memory, so truncate that - * one. - */ - maxphysaddr = 0; - for (i = 0; i < msz; i++) - if (OFmem[i].mr_start + OFmem[i].mr_size > maxphysaddr) - maxphysaddr = OFmem[i].mr_start + OFmem[i].mr_size; - - if (OFavail[asz - 1].mr_start + OFavail[asz - 1].mr_size > maxphysaddr) - OFavail[asz - 1].mr_size = maxphysaddr - - OFavail[asz - 1].mr_start; - - /* - * OFavail may have overlapping regions - collapse these - * and copy out remaining regions to OFfree - */ - do { - still_merging = FALSE; - for (i = 0; i < asz; i++) { - if (OFavail[i].mr_size == 0) - continue; - for (j = i+1; j < asz; j++) { - if (OFavail[j].mr_size == 0) - continue; - if (memr_overlap(&OFavail[j], &OFavail[i])) { - memr_merge(&OFavail[j], &OFavail[i]); - /* mark inactive */ - OFavail[j].mr_size = 0; - still_merging = TRUE; - } - } - } - } while (still_merging == TRUE); - - /* evict inactive ranges */ - for (i = 0, fsz = 0; i < asz; i++) { - if (OFavail[i].mr_size != 0) { - OFfree[fsz] = OFavail[i]; - fsz++; - } - } - - *availp = OFfree; - *availsz = fsz; + *availsz = asz; } #ifdef AIM @@ -509,9 +304,6 @@ OF_bootstrap() OF_init(fdt); } - /* Apple firmware has some bugs. Check for a "mac-io" alias. */ - apple_hacks = (OF_finddevice("mac-io") != -1) ? 1 : 0; - return (status); } Modified: head/sys/powerpc/powermac/platform_powermac.c ============================================================================== --- head/sys/powerpc/powermac/platform_powermac.c Sun Dec 1 19:05:32 2013 (r258806) +++ head/sys/powerpc/powermac/platform_powermac.c Sun Dec 1 19:43:15 2013 (r258807) @@ -57,8 +57,8 @@ extern void *ap_pcpu; static int powermac_probe(platform_t); static int powermac_attach(platform_t); -void powermac_mem_regions(platform_t, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz); +void powermac_mem_regions(platform_t, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz); static u_long powermac_timebase_freq(platform_t, struct cpuref *cpuref); static int powermac_smp_first_cpu(platform_t, struct cpuref *cpuref); static int powermac_smp_next_cpu(platform_t, struct cpuref *cpuref); @@ -114,10 +114,60 @@ powermac_probe(platform_t plat) } void -powermac_mem_regions(platform_t plat, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz) +powermac_mem_regions(platform_t plat, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz) { - ofw_mem_regions(phys,physsz,avail,availsz); + phandle_t memory; + cell_t memoryprop[PHYS_AVAIL_SZ * 2]; + ssize_t propsize, i, j; + int physacells = 1; + + memory = OF_finddevice("/memory"); + + /* "reg" has variable #address-cells, but #size-cells is always 1 */ + OF_getprop(OF_parent(memory), "#address-cells", &physacells, + sizeof(physacells)); + + propsize = OF_getprop(memory, "reg", memoryprop, sizeof(memoryprop)); + propsize /= sizeof(cell_t); + for (i = 0, j = 0; i < propsize; i += physacells+1, j++) { + phys[j].mr_start = memoryprop[i]; + if (physacells == 2) { +#ifndef __powerpc64__ + /* On 32-bit PPC, ignore regions starting above 4 GB */ + if (memoryprop[i] != 0) { + j--; + continue; + } +#else + phys[j].mr_start <<= 32; +#endif + phys[j].mr_start |= memoryprop[i+1]; + } + phys[j].mr_size = memoryprop[i + physacells]; + } + *physsz = j; + + /* "available" always has #address-cells = 1 */ + propsize = OF_getprop(memory, "available", memoryprop, + sizeof(memoryprop)); + propsize /= sizeof(cell_t); + for (i = 0, j = 0; i < propsize; i += 2, j++) { + avail[j].mr_start = memoryprop[i]; + avail[j].mr_size = memoryprop[i + 1]; + } + +#ifdef __powerpc64__ + /* Add in regions above 4 GB to the available list */ + for (i = 0; i < *physsz; i++) { + if (phys[i].mr_start > BUS_SPACE_MAXADDR_32BIT) { + avail[j].mr_start = phys[i].mr_start; + avail[j].mr_size = phys[i].mr_size; + j++; + } + } +#endif + *availsz = j; } static int Modified: head/sys/powerpc/powerpc/platform.c ============================================================================== --- head/sys/powerpc/powerpc/platform.c Sun Dec 1 19:05:32 2013 (r258806) +++ head/sys/powerpc/powerpc/platform.c Sun Dec 1 19:43:15 2013 (r258807) @@ -64,17 +64,93 @@ static char plat_name[64] = ""; SYSCTL_STRING(_hw, OID_AUTO, platform, CTLFLAG_RD | CTLFLAG_TUN, plat_name, 0, "Platform currently in use"); -static struct mem_region *pregions = NULL; -static struct mem_region *aregions = NULL; +static struct mem_region pregions[PHYS_AVAIL_SZ]; +static struct mem_region aregions[PHYS_AVAIL_SZ]; static int npregions, naregions; +/* + * Memory region utilities: determine if two regions overlap, + * and merge two overlapping regions into one + */ +static int +memr_overlap(struct mem_region *r1, struct mem_region *r2) +{ + if ((r1->mr_start + r1->mr_size) < r2->mr_start || + (r2->mr_start + r2->mr_size) < r1->mr_start) + return (FALSE); + + return (TRUE); +} + +static void +memr_merge(struct mem_region *from, struct mem_region *to) +{ + vm_offset_t end; + end = ulmax(to->mr_start + to->mr_size, from->mr_start + from->mr_size); + to->mr_start = ulmin(from->mr_start, to->mr_start); + to->mr_size = end - to->mr_start; +} + +/* + * Quick sort callout for comparing memory regions. + */ +static int +mr_cmp(const void *a, const void *b) +{ + const struct mem_region *regiona, *regionb; + + regiona = a; + regionb = b; + if (regiona->mr_start < regionb->mr_start) + return (-1); + else if (regiona->mr_start > regionb->mr_start) + return (1); + else + return (0); +} + void mem_regions(struct mem_region **phys, int *physsz, struct mem_region **avail, int *availsz) { - if (pregions == NULL) - PLATFORM_MEM_REGIONS(plat_obj, &pregions, &npregions, - &aregions, &naregions); + int i, j, still_merging; + + if (npregions == 0) { + PLATFORM_MEM_REGIONS(plat_obj, &pregions[0], &npregions, + aregions, &naregions); + qsort(pregions, npregions, sizeof(*pregions), mr_cmp); + qsort(aregions, naregions, sizeof(*aregions), mr_cmp); + + /* Remove overlapping available regions */ + do { + still_merging = FALSE; + for (i = 0; i < naregions; i++) { + if (aregions[i].mr_size == 0) + continue; + for (j = i+1; j < naregions; j++) { + if (aregions[j].mr_size == 0) + continue; + if (!memr_overlap(&aregions[j], + &aregions[i])) + continue; + + memr_merge(&aregions[j], &aregions[i]); + /* mark inactive */ + aregions[j].mr_size = 0; + still_merging = TRUE; + } + } + } while (still_merging == TRUE); + + /* Collapse zero-length available regions */ + for (i = 0; i < naregions; i++) { + if (aregions[i].mr_size == 0) { + memcpy(&aregions[i], &aregions[i+1], + (naregions - i - 1)*sizeof(*aregions)); + naregions--; + } + } + } *phys = pregions; *avail = aregions; @@ -87,9 +163,11 @@ mem_valid(vm_offset_t addr, int len) { int i; - if (pregions == NULL) - PLATFORM_MEM_REGIONS(plat_obj, &pregions, &npregions, - &aregions, &naregions); + if (npregions == 0) { + struct mem_region *p, *a; + int na, np; + mem_regions(&p, &np, &a, &na); + } for (i = 0; i < npregions; i++) if ((addr >= pregions[i].mr_start) Modified: head/sys/powerpc/powerpc/platform_if.m ============================================================================== --- head/sys/powerpc/powerpc/platform_if.m Sun Dec 1 19:05:32 2013 (r258806) +++ head/sys/powerpc/powerpc/platform_if.m Sun Dec 1 19:43:15 2013 (r258807) @@ -120,9 +120,9 @@ METHOD int attach { METHOD void mem_regions { platform_t _plat; - struct mem_region **_memp; + struct mem_region *_memp; int *_memsz; - struct mem_region **_availp; + struct mem_region *_availp; int *_availsz; }; Modified: head/sys/powerpc/ps3/platform_ps3.c ============================================================================== --- head/sys/powerpc/ps3/platform_ps3.c Sun Dec 1 19:05:32 2013 (r258806) +++ head/sys/powerpc/ps3/platform_ps3.c Sun Dec 1 19:43:15 2013 (r258807) @@ -58,8 +58,8 @@ extern void *ap_pcpu; static int ps3_probe(platform_t); static int ps3_attach(platform_t); -static void ps3_mem_regions(platform_t, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz); +static void ps3_mem_regions(platform_t, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz); static vm_offset_t ps3_real_maxaddr(platform_t); static u_long ps3_timebase_freq(platform_t, struct cpuref *cpuref); #ifdef SMP @@ -107,12 +107,31 @@ ps3_probe(platform_t plat) return (BUS_PROBE_NOWILDCARD); } -#define MEM_REGIONS 2 -static struct mem_region avail_regions[MEM_REGIONS]; - static int ps3_attach(platform_t plat) { + uint64_t junk; + int count; + struct mem_region avail_regions[2]; + + ps3_mem_regions(plat, NULL, NULL, avail_regions, &count); + + lv1_allocate_memory(avail_regions[1].mr_size, 24 /* 16 MB pages */, + 0, 0x04 /* any address */, &avail_regions[1].mr_start, &junk); + + pmap_mmu_install("mmu_ps3", BUS_PROBE_SPECIFIC); + cpu_idle_hook = ps3_cpu_idle; + + /* Set a breakpoint to make NULL an invalid address */ + lv1_set_dabr(0x7 /* read and write, MMU on */, 2 /* kernel accesses */); + + return (0); +} + +void +ps3_mem_regions(platform_t plat, struct mem_region *phys, int *physsz, + struct mem_region *avail_regions, int *availsz) +{ uint64_t lpar_id, junk, ppe_id; /* Get real mode memory region */ @@ -133,26 +152,12 @@ ps3_attach(platform_t plat) /* Convert to maximum amount we can allocate in 16 MB pages */ avail_regions[1].mr_size -= avail_regions[0].mr_size; avail_regions[1].mr_size -= avail_regions[1].mr_size % (16*1024*1024); + *availsz = 2; - lv1_allocate_memory(avail_regions[1].mr_size, 24 /* 16 MB pages */, - 0, 0x04 /* any address */, &avail_regions[1].mr_start, &junk); - - pmap_mmu_install("mmu_ps3", BUS_PROBE_SPECIFIC); - cpu_idle_hook = ps3_cpu_idle; - - /* Set a breakpoint to make NULL an invalid address */ - lv1_set_dabr(0x7 /* read and write, MMU on */, 2 /* kernel accesses */); - - return (0); -} - -void -ps3_mem_regions(platform_t plat, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz) -{ - - *phys = *avail = avail_regions; - *physsz = *availsz = MEM_REGIONS; + if (phys != NULL) { + memcpy(phys, avail_regions, sizeof(*phys)*2); + *physsz = 2; + } } static u_long @@ -241,7 +246,12 @@ ps3_reset(platform_t plat) static vm_offset_t ps3_real_maxaddr(platform_t plat) { - return (avail_regions[0].mr_start + avail_regions[0].mr_size); + struct mem_region *phys, *avail; + int nphys, navail; + + mem_regions(&phys, &nphys, &avail, &navail); + + return (phys[0].mr_start + phys[0].mr_size); } static void Modified: head/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- head/sys/powerpc/pseries/platform_chrp.c Sun Dec 1 19:05:32 2013 (r258806) +++ head/sys/powerpc/pseries/platform_chrp.c Sun Dec 1 19:43:15 2013 (r258807) @@ -65,8 +65,8 @@ static vm_offset_t realmaxaddr = VM_MAX_ static int chrp_probe(platform_t); static int chrp_attach(platform_t); -void chrp_mem_regions(platform_t, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz); +void chrp_mem_regions(platform_t, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz); static vm_offset_t chrp_real_maxaddr(platform_t); static u_long chrp_timebase_freq(platform_t, struct cpuref *cpuref); static int chrp_smp_first_cpu(platform_t, struct cpuref *cpuref); @@ -157,11 +157,107 @@ chrp_attach(platform_t plat) return (0); } +static int +parse_drconf_memory(int *msz, int *asz, struct mem_region *ofmem, + struct mem_region *ofavail) +{ + phandle_t phandle; + vm_offset_t base; + int i, idx, len, lasz, lmsz, res; + uint32_t lmb_size[2]; + unsigned long *dmem, flags; + + lmsz = *msz; + lasz = *asz; + + phandle = OF_finddevice("/ibm,dynamic-reconfiguration-memory"); + if (phandle == -1) + /* No drconf node, return. */ + return (0); + + res = OF_getprop(phandle, "ibm,lmb-size", lmb_size, sizeof(lmb_size)); + if (res == -1) + return (0); + printf("Logical Memory Block size: %d MB\n", lmb_size[1] >> 20); + + /* Parse the /ibm,dynamic-memory. + The first position gives the # of entries. The next two words + reflect the address of the memory block. The next four words are + the DRC index, reserved, list index and flags. + (see PAPR C.6.6.2 ibm,dynamic-reconfiguration-memory) + + #el Addr DRC-idx res list-idx flags + ------------------------------------------------- + | 4 | 8 | 4 | 4 | 4 | 4 |.... + ------------------------------------------------- + */ + + len = OF_getproplen(phandle, "ibm,dynamic-memory"); + if (len > 0) { + + /* We have to use a variable length array on the stack + since we have very limited stack space. + */ + cell_t arr[len/sizeof(cell_t)]; + + res = OF_getprop(phandle, "ibm,dynamic-memory", &arr, + sizeof(arr)); + if (res == -1) + return (0); + + /* Number of elements */ + idx = arr[0]; + + /* First address. */ + dmem = (void*)&arr[1]; + + for (i = 0; i < idx; i++) { + base = *dmem; + dmem += 2; + flags = *dmem; + /* Use region only if available and not reserved. */ + if ((flags & 0x8) && !(flags & 0x80)) { + ofmem[lmsz].mr_start = base; + ofmem[lmsz].mr_size = (vm_size_t)lmb_size[1]; + ofavail[lasz].mr_start = base; + ofavail[lasz].mr_size = (vm_size_t)lmb_size[1]; + lmsz++; + lasz++; + } + dmem++; + } + } + + *msz = lmsz; + *asz = lasz; + + return (1); +} + void -chrp_mem_regions(platform_t plat, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz) +chrp_mem_regions(platform_t plat, struct mem_region *phys, int *physsz, + struct mem_region *avail, int *availsz) { - ofw_mem_regions(phys,physsz,avail,availsz); + vm_offset_t maxphysaddr; + int i; + + ofw_mem_regions(phys, physsz, avail, availsz); + parse_drconf_memory(physsz, availsz, phys, avail); + + /* + * On some firmwares (SLOF), some memory may be marked available that + * doesn't actually exist. This manifests as an extension of the last + * available segment past the end of physical memory, so truncate that + * one. + */ + maxphysaddr = 0; + for (i = 0; i < *physsz; i++) + if (phys[i].mr_start + phys[i].mr_size > maxphysaddr) + maxphysaddr = phys[i].mr_start + phys[i].mr_size; + + for (i = 0; i < *availsz; i++) + if (avail[i].mr_start + avail[i].mr_size > maxphysaddr) + avail[i].mr_size = maxphysaddr - avail[i].mr_start; } static vm_offset_t Modified: head/sys/powerpc/wii/platform_wii.c ============================================================================== --- head/sys/powerpc/wii/platform_wii.c Sun Dec 1 19:05:32 2013 (r258806) +++ head/sys/powerpc/wii/platform_wii.c Sun Dec 1 19:43:15 2013 (r258807) @@ -56,8 +56,8 @@ __FBSDID("$FreeBSD$"); static int wii_probe(platform_t); static int wii_attach(platform_t); -static void wii_mem_regions(platform_t, struct mem_region **, - int *, struct mem_region **, int *); +static void wii_mem_regions(platform_t, struct mem_region *, + int *, struct mem_region *, int *); static unsigned long wii_timebase_freq(platform_t, struct cpuref *); static void wii_reset(platform_t); static void wii_cpu_idle(sbintime_t); @@ -107,12 +107,9 @@ wii_attach(platform_t plat) return (0); } -#define MEM_REGIONS 2 -static struct mem_region avail_regions[MEM_REGIONS]; - static void -wii_mem_regions(platform_t plat, struct mem_region **phys, int *physsz, - struct mem_region **avail, int *availsz) +wii_mem_regions(platform_t plat, struct mem_region *phys, int *physsz, + struct mem_region *avail_regions, int *availsz) { /* 24MB 1T-SRAM */ avail_regions[0].mr_start = 0x00000000; @@ -139,8 +136,8 @@ wii_mem_regions(platform_t plat, struct */ avail_regions[1].mr_size -= WIIIPC_IOH_LEN + 1; - *phys = *avail = avail_regions; - *physsz = *availsz = MEM_REGIONS; + memcpy(phys, avail, 2*sizeof(*avail); + *physsz = *availsz = 2; } static u_long From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 19:45:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CDC8587; Sun, 1 Dec 2013 19:45:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F33341762; Sun, 1 Dec 2013 19:45: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 rB1Jj4Fi079021; Sun, 1 Dec 2013 19:45:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1Jj492079019; Sun, 1 Dec 2013 19:45:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312011945.rB1Jj492079019@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 1 Dec 2013 19:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258808 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 19:45:05 -0000 Author: nwhitehorn Date: Sun Dec 1 19:45:04 2013 New Revision: 258808 URL: http://svnweb.freebsd.org/changeset/base/258808 Log: No actual hardware supported by FreeBSD requires this SPRG save/restore paranoia, so kill it. In particular, changes to SPRG0 are dangerous, since that is where the PCPU pointer is kept. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Sun Dec 1 19:43:15 2013 (r258807) +++ head/sys/powerpc/ofw/ofw_machdep.c Sun Dec 1 19:45:04 2013 (r258808) @@ -91,52 +91,6 @@ ofw_restore_trap_vec(char *restore_trap_ __syncicache(EXC_RSVD, EXC_LAST - EXC_RSVD); } -/* - * Saved SPRG0-3 from OpenFirmware. Will be restored prior to the callback. - */ -register_t ofw_sprg0_save; - -static __inline void -ofw_sprg_prepare(void) -{ - if (ofw_real_mode) - return; - - /* - * Assume that interrupt are disabled at this point, or - * SPRG1-3 could be trashed - */ - __asm __volatile("mfsprg0 %0\n\t" - "mtsprg0 %1\n\t" - "mtsprg1 %2\n\t" - "mtsprg2 %3\n\t" - "mtsprg3 %4\n\t" - : "=&r"(ofw_sprg0_save) - : "r"(ofmsr[1]), - "r"(ofmsr[2]), - "r"(ofmsr[3]), - "r"(ofmsr[4])); -} - -static __inline void -ofw_sprg_restore(void) -{ -#if 0 - if (ofw_real_mode) - return; -#endif - - /* - * Note that SPRG1-3 contents are irrelevant. They are scratch - * registers used in the early portion of trap handling when - * interrupts are disabled. - * - * PCPU data cannot be used until this routine is called ! - */ - __asm __volatile("mtsprg0 %0" :: "r"(ofw_sprg0_save)); -} -#endif - static int parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output) { @@ -332,13 +286,10 @@ openfirmware_core(void *args) /* * Turn off exceptions - we really don't want to end up - * anywhere unexpected with PCPU set to something strange - * or the stack pointer wrong. + * anywhere in the kernel while in OF state. */ oldmsr = intr_disable(); - ofw_sprg_prepare(); - /* Save trap vectors */ ofw_save_trap_vec(save_trap_of); @@ -360,8 +311,6 @@ openfirmware_core(void *args) /* Restore trap vecotrs */ ofw_restore_trap_vec(save_trap_of); - ofw_sprg_restore(); - intr_restore(oldmsr); return (result); From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 19:56:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 545ACAED; Sun, 1 Dec 2013 19:56:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4053717DF; Sun, 1 Dec 2013 19:56:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1JuVtK082664; Sun, 1 Dec 2013 19:56:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1JuV51082663; Sun, 1 Dec 2013 19:56:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312011956.rB1JuV51082663@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 1 Dec 2013 19:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258810 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 19:56:31 -0000 Author: nwhitehorn Date: Sun Dec 1 19:56:30 2013 New Revision: 258810 URL: http://svnweb.freebsd.org/changeset/base/258810 Log: Deleted one line too many. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Sun Dec 1 19:55:51 2013 (r258809) +++ head/sys/powerpc/ofw/ofw_machdep.c Sun Dec 1 19:56:30 2013 (r258810) @@ -90,6 +90,7 @@ ofw_restore_trap_vec(char *restore_trap_ bcopy(restore_trap_vec, (void *)EXC_RST, EXC_LAST - EXC_RST); __syncicache(EXC_RSVD, EXC_LAST - EXC_RSVD); } +#endif static int parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output) From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 19:59:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1C6EC3F; Sun, 1 Dec 2013 19:59:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C50B317ED; Sun, 1 Dec 2013 19:59:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1Jxa0V083094; Sun, 1 Dec 2013 19:59:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1JxaCJ083093; Sun, 1 Dec 2013 19:59:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312011959.rB1JxaCJ083093@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 1 Dec 2013 19:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258811 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 19:59:37 -0000 Author: nwhitehorn Date: Sun Dec 1 19:59:36 2013 New Revision: 258811 URL: http://svnweb.freebsd.org/changeset/base/258811 Log: Revert last few revisions; apologies for the noise. There are very rare, broken systems that require SPRG state to be preserved. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Sun Dec 1 19:56:30 2013 (r258810) +++ head/sys/powerpc/ofw/ofw_machdep.c Sun Dec 1 19:59:36 2013 (r258811) @@ -90,6 +90,49 @@ ofw_restore_trap_vec(char *restore_trap_ bcopy(restore_trap_vec, (void *)EXC_RST, EXC_LAST - EXC_RST); __syncicache(EXC_RSVD, EXC_LAST - EXC_RSVD); } + +/* + * Saved SPRG0-3 from OpenFirmware. Will be restored prior to the callback. + */ +register_t ofw_sprg0_save; + +static __inline void +ofw_sprg_prepare(void) +{ + if (ofw_real_mode) + return; + + /* + * Assume that interrupt are disabled at this point, or + * SPRG1-3 could be trashed + */ + __asm __volatile("mfsprg0 %0\n\t" + "mtsprg0 %1\n\t" + "mtsprg1 %2\n\t" + "mtsprg2 %3\n\t" + "mtsprg3 %4\n\t" + : "=&r"(ofw_sprg0_save) + : "r"(ofmsr[1]), + "r"(ofmsr[2]), + "r"(ofmsr[3]), + "r"(ofmsr[4])); +} + +static __inline void +ofw_sprg_restore(void) +{ + if (ofw_real_mode) + return; + + /* + * Note that SPRG1-3 contents are irrelevant. They are scratch + * registers used in the early portion of trap handling when + * interrupts are disabled. + * + * PCPU data cannot be used until this routine is called ! + */ + __asm __volatile("mtsprg0 %0" :: "r"(ofw_sprg0_save)); +} #endif static int @@ -287,10 +330,13 @@ openfirmware_core(void *args) /* * Turn off exceptions - we really don't want to end up - * anywhere in the kernel while in OF state. + * anywhere unexpected with PCPU set to something strange + * or the stack pointer wrong. */ oldmsr = intr_disable(); + ofw_sprg_prepare(); + /* Save trap vectors */ ofw_save_trap_vec(save_trap_of); @@ -312,6 +358,8 @@ openfirmware_core(void *args) /* Restore trap vecotrs */ ofw_restore_trap_vec(save_trap_of); + ofw_sprg_restore(); + intr_restore(oldmsr); return (result); From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 20:03:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E30B7DC3; Sun, 1 Dec 2013 20:03:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CDA521832; Sun, 1 Dec 2013 20:03:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1K30U2085924; Sun, 1 Dec 2013 20:03:00 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1K30JE085923; Sun, 1 Dec 2013 20:03:00 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201312012003.rB1K30JE085923@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 1 Dec 2013 20:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258812 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 20:03:01 -0000 Author: glebius Date: Sun Dec 1 20:03:00 2013 New Revision: 258812 URL: http://svnweb.freebsd.org/changeset/base/258812 Log: Remove unused variable. Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sun Dec 1 19:59:36 2013 (r258811) +++ head/sys/kern/uipc_syscalls.c Sun Dec 1 20:03:00 2013 (r258812) @@ -2288,7 +2288,6 @@ vn_sendfile(struct file *fp, int sockfd, struct vattr va; off_t off, xfsize, fsbytes, sbytes, rem, obj_size; int error, bsize, nd, hdrlen, mnw; - bool inflight_called; pg = NULL; obj = NULL; @@ -2298,7 +2297,6 @@ vn_sendfile(struct file *fp, int sockfd, hdrlen = mnw = 0; rem = nbytes; obj_size = 0; - inflight_called = false; error = sendfile_getobj(td, fp, &obj, &vp, &shmfd, &obj_size, &bsize); if (error != 0) From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 22:08:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C70C9595; Sun, 1 Dec 2013 22:08:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B09BF1CC2; Sun, 1 Dec 2013 22:08:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1M8M8W028237; Sun, 1 Dec 2013 22:08:22 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1M8Kj0028221; Sun, 1 Dec 2013 22:08:20 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312012208.rB1M8Kj0028221@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 1 Dec 2013 22:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258817 - in head/contrib: gcc/cp gcclibs/libiberty gcclibs/libiberty/testsuite X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 22:08:23 -0000 Author: pfg Date: Sun Dec 1 22:08:19 2013 New Revision: 258817 URL: http://svnweb.freebsd.org/changeset/base/258817 Log: libiberty: upstream updates. There is a new ChangeLog.gcc43 file but most notable: * floatformat.c (get_field): Fix segfault with little-endian word order on 64-bit hosts. (put_field): Likewise. (min): Move definition. gcc/cp/ChangeLog 2007-05-04 Geoffrey Keating PR 31775 * mangle.c (write_mangled_name): Mangle static variable names. (write_unqualified_name): Use local-source-name for namespace-scope static variables. (Completes FreeBSD's r258017 ) Obtained from: gcc 4.3 (rev. 118552, 120097, 20698, 120702, 121364, 122972, 126588; GPLv2) MFC after: 2 weeks Added: head/contrib/gcclibs/libiberty/ChangeLog.gcc43 Modified: head/contrib/gcc/cp/ChangeLog.gcc43 head/contrib/gcc/cp/mangle.c head/contrib/gcclibs/libiberty/choose-temp.c head/contrib/gcclibs/libiberty/cp-demangle.c head/contrib/gcclibs/libiberty/cp-demangle.h head/contrib/gcclibs/libiberty/floatformat.c head/contrib/gcclibs/libiberty/functions.texi head/contrib/gcclibs/libiberty/pex-unix.c head/contrib/gcclibs/libiberty/strsignal.c head/contrib/gcclibs/libiberty/testsuite/demangle-expected head/contrib/gcclibs/libiberty/testsuite/test-demangle.c Modified: head/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/cp/ChangeLog.gcc43 Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcc/cp/ChangeLog.gcc43 Sun Dec 1 22:08:19 2013 (r258817) @@ -1,4 +1,4 @@ -2007-07-09 Geoffrey Keating +2007-07-09 Geoffrey Keating (r126529) PR 32617 * decl.c (cxx_init_decl_processing): Don't set @@ -18,6 +18,13 @@ * decl2.c (determine_visibility): Remove duplicate code for handling type info. +2007-05-05 Geoffrey Keating (r124467) + + PR 31775 + * mangle.c (write_mangled_name): Mangle static variable names. + (write_unqualified_name): Use local-source-name for + namespace-scope static variables. + 2007-03-12 Seongbae Park (r122851) * decl.c (compute_array_index_type): New warning flag warn_vla. Modified: head/contrib/gcc/cp/mangle.c ============================================================================== --- head/contrib/gcc/cp/mangle.c Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcc/cp/mangle.c Sun Dec 1 22:08:19 2013 (r258817) @@ -688,7 +688,8 @@ write_mangled_name (const tree decl, boo } } else if (TREE_CODE (decl) == VAR_DECL - /* The names of global variables aren't mangled. */ + /* The names of non-static global variables aren't mangled. */ + && DECL_EXTERNAL_LINKAGE_P (decl) && (CP_DECL_CONTEXT (decl) == global_namespace /* And neither are `extern "C"' variables. */ || DECL_EXTERN_C_P (decl))) @@ -1086,7 +1087,10 @@ write_template_prefix (const tree node) ::= ::= - ::= */ + ::= + ::= + + ::= L */ static void write_unqualified_name (const tree decl) @@ -1126,6 +1130,16 @@ write_unqualified_name (const tree decl) write_string (oni[DECL_OVERLOADED_OPERATOR_P (decl)].mangled_name); } + else if (VAR_OR_FUNCTION_DECL_P (decl) && ! TREE_PUBLIC (decl) + && DECL_NAMESPACE_SCOPE_P (decl) + && decl_linkage (decl) == lk_internal) + { + MANGLE_TRACE_TREE ("local-source-name", decl); + write_char ('L'); + write_source_name (DECL_NAME (decl)); + /* The default discriminator is 1, and that's all we ever use, + so there's no code to output one here. */ + } else write_source_name (DECL_NAME (decl)); } Added: head/contrib/gcclibs/libiberty/ChangeLog.gcc43 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcclibs/libiberty/ChangeLog.gcc43 Sun Dec 1 22:08:19 2013 (r258817) @@ -0,0 +1,60 @@ +2007-05-05 Geoffrey Keating (r124467) + + PR 31775 + * mangle.c (write_mangled_name): Mangle static variable names. + (write_unqualified_name): Use local-source-name for + namespace-scope static variables. + +2007-03-15 Geoffrey Keating (r122972) + + * cp-demangle.c (d_encoding): Exit early on error. + (d_pointer_to_member_type): Exit early if cplus_demangle_type + returns NULL. + (cplus_demangle_type): Likewise. + * testsuite/demangle-expected: New testcase. + +2007-01-31 Ben Elliston (r121364) + + * strsignal.c (psignal): Change type of signo to int. + * functions.texi: Regenerate. + +2007-01-12 Ben Elliston (r120702) + + * pex-unix.c (writeerr): Cast write result to void. + + * choose-temp.c (choose_temp_base): Check the result of the call + to mktemp rather than testing the length of the modified string. + +2006-12-20 Geoffrey Keating (r120097) + + * cp-demangle.h: Add comment explaining what to do to avoid + overrunning string. + (d_check_char): New. + (d_next_char): Don't advance past trailing '\0'. + * cp-demangle.c (cplus_demangle_mangled_name): Use d_check_char. + (d_nested_name): Likewise. + (d_special_name): Likewise. + (d_call_offset): Likewise. + (d_function_type): Likewise. + (d_array_type): Likewise. + (d_pointer_to_member_type): Likewise. + (d_template_param): Likewise. + (d_template_args): Likewise. + (d_template_arg): Likewise. + (d_expr_primary): Likewise. + (d_local_name): Likewise. + (d_substitution): Likewise. + (d_ctor_dtor_name): Use d_advance rather than d_next_char. + * testsuite/test-demangle.c: Include sys/mman.h. + (MAP_ANONYMOUS): Define. + (protect_end): New. + (main): Use protect_end. + * testsuite/demangle-expected: Add testcases for overrunning + the end of the string. + +2006-11-07 Julian Brown (r118552) + + * floatformat.c (get_field): Fix segfault with little-endian word + order on 64-bit hosts. + (put_field): Likewise. + (min): Move definition. Modified: head/contrib/gcclibs/libiberty/choose-temp.c ============================================================================== --- head/contrib/gcclibs/libiberty/choose-temp.c Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcclibs/libiberty/choose-temp.c Sun Dec 1 22:08:19 2013 (r258817) @@ -65,8 +65,7 @@ choose_temp_base (void) strcpy (temp_filename, base); strcpy (temp_filename + len, TEMP_FILE); - mktemp (temp_filename); - if (strlen (temp_filename) == 0) + if (mktemp (temp_filename) == 0) abort (); return temp_filename; } Modified: head/contrib/gcclibs/libiberty/cp-demangle.c ============================================================================== --- head/contrib/gcclibs/libiberty/cp-demangle.c Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcclibs/libiberty/cp-demangle.c Sun Dec 1 22:08:19 2013 (r258817) @@ -913,9 +913,9 @@ CP_STATIC_IF_GLIBCPP_V3 struct demangle_component * cplus_demangle_mangled_name (struct d_info *di, int top_level) { - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; - if (d_next_char (di) != 'Z') + if (! d_check_char (di, 'Z')) return NULL; return d_encoding (di, top_level); } @@ -1021,7 +1021,7 @@ d_encoding (struct d_info *di, int top_l } peek = d_peek_char (di); - if (peek == '\0' || peek == 'E') + if (dc == NULL || peek == '\0' || peek == 'E') return dc; return d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME, dc, d_bare_function_type (di, has_return_type (dc))); @@ -1054,11 +1054,9 @@ d_name (struct d_info *di) case 'Z': return d_local_name (di); -/* APPLE LOCAL begin mainline 2007-05-09 5173149 */ \ case 'L': return d_unqualified_name (di); -/* APPLE LOCAL end mainline 2007-05-09 5173149 */ \ case 'S': { int subst; @@ -1128,7 +1126,7 @@ d_nested_name (struct d_info *di) struct demangle_component *ret; struct demangle_component **pret; - if (d_next_char (di) != 'N') + if (! d_check_char (di, 'N')) return NULL; pret = d_cv_qualifiers (di, &ret, 1); @@ -1139,7 +1137,7 @@ d_nested_name (struct d_info *di) if (*pret == NULL) return NULL; - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; @@ -1179,10 +1177,8 @@ d_prefix (struct d_info *di) if (IS_DIGIT (peek) || IS_LOWER (peek) || peek == 'C' -/* APPLE LOCAL begin mainline 2007-05-09 5173149 */ \ || peek == 'D' || peek == 'L') -/* APPLE LOCAL end mainline 2007-05-09 5173149 */ \ dc = d_unqualified_name (di); else if (peek == 'S') dc = d_substitution (di, 1); @@ -1216,11 +1212,9 @@ d_prefix (struct d_info *di) /* ::= ::= ::= - APPLE LOCAL begin mainline 2007-05-09 5173149 ::= ::= L - APPLE LOCAL end mainline 2007-05-09 5173149 */ static struct demangle_component * @@ -1242,7 +1236,6 @@ d_unqualified_name (struct d_info *di) } else if (peek == 'C' || peek == 'D') return d_ctor_dtor_name (di); -/* APPLE LOCAL begin mainline 2007-05-09 5173149 */ \ else if (peek == 'L') { struct demangle_component * ret; @@ -1256,7 +1249,6 @@ d_unqualified_name (struct d_info *di) return NULL; return ret; } -/* APPLE LOCAL end mainline 2007-05-09 5173149 */ \ else return NULL; } @@ -1477,11 +1469,8 @@ d_operator_name (struct d_info *di) static struct demangle_component * d_special_name (struct d_info *di) { - char c; - di->expansion += 20; - c = d_next_char (di); - if (c == 'T') + if (d_check_char (di, 'T')) { switch (d_next_char (di)) { @@ -1530,7 +1519,7 @@ d_special_name (struct d_info *di) offset = d_number (di); if (offset < 0) return NULL; - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; base_type = cplus_demangle_type (di); /* We don't display the offset. FIXME: We should display @@ -1551,7 +1540,7 @@ d_special_name (struct d_info *di) return NULL; } } - else if (c == 'G') + else if (d_check_char (di, 'G')) { switch (d_next_char (di)) { @@ -1598,14 +1587,14 @@ d_call_offset (struct d_info *di, int c) else if (c == 'v') { d_number (di); - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return 0; d_number (di); } else return 0; - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return 0; return 1; @@ -1629,13 +1618,13 @@ d_ctor_dtor_name (struct d_info *di) else if (di->last_name->type == DEMANGLE_COMPONENT_SUB_STD) di->expansion += di->last_name->u.s_string.len; } - switch (d_next_char (di)) + switch (d_peek_char (di)) { case 'C': { enum gnu_v3_ctor_kinds kind; - switch (d_next_char (di)) + switch (d_peek_next_char (di)) { case '1': kind = gnu_v3_complete_object_ctor; @@ -1649,6 +1638,7 @@ d_ctor_dtor_name (struct d_info *di) default: return NULL; } + d_advance (di, 2); return d_make_ctor (di, kind, di->last_name); } @@ -1656,7 +1646,7 @@ d_ctor_dtor_name (struct d_info *di) { enum gnu_v3_dtor_kinds kind; - switch (d_next_char (di)) + switch (d_peek_next_char (di)) { case '0': kind = gnu_v3_deleting_dtor; @@ -1670,6 +1660,7 @@ d_ctor_dtor_name (struct d_info *di) default: return NULL; } + d_advance (di, 2); return d_make_dtor (di, kind, di->last_name); } @@ -1763,7 +1754,7 @@ cplus_demangle_type (struct d_info *di) if (pret == NULL) return NULL; *pret = cplus_demangle_type (di); - if (! d_add_substitution (di, ret)) + if (! *pret || ! d_add_substitution (di, ret)) return NULL; return ret; } @@ -1953,7 +1944,7 @@ d_function_type (struct d_info *di) { struct demangle_component *ret; - if (d_next_char (di) != 'F') + if (! d_check_char (di, 'F')) return NULL; if (d_peek_char (di) == 'Y') { @@ -1962,7 +1953,7 @@ d_function_type (struct d_info *di) d_advance (di, 1); } ret = d_bare_function_type (di, 1); - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; } @@ -2049,7 +2040,7 @@ d_array_type (struct d_info *di) char peek; struct demangle_component *dim; - if (d_next_char (di) != 'A') + if (! d_check_char (di, 'A')) return NULL; peek = d_peek_char (di); @@ -2077,7 +2068,7 @@ d_array_type (struct d_info *di) return NULL; } - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; return d_make_comp (di, DEMANGLE_COMPONENT_ARRAY_TYPE, dim, @@ -2093,7 +2084,7 @@ d_pointer_to_member_type (struct d_info struct demangle_component *mem; struct demangle_component **pmem; - if (d_next_char (di) != 'M') + if (! d_check_char (di, 'M')) return NULL; cl = cplus_demangle_type (di); @@ -2118,6 +2109,8 @@ d_pointer_to_member_type (struct d_info if (pmem == NULL) return NULL; *pmem = cplus_demangle_type (di); + if (*pmem == NULL) + return NULL; if (pmem != &mem && (*pmem)->type != DEMANGLE_COMPONENT_FUNCTION_TYPE) { @@ -2137,7 +2130,7 @@ d_template_param (struct d_info *di) { long param; - if (d_next_char (di) != 'T') + if (! d_check_char (di, 'T')) return NULL; if (d_peek_char (di) == '_') @@ -2150,7 +2143,7 @@ d_template_param (struct d_info *di) param += 1; } - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; ++di->did_subs; @@ -2172,7 +2165,7 @@ d_template_args (struct d_info *di) constructor or destructor. */ hold_last_name = di->last_name; - if (d_next_char (di) != 'I') + if (! d_check_char (di, 'I')) return NULL; al = NULL; @@ -2217,7 +2210,7 @@ d_template_arg (struct d_info *di) case 'X': d_advance (di, 1); ret = d_expression (di); - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; @@ -2344,7 +2337,7 @@ d_expr_primary (struct d_info *di) { struct demangle_component *ret; - if (d_next_char (di) != 'L') + if (! d_check_char (di, 'L')) return NULL; if (d_peek_char (di) == '_') ret = cplus_demangle_mangled_name (di, 0); @@ -2390,7 +2383,7 @@ d_expr_primary (struct d_info *di) } ret = d_make_comp (di, t, type, d_make_name (di, s, d_str (di) - s)); } - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; } @@ -2404,12 +2397,12 @@ d_local_name (struct d_info *di) { struct demangle_component *function; - if (d_next_char (di) != 'Z') + if (! d_check_char (di, 'Z')) return NULL; function = d_encoding (di, 0); - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; if (d_peek_char (di) == 's') @@ -2514,7 +2507,7 @@ d_substitution (struct d_info *di, int p { char c; - if (d_next_char (di) != 'S') + if (! d_check_char (di, 'S')) return NULL; c = d_next_char (di); Modified: head/contrib/gcclibs/libiberty/cp-demangle.h ============================================================================== --- head/contrib/gcclibs/libiberty/cp-demangle.h Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcclibs/libiberty/cp-demangle.h Sun Dec 1 22:08:19 2013 (r258817) @@ -123,10 +123,16 @@ struct d_info int expansion; }; +/* To avoid running past the ending '\0', don't: + - call d_peek_next_char if d_peek_char returned '\0' + - call d_advance with an 'i' that is too large + - call d_check_char(di, '\0') + Everything else is safe. */ #define d_peek_char(di) (*((di)->n)) #define d_peek_next_char(di) ((di)->n[1]) #define d_advance(di, i) ((di)->n += (i)) -#define d_next_char(di) (*((di)->n++)) +#define d_check_char(di, c) (d_peek_char(di) == c ? ((di)->n++, 1) : 0) +#define d_next_char(di) (d_peek_char(di) == '\0' ? '\0' : *((di)->n++)) #define d_str(di) ((di)->n) /* Functions and arrays in cp-demangle.c which are referenced by Modified: head/contrib/gcclibs/libiberty/floatformat.c ============================================================================== --- head/contrib/gcclibs/libiberty/floatformat.c Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcclibs/libiberty/floatformat.c Sun Dec 1 22:08:19 2013 (r258817) @@ -249,53 +249,51 @@ const struct floatformat floatformat_ia6 floatformat_always_valid }; + +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif + /* Extract a field which starts at START and is LEN bits long. DATA and TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */ static unsigned long get_field (const unsigned char *data, enum floatformat_byteorders order, unsigned int total_len, unsigned int start, unsigned int len) { - unsigned long result; + unsigned long result = 0; unsigned int cur_byte; - int cur_bitshift; + int lo_bit, hi_bit, cur_bitshift = 0; + int nextbyte = (order == floatformat_little) ? 1 : -1; + + /* Start is in big-endian bit order! Fix that first. */ + start = total_len - (start + len); /* Start at the least significant part of the field. */ - cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT; if (order == floatformat_little) - cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1; - cur_bitshift = - ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT; - result = *(data + cur_byte) >> (-cur_bitshift); - cur_bitshift += FLOATFORMAT_CHAR_BIT; - if (order == floatformat_little) - ++cur_byte; + cur_byte = start / FLOATFORMAT_CHAR_BIT; else - --cur_byte; + cur_byte = (total_len - start - 1) / FLOATFORMAT_CHAR_BIT; - /* Move towards the most significant part of the field. */ - while ((unsigned int) cur_bitshift < len) + lo_bit = start % FLOATFORMAT_CHAR_BIT; + hi_bit = min (lo_bit + len, FLOATFORMAT_CHAR_BIT); + + do { - if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT) - /* This is the last byte; zero out the bits which are not part of - this field. */ - result |= - (*(data + cur_byte) & ((1 << (len - cur_bitshift)) - 1)) - << cur_bitshift; - else - result |= *(data + cur_byte) << cur_bitshift; - cur_bitshift += FLOATFORMAT_CHAR_BIT; - if (order == floatformat_little) - ++cur_byte; - else - --cur_byte; + unsigned int shifted = *(data + cur_byte) >> lo_bit; + unsigned int bits = hi_bit - lo_bit; + unsigned int mask = (1 << bits) - 1; + result |= (shifted & mask) << cur_bitshift; + len -= bits; + cur_bitshift += bits; + cur_byte += nextbyte; + lo_bit = 0; + hi_bit = min (len, FLOATFORMAT_CHAR_BIT); } + while (len != 0); + return result; } -#ifndef min -#define min(a, b) ((a) < (b) ? (a) : (b)) -#endif - /* Convert from FMT to a double. FROM is the address of the extended float. Store the double in *TO. */ @@ -428,43 +426,34 @@ put_field (unsigned char *data, enum flo unsigned long stuff_to_put) { unsigned int cur_byte; - int cur_bitshift; + int lo_bit, hi_bit; + int nextbyte = (order == floatformat_little) ? 1 : -1; + + /* Start is in big-endian bit order! Fix that first. */ + start = total_len - (start + len); /* Start at the least significant part of the field. */ - cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT; - if (order == floatformat_little) - cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1; - cur_bitshift = - ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT; - *(data + cur_byte) &= - ~(((1 << ((start + len) % FLOATFORMAT_CHAR_BIT)) - 1) << (-cur_bitshift)); - *(data + cur_byte) |= - (stuff_to_put & ((1 << FLOATFORMAT_CHAR_BIT) - 1)) << (-cur_bitshift); - cur_bitshift += FLOATFORMAT_CHAR_BIT; if (order == floatformat_little) - ++cur_byte; + cur_byte = start / FLOATFORMAT_CHAR_BIT; else - --cur_byte; + cur_byte = (total_len - start - 1) / FLOATFORMAT_CHAR_BIT; - /* Move towards the most significant part of the field. */ - while ((unsigned int) cur_bitshift < len) + lo_bit = start % FLOATFORMAT_CHAR_BIT; + hi_bit = min (lo_bit + len, FLOATFORMAT_CHAR_BIT); + + do { - if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT) - { - /* This is the last byte. */ - *(data + cur_byte) &= - ~((1 << (len - cur_bitshift)) - 1); - *(data + cur_byte) |= (stuff_to_put >> cur_bitshift); - } - else - *(data + cur_byte) = ((stuff_to_put >> cur_bitshift) - & ((1 << FLOATFORMAT_CHAR_BIT) - 1)); - cur_bitshift += FLOATFORMAT_CHAR_BIT; - if (order == floatformat_little) - ++cur_byte; - else - --cur_byte; + unsigned char *byte_ptr = data + cur_byte; + unsigned int bits = hi_bit - lo_bit; + unsigned int mask = ((1 << bits) - 1) << lo_bit; + *byte_ptr = (*byte_ptr & ~mask) | ((stuff_to_put << lo_bit) & mask); + stuff_to_put >>= bits; + len -= bits; + cur_byte += nextbyte; + lo_bit = 0; + hi_bit = min (len, FLOATFORMAT_CHAR_BIT); } + while (len != 0); } /* The converse: convert the double *FROM to an extended float Modified: head/contrib/gcclibs/libiberty/functions.texi ============================================================================== --- head/contrib/gcclibs/libiberty/functions.texi Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcclibs/libiberty/functions.texi Sun Dec 1 22:08:19 2013 (r258817) @@ -948,7 +948,7 @@ documented. @end deftypefn @c strsignal.c:539 -@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message}) +@deftypefn Supplemental void psignal (int @var{signo}, char *@var{message}) Print @var{message} to the standard error, followed by a colon, followed by the description of the signal specified by @var{signo}, Modified: head/contrib/gcclibs/libiberty/pex-unix.c ============================================================================== --- head/contrib/gcclibs/libiberty/pex-unix.c Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcclibs/libiberty/pex-unix.c Sun Dec 1 22:08:19 2013 (r258817) @@ -339,7 +339,7 @@ static void pex_child_error (struct pex_obj *obj, const char *executable, const char *errmsg, int err) { -#define writeerr(s) write (STDERR_FILE_NO, s, strlen (s)) +#define writeerr(s) (void) write (STDERR_FILE_NO, s, strlen (s)) writeerr (obj->pname); writeerr (": error trying to exec '"); writeerr (executable); Modified: head/contrib/gcclibs/libiberty/strsignal.c ============================================================================== --- head/contrib/gcclibs/libiberty/strsignal.c Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcclibs/libiberty/strsignal.c Sun Dec 1 22:08:19 2013 (r258817) @@ -9,7 +9,7 @@ /* We need to declare sys_siglist, because even if the system provides it we can't assume that it is declared in (for example, SunOS provides sys_siglist, but it does not declare it in any - header file). fHowever, we can't declare sys_siglist portably, + header file). However, we can't declare sys_siglist portably, because on some systems it is declared with const and on some systems it is declared without const. If we were using autoconf, we could work out the right declaration. Until, then we just @@ -536,7 +536,7 @@ strtosigno (const char *name) /* -@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message}) +@deftypefn Supplemental void psignal (int @var{signo}, char *@var{message}) Print @var{message} to the standard error, followed by a colon, followed by the description of the signal specified by @var{signo}, @@ -549,7 +549,7 @@ followed by a newline. #ifndef HAVE_PSIGNAL void -psignal (unsigned signo, char *message) +psignal (int signo, char *message) { if (signal_names == NULL) { Modified: head/contrib/gcclibs/libiberty/testsuite/demangle-expected ============================================================================== --- head/contrib/gcclibs/libiberty/testsuite/demangle-expected Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcclibs/libiberty/testsuite/demangle-expected Sun Dec 1 22:08:19 2013 (r258817) @@ -3816,7 +3816,6 @@ f SASDASDFASDF_sdfsdf SASDASDFASDF_sdfsdf SASDASDFASDF_sdfsdf -# APPLE LOCAL begin mainline 2007-05-09 5173149 # These are all cases of invalid manglings where the demangler would read # past the end of the string. # d_name wasn't honouring a NULL from d_substitution @@ -3843,6 +3842,29 @@ _ZNT --format=gnu-v3 _Z1aMark _Z1aMark +--format=gnu-v3 +_ZSA +_ZSA +# d_expr_primary wasn't honouring NULL from cplus_demangle_mangled_name +--format=gnu-v3 +_ZN1fIL_ +_ZN1fIL_ +# d_operator_name was taking two characters in a row +--format=gnu-v3 +_Za +_Za +# d_prefix wasn't honouring NULL from d_substitution +--format=gnu-v3 +_ZNSA +_ZNSA +# d_prefix wasn't honouring NULL from d_template_param +--format=gnu-v3 +_ZNT +_ZNT +# Dereferencing NULL in d_pointer_to_member_type +--format=gnu-v3 +_Z1aMark +_Z1aMark # test 1 --format=gnu-v3 _ZL3foo_2 @@ -3859,4 +3881,3 @@ foo()::var1 --format=gnu-v3 _ZZN7myspaceL3foo_1EvEN11localstruct1fEZNS_3fooEvE16otherlocalstruct myspace::foo()::localstruct::f(myspace::foo()::otherlocalstruct) -# APPLE LOCAL end mainline 2007-05-09 5173149 Modified: head/contrib/gcclibs/libiberty/testsuite/test-demangle.c ============================================================================== --- head/contrib/gcclibs/libiberty/testsuite/test-demangle.c Sun Dec 1 21:44:05 2013 (r258816) +++ head/contrib/gcclibs/libiberty/testsuite/test-demangle.c Sun Dec 1 22:08:19 2013 (r258817) @@ -86,6 +86,50 @@ getline(buf) buf->alloced = alloc; } +/* If we have mmap() and mprotect(), copy the string S just before a + protected page, so that if the demangler runs over the end of the + string we'll get a fault, and return the address of the new string. + If no mmap, or it fails, or it looks too hard, just return S. */ + +#ifdef HAVE_SYS_MMAN_H +#include +#endif +#if defined(MAP_ANON) && ! defined (MAP_ANONYMOUS) +#define MAP_ANONYMOUS MAP_ANON +#endif + +static const char * +protect_end (const char * s) +{ +#if defined(HAVE_MMAP) && defined (MAP_ANONYMOUS) + size_t pagesize = getpagesize(); + static char * buf; + size_t s_len = strlen (s); + char * result; + + /* Don't try if S is too long. */ + if (s_len >= pagesize) + return s; + + /* Allocate one page of allocated space followed by an unmapped + page. */ + if (buf == NULL) + { + buf = mmap (NULL, pagesize * 2, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + if (! buf) + return s; + munmap (buf + pagesize, pagesize); + } + + result = buf + (pagesize - s_len - 1); + memcpy (result, s, s_len + 1); + return result; +#else + return s; +#endif +} + static void fail (lineno, opts, in, out, exp) int lineno; @@ -150,6 +194,8 @@ main(argc, argv) for (;;) { + const char *inp; + getline (&format); if (feof (stdin)) break; @@ -157,6 +203,8 @@ main(argc, argv) getline (&input); getline (&expect); + inp = protect_end (input.data); + tests++; no_params = 0; @@ -237,14 +285,14 @@ main(argc, argv) { enum gnu_v3_ctor_kinds kc; - kc = is_gnu_v3_mangled_ctor (input.data); + kc = is_gnu_v3_mangled_ctor (inp); sprintf (buf, "%d", (int) kc); } else { enum gnu_v3_dtor_kinds kd; - kd = is_gnu_v3_mangled_dtor (input.data); + kd = is_gnu_v3_mangled_dtor (inp); sprintf (buf, "%d", (int) kd); } @@ -259,7 +307,7 @@ main(argc, argv) cplus_demangle_set_style (style); - result = cplus_demangle (input.data, + result = cplus_demangle (inp, DMGL_PARAMS|DMGL_ANSI|DMGL_TYPES |(ret_postfix ? DMGL_RET_POSTFIX : 0)); @@ -275,7 +323,7 @@ main(argc, argv) if (no_params) { getline (&expect); - result = cplus_demangle (input.data, DMGL_ANSI|DMGL_TYPES); + result = cplus_demangle (inp, DMGL_ANSI|DMGL_TYPES); if (result ? strcmp (result, expect.data) From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 22:43:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B495A70; Sun, 1 Dec 2013 22:43:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3AE341E3B; Sun, 1 Dec 2013 22:43:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1MhFvr041024; Sun, 1 Dec 2013 22:43:15 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1MhEmV041022; Sun, 1 Dec 2013 22:43:14 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312012243.rB1MhEmV041022@svn.freebsd.org> From: Peter Wemm Date: Sun, 1 Dec 2013 22:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258818 - stable/9/usr.bin/uname X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 22:43:15 -0000 Author: peter Date: Sun Dec 1 22:43:14 2013 New Revision: 258818 URL: http://svnweb.freebsd.org/changeset/base/258818 Log: MFC r256557 - kernel and userland osreldate helpers. Modified: stable/9/usr.bin/uname/uname.1 stable/9/usr.bin/uname/uname.c Modified: stable/9/usr.bin/uname/uname.1 ============================================================================== --- stable/9/usr.bin/uname/uname.1 Sun Dec 1 22:08:19 2013 (r258817) +++ stable/9/usr.bin/uname/uname.1 Sun Dec 1 22:43:14 2013 (r258818) @@ -28,7 +28,7 @@ .\" @(#)uname.1 8.3 (Berkeley) 4/8/94 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd December 1, 2013 .Dt UNAME 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd display information about the system .Sh SYNOPSIS .Nm -.Op Fl aimnoprsv +.Op Fl aiKmnoprsUv .Sh DESCRIPTION The .Nm @@ -55,6 +55,10 @@ and were specified. .It Fl i Write the kernel ident to standard output. +.It Fl K +Write the +.Fx +version of the kernel. .It Fl m Write the type of the current hardware platform to standard output. .It Fl n @@ -70,6 +74,10 @@ Write the current release level of the o to standard output. .It Fl s Write the name of the operating system implementation to standard output. +.It Fl U +Write the +.Fx +version of the user environment. .It Fl v Write the version level of this release of the operating system to standard output. @@ -79,6 +87,14 @@ If the .Fl a flag is specified, or multiple flags are specified, all output is written on a single line, separated by spaces. +.Pp +The +.Fl K +and +.Fl U +flags are intended to be used for fine grain differentiation of incremental +.Fx +development and user visible changes. .Sh ENVIRONMENT An environment variable composed of the string .Ev UNAME_ @@ -91,6 +107,8 @@ of the environment variable. .Sh EXIT STATUS .Ex -std .Sh SEE ALSO +.Xr feature_present 3 , +.Xr getosreldate 3 , .Xr sysctl 3 , .Xr uname 3 , .Xr sysctl 8 @@ -104,3 +122,12 @@ specification. The .Nm command appeared in PWB UNIX. +.Pp +The +.Fl K +and +.Fl U +extension flags were first released in +.Fx 10.0 +and then ported back to +.Fx 9.2-STABLE . Modified: stable/9/usr.bin/uname/uname.c ============================================================================== --- stable/9/usr.bin/uname/uname.c Sun Dec 1 22:08:19 2013 (r258817) +++ stable/9/usr.bin/uname/uname.c Sun Dec 1 22:43:14 2013 (r258818) @@ -54,6 +54,8 @@ static const char sccsid[] = "@(#)uname. #include #include +#include + #define MFLAG 0x01 #define NFLAG 0x02 #define PFLAG 0x04 @@ -61,9 +63,12 @@ static const char sccsid[] = "@(#)uname. #define SFLAG 0x10 #define VFLAG 0x20 #define IFLAG 0x40 +#define UFLAG 0x80 +#define KFLAG 0x100 typedef void (*get_t)(void); get_t get_ident, get_platform, get_hostname, get_arch, get_release, get_sysname, get_version; +get_t get_kernvers, get_uservers; void native_ident(void); void native_platform(void); @@ -72,11 +77,13 @@ void native_arch(void); void native_release(void); void native_sysname(void); void native_version(void); +void native_kernvers(void); +void native_uservers(void); void print_uname(u_int); void setup_get(void); void usage(void); -char *ident, *platform, *hostname, *arch, *release, *sysname, *version; +char *ident, *platform, *hostname, *arch, *release, *sysname, *version, *kernvers, *uservers; int space; int @@ -88,7 +95,7 @@ main(int argc, char *argv[]) setup_get(); flags = 0; - while ((ch = getopt(argc, argv, "aimnoprsv")) != -1) + while ((ch = getopt(argc, argv, "aiKmnoprsUv")) != -1) switch(ch) { case 'a': flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG); @@ -96,6 +103,9 @@ main(int argc, char *argv[]) case 'i': flags |= IFLAG; break; + case 'K': + flags |= KFLAG; + break; case 'm': flags |= MFLAG; break; @@ -112,6 +122,9 @@ main(int argc, char *argv[]) case 'o': flags |= SFLAG; break; + case 'U': + flags |= UFLAG; + break; case 'v': flags |= VFLAG; break; @@ -152,6 +165,8 @@ setup_get(void) CHECK_ENV("m", platform); CHECK_ENV("p", arch); CHECK_ENV("i", ident); + CHECK_ENV("K", kernvers); + CHECK_ENV("U", uservers); } #define PRINT_FLAG(flags,flag,var) \ @@ -175,6 +190,8 @@ print_uname(u_int flags) PRINT_FLAG(flags, MFLAG, platform); PRINT_FLAG(flags, PFLAG, arch); PRINT_FLAG(flags, IFLAG, ident); + PRINT_FLAG(flags, KFLAG, kernvers); + PRINT_FLAG(flags, UFLAG, uservers); printf("\n"); } @@ -243,8 +260,26 @@ NATIVE_SYSCTLNAME_GET(ident, "kern.ident } NATIVE_SET; void +native_uservers(void) +{ + static char buf[128]; + + snprintf(buf, sizeof(buf), "%d", __FreeBSD_version); + uservers = buf; +} + +void +native_kernvers(void) +{ + static char buf[128]; + + snprintf(buf, sizeof(buf), "%d", getosreldate()); + kernvers = buf; +} + +void usage(void) { - fprintf(stderr, "usage: uname [-aimnoprsv]\n"); + fprintf(stderr, "usage: uname [-aiKmnoprsUv]\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 1 23:07:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A8C9CE7; Sun, 1 Dec 2013 23:07:38 +0000 (UTC) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C0C431EFA; Sun, 1 Dec 2013 23:07:37 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 728A0B8059; Mon, 2 Dec 2013 00:07:36 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 41127CB4E; Mon, 2 Dec 2013 00:07:36 +0100 (CET) Date: Mon, 2 Dec 2013 00:07:35 +0100 From: Jilles Tjoelker To: Konstantin Belousov Subject: Re: svn commit: r258779 - in head/sys/dev: cesa drm drm2/i915 drm2/radeon hatm Message-ID: <20131201230735.GB24849@stack.nl> References: <201311302216.rAUMGcPA037268@svn.freebsd.org> <20131201075944.GF59496@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131201075944.GF59496@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 23:07:38 -0000 On Sun, Dec 01, 2013 at 09:59:44AM +0200, Konstantin Belousov wrote: > On Sat, Nov 30, 2013 at 10:16:38PM +0000, Eitan Adler wrote: > > Author: eadler > > Date: Sat Nov 30 22:16:37 2013 > > New Revision: 258779 > > URL: http://svnweb.freebsd.org/changeset/base/258779 > > > > Log: > > Similar to the (1 << 31) case it is not defined to do (2 << 30). > > > > Modified: > ... > > head/sys/dev/drm2/i915/i915_reg.h > Revert the drm2/i915 changes from this and following commits now. > You did not contacted obvious maintainer of the file. > The changes are pointless and make the import of upstream changes > harder; for i915_reg.h, much harder. This is a valid concern. The change should be submitted to upstream; if upstream does not want the change, it is better to avoid the issue by adding -fno-strict-overflow for the offending files, matching upstream. > Not to mention that the whole churn is not needed if the > -fno-strict-overflow flag is used. I think the undefined shifts should be fixed where possible and not in contributed code. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 00:44:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD6F872E; Mon, 2 Dec 2013 00:44:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C95EF1255; Mon, 2 Dec 2013 00:44:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB20iamj074727; Mon, 2 Dec 2013 00:44:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB20iaOB074726; Mon, 2 Dec 2013 00:44:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312020044.rB20iaOB074726@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 2 Dec 2013 00:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258819 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 00:44:36 -0000 Author: nwhitehorn Date: Mon Dec 2 00:44:36 2013 New Revision: 258819 URL: http://svnweb.freebsd.org/changeset/base/258819 Log: Add new sysctl, kern.supported_abis, containing the list of FreeBSD MACHINE_ARCH values whose binaries this kernel can run. This patch provides a feature requested for implementing pkgng ABI identifiers in a robust way. The list is designed to indicate whether, say, an i386 package can be run on the current system. If kern.supported_abis contains "i386", then the answer is yes. Otherwise, the answer is no. At the moment, this only supports MACHINE_ARCH and MACHINE_ARCH32. As we gain support for more interesting combinations, this needs to become more flexible, possibily through the sysent framework, along with the hw.machine_arch emulation immediately preceding this code in kern_mib.c. Reviewed by: imp MFC after: 3 days Modified: head/sys/kern/kern_mib.c Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Sun Dec 1 22:43:14 2013 (r258818) +++ head/sys/kern/kern_mib.c Mon Dec 2 00:44:36 2013 (r258819) @@ -261,6 +261,13 @@ sysctl_hw_machine_arch(SYSCTL_HANDLER_AR SYSCTL_PROC(_hw, HW_MACHINE_ARCH, machine_arch, CTLTYPE_STRING | CTLFLAG_RD, NULL, 0, sysctl_hw_machine_arch, "A", "System architecture"); +SYSCTL_STRING(_kern, OID_AUTO, supported_abis, CTLFLAG_RD | CTLFLAG_MPSAFE, +#ifdef COMPAT_FREEBSD32 + MACHINE_ARCH " " MACHINE_ARCH32, 0, "List of supported ABIs"); +#else + MACHINE_ARCH, 0, "List of supported ABIs"); +#endif + static int sysctl_hostname(SYSCTL_HANDLER_ARGS) { From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 02:33:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56FD61A9; Mon, 2 Dec 2013 02:33:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3856116FB; Mon, 2 Dec 2013 02:33: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 rB22X4NI099188; Mon, 2 Dec 2013 02:33:04 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB22X4ME099186; Mon, 2 Dec 2013 02:33:04 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201312020233.rB22X4ME099186@svn.freebsd.org> From: Ian Lepore Date: Mon, 2 Dec 2013 02:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258820 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 02:33:04 -0000 Author: ian Date: Mon Dec 2 02:33:03 2013 New Revision: 258820 URL: http://svnweb.freebsd.org/changeset/base/258820 Log: Add definitions for the additional PIO pins found on recent AT91 SoCs. Modified: head/sys/arm/at91/at91_pioreg.h Modified: head/sys/arm/at91/at91_pioreg.h ============================================================================== --- head/sys/arm/at91/at91_pioreg.h Mon Dec 2 00:44:36 2013 (r258819) +++ head/sys/arm/at91/at91_pioreg.h Mon Dec 2 02:33:03 2013 (r258820) @@ -164,5 +164,69 @@ #define AT91C_PIO_PC29 ((unsigned int) 1 << 29) // Pin Controlled by PC29 #define AT91C_PIO_PC30 ((unsigned int) 1 << 30) // Pin Controlled by PC30 #define AT91C_PIO_PC31 ((unsigned int) 1 << 31) // Pin Controlled by PC31 +#define AT91C_PIO_PD0 ((unsigned int) 1 << 0) // Pin Controlled by PD0 +#define AT91C_PIO_PD1 ((unsigned int) 1 << 1) // Pin Controlled by PD1 +#define AT91C_PIO_PD2 ((unsigned int) 1 << 2) // Pin Controlled by PD2 +#define AT91C_PIO_PD3 ((unsigned int) 1 << 3) // Pin Controlled by PD3 +#define AT91C_PIO_PD4 ((unsigned int) 1 << 4) // Pin Controlled by PD4 +#define AT91C_PIO_PD5 ((unsigned int) 1 << 5) // Pin Controlled by PD5 +#define AT91C_PIO_PD6 ((unsigned int) 1 << 6) // Pin Controlled by PD6 +#define AT91C_PIO_PD7 ((unsigned int) 1 << 7) // Pin Controlled by PD7 +#define AT91C_PIO_PD8 ((unsigned int) 1 << 8) // Pin Controlled by PD8 +#define AT91C_PIO_PD9 ((unsigned int) 1 << 9) // Pin Controlled by PD9 +#define AT91C_PIO_PD10 ((unsigned int) 1 << 10) // Pin Controlled by PD10 +#define AT91C_PIO_PD11 ((unsigned int) 1 << 11) // Pin Controlled by PD11 +#define AT91C_PIO_PD12 ((unsigned int) 1 << 12) // Pin Controlled by PD12 +#define AT91C_PIO_PD13 ((unsigned int) 1 << 13) // Pin Controlled by PD13 +#define AT91C_PIO_PD14 ((unsigned int) 1 << 14) // Pin Controlled by PD14 +#define AT91C_PIO_PD15 ((unsigned int) 1 << 15) // Pin Controlled by PD15 +#define AT91C_PIO_PD16 ((unsigned int) 1 << 16) // Pin Controlled by PD16 +#define AT91C_PIO_PD17 ((unsigned int) 1 << 17) // Pin Controlled by PD17 +#define AT91C_PIO_PD18 ((unsigned int) 1 << 18) // Pin Controlled by PD18 +#define AT91C_PIO_PD19 ((unsigned int) 1 << 19) // Pin Controlled by PD19 +#define AT91C_PIO_PD20 ((unsigned int) 1 << 20) // Pin Controlled by PD20 +#define AT91C_PIO_PD21 ((unsigned int) 1 << 21) // Pin Controlled by PD21 +#define AT91C_PIO_PD22 ((unsigned int) 1 << 22) // Pin Controlled by PD22 +#define AT91C_PIO_PD23 ((unsigned int) 1 << 23) // Pin Controlled by PD23 +#define AT91C_PIO_PD24 ((unsigned int) 1 << 24) // Pin Controlled by PD24 +#define AT91C_PIO_PD25 ((unsigned int) 1 << 25) // Pin Controlled by PD25 +#define AT91C_PIO_PD26 ((unsigned int) 1 << 26) // Pin Controlled by PD26 +#define AT91C_PIO_PD27 ((unsigned int) 1 << 27) // Pin Controlled by PD27 +#define AT91C_PIO_PD28 ((unsigned int) 1 << 28) // Pin Controlled by PD28 +#define AT91C_PIO_PD29 ((unsigned int) 1 << 29) // Pin Controlled by PD29 +#define AT91C_PIO_PD30 ((unsigned int) 1 << 30) // Pin Controlled by PD30 +#define AT91C_PIO_PD31 ((unsigned int) 1 << 31) // Pin Controlled by PD31 +#define AT91C_PIO_PE0 ((unsigned int) 1 << 0) // Pin Controlled by PE0 +#define AT91C_PIO_PE1 ((unsigned int) 1 << 1) // Pin Controlled by PE1 +#define AT91C_PIO_PE2 ((unsigned int) 1 << 2) // Pin Controlled by PE2 +#define AT91C_PIO_PE3 ((unsigned int) 1 << 3) // Pin Controlled by PE3 +#define AT91C_PIO_PE4 ((unsigned int) 1 << 4) // Pin Controlled by PE4 +#define AT91C_PIO_PE5 ((unsigned int) 1 << 5) // Pin Controlled by PE5 +#define AT91C_PIO_PE6 ((unsigned int) 1 << 6) // Pin Controlled by PE6 +#define AT91C_PIO_PE7 ((unsigned int) 1 << 7) // Pin Controlled by PE7 +#define AT91C_PIO_PE8 ((unsigned int) 1 << 8) // Pin Controlled by PE8 +#define AT91C_PIO_PE9 ((unsigned int) 1 << 9) // Pin Controlled by PE9 +#define AT91C_PIO_PE10 ((unsigned int) 1 << 10) // Pin Controlled by PE10 +#define AT91C_PIO_PE11 ((unsigned int) 1 << 11) // Pin Controlled by PE11 +#define AT91C_PIO_PE12 ((unsigned int) 1 << 12) // Pin Controlled by PE12 +#define AT91C_PIO_PE13 ((unsigned int) 1 << 13) // Pin Controlled by PE13 +#define AT91C_PIO_PE14 ((unsigned int) 1 << 14) // Pin Controlled by PE14 +#define AT91C_PIO_PE15 ((unsigned int) 1 << 15) // Pin Controlled by PE15 +#define AT91C_PIO_PE16 ((unsigned int) 1 << 16) // Pin Controlled by PE16 +#define AT91C_PIO_PE17 ((unsigned int) 1 << 17) // Pin Controlled by PE17 +#define AT91C_PIO_PE18 ((unsigned int) 1 << 18) // Pin Controlled by PE18 +#define AT91C_PIO_PE19 ((unsigned int) 1 << 19) // Pin Controlled by PE19 +#define AT91C_PIO_PE20 ((unsigned int) 1 << 20) // Pin Controlled by PE20 +#define AT91C_PIO_PE21 ((unsigned int) 1 << 21) // Pin Controlled by PE21 +#define AT91C_PIO_PE22 ((unsigned int) 1 << 22) // Pin Controlled by PE22 +#define AT91C_PIO_PE23 ((unsigned int) 1 << 23) // Pin Controlled by PE23 +#define AT91C_PIO_PE24 ((unsigned int) 1 << 24) // Pin Controlled by PE24 +#define AT91C_PIO_PE25 ((unsigned int) 1 << 25) // Pin Controlled by PE25 +#define AT91C_PIO_PE26 ((unsigned int) 1 << 26) // Pin Controlled by PE26 +#define AT91C_PIO_PE27 ((unsigned int) 1 << 27) // Pin Controlled by PE27 +#define AT91C_PIO_PE28 ((unsigned int) 1 << 28) // Pin Controlled by PE28 +#define AT91C_PIO_PE29 ((unsigned int) 1 << 29) // Pin Controlled by PE29 +#define AT91C_PIO_PE30 ((unsigned int) 1 << 30) // Pin Controlled by PE30 +#define AT91C_PIO_PE31 ((unsigned int) 1 << 31) // Pin Controlled by PE31 #endif /* ARM_AT91_AT91_PIOREG_H */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 03:11:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B454735; Mon, 2 Dec 2013 03:11:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 881D66C85; Mon, 2 Dec 2013 03:11:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB23BQoG078909; Mon, 2 Dec 2013 03:11:26 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB23BQIv078908; Mon, 2 Dec 2013 03:11:26 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312020311.rB23BQIv078908@svn.freebsd.org> From: Eitan Adler Date: Mon, 2 Dec 2013 03:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258821 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 03:11:26 -0000 Author: eadler Date: Mon Dec 2 03:11:25 2013 New Revision: 258821 URL: http://svnweb.freebsd.org/changeset/base/258821 Log: In a situation where: - The remote host sends a FIN - in an ACK for a sequence number for which an ACK has already been received - There is still unacked data on route to the remote host - The packet does not contain a window update The packet may be dropped without processing the FIN flag. PR: kern/99188 Submitted by: Staffan Ulfberg Discussed with: andre MFC after: never Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Dec 2 02:33:03 2013 (r258820) +++ head/sys/netinet/tcp_input.c Mon Dec 2 03:11:25 2013 (r258821) @@ -2429,13 +2429,15 @@ tcp_do_segment(struct mbuf *m, struct tc hhook_run_tcp_est_in(tp, th, &to); if (SEQ_LEQ(th->th_ack, tp->snd_una)) { - if (tlen == 0 && tiwin == tp->snd_wnd) { + if (tlen == 0 && tiwin == tp->snd_wnd && + !(thflags & TH_FIN)) { TCPSTAT_INC(tcps_rcvdupack); /* * If we have outstanding data (other than * a window probe), this is a completely * duplicate ack (ie, window info didn't - * change), the ack is the biggest we've + * change and FIN isn't set), + * the ack is the biggest we've * seen and we've seen exactly our rexmt * threshhold of them, assume a packet * has been dropped and retransmit it. From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 03:24:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8EC295A for ; Mon, 2 Dec 2013 03:24:00 +0000 (UTC) Received: from mail-qe0-x22f.google.com (mail-qe0-x22f.google.com [IPv6:2607:f8b0:400d:c02::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5EEC16CF6 for ; Mon, 2 Dec 2013 03:24:00 +0000 (UTC) Received: by mail-qe0-f47.google.com with SMTP id t7so12505852qeb.20 for ; Sun, 01 Dec 2013 19:23:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=HrcwzxpxkBpF2tmiUMK/8e2LuFWoOUy6NeZNi7juCFI=; b=tRuO/1LhqOL17kky+DdXwv6sEo55o7shRCMN/oO2Ev0X8XGHuVIiLRve99ItoFsVRm K3L0D9ICZOBRKdhii4z5D/GbWHpa4vhynL0iCe9AaFfci7HH8p9+rgxE4yIM/mckBoP2 DMDWBhGCOiBlcre+A7ySu17qqH+IZWyxUbIbM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=HrcwzxpxkBpF2tmiUMK/8e2LuFWoOUy6NeZNi7juCFI=; b=UfyXI3xaBinc1PExKCbmvRGdMuCNUATMzj6hYM20nfDjoQrIRnF8hFjtPIDaL0V5Bj ZFwu+ZaAinkqHs/HwvTNf7jc7K+ie40N4qI56drsdk4+bXCvHH4ZC5HioUY+VDBxwzzN na8fe7IEa01ckYNUMVoONGeYec3seMzH+jVa8kGVmv3snCeMH5S13EEdFEt/12x7LZ1r 6wrfgPKr5XQ0GVup52sFmaG96tlBy5gRUsLF/M0OyCmcRR6muWR+y4B8R/AcGZsG2Ew1 +cVa+s3qXE4T7K3N4BhkTM6n7EjLtAuEeGAc2NZw7kA1F5FtY/pHX/PVw79N6We5d+Lk 2ClQ== X-Gm-Message-State: ALoCoQnDh93nAqPaUzjHCMiXv/6jaiV0ulGQ5GDBMdlSd6Iif5rfhu8Otb6LkGdkgYWjo+jAxVe0 X-Received: by 10.224.75.9 with SMTP id w9mr45111296qaj.68.1385954639609; Sun, 01 Dec 2013 19:23:59 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.86.42 with HTTP; Sun, 1 Dec 2013 19:23:29 -0800 (PST) In-Reply-To: <20131201230735.GB24849@stack.nl> References: <201311302216.rAUMGcPA037268@svn.freebsd.org> <20131201075944.GF59496@kib.kiev.ua> <20131201230735.GB24849@stack.nl> From: Eitan Adler Date: Sun, 1 Dec 2013 22:23:29 -0500 X-Google-Sender-Auth: Pp0TPXzJK0tXNCzXdXTEGK1XL2c Message-ID: Subject: Re: svn commit: r258779 - in head/sys/dev: cesa drm drm2/i915 drm2/radeon hatm To: Jilles Tjoelker Content-Type: text/plain; charset=UTF-8 Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 03:24:00 -0000 On Sun, Dec 1, 2013 at 6:07 PM, Jilles Tjoelker wrote: >> Revert the drm2/i915 changes from this and following commits now. >> You did not contacted obvious maintainer of the file. Of course I did not. This was discussed on arch@ and the change made mechanically. >> The changes are pointless and make the import of upstream changes >> harder; for i915_reg.h, much harder. > > This is a valid concern. The change should be submitted to upstream; if > upstream does not want the change, it is better to avoid the issue by > adding -fno-strict-overflow for the offending files, matching upstream. I will revert to the broken and incorrect code in sys/dev/drm2/i915. Upstream should be contacted with the patch. >> Not to mention that the whole churn is not needed if the >> -fno-strict-overflow flag is used. > > I think the undefined shifts should be fixed where possible and not in > contributed code. Agreed. In addition, contributed code ought to be clearly differentiated in the directory hierarchy. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 03:36:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34449B2F; Mon, 2 Dec 2013 03:36:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1505D6D4F; Mon, 2 Dec 2013 03:36:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB23aiEJ088952; Mon, 2 Dec 2013 03:36:44 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB23aid9088951; Mon, 2 Dec 2013 03:36:44 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312020336.rB23aid9088951@svn.freebsd.org> From: Eitan Adler Date: Mon, 2 Dec 2013 03:36:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258822 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 03:36:45 -0000 Author: eadler Date: Mon Dec 2 03:36:44 2013 New Revision: 258822 URL: http://svnweb.freebsd.org/changeset/base/258822 Log: Partial revert of r258779 and r258780: The directory sys/dev/drm2/i915 is apperently contributed code. Revert to the broken version of this file to make future imports easier. Requested by: kib Modified: head/sys/dev/drm2/i915/i915_reg.h Modified: head/sys/dev/drm2/i915/i915_reg.h ============================================================================== --- head/sys/dev/drm2/i915/i915_reg.h Mon Dec 2 03:11:25 2013 (r258821) +++ head/sys/dev/drm2/i915/i915_reg.h Mon Dec 2 03:36:44 2013 (r258822) @@ -798,7 +798,7 @@ __FBSDID("$FreeBSD$"); #define _DPLL_A 0x06014 #define _DPLL_B 0x06018 #define DPLL(pipe) _PIPE(pipe, _DPLL_A, _DPLL_B) -#define DPLL_VCO_ENABLE (1U << 31) +#define DPLL_VCO_ENABLE (1 << 31) #define DPLL_DVO_HIGH_SPEED (1 << 30) #define DPLL_SYNCLOCK_ENABLE (1 << 29) #define DPLL_VGA_MODE_DIS (1 << 28) @@ -1483,7 +1483,7 @@ __FBSDID("$FreeBSD$"); /* SDVO port control */ #define SDVOB 0x61140 #define SDVOC 0x61160 -#define SDVO_ENABLE (1U << 31) +#define SDVO_ENABLE (1 << 31) #define SDVO_PIPE_B_SELECT (1 << 30) #define SDVO_STALL_SELECT (1 << 29) #define SDVO_INTERRUPT_ENABLE (1 << 26) @@ -1521,7 +1521,7 @@ __FBSDID("$FreeBSD$"); #define DVOA 0x61120 #define DVOB 0x61140 #define DVOC 0x61160 -#define DVO_ENABLE (1U << 31) +#define DVO_ENABLE (1 << 31) #define DVO_PIPE_B_SELECT (1 << 30) #define DVO_PIPE_STALL_UNUSED (0 << 28) #define DVO_PIPE_STALL (1 << 28) @@ -1557,7 +1557,7 @@ __FBSDID("$FreeBSD$"); * Enables the LVDS port. This bit must be set before DPLLs are enabled, as * the DPLL semantics change when the LVDS is assigned to that pipe. */ -#define LVDS_PORT_EN (1U << 31) +#define LVDS_PORT_EN (1 << 31) /* Selects pipe B for LVDS data. Must be set on pre-965. */ #define LVDS_PIPEB_SELECT (1 << 30) #define LVDS_PIPE_MASK (1 << 30) @@ -1604,7 +1604,7 @@ __FBSDID("$FreeBSD$"); /* Video Data Island Packet control */ #define VIDEO_DIP_DATA 0x61178 #define VIDEO_DIP_CTL 0x61170 -#define VIDEO_DIP_ENABLE (1U << 31) +#define VIDEO_DIP_ENABLE (1 << 31) #define VIDEO_DIP_PORT_B (1 << 29) #define VIDEO_DIP_PORT_C (2 << 29) #define VIDEO_DIP_ENABLE_AVI (1 << 21) @@ -1620,7 +1620,7 @@ __FBSDID("$FreeBSD$"); /* Panel power sequencing */ #define PP_STATUS 0x61200 -#define PP_ON (1U << 31) +#define PP_ON (1 << 31) /* * Indicates that all dependencies of the panel are on: * @@ -1653,7 +1653,7 @@ __FBSDID("$FreeBSD$"); /* Panel fitting */ #define PFIT_CONTROL 0x61230 -#define PFIT_ENABLE (1U << 31) +#define PFIT_ENABLE (1 << 31) #define PFIT_PIPE_MASK (3 << 29) #define PFIT_PIPE_SHIFT 29 #define VERT_INTERP_DISABLE (0 << 10) @@ -1714,7 +1714,7 @@ __FBSDID("$FreeBSD$"); /* TV port control */ #define TV_CTL 0x68000 /** Enables the TV encoder */ -# define TV_ENC_ENABLE (1U << 31) +# define TV_ENC_ENABLE (1 << 31) /** Sources the TV encoder input from pipe B instead of A. */ # define TV_ENC_PIPEB_SELECT (1 << 30) /** Outputs composite video (DAC A only) */ @@ -1786,7 +1786,7 @@ __FBSDID("$FreeBSD$"); * * This gets cleared when TV_DAC_STATE_EN is cleared */ -# define TVDAC_STATE_CHG (1U << 31) +# define TVDAC_STATE_CHG (1 << 31) # define TVDAC_SENSE_MASK (7 << 28) /** Reports that DAC A voltage is above the detect threshold */ # define TVDAC_A_SENSE (1 << 30) @@ -1913,7 +1913,7 @@ __FBSDID("$FreeBSD$"); #define TV_H_CTL_2 0x68034 /** Enables the colorburst (needed for non-component color) */ -# define TV_BURST_ENA (1U << 31) +# define TV_BURST_ENA (1 << 31) /** Offset of the colorburst from the start of hsync, in pixels minus one. */ # define TV_HBURST_START_SHIFT 16 # define TV_HBURST_START_MASK 0x1fff0000 @@ -1958,7 +1958,7 @@ __FBSDID("$FreeBSD$"); #define TV_V_CTL_3 0x68044 /** Enables generation of the equalization signal */ -# define TV_EQUAL_ENA (1U << 31) +# define TV_EQUAL_ENA (1 << 31) /** Length of vsync, in half lines */ # define TV_VEQ_LEN_MASK 0x007f0000 # define TV_VEQ_LEN_SHIFT 16 @@ -2032,7 +2032,7 @@ __FBSDID("$FreeBSD$"); #define TV_SC_CTL_1 0x68060 /** Turns on the first subcarrier phase generation DDA */ -# define TV_SC_DDA1_EN (1U << 31) +# define TV_SC_DDA1_EN (1 << 31) /** Turns on the first subcarrier phase generation DDA */ # define TV_SC_DDA2_EN (1 << 30) /** Turns on the first subcarrier phase generation DDA */ @@ -2095,7 +2095,7 @@ __FBSDID("$FreeBSD$"); * If set, the rest of the registers are ignored, and the calculated values can * be read back from the register. */ -# define TV_AUTO_SCALE (1U << 31) +# define TV_AUTO_SCALE (1 << 31) /** * Disables the vertical filter. * @@ -2158,7 +2158,7 @@ __FBSDID("$FreeBSD$"); # define TV_VSCALE_IP_FRAC_SHIFT 0 #define TV_CC_CONTROL 0x68090 -# define TV_CC_ENABLE (1U << 31) +# define TV_CC_ENABLE (1 << 31) /** * Specifies which field to send the CC data in. * @@ -2174,7 +2174,7 @@ __FBSDID("$FreeBSD$"); # define TV_CC_LINE_SHIFT 0 #define TV_CC_DATA 0x68094 -# define TV_CC_RDY (1U << 31) +# define TV_CC_RDY (1 << 31) /** Second word of CC data to be transmitted. */ # define TV_CC_DATA_2_MASK 0x007f0000 # define TV_CC_DATA_2_SHIFT 16 @@ -2197,7 +2197,7 @@ __FBSDID("$FreeBSD$"); #define DP_C 0x64200 #define DP_D 0x64300 -#define DP_PORT_EN (1U << 31) +#define DP_PORT_EN (1 << 31) #define DP_PIPEB_SELECT (1 << 30) #define DP_PIPE_MASK (1 << 30) @@ -2307,7 +2307,7 @@ __FBSDID("$FreeBSD$"); #define DPD_AUX_CH_DATA4 0x64320 #define DPD_AUX_CH_DATA5 0x64324 -#define DP_AUX_CH_CTL_SEND_BUSY (1U << 31) +#define DP_AUX_CH_CTL_SEND_BUSY (1 << 31) #define DP_AUX_CH_CTL_DONE (1 << 30) #define DP_AUX_CH_CTL_INTERRUPT (1 << 29) #define DP_AUX_CH_CTL_TIME_OUT_ERROR (1 << 28) @@ -2903,7 +2903,7 @@ __FBSDID("$FreeBSD$"); /* VBIOS regs */ #define VGACNTRL 0x71400 -# define VGA_DISP_DISABLE (1U << 31) +# define VGA_DISP_DISABLE (1 << 31) # define VGA_2X_MODE (1 << 30) # define VGA_PIPE_B_SELECT (1 << 29) @@ -3029,7 +3029,7 @@ __FBSDID("$FreeBSD$"); #define LGC_PALETTE(pipe) _PIPE(pipe, _LGC_PALETTE_A, _LGC_PALETTE_B) /* interrupts */ -#define DE_MASTER_IRQ_CONTROL (1U << 31) +#define DE_MASTER_IRQ_CONTROL (1 << 31) #define DE_SPRITEB_FLIP_DONE (1 << 29) #define DE_SPRITEA_FLIP_DONE (1 << 28) #define DE_PLANEB_FLIP_DONE (1 << 27) @@ -3553,7 +3553,7 @@ __FBSDID("$FreeBSD$"); /* or SDVOB */ #define HDMIB 0xe1140 -#define PORT_ENABLE (1U << 31) +#define PORT_ENABLE (1 << 31) #define TRANSCODER(pipe) ((pipe) << 30) #define TRANSCODER_CPT(pipe) ((pipe) << 29) #define TRANSCODER_MASK (1 << 30) @@ -3583,13 +3583,13 @@ __FBSDID("$FreeBSD$"); #define LVDS_DETECTED (1 << 1) #define BLC_PWM_CPU_CTL2 0x48250 -#define PWM_ENABLE (1U << 31) +#define PWM_ENABLE (1 << 31) #define PWM_PIPE_A (0 << 29) #define PWM_PIPE_B (1 << 29) #define BLC_PWM_CPU_CTL 0x48254 #define BLC_PWM_PCH_CTL1 0xc8250 -#define PWM_PCH_ENABLE (1U << 31) +#define PWM_PCH_ENABLE (1 << 31) #define PWM_POLARITY_ACTIVE_LOW (1 << 29) #define PWM_POLARITY_ACTIVE_HIGH (0 << 29) #define PWM_POLARITY_ACTIVE_LOW2 (1 << 28) @@ -3611,8 +3611,8 @@ __FBSDID("$FreeBSD$"); #define PANEL_PORT_SELECT_LVDS (0 << 30) #define PANEL_PORT_SELECT_DPA (1 << 30) #define EDP_PANEL (1 << 30) -#define PANEL_PORT_SELECT_DPC (2U << 30) -#define PANEL_PORT_SELECT_DPD (3U << 30) +#define PANEL_PORT_SELECT_DPC (2 << 30) +#define PANEL_PORT_SELECT_DPD (3 << 30) #define PANEL_POWER_UP_DELAY_MASK (0x1fff0000) #define PANEL_POWER_UP_DELAY_SHIFT 16 #define PANEL_LIGHT_ON_DELAY_MASK (0x1fff) From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 03:40:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D1C4DCC; Mon, 2 Dec 2013 03:40:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 005F96D9B; Mon, 2 Dec 2013 03:40:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB23epT5092011; Mon, 2 Dec 2013 03:40:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB23ep3t092010; Mon, 2 Dec 2013 03:40:51 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312020340.rB23ep3t092010@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 Dec 2013 03:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258823 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 03:40:52 -0000 Author: adrian Date: Mon Dec 2 03:40:51 2013 New Revision: 258823 URL: http://svnweb.freebsd.org/changeset/base/258823 Log: Add some code to double-check whether we're correctly populating the TX ring according to what the firmware requires. The firmware requires A-MPDU sub-frames to be at a very specific ring offset - that is, the ring slot offset should be (seqno % 256.) This holds for every NIC I've tested thus far except the 4965, which starts erroring out here shortly before the firmware panics. Which is good, it's doing what it's supposed to (read: capture that we've screwed up somewhere.) The specifics about getting this stuff right: * the initial seqno allocation should match up with the ringid. * .. yes, this means we can start at a ring offset that isn't zero. * .. because we program the start seqno in the firmware message to setup the AC. * The initial seqno allocation may be non-zero _and_ frames may be being transmitted during a-mpdu negotiation. I faced similar issues on ath(4) and had to software queue frames to that node+TID during A-MPDU negotiation. * seqno allocation should be in lockstep with ring increments. * If we fail to transmit some segment, no, we shouldn't reuse that ring slot. We should just transmit a BAR (which we aren't yet doing, sigh) and move onto the next seqno. * In theory there shouldn't be any holes in the seqno space when we are transmitting frames. Tested: * 4965 (throws problems, so yes we have to fix this); * 5100 (seems ok); * 6200 (seems ok); * 2200 (seems ok); * 2230 (seems ok). Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Dec 2 03:36:44 2013 (r258822) +++ head/sys/dev/iwn/if_iwn.c Mon Dec 2 03:40:51 2013 (r258823) @@ -4070,6 +4070,7 @@ iwn_tx_data(struct iwn_softc *sc, struct } ac = M_WME_GETAC(m); if (m->m_flags & M_AMPDU_MPDU) { + uint16_t seqno; struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[ac]; if (!IEEE80211_AMPDU_RUNNING(tap)) { @@ -4077,9 +4078,27 @@ iwn_tx_data(struct iwn_softc *sc, struct return EINVAL; } + /* + * Queue this frame to the hardware ring that we've + * negotiated AMPDU TX on. + * + * Note that the sequence number must match the TX slot + * being used! + */ ac = *(int *)tap->txa_private; + seqno = ni->ni_txseqs[tid]; *(uint16_t *)wh->i_seq = - htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT); + htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT); + ring = &sc->txq[ac]; + if ((seqno % 256) != ring->cur) { + device_printf(sc->sc_dev, + "%s: m=%p: seqno (%d) (%d) != ring index (%d) !\n", + __func__, + m, + seqno, + seqno % 256, + ring->cur); + } ni->ni_txseqs[tid]++; } ring = &sc->txq[ac]; From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 03:42:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1229F17; Mon, 2 Dec 2013 03:42:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE97B6DA8; Mon, 2 Dec 2013 03:42:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB23gegM092675; Mon, 2 Dec 2013 03:42:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB23geHH092674; Mon, 2 Dec 2013 03:42:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312020342.rB23geHH092674@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 Dec 2013 03:42:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258824 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 03:42:40 -0000 Author: adrian Date: Mon Dec 2 03:42:39 2013 New Revision: 258824 URL: http://svnweb.freebsd.org/changeset/base/258824 Log: Add some sanity checks to the TLV fetch. Obtained from: Linux iwlwifi Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Dec 2 03:40:51 2013 (r258823) +++ head/sys/dev/iwn/if_iwn.c Mon Dec 2 03:42:39 2013 (r258824) @@ -7506,8 +7506,16 @@ iwn_read_firmware_tlv(struct iwn_softc * DPRINTF(sc, IWN_DEBUG_RESET, "PAN Support found: %d\n", 1); break; - case IWN_FW_TLV_FLAGS : - sc->tlv_feature_flags = htole32(*ptr); + case IWN_FW_TLV_FLAGS: + if (len < sizeof(uint32_t)) + break; + if (len % sizeof(uint32_t)) + break; + sc->tlv_feature_flags = le32toh(*ptr); + DPRINTF(sc, IWN_DEBUG_RESET, + "%s: feature: 0x%08x\n", + __func__, + sc->tlv_feature_flags); break; case IWN_FW_TLV_PBREQ_MAXLEN: case IWN_FW_TLV_RUNT_EVTLOG_PTR: From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 03:43:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B8D8E0; Mon, 2 Dec 2013 03:43:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 290D86DAC; Mon, 2 Dec 2013 03:43:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB23hcjs092960; Mon, 2 Dec 2013 03:43:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB23hcg3092959; Mon, 2 Dec 2013 03:43:38 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312020343.rB23hcg3092959@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 Dec 2013 03:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258825 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 03:43:38 -0000 Author: adrian Date: Mon Dec 2 03:43:37 2013 New Revision: 258825 URL: http://svnweb.freebsd.org/changeset/base/258825 Log: Oops - fix bad indent. Sorry! Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Dec 2 03:42:39 2013 (r258824) +++ head/sys/dev/iwn/if_iwn.c Mon Dec 2 03:43:37 2013 (r258825) @@ -7506,7 +7506,7 @@ iwn_read_firmware_tlv(struct iwn_softc * DPRINTF(sc, IWN_DEBUG_RESET, "PAN Support found: %d\n", 1); break; - case IWN_FW_TLV_FLAGS: + case IWN_FW_TLV_FLAGS: if (len < sizeof(uint32_t)) break; if (len % sizeof(uint32_t)) From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 03:47:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A61C24E; Mon, 2 Dec 2013 03:47:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 05BBA6DC7; Mon, 2 Dec 2013 03:47:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB23l9lV093992; Mon, 2 Dec 2013 03:47:09 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB23l92h093977; Mon, 2 Dec 2013 03:47:09 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312020347.rB23l92h093977@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 2 Dec 2013 03:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258826 - head/contrib/gcclibs/libcpp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 03:47:10 -0000 Author: pfg Date: Mon Dec 2 03:47:08 2013 New Revision: 258826 URL: http://svnweb.freebsd.org/changeset/base/258826 Log: libcpp: Merge fixes from upstream GCC preprocessor/29966: * macro.c (lex_expansion_token): Save and restore cpp_reader's cur_token. (_cpp_create_definition): Don't restore cur_token here. * lex.c (_cpp_lex_token): Added assertion. GCC preprocessor/28709: * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs. GCC c/31924 * expr.c (interpret_float_suffix): Check for invalid suffix. GCC preprocessor/14331 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF. Fixup whitespacing Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730, 125212, 125255 ; GPLv2) MFC after: 3 weeks Modified: head/contrib/gcclibs/libcpp/ChangeLog.gcc43 head/contrib/gcclibs/libcpp/expr.c head/contrib/gcclibs/libcpp/lex.c head/contrib/gcclibs/libcpp/macro.c head/contrib/gcclibs/libcpp/pch.c Modified: head/contrib/gcclibs/libcpp/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcclibs/libcpp/ChangeLog.gcc43 Mon Dec 2 03:43:37 2013 (r258825) +++ head/contrib/gcclibs/libcpp/ChangeLog.gcc43 Mon Dec 2 03:47:08 2013 (r258826) @@ -7,6 +7,11 @@ * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed binary integer constants. +2007-05-31 Dave Korn (r125212) + + PR preprocessor/14331 + * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF. + 2007-05-21 Ian Lance Taylor (r124929) * internal.h (struct cpp_reader): Add new fields: @@ -23,6 +28,29 @@ (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and pfile->nonexistent_file_ob. +2007-05-14 Janis Johnson (r124731) + + PR c/31924 + * expr.c (interpret_float_suffix): Check for invalid suffix. + +2007-05-02 Eric Christopher (r124358) + + * expr.c (num_div_op): Don't overflow if the result is + zero. + +2007-05-02 Tom Tromey (r124356) + + PR preprocessor/28709: + * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs. + +2007-01-30 Tom Tromey (r121340) + + PR preprocessor/29966: + * macro.c (lex_expansion_token): Save and restore cpp_reader's + cur_token. + (_cpp_create_definition): Don't restore cur_token here. + * lex.c (_cpp_lex_token): Added assertion. + 2006-12-29 Ian Lance Taylor (r120263) * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't Modified: head/contrib/gcclibs/libcpp/expr.c ============================================================================== --- head/contrib/gcclibs/libcpp/expr.c Mon Dec 2 03:43:37 2013 (r258825) +++ head/contrib/gcclibs/libcpp/expr.c Mon Dec 2 03:47:08 2013 (r258826) @@ -87,16 +87,19 @@ interpret_float_suffix (const uchar *s, while (len--) switch (s[len]) { - case 'f': case 'F': f++; break; - case 'l': case 'L': l++; break; - case 'i': case 'I': - case 'j': case 'J': i++; break; - case 'd': case 'D': - /* Disallow fd, ld suffixes. */ - if (d && (f || l)) + case 'f': case 'F': + if (d > 0) + return 0; + f++; + break; + case 'l': case 'L': + if (d > 0) return 0; - d++; + l++; break; + case 'i': case 'I': + case 'j': case 'J': i++; break; + case 'd': case 'D': d++; break; default: return 0; } @@ -494,7 +497,7 @@ append_digit (cpp_num num, int digit, in if (add_low + digit < add_low) add_high++; add_low += digit; - + if (result.low + add_low < result.low) add_high++; if (result.high + add_high < result.high) @@ -1580,7 +1583,8 @@ num_div_op (cpp_reader *pfile, cpp_num l { if (negate) result = num_negate (result, precision); - result.overflow = num_positive (result, precision) ^ !negate; + result.overflow = (num_positive (result, precision) ^ !negate + && !num_zerop (result)); } return result; Modified: head/contrib/gcclibs/libcpp/lex.c ============================================================================== --- head/contrib/gcclibs/libcpp/lex.c Mon Dec 2 03:43:37 2013 (r258825) +++ head/contrib/gcclibs/libcpp/lex.c Mon Dec 2 03:47:08 2013 (r258826) @@ -766,6 +766,11 @@ _cpp_lex_token (cpp_reader *pfile) pfile->cur_run = next_tokenrun (pfile->cur_run); pfile->cur_token = pfile->cur_run->base; } + /* We assume that the current token is somewhere in the current + run. */ + if (pfile->cur_token < pfile->cur_run->base + || pfile->cur_token >= pfile->cur_run->limit) + abort (); if (pfile->lookaheads) { @@ -847,11 +852,8 @@ _cpp_get_fresh_line (cpp_reader *pfile) && buffer->next_line > buffer->rlimit && !buffer->from_stage3) { - /* Only warn once. */ + /* Clip to buffer size. */ buffer->next_line = buffer->rlimit; - cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, - CPP_BUF_COLUMN (buffer, buffer->cur), - "no newline at end of file"); } return_at_eof = buffer->return_at_eof; Modified: head/contrib/gcclibs/libcpp/macro.c ============================================================================== --- head/contrib/gcclibs/libcpp/macro.c Mon Dec 2 03:43:37 2013 (r258825) +++ head/contrib/gcclibs/libcpp/macro.c Mon Dec 2 03:47:08 2013 (r258826) @@ -1,6 +1,7 @@ /* Part of CPP library. (Macro and #define handling.) Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -438,19 +439,18 @@ static bool paste_tokens (cpp_reader *pfile, const cpp_token **plhs, const cpp_token *rhs) { unsigned char *buf, *end, *lhsend; - const cpp_token *lhs; + cpp_token *lhs; unsigned int len; - lhs = *plhs; - len = cpp_token_len (lhs) + cpp_token_len (rhs) + 1; + len = cpp_token_len (*plhs) + cpp_token_len (rhs) + 1; buf = (unsigned char *) alloca (len); - end = lhsend = cpp_spell_token (pfile, lhs, buf, false); + end = lhsend = cpp_spell_token (pfile, *plhs, buf, false); /* Avoid comment headers, since they are still processed in stage 3. It is simpler to insert a space here, rather than modifying the lexer to ignore comments in some circumstances. Simply returning false doesn't work, since we want to clear the PASTE_LEFT flag. */ - if (lhs->type == CPP_DIV && rhs->type != CPP_EQ) + if ((*plhs)->type == CPP_DIV && rhs->type != CPP_EQ) *end++ = ' '; end = cpp_spell_token (pfile, rhs, end, false); *end = '\n'; @@ -460,13 +460,22 @@ paste_tokens (cpp_reader *pfile, const c /* Set pfile->cur_token as required by _cpp_lex_direct. */ pfile->cur_token = _cpp_temp_token (pfile); - *plhs = _cpp_lex_direct (pfile); + lhs = _cpp_lex_direct (pfile); if (pfile->buffer->cur != pfile->buffer->rlimit) { + source_location saved_loc = lhs->src_loc; + _cpp_pop_buffer (pfile); _cpp_backup_tokens (pfile, 1); *lhsend = '\0'; + /* We have to remove the PASTE_LEFT flag from the old lhs, but + we want to keep the new location. */ + *lhs = **plhs; + *plhs = lhs; + lhs->src_loc = saved_loc; + lhs->flags &= ~PASTE_LEFT; + /* Mandatory error for all apart from assembler. */ if (CPP_OPTION (pfile, lang) != CLK_ASM) cpp_error (pfile, CPP_DL_ERROR, @@ -475,6 +484,7 @@ paste_tokens (cpp_reader *pfile, const c return false; } + *plhs = lhs; _cpp_pop_buffer (pfile); return true; } @@ -1405,10 +1415,12 @@ alloc_expansion_token (cpp_reader *pfile static cpp_token * lex_expansion_token (cpp_reader *pfile, cpp_macro *macro) { - cpp_token *token; + cpp_token *token, *saved_cur_token; + saved_cur_token = pfile->cur_token; pfile->cur_token = alloc_expansion_token (pfile, macro); token = _cpp_lex_direct (pfile); + pfile->cur_token = saved_cur_token; /* Is this a parameter? */ if (token->type == CPP_NAME @@ -1597,18 +1609,12 @@ _cpp_create_definition (cpp_reader *pfil ok = _cpp_create_trad_definition (pfile, macro); else { - cpp_token *saved_cur_token = pfile->cur_token; - ok = create_iso_definition (pfile, macro); - /* Restore lexer position because of games lex_expansion_token() - plays lexing the macro. We set the type for SEEN_EOL() in - directives.c. + /* We set the type for SEEN_EOL() in directives.c. Longer term we should lex the whole line before coming here, and just copy the expansion. */ - saved_cur_token[-1].type = pfile->cur_token[-1].type; - pfile->cur_token = saved_cur_token; /* Stop the lexer accepting __VA_ARGS__. */ pfile->state.va_args_ok = 0; Modified: head/contrib/gcclibs/libcpp/pch.c ============================================================================== --- head/contrib/gcclibs/libcpp/pch.c Mon Dec 2 03:43:37 2013 (r258825) +++ head/contrib/gcclibs/libcpp/pch.c Mon Dec 2 03:47:08 2013 (r258826) @@ -35,14 +35,14 @@ static int write_defs (cpp_reader *, cpp static int save_macros (cpp_reader *, cpp_hashnode *, void *); /* This structure represents a macro definition on disk. */ -struct macrodef_struct +struct macrodef_struct { unsigned int definition_length; unsigned short name_length; unsigned short flags; }; -/* This is how we write out a macro definition. +/* This is how we write out a macro definition. Suitable for being called by cpp_forall_identifiers. */ static int @@ -54,7 +54,7 @@ write_macdef (cpp_reader *pfile, cpp_has case NT_VOID: if (! (hn->flags & NODE_POISONED)) return 1; - + case NT_MACRO: if ((hn->flags & NODE_BUILTIN)) return 1; @@ -76,7 +76,7 @@ write_macdef (cpp_reader *pfile, cpp_has defn = NODE_NAME (hn); s.definition_length = s.name_length; } - + if (fwrite (&s, sizeof (s), 1, f) != 1 || fwrite (defn, 1, s.definition_length, f) != s.definition_length) { @@ -86,7 +86,7 @@ write_macdef (cpp_reader *pfile, cpp_has } } return 1; - + case NT_ASSERTION: /* Not currently implemented. */ return 1; @@ -123,7 +123,7 @@ static int save_idents (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + if (hn->type != NT_VOID) { struct cpp_string news; @@ -136,7 +136,7 @@ save_idents (cpp_reader *pfile ATTRIBUTE { struct cpp_string *sp; unsigned char *text; - + sp = XNEW (struct cpp_string); *slot = sp; @@ -157,7 +157,7 @@ hashmem (const void *p_p, size_t sz) const unsigned char *p = (const unsigned char *)p_p; size_t i; hashval_t h; - + h = 0; for (i = 0; i < sz; i++) h = h * 67 - (*p++ - 113); @@ -194,10 +194,10 @@ cpp_save_state (cpp_reader *r, FILE *f) { /* Save the list of non-void identifiers for the dependency checking. */ r->savedstate = XNEW (struct cpp_savedstate); - r->savedstate->definedhash = htab_create (100, cpp_string_hash, + r->savedstate->definedhash = htab_create (100, cpp_string_hash, cpp_string_eq, NULL); cpp_forall_identifiers (r, save_idents, r->savedstate); - + /* Write out the list of defined identifiers. */ cpp_forall_identifiers (r, write_macdef, f); @@ -210,20 +210,20 @@ static int count_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + switch (hn->type) { case NT_MACRO: if (hn->flags & NODE_BUILTIN) return 1; - + /* else fall through. */ case NT_VOID: { struct cpp_string news; void **slot; - + news.len = NODE_LEN (hn); news.text = NODE_NAME (hn); slot = (void **) htab_find (ss->definedhash, &news); @@ -249,20 +249,20 @@ static int write_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + switch (hn->type) { case NT_MACRO: if (hn->flags & NODE_BUILTIN) return 1; - + /* else fall through. */ case NT_VOID: { struct cpp_string news; void **slot; - + news.len = NODE_LEN (hn); news.text = NODE_NAME (hn); slot = (void **) htab_find (ss->definedhash, &news); @@ -303,7 +303,7 @@ cpp_write_pch_deps (cpp_reader *r, FILE struct cpp_savedstate *const ss = r->savedstate; unsigned char *definedstrs; size_t i; - + /* Collect the list of identifiers which have been seen and weren't defined to anything previously. */ ss->hashsize = 0; @@ -404,7 +404,7 @@ collect_ht_nodes (cpp_reader *pfile ATTR with the preprocessor's current definitions. It will be consistent when: - - anything that was defined just before the PCH was generated + - anything that was defined just before the PCH was generated is defined the same way now; and - anything that was not defined then, but is defined now, was not used by the PCH. @@ -430,10 +430,10 @@ cpp_valid_state (cpp_reader *r, const ch { cpp_hashnode *h; const unsigned char *newdefn; - + if (read (fd, &m, sizeof (m)) != sizeof (m)) goto error; - + if (m.name_length == 0) break; @@ -453,10 +453,10 @@ cpp_valid_state (cpp_reader *r, const ch namebuf = XNEWVEC (unsigned char, namebufsz); } - if ((size_t)read (fd, namebuf, m.definition_length) + if ((size_t)read (fd, namebuf, m.definition_length) != m.definition_length) goto error; - + h = cpp_lookup (r, namebuf, m.name_length); if (m.flags & NODE_POISONED || h->type != NT_MACRO @@ -470,7 +470,7 @@ cpp_valid_state (cpp_reader *r, const ch } newdefn = cpp_macro_definition (r, h); - + if (m.definition_length != ustrlen (newdefn) || memcmp (namebuf, newdefn, m.definition_length) != 0) { @@ -498,17 +498,17 @@ cpp_valid_state (cpp_reader *r, const ch nl.defs = XNEWVEC (cpp_hashnode *, nl.asize); cpp_forall_identifiers (r, &collect_ht_nodes, &nl); qsort (nl.defs, nl.n_defs, sizeof (cpp_hashnode *), &comp_hashnodes); - + /* Loop through nl.defs and undeftab, both of which are sorted lists. There should be no matches. */ first = undeftab; last = undeftab + m.definition_length; i = 0; - + while (first < last && i < nl.n_defs) { int cmp = ustrcmp (first, NODE_NAME (nl.defs[i])); - + if (cmp < 0) first += ustrlen (first) + 1; else if (cmp > 0) @@ -516,13 +516,13 @@ cpp_valid_state (cpp_reader *r, const ch else { if (CPP_OPTION (r, warn_invalid_pch)) - cpp_error (r, CPP_DL_WARNING_SYSHDR, + cpp_error (r, CPP_DL_WARNING_SYSHDR, "%s: not used because `%s' is defined", name, first); goto fail; } } - + free(nl.defs); free (undeftab); @@ -545,7 +545,7 @@ cpp_valid_state (cpp_reader *r, const ch /* Save all the existing macros. */ -struct save_macro_data +struct save_macro_data { uchar **defns; size_t count; @@ -567,7 +567,7 @@ struct save_macro_data file were not saved in this way, but this is not done (yet), except for builtins, and for #assert by default. */ -static int +static int save_macros (cpp_reader *r, cpp_hashnode *h, void *data_p) { struct save_macro_data *data = (struct save_macro_data *)data_p; @@ -577,9 +577,9 @@ save_macros (cpp_reader *r, cpp_hashnode if (data->count == data->array_size) { data->array_size *= 2; - data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); + data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); } - + switch (h->type) { case NT_ASSERTION: @@ -596,7 +596,7 @@ save_macros (cpp_reader *r, cpp_hashnode data->defns[data->count][defnlen] = '\n'; } break; - + default: abort (); } @@ -612,7 +612,7 @@ void cpp_prepare_state (cpp_reader *r, struct save_macro_data **data) { struct save_macro_data *d = XNEW (struct save_macro_data); - + d->array_size = 512; d->defns = XNEWVEC (uchar *, d->array_size); d->count = 0; @@ -622,7 +622,7 @@ cpp_prepare_state (cpp_reader *r, struct } /* Given a precompiled header that was previously determined to be valid, - apply all its definitions (and undefinitions) to the current state. + apply all its definitions (and undefinitions) to the current state. DEPNAME is passed to deps_restore. */ int @@ -632,7 +632,7 @@ cpp_read_state (cpp_reader *r, const cha size_t i; struct lexer_state old_state; - /* Restore spec_nodes, which will be full of references to the old + /* Restore spec_nodes, which will be full of references to the old hashtable entries and so will now be invalid. */ { struct spec_nodes *s = &r->spec_nodes; @@ -691,7 +691,7 @@ cpp_read_state (cpp_reader *r, const cha goto error; return 0; - + error: cpp_errno (r, CPP_DL_ERROR, "while reading precompiled header"); return -1; From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 03:49:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B50A47D; Mon, 2 Dec 2013 03:49:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ECA536DDA; Mon, 2 Dec 2013 03:49:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB23nXbh094623; Mon, 2 Dec 2013 03:49:33 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB23nXlH094622; Mon, 2 Dec 2013 03:49:33 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312020349.rB23nXlH094622@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 Dec 2013 03:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258827 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 03:49:34 -0000 Author: adrian Date: Mon Dec 2 03:49:33 2013 New Revision: 258827 URL: http://svnweb.freebsd.org/changeset/base/258827 Log: Log the rx ring offset as part of the debug message. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Dec 2 03:47:08 2013 (r258826) +++ head/sys/dev/iwn/if_iwn.c Mon Dec 2 03:49:33 2013 (r258827) @@ -3508,8 +3508,8 @@ iwn_notif_intr(struct iwn_softc *sc) desc = mtod(data->m, struct iwn_rx_desc *); DPRINTF(sc, IWN_DEBUG_RECV, - "%s: qid %x idx %d flags %x type %d(%s) len %d\n", - __func__, desc->qid & 0xf, desc->idx, desc->flags, + "%s: cur=%d; qid %x idx %d flags %x type %d(%s) len %d\n", + __func__, sc->rxq.cur, desc->qid & 0xf, desc->idx, desc->flags, desc->type, iwn_intr_str(desc->type), le16toh(desc->len)); From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 03:52:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86DCF5CD; Mon, 2 Dec 2013 03:52:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 67D396E10; Mon, 2 Dec 2013 03:52:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB23qfkP097548; Mon, 2 Dec 2013 03:52:41 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB23qfZc097545; Mon, 2 Dec 2013 03:52:41 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201312020352.rB23qfZc097545@svn.freebsd.org> From: Ian Lepore Date: Mon, 2 Dec 2013 03:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258828 - in head/sys: arm/at91 dev/nand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 03:52:41 -0000 Author: ian Date: Mon Dec 2 03:52:40 2013 New Revision: 258828 URL: http://svnweb.freebsd.org/changeset/base/258828 Log: Add a nand flash controller driver for Atmel at91 family. Tested only on at91rm9200 so far. The files.at91 has listed a nand driver for ages, but it never existed. Added: head/sys/dev/nand/nfc_at91.c (contents, props changed) Modified: head/sys/arm/at91/files.at91 Modified: head/sys/arm/at91/files.at91 ============================================================================== --- head/sys/arm/at91/files.at91 Mon Dec 2 03:49:33 2013 (r258827) +++ head/sys/arm/at91/files.at91 Mon Dec 2 03:52:40 2013 (r258828) @@ -5,7 +5,7 @@ arm/at91/at91_machdep.c standard arm/at91/at91.c standard arm/at91/at91_cfata.c optional at91_cfata arm/at91/at91_mci.c optional at91_mci -arm/at91/at91_nand.c optional nand +dev/nand/nfc_at91.c optional nand arm/at91/at91_pio.c standard arm/at91/at91_pmc.c standard arm/at91/at91_pit.c optional at91sam9 Added: head/sys/dev/nand/nfc_at91.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/nand/nfc_at91.c Mon Dec 2 03:52:40 2013 (r258828) @@ -0,0 +1,258 @@ +/*- + * Copyright (C) 2013 Ian Lepore. + * 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. + */ + +/* + * Atmel at91-family integrated NAND controller driver. + * + * This code relies on the board setup code (in at91/board_whatever.c) having + * set up the EBI and SMC registers appropriately for whatever type of nand part + * is on the board. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include "nfc_if.h" + +/* + * Data cycles are triggered by access to any address within the EBI CS3 region + * that has A21 and A22 clear. Command cycles are any access with bit A21 + * asserted. Address cycles are any access with bit A22 asserted. + * + * XXX The atmel docs say that any address bits can be used instead of A21 and + * A22; these values should be configurable. + */ +#define AT91_NAND_DATA 0 +#define AT91_NAND_COMMAND (1 << 21) +#define AT91_NAND_ADDRESS (1 << 22) + +struct at91_nand_softc { + struct nand_softc nand_sc; + struct resource *res; +}; + +static int at91_nand_attach(device_t); +static int at91_nand_probe(device_t); +static uint8_t at91_nand_read_byte(device_t); +static void at91_nand_read_buf(device_t, void *, uint32_t); +static int at91_nand_read_rnb(device_t); +static int at91_nand_select_cs(device_t, uint8_t); +static int at91_nand_send_command(device_t, uint8_t); +static int at91_nand_send_address(device_t, uint8_t); +static void at91_nand_write_buf(device_t, void *, uint32_t); + +static inline u_int8_t +dev_read_1(struct at91_nand_softc *sc, bus_size_t offset) +{ + return bus_read_1(sc->res, offset); +} + +static inline void +dev_write_1(struct at91_nand_softc *sc, bus_size_t offset, u_int8_t value) +{ + bus_write_1(sc->res, offset, value); +} + +static int +at91_nand_probe(device_t dev) +{ + + device_set_desc(dev, "AT91 Integrated NAND controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +at91_nand_attach(device_t dev) +{ + struct at91_nand_softc *sc; + int err, rid; + + sc = device_get_softc(dev); + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "could not allocate resources!\n"); + return (ENXIO); + } + + nand_init(&sc->nand_sc, dev, NAND_ECC_SOFT, 0, 0, NULL, NULL); + + err = nandbus_create(dev); + + return (err); +} + +static int +at91_nand_send_command(device_t dev, uint8_t command) +{ + struct at91_nand_softc *sc; + + /* nand_debug(NDBG_DRV,"at91_nand_send_command: 0x%02x", command); */ + + sc = device_get_softc(dev); + dev_write_1(sc, AT91_NAND_COMMAND, command); + return (0); +} + +static int +at91_nand_send_address(device_t dev, uint8_t addr) +{ + struct at91_nand_softc *sc; + + /* nand_debug(NDBG_DRV,"at91_nand_send_address: x%02x", addr); */ + + sc = device_get_softc(dev); + dev_write_1(sc, AT91_NAND_ADDRESS, addr); + return (0); +} + +static uint8_t +at91_nand_read_byte(device_t dev) +{ + struct at91_nand_softc *sc; + uint8_t data; + + sc = device_get_softc(dev); + data = dev_read_1(sc, AT91_NAND_DATA); + + /* nand_debug(NDBG_DRV,"at91_nand_read_byte: 0x%02x", data); */ + + return (data); +} + + +static void +at91_nand_dump_buf(const char *op, void* buf, uint32_t len) +{ + int i; + uint8_t *b = buf; + + printf("at91_nand_%s_buf (hex):", op); + for (i = 0; i < len; i++) { + if ((i & 0x01f) == 0) + printf("\n"); + printf(" %02x", b[i]); + } + printf("\n"); +} + +static void +at91_nand_read_buf(device_t dev, void* buf, uint32_t len) +{ + struct at91_nand_softc *sc; + + sc = device_get_softc(dev); + + bus_read_multi_1(sc->res, AT91_NAND_DATA, buf, len); + + if (nand_debug_flag & NDBG_DRV) + at91_nand_dump_buf("read", buf, len); +} + +static void +at91_nand_write_buf(device_t dev, void* buf, uint32_t len) +{ + struct at91_nand_softc *sc; + + sc = device_get_softc(dev); + + if (nand_debug_flag & NDBG_DRV) + at91_nand_dump_buf("write", buf, len); + + bus_write_multi_1(sc->res, AT91_NAND_DATA, buf, len); +} + +static int +at91_nand_select_cs(device_t dev, uint8_t cs) +{ + + if (cs > 0) + return (ENODEV); + + return (0); +} + +static int +at91_nand_read_rnb(device_t dev) +{ +#if 0 + /* + * XXX There's no way for this code to know which GPIO pin (if any) is + * attached to the chip's RNB line. Not to worry, nothing calls this; + * at higher layers, all the nand code uses status commands. + */ + uint32_t bits; + + bits = at91_pio_gpio_get(AT91RM92_PIOD_BASE, AT91C_PIO_PD15); + nand_debug(NDBG_DRV,"at91_nand: read_rnb: %#x", bits); + return (bits != 0); /* ready */ +#endif + panic("at91_nand_read_rnb() is not implemented\n"); + return (0); +} + +static device_method_t at91_nand_methods[] = { + DEVMETHOD(device_probe, at91_nand_probe), + DEVMETHOD(device_attach, at91_nand_attach), + + DEVMETHOD(nfc_send_command, at91_nand_send_command), + DEVMETHOD(nfc_send_address, at91_nand_send_address), + DEVMETHOD(nfc_read_byte, at91_nand_read_byte), + DEVMETHOD(nfc_read_buf, at91_nand_read_buf), + DEVMETHOD(nfc_write_buf, at91_nand_write_buf), + DEVMETHOD(nfc_select_cs, at91_nand_select_cs), + DEVMETHOD(nfc_read_rnb, at91_nand_read_rnb), + + DEVMETHOD_END +}; + +static driver_t at91_nand_driver = { + "nand", + at91_nand_methods, + sizeof(struct at91_nand_softc), +}; + +static devclass_t at91_nand_devclass; +DRIVER_MODULE(at91_nand, atmelarm, at91_nand_driver, at91_nand_devclass, 0, 0); + From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 03:59:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AE24753; Mon, 2 Dec 2013 03:59:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 56BD06E31; Mon, 2 Dec 2013 03:59: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 rB23xkHX099408; Mon, 2 Dec 2013 03:59:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB23xjj2099405; Mon, 2 Dec 2013 03:59:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312020359.rB23xjj2099405@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 Dec 2013 03:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258829 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 03:59:46 -0000 Author: adrian Date: Mon Dec 2 03:59:45 2013 New Revision: 258829 URL: http://svnweb.freebsd.org/changeset/base/258829 Log: Overhaul the iwn(4) scan infrastructure to be slightly more "correct" for these chipsets. * Correctly set the active/passive flag in the scan request - this is NOT a "is the channel active|passive"; it's to do with whether we have an SSID to actively scan for or not. The firmware takes care of the active/passive setup of the channel. * Calculate the active/passive dwell time based on the beacon interval and the channel mode, rather than using a hard coded value. * For now, hardcode the scan service_time. It's defined as: 31:22 - number of beacon intervals to come back onto the home channel for; 0:21 - time (microseconds) to come back onto the home channel for. When doing an active scan when the NIC is active (whether we're associated or not - it only matters if we've setup the NIC to a destination or not) this determines how much time to stay on the home channel for when scanning. We can tune this based on the amount of active traffic. For now it's 4 beacon intervals and 100 microseconds. * Fix the "good crc threshold" setting. It differs based on the NIC firmware. Some older firmware required a workaround; the later firmware instead treats the field as a flag. * Enforce that we are not sending a scan command if one is already pending. Any time this is done is a bug and it absolutely needs to be fixed - so be very loud. * Add the SCAN flag to a few debug messages that are scan related but only occuring under STATE. Now, this does get noisy when you're scanning in an actively busy 2GHz network as the firmware (for reason I don't quite yet understand) seems hell bent on staying on some passive channels longer than it should. However, it should eventually recover and complete the scan. This is a work in progress; please let me know if things get stuck or if things improve! Tested: * intel centrino 2200 * intel centrino 2230 * intel 6200 * intel 5100 * intel 4965 (gets upset, but that's a known issue) Obtained from: linux iwlwifi Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Dec 2 03:52:40 2013 (r258828) +++ head/sys/dev/iwn/if_iwn.c Mon Dec 2 03:59:45 2013 (r258829) @@ -3608,7 +3608,8 @@ iwn_notif_intr(struct iwn_softc *sc) BUS_DMASYNC_POSTREAD); #ifdef IWN_DEBUG uint32_t *status = (uint32_t *)(desc + 1); - DPRINTF(sc, IWN_DEBUG_INTR, "state changed to %x\n", + DPRINTF(sc, IWN_DEBUG_INTR | IWN_DEBUG_STATE, + "state changed to %x\n", le32toh(*status)); #endif break; @@ -3633,11 +3634,11 @@ iwn_notif_intr(struct iwn_softc *sc) #ifdef IWN_DEBUG struct iwn_stop_scan *scan = (struct iwn_stop_scan *)(desc + 1); - DPRINTF(sc, IWN_DEBUG_STATE, + DPRINTF(sc, IWN_DEBUG_STATE | IWN_DEBUG_SCAN, "scan finished nchan=%d status=%d chan=%d\n", scan->nchan, scan->status, scan->chan); #endif - + sc->sc_is_scanning = 0; IWN_UNLOCK(sc); ieee80211_scan_next(vap); IWN_LOCK(sc); @@ -5020,6 +5021,12 @@ iwn_set_led(struct iwn_softc *sc, uint8_ DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__); +#if 0 + /* XXX don't set LEDs during scan? */ + if (sc->sc_is_scanning) + return; +#endif + /* Clear microcode LED ownership. */ IWN_CLRBITS(sc, IWN_LED, IWN_LED_BSM_CTRL); @@ -5485,6 +5492,10 @@ iwn_collect_noise(struct iwn_softc *sc, #ifdef notyet /* XXX Disable RX chains with no antennas connected. */ sc->rxon->rxchain = htole16(IWN_RXCHAIN_SEL(sc->chainmask)); + if (sc->sc_is_scanning) + device_printf(sc->sc_dev, + "%s: is_scanning set, before RXON\n", + __func__); (void)iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 1); #endif @@ -6119,6 +6130,10 @@ iwn_config(struct iwn_softc *sc) IWN_RXCHAIN_IDLE_COUNT(2); sc->rxon->rxchain = htole16(rxchain); DPRINTF(sc, IWN_DEBUG_RESET, "%s: setting configuration\n", __func__); + if (sc->sc_is_scanning) + device_printf(sc->sc_dev, + "%s: is_scanning set, before RXON\n", + __func__); error = iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 0); if (error != 0) { device_printf(sc->sc_dev, "%s: RXON command failed\n", @@ -6169,6 +6184,73 @@ ieee80211_add_ssid(uint8_t *frm, const u return frm + len; } +static uint16_t +iwn_get_active_dwell_time(struct iwn_softc *sc, + struct ieee80211_channel *c, uint8_t n_probes) +{ + /* No channel? Default to 2GHz settings */ + if (c == NULL || IEEE80211_IS_CHAN_2GHZ(c)) { + return (IWN_ACTIVE_DWELL_TIME_2GHZ + + IWN_ACTIVE_DWELL_FACTOR_2GHZ * (n_probes + 1)); + } + + /* 5GHz dwell time */ + return (IWN_ACTIVE_DWELL_TIME_5GHZ + + IWN_ACTIVE_DWELL_FACTOR_5GHZ * (n_probes + 1)); +} + +/* + * Limit the total dwell time to 85% of the beacon interval. + * + * Returns the dwell time in milliseconds. + */ +static uint16_t +iwn_limit_dwell(struct iwn_softc *sc, uint16_t dwell_time) +{ + struct ieee80211com *ic = sc->sc_ifp->if_l2com; + struct ieee80211vap *vap = NULL; + int bintval = 0; + + /* bintval is in TU (1.024mS) */ + if (! TAILQ_EMPTY(&ic->ic_vaps)) { + vap = TAILQ_FIRST(&ic->ic_vaps); + bintval = vap->iv_bss->ni_intval; + } + + /* + * If it's non-zero, we should calculate the minimum of + * it and the DWELL_BASE. + * + * XXX Yes, the math should take into account that bintval + * is 1.024mS, not 1mS.. + */ + if (bintval > 0) { + DPRINTF(sc, IWN_DEBUG_SCAN, + "%s: bintval=%d\n", + __func__, + bintval); + return (MIN(IWN_PASSIVE_DWELL_BASE, ((bintval * 85) / 100))); + } + + /* No association context? Default */ + return (IWN_PASSIVE_DWELL_BASE); +} + +static uint16_t +iwn_get_passive_dwell_time(struct iwn_softc *sc, struct ieee80211_channel *c) +{ + uint16_t passive; + + if (c == NULL || IEEE80211_IS_CHAN_2GHZ(c)) { + passive = IWN_PASSIVE_DWELL_BASE + IWN_PASSIVE_DWELL_TIME_2GHZ; + } else { + passive = IWN_PASSIVE_DWELL_BASE + IWN_PASSIVE_DWELL_TIME_5GHZ; + } + + /* Clamp to the beacon interval if we're associated */ + return (iwn_limit_dwell(sc, passive)); +} + static int iwn_scan(struct iwn_softc *sc) { @@ -6187,9 +6269,22 @@ iwn_scan(struct iwn_softc *sc) uint16_t rxchain; uint8_t txant; int buflen, error; + int is_active; + uint16_t dwell_active, dwell_passive; + uint32_t extra, scan_service_time; DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); + /* + * We are absolutely not allowed to send a scan command when another + * scan command is pending. + */ + if (sc->sc_is_scanning) { + device_printf(sc->sc_dev, "%s: called whilst scanning!\n", + __func__); + return (EAGAIN); + } + sc->rxon = &sc->rx_on[IWN_RXON_BSS_CTX]; buf = malloc(IWN_SCAN_MAXSZ, M_DEVBUF, M_NOWAIT | M_ZERO); if (buf == NULL) { @@ -6209,7 +6304,18 @@ iwn_scan(struct iwn_softc *sc) * Max needs to be greater than active and passive and quiet! * It's also in microseconds! */ - hdr->max_svc = htole32(250 * 1000); + hdr->max_svc = htole32(250 * 1024); + + /* + * Reset scan: interval=100 + * Normal scan: interval=becaon interval + * suspend_time: 100 (TU) + * + */ + extra = (100 /* suspend_time */ / 100 /* beacon interval */) << 22; + //scan_service_time = extra | ((100 /* susp */ % 100 /* int */) * 1024); + scan_service_time = (4 << 22) | (100 * 1024); /* Hardcode for now! */ + hdr->pause_svc = htole32(scan_service_time); /* Select antennas for scanning. */ rxchain = @@ -6249,12 +6355,31 @@ iwn_scan(struct iwn_softc *sc) txant = IWN_LSB(sc->txchainmask); tx->rate |= htole32(IWN_RFLAG_ANT(txant)); + /* + * Only do active scanning if we're announcing a probe request + * for a given SSID (or more, if we ever add it to the driver.) + */ + is_active = 0; + + /* + * If we're scanning for a specific SSID, add it to the command. + */ essid = (struct iwn_scan_essid *)(tx + 1); if (ss->ss_ssid[0].len != 0) { essid[0].id = IEEE80211_ELEMID_SSID; essid[0].len = ss->ss_ssid[0].len; memcpy(essid[0].data, ss->ss_ssid[0].ssid, ss->ss_ssid[0].len); } + + DPRINTF(sc, IWN_DEBUG_SCAN, "%s: ssid_len=%d, ssid=%*s\n", + __func__, + ss->ss_ssid[0].len, + ss->ss_ssid[0].len, + ss->ss_ssid[0].ssid); + + if (ss->ss_nssid > 0) + is_active = 1; + /* * Build a probe request frame. Most of the following code is a * copy & paste of what is done in net80211. @@ -6280,6 +6405,41 @@ iwn_scan(struct iwn_softc *sc) /* Set length of probe request. */ tx->len = htole16(frm - (uint8_t *)wh); + /* + * If active scanning is requested but a certain channel is + * marked passive, we can do active scanning if we detect + * transmissions. + * + * There is an issue with some firmware versions that triggers + * a sysassert on a "good CRC threshold" of zero (== disabled), + * on a radar channel even though this means that we should NOT + * send probes. + * + * The "good CRC threshold" is the number of frames that we + * need to receive during our dwell time on a channel before + * sending out probes -- setting this to a huge value will + * mean we never reach it, but at the same time work around + * the aforementioned issue. Thus use IWL_GOOD_CRC_TH_NEVER + * here instead of IWL_GOOD_CRC_TH_DISABLED. + * + * This was fixed in later versions along with some other + * scan changes, and the threshold behaves as a flag in those + * versions. + */ + + /* + * If we're doing active scanning, set the crc_threshold + * to a suitable value. This is different to active veruss + * passive scanning depending upon the channel flags; the + * firmware will obey that particular check for us. + */ + if (sc->tlv_feature_flags & IWN_UCODE_TLV_FLAGS_NEWSCAN) + hdr->crc_threshold = is_active ? + IWN_GOOD_CRC_TH_DEFAULT : IWN_GOOD_CRC_TH_DISABLED; + else + hdr->crc_threshold = is_active ? + IWN_GOOD_CRC_TH_DEFAULT : IWN_GOOD_CRC_TH_NEVER; + c = ic->ic_curchan; chan = (struct iwn_scan_chan *)frm; chan->chan = htole16(ieee80211_chan2ieee(ic, c)); @@ -6287,46 +6447,61 @@ iwn_scan(struct iwn_softc *sc) if (ss->ss_nssid > 0) chan->flags |= htole32(IWN_CHAN_NPBREQS(1)); chan->dsp_gain = 0x6e; + + /* + * Set the passive/active flag depending upon the channel mode. + * XXX TODO: take the is_active flag into account as well? + */ + if (c->ic_flags & IEEE80211_CHAN_PASSIVE) + chan->flags |= htole32(IWN_CHAN_PASSIVE); + else + chan->flags |= htole32(IWN_CHAN_ACTIVE); + + /* + * Calculate the active/passive dwell times. + */ + + dwell_active = iwn_get_active_dwell_time(sc, c, ss->ss_nssid); + dwell_passive = iwn_get_passive_dwell_time(sc, c); + + /* Make sure they're valid */ + if (dwell_passive <= dwell_active) + dwell_passive = dwell_active + 1; + + chan->active = htole16(dwell_active); + chan->passive = htole16(dwell_passive); + if (IEEE80211_IS_CHAN_5GHZ(c) && !(c->ic_flags & IEEE80211_CHAN_PASSIVE)) { chan->rf_gain = 0x3b; - chan->active = htole16(24); - chan->passive = htole16(110); - chan->flags |= htole32(IWN_CHAN_ACTIVE); } else if (IEEE80211_IS_CHAN_5GHZ(c)) { chan->rf_gain = 0x3b; - chan->active = htole16(24); - if (sc->rxon->associd) - chan->passive = htole16(78); - else - chan->passive = htole16(110); - hdr->crc_threshold = 0xffff; } else if (!(c->ic_flags & IEEE80211_CHAN_PASSIVE)) { chan->rf_gain = 0x28; - chan->active = htole16(36); - chan->passive = htole16(120); - chan->flags |= htole32(IWN_CHAN_ACTIVE); } else { chan->rf_gain = 0x28; - chan->active = htole16(36); - if (sc->rxon->associd) - chan->passive = htole16(88); - else - chan->passive = htole16(120); - hdr->crc_threshold = 0xffff; } DPRINTF(sc, IWN_DEBUG_STATE, "%s: chan %u flags 0x%x rf_gain 0x%x " - "dsp_gain 0x%x active 0x%x passive 0x%x\n", __func__, + "dsp_gain 0x%x active %d passive %d scan_svc_time %d crc 0x%x " + "isactive=%d numssid=%d\n", __func__, chan->chan, chan->flags, chan->rf_gain, chan->dsp_gain, - chan->active, chan->passive); + dwell_active, dwell_passive, scan_service_time, + hdr->crc_threshold, is_active, ss->ss_nssid); hdr->nchan++; chan++; buflen = (uint8_t *)chan - buf; hdr->len = htole16(buflen); + if (sc->sc_is_scanning) { + device_printf(sc->sc_dev, + "%s: called with is_scanning set!\n", + __func__); + } + sc->sc_is_scanning = 1; + DPRINTF(sc, IWN_DEBUG_STATE, "sending scan command nchan=%d\n", hdr->nchan); error = iwn_cmd(sc, IWN_CMD_SCAN, buf, buflen, 1); @@ -6373,6 +6548,10 @@ iwn_auth(struct iwn_softc *sc, struct ie DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x cck %x ofdm %x\n", sc->rxon->chan, sc->rxon->flags, sc->rxon->cck_mask, sc->rxon->ofdm_mask); + if (sc->sc_is_scanning) + device_printf(sc->sc_dev, + "%s: is_scanning set, before RXON\n", + __func__); error = iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 1); if (error != 0) { device_printf(sc->sc_dev, "%s: RXON command failed, error %d\n", @@ -6468,6 +6647,10 @@ iwn_run(struct iwn_softc *sc, struct iee sc->rxon->filter |= htole32(IWN_FILTER_BSS); DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x\n", sc->rxon->chan, sc->rxon->flags); + if (sc->sc_is_scanning) + device_printf(sc->sc_dev, + "%s: is_scanning set, before RXON\n", + __func__); error = iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 1); if (error != 0) { device_printf(sc->sc_dev, @@ -8109,6 +8292,7 @@ iwn_stop_locked(struct iwn_softc *sc) IWN_LOCK_ASSERT(sc); + sc->sc_is_scanning = 0; sc->sc_tx_timer = 0; callout_stop(&sc->watchdog_to); callout_stop(&sc->calib_to); Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Mon Dec 2 03:52:40 2013 (r258828) +++ head/sys/dev/iwn/if_iwnreg.h Mon Dec 2 03:59:45 2013 (r258829) @@ -922,17 +922,53 @@ struct iwn_scan_chan { /* Maximum size of a scan command. */ #define IWN_SCAN_MAXSZ (MCLBYTES - 4) -#define IWN_ACTIVE_DWELL_TIME_24 (30) /* all times in msec */ -#define IWN_ACTIVE_DWELL_TIME_52 (20) -#define IWN_ACTIVE_DWELL_FACTOR_24 (3) -#define IWN_ACTIVE_DWELL_FACTOR_52 (2) +/* + * For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel after + * sending probe req. This should be set long enough to hear probe responses + * from more than one AP. + */ +#define IWN_ACTIVE_DWELL_TIME_2GHZ (30) /* all times in msec */ +#define IWN_ACTIVE_DWELL_TIME_5GHZ (20) +#define IWN_ACTIVE_DWELL_FACTOR_2GHZ (3) +#define IWN_ACTIVE_DWELL_FACTOR_5GHZ (2) -#define IWN_PASSIVE_DWELL_TIME_24 (20) /* all times in msec */ -#define IWN_PASSIVE_DWELL_TIME_52 (10) +/* + * For passive scan, listen PASSIVE_DWELL_TIME (msec) on each channel. + * Must be set longer than active dwell time. + * For the most reliable scan, set > AP beacon interval (typically 100msec). + */ +#define IWN_PASSIVE_DWELL_TIME_2GHZ (20) /* all times in msec */ +#define IWN_PASSIVE_DWELL_TIME_5GHZ (10) #define IWN_PASSIVE_DWELL_BASE (100) #define IWN_CHANNEL_TUNE_TIME (5) #define IWN_SCAN_CHAN_TIMEOUT 2 +#define IWN_MAX_SCAN_CHANNEL 50 + +/* + * If active scanning is requested but a certain channel is + * marked passive, we can do active scanning if we detect + * transmissions. + * + * There is an issue with some firmware versions that triggers + * a sysassert on a "good CRC threshold" of zero (== disabled), + * on a radar channel even though this means that we should NOT + * send probes. + * + * The "good CRC threshold" is the number of frames that we + * need to receive during our dwell time on a channel before + * sending out probes -- setting this to a huge value will + * mean we never reach it, but at the same time work around + * the aforementioned issue. Thus use IWL_GOOD_CRC_TH_NEVER + * here instead of IWL_GOOD_CRC_TH_DISABLED. + * + * This was fixed in later versions along with some other + * scan changes, and the threshold behaves as a flag in those + * versions. + */ +#define IWN_GOOD_CRC_TH_DISABLED 0 +#define IWN_GOOD_CRC_TH_DEFAULT htole16(1) +#define IWN_GOOD_CRC_TH_NEVER htole16(0xffff) /* Structure for command IWN_CMD_TXPOWER (4965AGN only.) */ #define IWN_RIDX_MAX 32 Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Mon Dec 2 03:52:40 2013 (r258828) +++ head/sys/dev/iwn/if_iwnvar.h Mon Dec 2 03:59:45 2013 (r258829) @@ -361,6 +361,9 @@ struct iwn_softc { int sc_tx_timer; int sc_scan_timer; + /* Are we doing a scan? */ + int sc_is_scanning; + struct ieee80211_tx_ampdu *qid2tap[IWN5000_NTXQUEUES]; int (*sc_ampdu_rx_start)(struct ieee80211_node *, From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 05:21:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 652093C5; Mon, 2 Dec 2013 05:21:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 39F531182; Mon, 2 Dec 2013 05:21: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 rB25LtXJ041279; Mon, 2 Dec 2013 05:21:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB25Ls58041275; Mon, 2 Dec 2013 05:21:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312020521.rB25Ls58041275@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 2 Dec 2013 05:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258830 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 05:21:55 -0000 Author: yongari Date: Mon Dec 2 05:21:54 2013 New Revision: 258830 URL: http://svnweb.freebsd.org/changeset/base/258830 Log: Add support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787. Submitted by: jhb PR: 184304 Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Dec 2 03:59:45 2013 (r258829) +++ head/sys/dev/bge/if_bge.c Mon Dec 2 05:21:54 2013 (r258830) @@ -221,11 +221,16 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM57760 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57761 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57762 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57764 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57765 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57766 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57767 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57780 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57781 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57782 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57785 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57786 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57787 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57788 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57790 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57791 }, @@ -2694,6 +2699,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM5725: case BCOM_DEVICEID_BCM5727: case BCOM_DEVICEID_BCM5762: + case BCOM_DEVICEID_BCM57764: + case BCOM_DEVICEID_BCM57767: + case BCOM_DEVICEID_BCM57787: id = pci_read_config(dev, BGE_PCI_GEN2_PRODID_ASICREV, 4); break; @@ -2702,7 +2710,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM57765: case BCOM_DEVICEID_BCM57766: case BCOM_DEVICEID_BCM57781: + case BCOM_DEVICEID_BCM57782: case BCOM_DEVICEID_BCM57785: + case BCOM_DEVICEID_BCM57786: case BCOM_DEVICEID_BCM57791: case BCOM_DEVICEID_BCM57795: id = pci_read_config(dev, Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Mon Dec 2 03:59:45 2013 (r258829) +++ head/sys/dev/bge/if_bgereg.h Mon Dec 2 05:21:54 2013 (r258830) @@ -2503,11 +2503,16 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM57760 0x1690 #define BCOM_DEVICEID_BCM57761 0x16B0 #define BCOM_DEVICEID_BCM57762 0x1682 +#define BCOM_DEVICEID_BCM57764 0x1642 #define BCOM_DEVICEID_BCM57765 0x16B4 #define BCOM_DEVICEID_BCM57766 0x1686 +#define BCOM_DEVICEID_BCM57767 0x1683 #define BCOM_DEVICEID_BCM57780 0x1692 #define BCOM_DEVICEID_BCM57781 0x16B1 +#define BCOM_DEVICEID_BCM57782 0x16B7 #define BCOM_DEVICEID_BCM57785 0x16B5 +#define BCOM_DEVICEID_BCM57786 0x16B3 +#define BCOM_DEVICEID_BCM57787 0x1641 #define BCOM_DEVICEID_BCM57788 0x1691 #define BCOM_DEVICEID_BCM57790 0x1694 #define BCOM_DEVICEID_BCM57791 0x16B2 From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 05:45:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA601AC5; Mon, 2 Dec 2013 05:45:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D6BDF12B2; Mon, 2 Dec 2013 05:45:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB25jBi4051753; Mon, 2 Dec 2013 05:45:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB25jBuO051752; Mon, 2 Dec 2013 05:45:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312020545.rB25jBuO051752@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 Dec 2013 05:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258833 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 05:45:12 -0000 Author: adrian Date: Mon Dec 2 05:45:11 2013 New Revision: 258833 URL: http://svnweb.freebsd.org/changeset/base/258833 Log: * Sort the copyright lines by date * Ok ok, I've touched this enough to claim part of it. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Dec 2 05:43:23 2013 (r258832) +++ head/sys/dev/iwn/if_iwn.c Mon Dec 2 05:45:11 2013 (r258833) @@ -1,11 +1,10 @@ /*- - * Copyright (c) 2013 Cedric GROSS - * Copyright (c) 2011 Intel Corporation - * Copyright (c) 2007-2009 - * Damien Bergamini - * Copyright (c) 2008 - * Benjamin Close + * Copyright (c) 2007-2009 Damien Bergamini + * Copyright (c) 2008 Benjamin Close * Copyright (c) 2008 Sam Leffler, Errno Consulting + * Copyright (c) 2011 Intel Corporation + * Copyright (c) 2013 Cedric GROSS + * Copyright (c) 2013 Adrian Chadd * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 08:21:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CFFADD8; Mon, 2 Dec 2013 08:21:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1501A1B7E; Mon, 2 Dec 2013 08:21:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB28LWPT024100; Mon, 2 Dec 2013 08:21:32 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB28LSdI024080; Mon, 2 Dec 2013 08:21:28 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312020821.rB28LSdI024080@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 2 Dec 2013 08:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258838 - in head: . contrib/mdocml etc etc/casper etc/mtree lib lib/libcapsicum libexec libexec/casper libexec/casper/dns libexec/casper/grp libexec/casper/pwd libexec/casper/random li... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 08:21:32 -0000 Author: pjd Date: Mon Dec 2 08:21:28 2013 New Revision: 258838 URL: http://svnweb.freebsd.org/changeset/base/258838 Log: Please welcome casperd daemon. It (and its services) will be responsible for giving access to functionality that is not available in capability mode sandbox. The functionality can be precisely restricted. Start with the following services: - system.dns - provides API compatible to: - gethostbyname(3), - gethostbyname2(3), - gethostbyaddr(3), - getaddrinfo(3), - getnameinfo(3), - system.grp - provides getgrent(3)-compatible API, - system.pwd - provides getpwent(3)-compatible API, - system.random - allows to obtain entropy from /dev/random, - system.sysctl - provides sysctlbyname(3-compatible API. Sponsored by: The FreeBSD Foundation Added: head/etc/casper/ head/etc/casper/Makefile (contents, props changed) head/etc/casper/system.dns (contents, props changed) head/etc/casper/system.grp (contents, props changed) head/etc/casper/system.pwd (contents, props changed) head/etc/casper/system.random (contents, props changed) head/etc/casper/system.sysctl (contents, props changed) head/lib/libcapsicum/ head/lib/libcapsicum/Makefile (contents, props changed) head/lib/libcapsicum/libcapsicum.3 (contents, props changed) head/lib/libcapsicum/libcapsicum.c (contents, props changed) head/lib/libcapsicum/libcapsicum.h (contents, props changed) head/lib/libcapsicum/libcapsicum_dns.c (contents, props changed) head/lib/libcapsicum/libcapsicum_dns.h (contents, props changed) head/lib/libcapsicum/libcapsicum_grp.c (contents, props changed) head/lib/libcapsicum/libcapsicum_grp.h (contents, props changed) head/lib/libcapsicum/libcapsicum_impl.h (contents, props changed) head/lib/libcapsicum/libcapsicum_pwd.c (contents, props changed) head/lib/libcapsicum/libcapsicum_pwd.h (contents, props changed) head/lib/libcapsicum/libcapsicum_random.c (contents, props changed) head/lib/libcapsicum/libcapsicum_random.h (contents, props changed) head/lib/libcapsicum/libcapsicum_service.c (contents, props changed) head/lib/libcapsicum/libcapsicum_service.h (contents, props changed) head/lib/libcapsicum/libcapsicum_sysctl.c (contents, props changed) head/lib/libcapsicum/libcapsicum_sysctl.h (contents, props changed) head/libexec/casper/ head/libexec/casper/Makefile (contents, props changed) head/libexec/casper/dns/ head/libexec/casper/dns/Makefile (contents, props changed) head/libexec/casper/dns/dns.c (contents, props changed) head/libexec/casper/grp/ head/libexec/casper/grp/Makefile (contents, props changed) head/libexec/casper/grp/grp.c (contents, props changed) head/libexec/casper/pwd/ head/libexec/casper/pwd/Makefile (contents, props changed) head/libexec/casper/pwd/pwd.c (contents, props changed) head/libexec/casper/random/ head/libexec/casper/random/Makefile (contents, props changed) head/libexec/casper/random/random.c (contents, props changed) head/libexec/casper/sysctl/ head/libexec/casper/sysctl/Makefile (contents, props changed) head/libexec/casper/sysctl/sysctl.c (contents, props changed) head/sbin/casperd/ head/sbin/casperd/Makefile (contents, props changed) head/sbin/casperd/casperd.8 (contents, props changed) head/sbin/casperd/casperd.c (contents, props changed) head/sbin/casperd/zygote.c (contents, props changed) head/sbin/casperd/zygote.h (contents, props changed) head/tools/build/options/WITHOUT_CASPER (contents, props changed) Modified: head/Makefile.inc1 head/contrib/mdocml/lib.in head/etc/Makefile head/etc/mtree/BSD.root.dist head/lib/Makefile head/libexec/Makefile head/sbin/Makefile head/share/mk/bsd.libnames.mk head/share/mk/bsd.own.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Dec 2 06:17:29 2013 (r258837) +++ head/Makefile.inc1 Mon Dec 2 08:21:28 2013 (r258838) @@ -1499,7 +1499,8 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libbz2 ${_libcom_err} lib/libcrypt \ lib/libelf lib/libexpat \ ${_lib_libgssapi} ${_lib_libipx} \ - lib/libkiconv lib/libkvm lib/liblzma lib/libmd \ + lib/libkiconv lib/libkvm lib/liblzma lib/libmd lib/libnv \ + ${_lib_libcapsicum} \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ @@ -1521,6 +1522,11 @@ _lib_libthr= lib/libthr _ofed_lib= contrib/ofed/usr.lib/ .endif +.if ${MK_CASPER} != "no" +_lib_libcapsicum=lib/libcapsicum +.endif + +lib/libcapsicum__L: lib/libnv__L lib/libpjdlog__L: lib/libutil__L _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib ${_ofed_lib} Modified: head/contrib/mdocml/lib.in ============================================================================== --- head/contrib/mdocml/lib.in Mon Dec 2 06:17:29 2013 (r258837) +++ head/contrib/mdocml/lib.in Mon Dec 2 08:21:28 2013 (r258838) @@ -32,6 +32,7 @@ LINE("libc", "Standard C\\~Library (lib LINE("libc_r", "Reentrant C\\~Library (libc_r, \\-lc_r)") LINE("libcalendar", "Calendar Arithmetic Library (libcalendar, \\-lcalendar)") LINE("libcam", "Common Access Method User Library (libcam, \\-lcam)") +LINE("libcapsicum", "Capsicum Library (libcapsicum, \\-lcapsicum)") LINE("libcdk", "Curses Development Kit Library (libcdk, \\-lcdk)") LINE("libcipher", "FreeSec Crypt Library (libcipher, \\-lcipher)") LINE("libcompat", "Compatibility Library (libcompat, \\-lcompat)") Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Mon Dec 2 06:17:29 2013 (r258837) +++ head/etc/Makefile Mon Dec 2 08:21:28 2013 (r258838) @@ -221,6 +221,9 @@ distribution: .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif +.if ${MK_CASPER} != "no" + ${_+_}cd ${.CURDIR}/casper; ${MAKE} install +.endif ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install Added: head/etc/casper/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/casper/Makefile Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +FILES= system.dns +FILES+= system.grp +FILES+= system.pwd +FILES+= system.random +FILES+= system.sysctl + +NO_OBJ= +FILESDIR= /etc/casper + +.include Added: head/etc/casper/system.dns ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/casper/system.dns Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1 @@ +/libexec/casper/dns Added: head/etc/casper/system.grp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/casper/system.grp Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1 @@ +/libexec/casper/grp Added: head/etc/casper/system.pwd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/casper/system.pwd Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1 @@ +/libexec/casper/pwd Added: head/etc/casper/system.random ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/casper/system.random Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1 @@ +/libexec/casper/random Added: head/etc/casper/system.sysctl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/casper/system.sysctl Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1 @@ +/libexec/casper/sysctl Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Mon Dec 2 06:17:29 2013 (r258837) +++ head/etc/mtree/BSD.root.dist Mon Dec 2 08:21:28 2013 (r258838) @@ -26,6 +26,8 @@ .. bluetooth .. + casper + .. defaults .. devd @@ -74,6 +76,8 @@ .. .. libexec + casper + .. resolvconf .. .. Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Dec 2 06:17:29 2013 (r258837) +++ head/lib/Makefile Mon Dec 2 08:21:28 2013 (r258838) @@ -37,6 +37,8 @@ SUBDIR_ORDERED= ${_csu} \ libauditd \ libutil \ libpjdlog \ + libnv \ + ${_libcapsicum} \ libcompiler_rt \ libcrypt \ libelf \ @@ -70,6 +72,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libbz2 \ libcalendar \ libcam \ + ${_libcasper} \ libcompat \ libdevinfo \ libdevstat \ @@ -157,6 +160,11 @@ _libsdp= libsdp _libbsnmp= libbsnmp .endif +.if ${MK_CASPER} != "no" +_libcapsicum= libcapsicum +_libcasper= libcasper +.endif + .if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) _clang= clang .endif Added: head/lib/libcapsicum/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcapsicum/Makefile Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1,46 @@ +# $FreeBSD$ + +LIB= capsicum + +SHLIB_MAJOR= 0 + +SRCS= libcapsicum.c +SRCS+= libcapsicum_dns.c +SRCS+= libcapsicum_grp.c +SRCS+= libcapsicum_pwd.c +SRCS+= libcapsicum_random.c +SRCS+= libcapsicum_service.c +SRCS+= libcapsicum_sysctl.c + +INCS= libcapsicum.h +INCS+= libcapsicum_dns.h +INCS+= libcapsicum_grp.h +INCS+= libcapsicum_pwd.h +INCS+= libcapsicum_random.h +INCS+= libcapsicum_service.h +INCS+= libcapsicum_sysctl.h + +DPADD= ${LIBNV} +LDADD= -lnv + +CFLAGS+=-I${.CURDIR} +CFLAGS+=-I${.CURDIR}/../libnv + +WARNS?= 6 + +MAN+= libcapsicum.3 + +MLINKS+=libcapsicum.3 cap_init.3 +MLINKS+=libcapsicum.3 cap_wrap.3 +MLINKS+=libcapsicum.3 cap_unwrap.3 +MLINKS+=libcapsicum.3 cap_sock.3 +MLINKS+=libcapsicum.3 cap_clone.3 +MLINKS+=libcapsicum.3 cap_close.3 +MLINKS+=libcapsicum.3 cap_limit_get.3 +MLINKS+=libcapsicum.3 cap_limit_set.3 +MLINKS+=libcapsicum.3 cap_send_nvlist.3 +MLINKS+=libcapsicum.3 cap_recv_nvlist.3 +MLINKS+=libcapsicum.3 cap_xfer_nvlist.3 +MLINKS+=libcapsicum.3 cap_service_open.3 + +.include Added: head/lib/libcapsicum/libcapsicum.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcapsicum/libcapsicum.3 Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1,288 @@ +.\" Copyright (c) 2013 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by Pawel Jakub Dawidek under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" 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 AUTHORS 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 AUTHORS 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$ +.\" +.Dd October 26, 2013 +.Dt LIBCAPSICUM 3 +.Os +.Sh NAME +.Nm cap_init , +.Nm cap_wrap , +.Nm cap_unwrap , +.Nm cap_sock , +.Nm cap_clone , +.Nm cap_close , +.Nm cap_limit_get , +.Nm cap_limit_set , +.Nm cap_send_nvlist , +.Nm cap_recv_nvlist , +.Nm cap_xfer_nvlist , +.Nm cap_service_open +.Nd "library for handling application capabilities" +.Sh LIBRARY +.Lb libcapsicum +.Sh SYNOPSIS +.In libcapsicum.h +.In nv.h +.Ft "cap_channel_t *" +.Fn cap_init "void" +.Ft "cap_channel_t *" +.Fn cap_wrap "int sock" +.Ft "int" +.Fn cap_unwrap "cap_channel_t *chan" +.Ft "int" +.Fn cap_sock "const cap_channel_t *chan" +.Ft "cap_channel_t *" +.Fn cap_clone "const cap_channel_t *chan" +.Ft "void" +.Fn cap_close "cap_channel_t *chan" +.Ft "int" +.Fn cap_limit_get "const cap_channel_t *chan" "nvlist_t **limitsp" +.Ft "int" +.Fn cap_limit_set "const cap_channel_t *chan" "nvlist_t *limits" +.Ft "int" +.Fn cap_send_nvlist "const cap_channel_t *chan" "const nvlist_t *nvl" +.Ft "nvlist_t *" +.Fn cap_recv_nvlist "const cap_channel_t *chan" +.Ft "nvlist_t *" +.Fn cap_xfer_nvlist "const cap_channel_t *chan" "nvlist_t *nvl" +.In libcapsicum_service.h +.Ft "cap_channel_t *" +.Fn cap_service_open "const cap_channel_t *chan" "const char *name" +.Sh DESCRIPTION +The +.Nm libcapsicum +library allows to manage application capabilities through the +.Xr casperd 8 +daemon. +.Pp +The application capability (represented by the +.Vt cap_channel_t +type) is a communication channel between the caller and the +.Xr casperd 8 +daemon or an instance of one of its services. +A capability to the +.Xr casperd 8 +daemon obtained with the +.Fn cap_init +function allows to create capabilities to casper's services via the +.Fn cap_service_open +function. +.Pp +The +.Fn cap_init +function opens capability to the +.Xr casperd 8 +daemon. +.Pp +The +.Fn cap_wrap +function creates +.Vt cap_channel_t +based on the given socket. +The function is used when capability is inherited through +.Xr execve 2 +or send over +.Xr unix 4 +domain socket as a regular file descriptor and has to be represented as +.Vt cap_channel_t +again. +.Pp +The +.Fn cap_unwrap +function is the opposite of the +.Fn cap_wrap +function. +It frees the +.Vt cap_channel_t +structure and returns +.Xr unix 4 +domain socket associated with it. +.Pp +The +.Fn cap_clone +function clones the given capability. +.Pp +The +.Fn cap_close +function closes the given capability. +.Pp +The +.Fn cap_sock +function returns +.Xr unix 4 +domain socket descriptor associated with the given capability for use with +system calls like +.Xr kevent 2 , +.Xr poll 2 +and +.Xr select 2 . +.Pp +The +.Fn cap_limit_get +function stores current limits of the given capability in the +.Fa limitsp +argument. +If the function return +.Va 0 +and +.Dv NULL +is stored in +.Fa limitsp +it means there are no limits set. +.Pp +The +.Fn cap_limit_set +function sets limits for the given capability. +The limits are provided as nvlist. +The exact format depends on the service the capability represents. +.Pp +The +.Fn cap_send_nvlist +function sends the given nvlist over the given capability. +This is low level interface to communicate with casper services. +Most services should provide higher level API. +.Pp +The +.Fn cap_recv_nvlist +function receives the given nvlist over the given capability. +.Pp +The +.Fn cap_xfer_nvlist +function sends the given nvlist, destroys it and receives new nvlist in +response over the given capability. +It does not matter if the function succeeds or fails, the nvlist given +for sending will always be destroyed once the function returns. +.Pp +The +.Fn cap_service_open +function opens casper service of the given name through casper capability +obtained via the +.Fn cap_init +function. +The function returns capability that provides access to opened service. +.Sh RETURN VALUES +The +.Fn cap_clone , +.Fn cap_init , +.Fn cap_recv_nvlist , +.Fn cap_service_open , +.Fn cap_wrap +and +.Fn cap_xfer_nvlist +functions return +.Dv NULL +and set the +.Va errno +variable on failure. +.Pp +The +.Fn cap_limit_get , +.Fn cap_limit_set +and +.Fn cap_send_nvlist +functions return +.Dv -1 +and set the +.Va errno +variable on failure. +.Pp +The +.Fn cap_close , +.Fn cap_sock +and +.Fn cap_unwrap +functions always succeed. +.Sh EXAMPLES +The following example first opens capability to the +.Xr casperd 8 +daemon, then using this capability creates new capability to the +.Nm system.dns +casper service and uses the latter capability to resolve IP address. +.Bd -literal +cap_channel_t *capcas, *capdns; +nvlist_t *limits; +const char *ipstr = "127.0.0.1"; +struct in_addr ip; +struct hostent *hp; + +/* Open capability to the Casper daemon. */ +capcas = cap_init(); +if (capcas == NULL) + err(1, "Unable to contact Casper daemon"); + +/* Enter capability mode sandbox. */ +if (cap_enter() < 0 && errno != ENOSYS) + err(1, "Unable to enter capability mode"); + +/* Use Casper capability to create capability to the system.dns service. */ +capdns = cap_service_open(capcas, "system.dns"); +if (capdns == NULL) + err(1, "Unable to open system.dns service"); + +/* Close Casper capability, we don't need it anymore. */ +cap_close(capcas); + +/* Limit system.dns to reverse DNS lookups and IPv4 addresses. */ +limits = nvlist_create(0); +nvlist_add_string(limits, "type", "ADDR"); +nvlist_add_number(limits, "family", (uint64_t)AF_INET); +if (cap_limit_set(capdns, limits) < 0) + err("Unable to limit access to the system.dns service"); + +/* Convert IP address in C-string to in_addr. */ +if (!inet_aton(ipstr, &ip)) + errx(1, "Unable to parse IP address %s.", ipstr); + +/* Find hostname for the given IP address. */ +hp = cap_gethostbyaddr(capdns, (const void *)&ip, sizeof(ip), AF_INET); +if (hp == NULL) + errx(1, "No name associated with %s.", ipstr); + +printf("Name associated with %s is %s.\\n", ipstr, hp->h_name); +.Ed +.Sh SEE ALSO +.Xr cap_enter 2 , +.Xr execve 2 , +.Xr kevent 2 , +.Xr poll 2 , +.Xr select 2 , +.Xr cap_gethostbyaddr 3 , +.Xr err 3 , +.Xr gethostbyaddr 3 , +.Xr inet_aton 3 , +.Xr nv 3 , +.Xr capsicum 4 , +.Xr unix 4 , +.Xr casperd 8 +.Sh AUTHORS +The +.Nm libcapsicum +library was implemented by +.An Pawel Jakub Dawidek Aq pawel@dawidek.net +under sponsorship from the FreeBSD Foundation. Added: head/lib/libcapsicum/libcapsicum.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcapsicum/libcapsicum.c Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1,266 @@ +/*- + * Copyright (c) 2012-2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "libcapsicum.h" +#include "libcapsicum_impl.h" +#include "nv.h" + +/* + * Structure describing communication channel between two separated processes. + */ +#define CAP_CHANNEL_MAGIC 0xcac8a31 +struct cap_channel { + /* + * Magic value helps to ensure that a pointer to the right structure is + * passed to our functions. + */ + int cch_magic; + /* Socket descriptor for IPC. */ + int cch_sock; +}; + +bool +fd_is_valid(int fd) +{ + + return (fcntl(fd, F_GETFL) != -1 || errno != EBADF); +} + +cap_channel_t * +cap_init(void) +{ + cap_channel_t *chan; + struct sockaddr_un sun; + int serrno, sock; + + bzero(&sun, sizeof(sun)); + sun.sun_family = AF_UNIX; + strlcpy(sun.sun_path, CASPER_SOCKPATH, sizeof(sun.sun_path)); + sun.sun_len = SUN_LEN(&sun); + + sock = socket(AF_UNIX, SOCK_STREAM, 0); + if (sock == -1) + return (NULL); + if (connect(sock, (struct sockaddr *)&sun, sizeof(sun)) < 0) { + serrno = errno; + close(sock); + errno = serrno; + return (NULL); + } + chan = cap_wrap(sock); + if (chan == NULL) { + serrno = errno; + close(sock); + errno = serrno; + return (NULL); + } + return (chan); +} + +cap_channel_t * +cap_wrap(int sock) +{ + cap_channel_t *chan; + + if (!fd_is_valid(sock)) + return (NULL); + + chan = malloc(sizeof(*chan)); + if (chan != NULL) { + chan->cch_sock = sock; + chan->cch_magic = CAP_CHANNEL_MAGIC; + } + + return (chan); +} + +int +cap_unwrap(cap_channel_t *chan) +{ + int sock; + + assert(chan != NULL); + assert(chan->cch_magic == CAP_CHANNEL_MAGIC); + + sock = chan->cch_sock; + chan->cch_magic = 0; + free(chan); + + return (sock); +} + +cap_channel_t * +cap_clone(const cap_channel_t *chan) +{ + cap_channel_t *newchan; + nvlist_t *nvl; + int newsock; + + assert(chan != NULL); + assert(chan->cch_magic == CAP_CHANNEL_MAGIC); + + nvl = nvlist_create(0); + nvlist_add_string(nvl, "cmd", "clone"); + nvl = cap_xfer_nvlist(chan, nvl); + if (nvl == NULL) + return (NULL); + if (nvlist_get_number(nvl, "error") != 0) { + errno = (int)nvlist_get_number(nvl, "error"); + nvlist_destroy(nvl); + return (NULL); + } + newsock = nvlist_take_descriptor(nvl, "sock"); + nvlist_destroy(nvl); + newchan = cap_wrap(newsock); + if (newchan == NULL) { + int serrno; + + serrno = errno; + close(newsock); + errno = serrno; + } + + return (newchan); +} + +void +cap_close(cap_channel_t *chan) +{ + + assert(chan != NULL); + assert(chan->cch_magic == CAP_CHANNEL_MAGIC); + + chan->cch_magic = 0; + close(chan->cch_sock); + free(chan); +} + +int +cap_sock(const cap_channel_t *chan) +{ + + assert(chan != NULL); + assert(chan->cch_magic == CAP_CHANNEL_MAGIC); + + return (chan->cch_sock); +} + +int +cap_limit_set(const cap_channel_t *chan, nvlist_t *limits) +{ + nvlist_t *nvlmsg; + int error; + + nvlmsg = nvlist_create(0); + nvlist_add_string(nvlmsg, "cmd", "limit_set"); + nvlist_add_nvlist(nvlmsg, "limits", limits); + nvlmsg = cap_xfer_nvlist(chan, nvlmsg); + if (nvlmsg == NULL) { + nvlist_destroy(limits); + return (-1); + } + error = (int)nvlist_get_number(nvlmsg, "error"); + nvlist_destroy(nvlmsg); + nvlist_destroy(limits); + if (error != 0) { + errno = error; + return (-1); + } + return (0); +} + +int +cap_limit_get(const cap_channel_t *chan, nvlist_t **limitsp) +{ + nvlist_t *nvlmsg; + int error; + + nvlmsg = nvlist_create(0); + nvlist_add_string(nvlmsg, "cmd", "limit_get"); + nvlmsg = cap_xfer_nvlist(chan, nvlmsg); + if (nvlmsg == NULL) + return (-1); + error = (int)nvlist_get_number(nvlmsg, "error"); + if (error != 0) { + nvlist_destroy(nvlmsg); + errno = error; + return (-1); + } + if (nvlist_exists_null(nvlmsg, "limits")) + *limitsp = NULL; + else + *limitsp = nvlist_take_nvlist(nvlmsg, "limits"); + nvlist_destroy(nvlmsg); + return (0); +} + +int +cap_send_nvlist(const cap_channel_t *chan, const nvlist_t *nvl) +{ + + assert(chan != NULL); + assert(chan->cch_magic == CAP_CHANNEL_MAGIC); + + return (nvlist_send(chan->cch_sock, nvl)); +} + +nvlist_t * +cap_recv_nvlist(const cap_channel_t *chan) +{ + + assert(chan != NULL); + assert(chan->cch_magic == CAP_CHANNEL_MAGIC); + + return (nvlist_recv(chan->cch_sock)); +} + +nvlist_t * +cap_xfer_nvlist(const cap_channel_t *chan, nvlist_t *nvl) +{ + + assert(chan != NULL); + assert(chan->cch_magic == CAP_CHANNEL_MAGIC); + + return (nvlist_xfer(chan->cch_sock, nvl)); +} Added: head/lib/libcapsicum/libcapsicum.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcapsicum/libcapsicum.h Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1,115 @@ +/*- + * Copyright (c) 2012-2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LIBCAPSICUM_H_ +#define _LIBCAPSICUM_H_ + +#ifndef _NVLIST_T_DECLARED +#define _NVLIST_T_DECLARED +struct nvlist; + +typedef struct nvlist nvlist_t; +#endif + +#ifndef _CAP_CHANNEL_T_DECLARED +#define _CAP_CHANNEL_T_DECLARED +struct cap_channel; + +typedef struct cap_channel cap_channel_t; +#endif + +/* + * The function opens unrestricted communication channel to Casper. + */ +cap_channel_t *cap_init(void); + +/* + * The function creates cap_channel_t based on the given socket. + */ +cap_channel_t *cap_wrap(int sock); + +/* + * The function returns communication socket and frees cap_channel_t. + */ +int cap_unwrap(cap_channel_t *chan); + +/* + * The function clones the given capability. + */ +cap_channel_t *cap_clone(const cap_channel_t *chan); + +/* + * The function closes the given capability. + */ +void cap_close(cap_channel_t *chan); + +/* + * The function returns socket descriptor associated with the given + * cap_channel_t for use with select(2)/kqueue(2)/etc. + */ +int cap_sock(const cap_channel_t *chan); + +/* + * The function limits the given capability. + * It always destroys 'limits' on return. + */ +int cap_limit_set(const cap_channel_t *chan, nvlist_t *limits); + +/* + * The function returns current limits of the given capability. + */ +int cap_limit_get(const cap_channel_t *chan, nvlist_t **limitsp); + +#ifdef TODO +/* + * The function registers a service within provided Casper's capability. + * It will run with the same privileges the process has at the time of + * calling this function. + */ +int cap_service_register(cap_channel_t *chan, const char *name, + cap_func_t *func); +#endif + +/* + * Function sends nvlist over the given capability. + */ +int cap_send_nvlist(const cap_channel_t *chan, const nvlist_t *nvl); +/* + * Function receives nvlist over the given capability. + */ +nvlist_t *cap_recv_nvlist(const cap_channel_t *chan); +/* + * Function sends the given nvlist, destroys it and receives new nvlist in + * response over the given capability. + */ +nvlist_t *cap_xfer_nvlist(const cap_channel_t *chan, nvlist_t *nvl); + +#endif /* !_LIBCAPSICUM_H_ */ Added: head/lib/libcapsicum/libcapsicum_dns.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcapsicum/libcapsicum_dns.c Mon Dec 2 08:21:28 2013 (r258838) @@ -0,0 +1,346 @@ +/*- + * Copyright (c) 2012-2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +#include "libcapsicum.h" +#include "libcapsicum_dns.h" + +static struct hostent hent; + +static void +hostent_free(struct hostent *hp) +{ + unsigned int ii; + + free(hp->h_name); + hp->h_name = NULL; + if (hp->h_aliases != NULL) { + for (ii = 0; hp->h_aliases[ii] != NULL; ii++) + free(hp->h_aliases[ii]); + free(hp->h_aliases); + hp->h_aliases = NULL; + } + if (hp->h_addr_list != NULL) { + for (ii = 0; hp->h_addr_list[ii] != NULL; ii++) + free(hp->h_addr_list[ii]); + free(hp->h_addr_list); + hp->h_addr_list = NULL; + } +} + +static struct hostent * +hostent_unpack(const nvlist_t *nvl, struct hostent *hp) +{ + unsigned int ii, nitems; + + hostent_free(hp); + + hp->h_name = strdup(nvlist_get_string(nvl, "name")); + if (hp->h_name == NULL) + goto fail; + hp->h_addrtype = (int)nvlist_get_number(nvl, "addrtype"); + hp->h_length = (int)nvlist_get_number(nvl, "length"); + + nitems = (unsigned int)nvlist_get_number(nvl, "naliases"); + hp->h_aliases = calloc(sizeof(hp->h_aliases[0]), nitems + 1); + if (hp->h_aliases == NULL) + goto fail; + for (ii = 0; ii < nitems; ii++) { + hp->h_aliases[ii] = + strdup(nvlist_getf_string(nvl, "alias%u", ii)); + if (hp->h_aliases[ii] == NULL) + goto fail; + } + hp->h_aliases[ii] = NULL; + + nitems = (unsigned int)nvlist_get_number(nvl, "naddrs"); + hp->h_addr_list = calloc(sizeof(hp->h_addr_list[0]), nitems + 1); + if (hp->h_addr_list == NULL) + goto fail; + for (ii = 0; ii < nitems; ii++) { + hp->h_addr_list[ii] = malloc(hp->h_length); + if (hp->h_addr_list[ii] == NULL) + goto fail; + bcopy(nvlist_getf_binary(nvl, NULL, "addr%u", ii), + hp->h_addr_list[ii], hp->h_length); + } + hp->h_addr_list[ii] = NULL; + + return (hp); +fail: + hostent_free(hp); + h_errno = NO_RECOVERY; + return (NULL); +} + +struct hostent * +cap_gethostbyname(cap_channel_t *chan, const char *name) +{ + + return (cap_gethostbyname2(chan, name, AF_INET)); +} + +struct hostent * +cap_gethostbyname2(cap_channel_t *chan, const char *name, int type) +{ + struct hostent *hp; + nvlist_t *nvl; + + nvl = nvlist_create(0); + nvlist_add_string(nvl, "cmd", "gethostbyname"); + nvlist_add_number(nvl, "family", (uint64_t)type); + nvlist_add_string(nvl, "name", name); + nvl = cap_xfer_nvlist(chan, nvl); + if (nvl == NULL) { + h_errno = NO_RECOVERY; + return (NULL); + } + if (nvlist_get_number(nvl, "error") != 0) { + h_errno = (int)nvlist_get_number(nvl, "error"); + nvlist_destroy(nvl); + return (NULL); + } + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 09:07:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EFA7B16; Mon, 2 Dec 2013 09:07:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 621CA106E; Mon, 2 Dec 2013 09:07:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB297iue038804; Mon, 2 Dec 2013 09:07:44 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB297iIL038802; Mon, 2 Dec 2013 09:07:44 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201312020907.rB297iIL038802@svn.freebsd.org> From: Kevin Lo Date: Mon, 2 Dec 2013 09:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258840 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 09:07:44 -0000 Author: kevlo Date: Mon Dec 2 09:07:43 2013 New Revision: 258840 URL: http://svnweb.freebsd.org/changeset/base/258840 Log: The RUN_MAX_TXSZ constat is defined as Tx desc + Tx wireless info + MCLBYTES + max padding. We were lucky in that run(4) working fine since both rt2860_rxwi and rt2860_txwi structure sizes are the same. Modified: head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runvar.h Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Mon Dec 2 08:36:53 2013 (r258839) +++ head/sys/dev/usb/wlan/if_run.c Mon Dec 2 09:07:43 2013 (r258840) @@ -3167,8 +3167,9 @@ run_tx(struct run_softc *sc, struct mbuf usbd_transfer_start(sc->sc_xfer[qid]); - DPRINTFN(8, "sending data frame len=%d rate=%d qid=%d\n", m->m_pkthdr.len + - (int)(sizeof (struct rt2870_txd) + sizeof (struct rt2860_rxwi)), + DPRINTFN(8, "sending data frame len=%d rate=%d qid=%d\n", + m->m_pkthdr.len + + (int)(sizeof(struct rt2870_txd) + sizeof(struct rt2860_txwi)), rt2860_rates[ridx].rate, qid); return (0); @@ -3233,7 +3234,7 @@ run_tx_mgt(struct run_softc *sc, struct run_set_tx_desc(sc, data); DPRINTFN(10, "sending mgt frame len=%d rate=%d\n", m->m_pkthdr.len + - (int)(sizeof (struct rt2870_txd) + sizeof (struct rt2860_rxwi)), + (int)(sizeof(struct rt2870_txd) + sizeof(struct rt2860_txwi)), rt2860_rates[ridx].rate); STAILQ_INSERT_TAIL(&sc->sc_epq[0].tx_qh, data, next); Modified: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Mon Dec 2 08:36:53 2013 (r258839) +++ head/sys/dev/usb/wlan/if_runvar.h Mon Dec 2 09:07:43 2013 (r258840) @@ -35,7 +35,7 @@ /* NB: "11" is the maximum number of padding bytes needed for Tx */ #define RUN_MAX_TXSZ \ (sizeof (struct rt2870_txd) + \ - sizeof (struct rt2860_rxwi) + \ + sizeof (struct rt2860_txwi) + \ MCLBYTES + 11) #define RUN_TX_TIMEOUT 5000 /* ms */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 09:23:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13AA929B; Mon, 2 Dec 2013 09:23:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 002F7118B; Mon, 2 Dec 2013 09:23: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 rB29NZec002285; Mon, 2 Dec 2013 09:23:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB29NZjI002282; Mon, 2 Dec 2013 09:23:35 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312020923.rB29NZjI002282@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 2 Dec 2013 09:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258841 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 09:23:36 -0000 Author: trasz Date: Mon Dec 2 09:23:34 2013 New Revision: 258841 URL: http://svnweb.freebsd.org/changeset/base/258841 Log: Fix typos. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/parse.y Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Mon Dec 2 09:07:43 2013 (r258840) +++ head/usr.sbin/ctld/parse.y Mon Dec 2 09:23:34 2013 (r258841) @@ -300,7 +300,7 @@ auth_group_statement: AUTH_GROUP STR log_warnx("auth-group for target \"%s\" " "specified more than once", target->t_iqn); else - log_warnx("cannot mix auth-grup with explicit " + log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", target->t_iqn); return (1); @@ -321,7 +321,7 @@ chap_statement: CHAP STR STR if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-grup with explicit " + log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", target->t_iqn); free($2); @@ -351,7 +351,7 @@ chap_mutual_statement: CHAP_MUTUAL STR S if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-grup with explicit " + log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", target->t_iqn); free($2); From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 09:47:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B679CC4; Mon, 2 Dec 2013 09:47:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 27ADD12F9; Mon, 2 Dec 2013 09:47:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB29lM7H009262; Mon, 2 Dec 2013 09:47:22 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB29lMXr009261; Mon, 2 Dec 2013 09:47:22 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312020947.rB29lMXr009261@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 2 Dec 2013 09:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258842 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 09:47:23 -0000 Author: trasz Date: Mon Dec 2 09:47:22 2013 New Revision: 258842 URL: http://svnweb.freebsd.org/changeset/base/258842 Log: Grammar fix. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Mon Dec 2 09:23:34 2013 (r258841) +++ head/usr.sbin/ctld/ctl.conf.5 Mon Dec 2 09:47:22 2013 (r258842) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 2013 +.Dd December 2, 2013 .Dt CTL.CONF 5 .Os .Sh NAME @@ -141,7 +141,7 @@ Note that targets must use either auth-g or chap-mutual clauses; it's a configuration error to mix them in one target. .It Ic chap-mutual Ao Ar user Ac Ao Ar secret Ac Ao Ar mutualuser Ac Aq Ar mutualsecret Specifies mutual CHAP authentication credentials. -Note that targets must use either auth-group, chap, +Note that targets must use either auth-group, chap, or chap-mutual clauses; it's a configuration error to mix them in one target. .It Ic portal-group Aq Ar name Assigns previously defined portal group to that target. From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 10:18:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5C41ACE; Mon, 2 Dec 2013 10:18:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C0B1315FC; Mon, 2 Dec 2013 10:18:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2AIQrV018815; Mon, 2 Dec 2013 10:18:26 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB2AIQ5l018810; Mon, 2 Dec 2013 10:18:26 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312021018.rB2AIQ5l018810@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 2 Dec 2013 10:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258843 - head/lib/libcasper X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 10:18:26 -0000 Author: pjd Date: Mon Dec 2 10:18:25 2013 New Revision: 258843 URL: http://svnweb.freebsd.org/changeset/base/258843 Log: Forgot to 'svn add' lib/libcasper/ directory. Reported by: glebius Added: head/lib/libcasper/ head/lib/libcasper/Makefile (contents, props changed) head/lib/libcasper/libcasper.c (contents, props changed) head/lib/libcasper/libcasper.h (contents, props changed) head/lib/libcasper/libcasper_impl.h (contents, props changed) Added: head/lib/libcasper/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcasper/Makefile Mon Dec 2 10:18:25 2013 (r258843) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +LIB= casper + +SHLIB_MAJOR= 0 + +SRCS= libcasper.c +INCS= libcasper.h + +DPADD= ${LIBCAPSICUM} ${LIBNV} ${LIBPJDLOG} +LDADD= -lcapsicum -lnv -lpjdlog + +CFLAGS+=-I${.CURDIR} +CFLAGS+=-I${.CURDIR}/../libpjdlog +CFLAGS+=-I${.CURDIR}/../../sbin/casper + +WARNS?= 6 + +.include Added: head/lib/libcasper/libcasper.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcasper/libcasper.c Mon Dec 2 10:18:25 2013 (r258843) @@ -0,0 +1,441 @@ +/*- + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +/* + * Currently there is only one service_connection per service. + * In the future we may want multiple connections from multiple clients + * per one service instance, but it has to be carefully designed. + * The problem is that we may restrict/sandbox service instance according + * to the limits provided. When new connection comes in with different + * limits we won't be able to access requested resources. + * Not to mention one process will serve to mutiple mutually untrusted + * clients and compromise of this service instance by one of its clients + * can lead to compromise of the other clients. + */ + +/* + * Client connections to the given service. + */ +#define SERVICE_CONNECTION_MAGIC 0x5e91c0ec +struct service_connection { + int sc_magic; + cap_channel_t *sc_chan; + nvlist_t *sc_limits; + TAILQ_ENTRY(service_connection) sc_next; +}; + +#define SERVICE_MAGIC 0x5e91ce +struct service { + int s_magic; + char *s_name; + service_limit_func_t *s_limit; + service_command_func_t *s_command; + TAILQ_HEAD(, service_connection) s_connections; +}; + +struct service * +service_alloc(const char *name, service_limit_func_t *limitfunc, + service_command_func_t *commandfunc) +{ + struct service *service; + + service = malloc(sizeof(*service)); + if (service == NULL) + return (NULL); + service->s_name = strdup(name); + if (service->s_name == NULL) { + free(service); + return (NULL); + } + service->s_limit = limitfunc; + service->s_command = commandfunc; + TAILQ_INIT(&service->s_connections); + service->s_magic = SERVICE_MAGIC; + + return (service); +} + +void +service_free(struct service *service) +{ + struct service_connection *sconn; + + PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC); + + service->s_magic = 0; + while ((sconn = service_connection_first(service)) != NULL) + service_connection_remove(service, sconn); + free(service->s_name); + free(service); +} + +struct service_connection * +service_connection_add(struct service *service, int sock, + const nvlist_t *limits) +{ + struct service_connection *sconn; + int serrno; + + PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC); + + sconn = malloc(sizeof(*sconn)); + if (sconn == NULL) { + pjdlog_error("Unable to allocate memory for service connection."); + return (NULL); + } + sconn->sc_chan = cap_wrap(sock); + if (sconn->sc_chan == NULL) { + serrno = errno; + pjdlog_error("Unable to wrap communication channel."); + free(sconn); + errno = serrno; + return (NULL); + } + if (limits == NULL) { + sconn->sc_limits = NULL; + } else { + sconn->sc_limits = nvlist_clone(limits); + if (sconn->sc_limits == NULL) { + serrno = errno; + pjdlog_error("Unable to clone limits."); + (void)cap_unwrap(sconn->sc_chan); + free(sconn); + errno = serrno; + return (NULL); + } + } + sconn->sc_magic = SERVICE_CONNECTION_MAGIC; + TAILQ_INSERT_TAIL(&service->s_connections, sconn, sc_next); + return (sconn); +} + +void +service_connection_remove(struct service *service, + struct service_connection *sconn) +{ + + PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC); + PJDLOG_ASSERT(sconn->sc_magic == SERVICE_CONNECTION_MAGIC); + + TAILQ_REMOVE(&service->s_connections, sconn, sc_next); + sconn->sc_magic = 0; + nvlist_destroy(sconn->sc_limits); + cap_close(sconn->sc_chan); + free(sconn); +} + +int +service_connection_clone(struct service *service, + struct service_connection *sconn) +{ + struct service_connection *newsconn; + int serrno, sock[2]; + + if (socketpair(PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0, sock) < 0) + return (-1); + + newsconn = service_connection_add(service, sock[0], + service_connection_get_limits(sconn)); + if (newsconn == NULL) { + serrno = errno; + close(sock[0]); + close(sock[1]); + errno = serrno; + return (-1); + } + + return (sock[1]); +} + +struct service_connection * +service_connection_first(struct service *service) +{ + struct service_connection *sconn; + + PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC); + + sconn = TAILQ_FIRST(&service->s_connections); + PJDLOG_ASSERT(sconn == NULL || + sconn->sc_magic == SERVICE_CONNECTION_MAGIC); + return (sconn); +} + +struct service_connection * +service_connection_next(struct service_connection *sconn) +{ + + PJDLOG_ASSERT(sconn->sc_magic == SERVICE_CONNECTION_MAGIC); + + sconn = TAILQ_NEXT(sconn, sc_next); + PJDLOG_ASSERT(sconn == NULL || + sconn->sc_magic == SERVICE_CONNECTION_MAGIC); + return (sconn); +} + +cap_channel_t * +service_connection_get_chan(const struct service_connection *sconn) +{ + + PJDLOG_ASSERT(sconn->sc_magic == SERVICE_CONNECTION_MAGIC); + + return (sconn->sc_chan); +} + +int +service_connection_get_sock(const struct service_connection *sconn) +{ + + PJDLOG_ASSERT(sconn->sc_magic == SERVICE_CONNECTION_MAGIC); + + return (cap_sock(sconn->sc_chan)); +} + +const nvlist_t * +service_connection_get_limits(const struct service_connection *sconn) +{ + + PJDLOG_ASSERT(sconn->sc_magic == SERVICE_CONNECTION_MAGIC); + + return (sconn->sc_limits); +} + +void +service_connection_set_limits(struct service_connection *sconn, + nvlist_t *limits) +{ + + PJDLOG_ASSERT(sconn->sc_magic == SERVICE_CONNECTION_MAGIC); + + nvlist_destroy(sconn->sc_limits); + sconn->sc_limits = limits; +} + +#if 0 +static void +casper_message_connection(struct service *service, const nvlist_t *nvl) +{ + + service_connection_add(&service->s_connections, + nvlist_get_descriptor(nvl, "sock")); +} + +static void +casper_message(const cap_channel_t *capcas, struct service *service) +{ + const char *cmd; + nvlist_t *nvl; + + nvl = cap_recv_nvlist(capcas); + if (nvl == NULL) + pjdlog_exit(1, "Unable to receive message from Casper"); + cmd = nvlist_get_string(nvl, "cmd"); + if (strcmp(cmd, "connection") == 0) + casper_message_connection(service, nvl); + else + PJDLOG_ABORT("Unknown command from Casper: %s.", cmd); +} +#endif + +void +service_message(struct service *service, struct service_connection *sconn) +{ + nvlist_t *nvlin, *nvlout; + const char *cmd; + int error; + + nvlin = cap_recv_nvlist(service_connection_get_chan(sconn)); + if (nvlin == NULL) { + if (errno == ENOTCONN) { + pjdlog_debug(1, "Connection closed by the client."); + } else { + pjdlog_errno(LOG_ERR, + "Unable to receive message from client"); + } + service_connection_remove(service, sconn); + return; + } + + error = EDOOFUS; + nvlout = nvlist_create(0); + + cmd = nvlist_get_string(nvlin, "cmd"); + pjdlog_debug(1, "Command received from client: %s.", cmd); + if (pjdlog_debug_get() >= 2) + nvlist_fdump(nvlin, stderr); + if (strcmp(cmd, "limit_set") == 0) { + nvlist_t *nvllim; + + nvllim = nvlist_take_nvlist(nvlin, "limits"); + error = service->s_limit(service_connection_get_limits(sconn), + nvllim); + if (error == 0) { + service_connection_set_limits(sconn, nvllim); + /* Function consumes nvllim. */ + } else { + nvlist_destroy(nvllim); + } + } else if (strcmp(cmd, "limit_get") == 0) { + const nvlist_t *nvllim; + + nvllim = service_connection_get_limits(sconn); + if (nvllim != NULL) + nvlist_add_nvlist(nvlout, "limits", nvllim); + else + nvlist_add_null(nvlout, "limits"); + error = 0; + } else if (strcmp(cmd, "clone") == 0) { + int sock; + + sock = service_connection_clone(service, sconn); + if (sock == -1) { + error = errno; + } else { + nvlist_add_descriptor(nvlout, "sock", sock); + error = 0; + } + } else { + nvlout = nvlist_create(0); + error = service->s_command(cmd, + service_connection_get_limits(sconn), nvlin, nvlout); + } + + nvlist_destroy(nvlin); + nvlist_add_number(nvlout, "error", (uint64_t)error); + pjdlog_debug(1, "Sending reply to client (error=%d).", error); + if (pjdlog_debug_get() >= 2) + nvlist_fdump(nvlout, stderr); + + if (cap_send_nvlist(service_connection_get_chan(sconn), nvlout) == -1) { + pjdlog_errno(LOG_ERR, "Unable to send message to client"); + service_connection_remove(service, sconn); + return; + } +} + +static int +fd_add(fd_set *fdsp, int maxfd, int fd) +{ + + FD_SET(fd, fdsp); + return (fd > maxfd ? fd : maxfd); +} + +int +service_start(const char *name, int sock, service_limit_func_t *limitfunc, + service_command_func_t *commandfunc, int argc, char *argv[]) +{ + struct service *service; + struct service_connection *sconn, *sconntmp; + fd_set fds; + int maxfd, nfds, serrno; + + assert(argc == 2); + + pjdlog_init(PJDLOG_MODE_STD); + pjdlog_debug_set(atoi(argv[1])); + + service = service_alloc(name, limitfunc, commandfunc); + if (service == NULL) + return (errno); + if (service_connection_add(service, sock, NULL) == NULL) { + serrno = errno; + service_free(service); + return (serrno); + } + + for (;;) { + FD_ZERO(&fds); + maxfd = -1; + for (sconn = service_connection_first(service); sconn != NULL; + sconn = service_connection_next(sconn)) { + maxfd = fd_add(&fds, maxfd, + service_connection_get_sock(sconn)); + } + + PJDLOG_ASSERT(maxfd >= 0); + PJDLOG_ASSERT(maxfd + 1 <= (int)FD_SETSIZE); + nfds = select(maxfd + 1, &fds, NULL, NULL, NULL); + if (nfds < 0) { + if (errno != EINTR) + pjdlog_errno(LOG_ERR, "select() failed"); + continue; + } else if (nfds == 0) { + /* Timeout. */ + PJDLOG_ABORT("select() timeout"); + continue; + } + + for (sconn = service_connection_first(service); sconn != NULL; + sconn = sconntmp) { + /* + * Prepare for connection to be removed from the list + * on failure. + */ + sconntmp = service_connection_next(sconn); + if (FD_ISSET(service_connection_get_sock(sconn), &fds)) + service_message(service, sconn); + } + if (service_connection_first(service) == NULL) { + /* + * No connections left, exiting. + */ + break; + } + } + + return (0); +} Added: head/lib/libcasper/libcasper.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcasper/libcasper.h Mon Dec 2 10:18:25 2013 (r258843) @@ -0,0 +1,70 @@ +/*- + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LIBCASPER_H_ +#define _LIBCASPER_H_ + +#ifndef _NVLIST_T_DECLARED +#define _NVLIST_T_DECLARED +struct nvlist; + +typedef struct nvlist nvlist_t; +#endif + +#define PARENT_FILENO 3 +#define EXECUTABLE_FILENO 4 +#define PROC_FILENO 5 + +struct service; +struct service_connection; + +typedef int service_limit_func_t(const nvlist_t *, const nvlist_t *); +typedef int service_command_func_t(const char *cmd, const nvlist_t *, + nvlist_t *, nvlist_t *); + +struct service_connection *service_connection_add(struct service *service, + int sock, const nvlist_t *limits); +void service_connection_remove(struct service *service, + struct service_connection *sconn); +int service_connection_clone(struct service *service, + struct service_connection *sconn); +struct service_connection *service_connection_first(struct service *service); +struct service_connection *service_connection_next(struct service_connection *sconn); +cap_channel_t *service_connection_get_chan(const struct service_connection *sconn); +int service_connection_get_sock(const struct service_connection *sconn); +const nvlist_t *service_connection_get_limits(const struct service_connection *sconn); +void service_connection_set_limits(struct service_connection *sconn, + nvlist_t *limits); + +int service_start(const char *name, int sock, service_limit_func_t *limitfunc, + service_command_func_t *commandfunc, int argc, char *argv[]); + +#endif /* !_LIBCASPER_H_ */ Added: head/lib/libcasper/libcasper_impl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcasper/libcasper_impl.h Mon Dec 2 10:18:25 2013 (r258843) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LIBCASPER_IMPL_H_ +#define _LIBCASPER_IMPL_H_ + +#include "libcasper.h" + +struct service; +struct service_connection; + +struct service * service_alloc(const char *name, + service_limit_func_t *limitfunc, service_command_func_t *commandfunc); +void service_free(struct service *service); + +void service_message(struct service *service, struct service_connection *sconn); + +#endif /* !_LIBCASPER_IMPL_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 10:59:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D76D52A; Mon, 2 Dec 2013 10:59:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3F90C185C; Mon, 2 Dec 2013 10:59:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2Axgpf032234; Mon, 2 Dec 2013 10:59:42 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB2AxgAY032233; Mon, 2 Dec 2013 10:59:42 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201312021059.rB2AxgAY032233@svn.freebsd.org> From: Bryan Drewery Date: Mon, 2 Dec 2013 10:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258844 - stable/9/lib/libfetch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 10:59:42 -0000 Author: bdrewery (ports committer) Date: Mon Dec 2 10:59:41 2013 New Revision: 258844 URL: http://svnweb.freebsd.org/changeset/base/258844 Log: MFC r258347,r258349: Support SNI in libfetch SNI is Server Name Indentification which is a protocol for TLS that indicates the host that is being connected to at the start of the handshake. It allows to use Virtual Hosts on HTTPS. PR: kern/183583 Approved by: bapt (implicit) Modified: stable/9/lib/libfetch/common.c Directory Properties: stable/9/lib/libfetch/ (props changed) Modified: stable/9/lib/libfetch/common.c ============================================================================== --- stable/9/lib/libfetch/common.c Mon Dec 2 10:18:25 2013 (r258843) +++ stable/9/lib/libfetch/common.c Mon Dec 2 10:59:41 2013 (r258844) @@ -829,6 +829,16 @@ fetch_ssl(conn_t *conn, const struct url return (-1); } SSL_set_fd(conn->ssl, conn->sd); + +#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) + if (!SSL_set_tlsext_host_name(conn->ssl, + __DECONST(struct url *, URL)->host)) { + fprintf(stderr, + "TLS server name indication extension failed for host %s\n", + URL->host); + return (-1); + } +#endif while ((ret = SSL_connect(conn->ssl)) == -1) { ssl_err = SSL_get_error(conn->ssl, ret); if (ssl_err != SSL_ERROR_WANT_READ && From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 13:10:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A3D46DA; Mon, 2 Dec 2013 13:10:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA13E11FB; Mon, 2 Dec 2013 13:09:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2D9xMK076741; Mon, 2 Dec 2013 13:09:59 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB2D9xoM076740; Mon, 2 Dec 2013 13:09:59 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201312021309.rB2D9xoM076740@svn.freebsd.org> From: Zbigniew Bodek Date: Mon, 2 Dec 2013 13:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258845 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 13:10:00 -0000 Author: zbb Date: Mon Dec 2 13:09:59 2013 New Revision: 258845 URL: http://svnweb.freebsd.org/changeset/base/258845 Log: Enable missing Access Flag for secondary cores on ARMv6/v7 Spotted by: Wojciech Macek Obtained from: Semihalf > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Mon Dec 2 10:59:41 2013 (r258844) +++ head/sys/arm/arm/locore.S Mon Dec 2 13:09:59 2013 (r258845) @@ -391,6 +391,7 @@ Ltag: mrc p15, 0, r0, c1, c0, 0 #if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) orr r0, r0, #CPU_CONTROL_V6_EXTPAGE + orr r0, r0, #CPU_CONTROL_AF_ENABLE #endif orr r0, r0, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE) mcr p15, 0, r0, c1, c0, 0 From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 14:28:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B536A3C; Mon, 2 Dec 2013 14:28:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A0AD1776; Mon, 2 Dec 2013 14:28:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2ESVvW006712; Mon, 2 Dec 2013 14:28:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB2ESV02006710; Mon, 2 Dec 2013 14:28:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312021428.rB2ESV02006710@svn.freebsd.org> From: Glen Barber Date: Mon, 2 Dec 2013 14:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258847 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 14:28:31 -0000 Author: gjb Date: Mon Dec 2 14:28:30 2013 New Revision: 258847 URL: http://svnweb.freebsd.org/changeset/base/258847 Log: Provide reproducibility between builds by building pkg(8) from ports, instead of using pkg-bootstrap. This should resolve a problem that was discovered during 10.0-BETA4 freebsd-update(8) builds, Reported by: secteam (delphij) MFC after: 3 days X-MFC-to-10: possibly immediately, pending freebsd-update(8) builds Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Mon Dec 2 14:26:57 2013 (r258846) +++ head/release/scripts/pkg-stage.sh Mon Dec 2 14:28:30 2013 (r258847) @@ -25,7 +25,7 @@ REVISION="${2}" . "${1}" || exit 1 if [ ! -x /usr/local/sbin/pkg ]; then - /usr/sbin/pkg bootstrap + /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi /bin/mkdir -p ${PKG_CACHEDIR} From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 17:01:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD026A7E; Mon, 2 Dec 2013 17:01:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A6E7C144D; Mon, 2 Dec 2013 17:01:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2H12le089653; Mon, 2 Dec 2013 17:01:02 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2H127D089646; Mon, 2 Dec 2013 17:01:02 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312021701.rB2H127D089646@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 2 Dec 2013 17:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258849 - head/tools/regression/capsicum/libcapsicum X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 17:01:02 -0000 Author: pjd Date: Mon Dec 2 17:01:01 2013 New Revision: 258849 URL: http://svnweb.freebsd.org/changeset/base/258849 Log: Regression tests for existing Casper services. Sponsored by: The FreeBSD Foundation Added: head/tools/regression/capsicum/libcapsicum/ head/tools/regression/capsicum/libcapsicum/Makefile (contents, props changed) head/tools/regression/capsicum/libcapsicum/dns.c (contents, props changed) head/tools/regression/capsicum/libcapsicum/grp.c (contents, props changed) head/tools/regression/capsicum/libcapsicum/pwd.c (contents, props changed) head/tools/regression/capsicum/libcapsicum/sysctl.c (contents, props changed) Added: head/tools/regression/capsicum/libcapsicum/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/capsicum/libcapsicum/Makefile Mon Dec 2 17:01:01 2013 (r258849) @@ -0,0 +1,31 @@ +# $FreeBSD$ + +SERVICES= dns +SERVICES+= grp +SERVICES+= pwd +SERVICES+= sysctl + +CFLAGS= -O2 -pipe -std=gnu99 -fstack-protector +CFLAGS+= -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter +CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type +CFLAGS+= -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter +CFLAGS+= -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls +CFLAGS+= -Wold-style-definition -Wno-pointer-sign + +CFLAGS+= -I${.CURDIR}/../../../../lib/libcapsicum +CFLAGS+= -ggdb + +all: ${SERVICES} + +.for SERVICE in ${SERVICES} + +${SERVICE}: ${SERVICE}.c + ${CC} ${CFLAGS} ${@}.c -o $@ -lcapsicum -lnv + +.endfor + +test: all + @prove -r ${.CURDIR} + +clean: + rm -f ${SERVICES} Added: head/tools/regression/capsicum/libcapsicum/dns.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/capsicum/libcapsicum/dns.c Mon Dec 2 17:01:01 2013 (r258849) @@ -0,0 +1,587 @@ +/*- + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static int ntest = 1; + +#define CHECK(expr) do { \ + if ((expr)) \ + printf("ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ + else \ + printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ + ntest++; \ +} while (0) +#define CHECKX(expr) do { \ + if ((expr)) { \ + printf("ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ + } else { \ + printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ + exit(1); \ + } \ +} while (0) + +#define GETHOSTBYNAME 0x01 +#define GETHOSTBYNAME2_AF_INET 0x02 +#define GETHOSTBYNAME2_AF_INET6 0x04 +#define GETHOSTBYADDR_AF_INET 0x08 +#define GETHOSTBYADDR_AF_INET6 0x10 + +static bool +hostent_aliases_compare(char **aliases0, char **aliases1) +{ + int i0, i1; + + if (aliases0 == NULL && aliases1 == NULL) + return (true); + if (aliases0 == NULL || aliases1 == NULL) + return (false); + + for (i0 = 0; aliases0[i0] != NULL; i0++) { + for (i1 = 0; aliases1[i1] != NULL; i1++) { + if (strcmp(aliases0[i0], aliases1[i1]) == 0) + break; + } + if (aliases1[i1] == NULL) + return (false); + } + + return (true); +} + +static bool +hostent_addr_list_compare(char **addr_list0, char **addr_list1, int length) +{ + int i0, i1; + + if (addr_list0 == NULL && addr_list1 == NULL) + return (true); + if (addr_list0 == NULL || addr_list1 == NULL) + return (false); + + for (i0 = 0; addr_list0[i0] != NULL; i0++) { + for (i1 = 0; addr_list1[i1] != NULL; i1++) { + if (memcmp(addr_list0[i0], addr_list1[i1], length) == 0) + break; + } + if (addr_list1[i1] == NULL) + return (false); + } + + return (true); +} + +static bool +hostent_compare(const struct hostent *hp0, const struct hostent *hp1) +{ + + if (hp0 == NULL && hp1 != NULL) + return (true); + + if (hp0 == NULL || hp1 == NULL) + return (false); + + if (hp0->h_name != NULL || hp1->h_name != NULL) { + if (hp0->h_name == NULL || hp1->h_name == NULL) + return (false); + if (strcmp(hp0->h_name, hp1->h_name) != 0) + return (false); + } + + if (!hostent_aliases_compare(hp0->h_aliases, hp1->h_aliases)) + return (false); + if (!hostent_aliases_compare(hp1->h_aliases, hp0->h_aliases)) + return (false); + + if (hp0->h_addrtype != hp1->h_addrtype) + return (false); + + if (hp0->h_length != hp1->h_length) + return (false); + + if (!hostent_addr_list_compare(hp0->h_addr_list, hp1->h_addr_list, + hp0->h_length)) { + return (false); + } + if (!hostent_addr_list_compare(hp1->h_addr_list, hp0->h_addr_list, + hp0->h_length)) { + return (false); + } + + return (true); +} + +static unsigned int +runtest(cap_channel_t *capdns) +{ + unsigned int result; + struct hostent *hps, *hpc; + struct in_addr ip4; + struct in6_addr ip6; + + result = 0; + + hps = gethostbyname("example.com"); + if (hps == NULL) + fprintf(stderr, "Unable to resolve %s IPv4.\n", "example.com"); + hpc = cap_gethostbyname(capdns, "example.com"); + if (hostent_compare(hps, hpc)) + result |= GETHOSTBYNAME; + + hps = gethostbyname2("example.com", AF_INET); + if (hps == NULL) + fprintf(stderr, "Unable to resolve %s IPv4.\n", "example.com"); + hpc = cap_gethostbyname2(capdns, "example.com", AF_INET); + if (hostent_compare(hps, hpc)) + result |= GETHOSTBYNAME2_AF_INET; + + hps = gethostbyname2("example.com", AF_INET6); + if (hps == NULL) + fprintf(stderr, "Unable to resolve %s IPv6.\n", "example.com"); + hpc = cap_gethostbyname2(capdns, "example.com", AF_INET6); + if (hostent_compare(hps, hpc)) + result |= GETHOSTBYNAME2_AF_INET6; + + /* + * 8.8.178.135 is IPv4 address of freefall.freebsd.org + * as of 27 October 2013. + */ + inet_pton(AF_INET, "8.8.178.135", &ip4); + hps = gethostbyaddr(&ip4, sizeof(ip4), AF_INET); + if (hps == NULL) + fprintf(stderr, "Unable to resolve %s.\n", "8.8.178.135"); + hpc = cap_gethostbyaddr(capdns, &ip4, sizeof(ip4), AF_INET); + if (hostent_compare(hps, hpc)) + result |= GETHOSTBYADDR_AF_INET; + + /* + * 2001:1900:2254:206c::16:87 is IPv6 address of freefall.freebsd.org + * as of 27 October 2013. + */ + inet_pton(AF_INET6, "2001:1900:2254:206c::16:87", &ip6); + hps = gethostbyaddr(&ip6, sizeof(ip6), AF_INET6); + if (hps == NULL) { + fprintf(stderr, "Unable to resolve %s.\n", + "2001:1900:2254:206c::16:87"); + } + hpc = cap_gethostbyaddr(capdns, &ip6, sizeof(ip6), AF_INET6); + if (hostent_compare(hps, hpc)) + result |= GETHOSTBYADDR_AF_INET6; + + return (result); +} + +int +main(void) +{ + cap_channel_t *capcas, *capdns, *origcapdns; + const char *types[2]; + int families[2]; + + printf("1..89\n"); + + capcas = cap_init(); + CHECKX(capcas != NULL); + + origcapdns = capdns = cap_service_open(capcas, "system.dns"); + CHECKX(capdns != NULL); + + cap_close(capcas); + + /* No limits set. */ + + CHECK(runtest(capdns) == + (GETHOSTBYNAME | GETHOSTBYNAME2_AF_INET | GETHOSTBYNAME2_AF_INET6 | + GETHOSTBYADDR_AF_INET | GETHOSTBYADDR_AF_INET6)); + + /* + * Allow: + * type: NAME, ADDR + * family: AF_INET, AF_INET6 + */ + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "NAME"; + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == 0); + families[0] = AF_INET; + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == 0); + + CHECK(runtest(capdns) == + (GETHOSTBYNAME | GETHOSTBYNAME2_AF_INET | GETHOSTBYNAME2_AF_INET6 | + GETHOSTBYADDR_AF_INET | GETHOSTBYADDR_AF_INET6)); + + cap_close(capdns); + + /* + * Allow: + * type: NAME + * family: AF_INET, AF_INET6 + */ + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 1) == 0); + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == -1 && + errno == ENOTCAPABLE); + types[0] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 1) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET; + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == 0); + + CHECK(runtest(capdns) == + (GETHOSTBYNAME | GETHOSTBYNAME2_AF_INET | GETHOSTBYNAME2_AF_INET6)); + + cap_close(capdns); + + /* + * Allow: + * type: ADDR + * family: AF_INET, AF_INET6 + */ + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 1) == 0); + types[1] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 2) == -1 && + errno == ENOTCAPABLE); + types[0] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 1) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET; + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == 0); + + CHECK(runtest(capdns) == + (GETHOSTBYADDR_AF_INET | GETHOSTBYADDR_AF_INET6)); + + cap_close(capdns); + + /* + * Allow: + * type: NAME, ADDR + * family: AF_INET + */ + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "NAME"; + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == 0); + families[0] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 1) == 0); + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 1) == -1 && + errno == ENOTCAPABLE); + + CHECK(runtest(capdns) == + (GETHOSTBYNAME | GETHOSTBYNAME2_AF_INET | GETHOSTBYADDR_AF_INET)); + + cap_close(capdns); + + /* + * Allow: + * type: NAME, ADDR + * family: AF_INET6 + */ + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "NAME"; + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == 0); + families[0] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 1) == 0); + families[1] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 2) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 1) == -1 && + errno == ENOTCAPABLE); + + CHECK(runtest(capdns) == + (GETHOSTBYNAME2_AF_INET6 | GETHOSTBYADDR_AF_INET6)); + + cap_close(capdns); + + /* Below we also test further limiting capability. */ + + /* + * Allow: + * type: NAME + * family: AF_INET + */ + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "NAME"; + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == 0); + families[0] = AF_INET; + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == 0); + types[0] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 1) == 0); + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == -1 && + errno == ENOTCAPABLE); + types[0] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 1) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 1) == 0); + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 1) == -1 && + errno == ENOTCAPABLE); + + CHECK(runtest(capdns) == (GETHOSTBYNAME | GETHOSTBYNAME2_AF_INET)); + + cap_close(capdns); + + /* + * Allow: + * type: NAME + * family: AF_INET6 + */ + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "NAME"; + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == 0); + families[0] = AF_INET; + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == 0); + types[0] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 1) == 0); + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == -1 && + errno == ENOTCAPABLE); + types[0] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 1) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 1) == 0); + families[1] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 2) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 1) == -1 && + errno == ENOTCAPABLE); + + CHECK(runtest(capdns) == GETHOSTBYNAME2_AF_INET6); + + cap_close(capdns); + + /* + * Allow: + * type: ADDR + * family: AF_INET + */ + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "NAME"; + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == 0); + families[0] = AF_INET; + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == 0); + types[0] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 1) == 0); + types[1] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 2) == -1 && + errno == ENOTCAPABLE); + types[0] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 1) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 1) == 0); + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 1) == -1 && + errno == ENOTCAPABLE); + + CHECK(runtest(capdns) == GETHOSTBYADDR_AF_INET); + + cap_close(capdns); + + /* + * Allow: + * type: ADDR + * family: AF_INET6 + */ + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "NAME"; + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == 0); + families[0] = AF_INET; + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == 0); + types[0] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 1) == 0); + types[1] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 2) == -1 && + errno == ENOTCAPABLE); + types[0] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 1) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 1) == 0); + families[1] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 2) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 1) == -1 && + errno == ENOTCAPABLE); + + CHECK(runtest(capdns) == GETHOSTBYADDR_AF_INET6); + + cap_close(capdns); + + /* Trying to rise the limits. */ + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 1) == 0); + families[0] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 1) == 0); + + types[0] = "NAME"; + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET; + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == -1 && + errno == ENOTCAPABLE); + + types[0] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 1) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 1) == -1 && + errno == ENOTCAPABLE); + + CHECK(cap_dns_type_limit(capdns, NULL, 0) == -1 && + errno == ENOTCAPABLE); + CHECK(cap_dns_family_limit(capdns, NULL, 0) == -1 && + errno == ENOTCAPABLE); + + /* Do the limits still hold? */ + CHECK(runtest(capdns) == (GETHOSTBYNAME | GETHOSTBYNAME2_AF_INET)); + + cap_close(capdns); + + capdns = cap_clone(origcapdns); + CHECK(capdns != NULL); + + types[0] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 1) == 0); + families[0] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 1) == 0); + + types[0] = "NAME"; + types[1] = "ADDR"; + CHECK(cap_dns_type_limit(capdns, types, 2) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET; + families[1] = AF_INET6; + CHECK(cap_dns_family_limit(capdns, families, 2) == -1 && + errno == ENOTCAPABLE); + + types[0] = "NAME"; + CHECK(cap_dns_type_limit(capdns, types, 1) == -1 && + errno == ENOTCAPABLE); + families[0] = AF_INET; + CHECK(cap_dns_family_limit(capdns, families, 1) == -1 && + errno == ENOTCAPABLE); + + CHECK(cap_dns_type_limit(capdns, NULL, 0) == -1 && + errno == ENOTCAPABLE); + CHECK(cap_dns_family_limit(capdns, NULL, 0) == -1 && + errno == ENOTCAPABLE); + + /* Do the limits still hold? */ + CHECK(runtest(capdns) == GETHOSTBYADDR_AF_INET6); + + cap_close(capdns); + + cap_close(origcapdns); + + exit(0); +} Added: head/tools/regression/capsicum/libcapsicum/grp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/capsicum/libcapsicum/grp.c Mon Dec 2 17:01:01 2013 (r258849) @@ -0,0 +1,1549 @@ +/*- + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static int ntest = 1; + +#define CHECK(expr) do { \ + if ((expr)) \ + printf("ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ + else \ + printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ + ntest++; \ +} while (0) +#define CHECKX(expr) do { \ + if ((expr)) { \ + printf("ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ + } else { \ + printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \ + exit(1); \ + } \ +} while (0) + +#define GID_WHEEL 0 +#define GID_OPERATOR 5 + +#define GETGRENT0 0x0001 +#define GETGRENT1 0x0002 +#define GETGRENT2 0x0004 +#define GETGRENT (GETGRENT0 | GETGRENT1 | GETGRENT2) +#define GETGRENT_R0 0x0008 +#define GETGRENT_R1 0x0010 +#define GETGRENT_R2 0x0020 +#define GETGRENT_R (GETGRENT_R0 | GETGRENT_R1 | GETGRENT_R2) +#define GETGRNAM 0x0040 +#define GETGRNAM_R 0x0080 +#define GETGRGID 0x0100 +#define GETGRGID_R 0x0200 +#define SETGRENT 0x0400 + +static bool +group_mem_compare(char **mem0, char **mem1) +{ + int i0, i1; + + if (mem0 == NULL && mem1 == NULL) + return (true); + if (mem0 == NULL || mem1 == NULL) + return (false); + + for (i0 = 0; mem0[i0] != NULL; i0++) { + for (i1 = 0; mem1[i1] != NULL; i1++) { + if (strcmp(mem0[i0], mem1[i1]) == 0) + break; + } + if (mem1[i1] == NULL) + return (false); + } + + return (true); +} + +static bool +group_compare(const struct group *grp0, const struct group *grp1) +{ + + if (grp0 == NULL && grp1 == NULL) + return (true); + if (grp0 == NULL || grp1 == NULL) + return (false); + + if (strcmp(grp0->gr_name, grp1->gr_name) != 0) + return (false); + + if (grp0->gr_passwd != NULL || grp1->gr_passwd != NULL) { + if (grp0->gr_passwd == NULL || grp1->gr_passwd == NULL) + return (false); + if (strcmp(grp0->gr_passwd, grp1->gr_passwd) != 0) + return (false); + } + + if (grp0->gr_gid != grp1->gr_gid) + return (false); + + if (!group_mem_compare(grp0->gr_mem, grp1->gr_mem)) + return (false); + + return (true); +} + +static unsigned int +runtest_cmds(cap_channel_t *capgrp) +{ + char bufs[1024], bufc[1024]; + unsigned int result; + struct group *grps, *grpc; + struct group sts, stc; + + result = 0; + + (void)setgrent(); + if (cap_setgrent(capgrp) == 1) + result |= SETGRENT; + + grps = getgrent(); + grpc = cap_getgrent(capgrp); + if (group_compare(grps, grpc)) { + result |= GETGRENT0; + grps = getgrent(); + grpc = cap_getgrent(capgrp); + if (group_compare(grps, grpc)) + result |= GETGRENT1; + } + + getgrent_r(&sts, bufs, sizeof(bufs), &grps); + cap_getgrent_r(capgrp, &stc, bufc, sizeof(bufc), &grpc); + if (group_compare(grps, grpc)) { + result |= GETGRENT_R0; + getgrent_r(&sts, bufs, sizeof(bufs), &grps); + cap_getgrent_r(capgrp, &stc, bufc, sizeof(bufc), &grpc); + if (group_compare(grps, grpc)) + result |= GETGRENT_R1; + } + + (void)setgrent(); + if (cap_setgrent(capgrp) == 1) + result |= SETGRENT; + + getgrent_r(&sts, bufs, sizeof(bufs), &grps); + cap_getgrent_r(capgrp, &stc, bufc, sizeof(bufc), &grpc); + if (group_compare(grps, grpc)) + result |= GETGRENT_R2; + + grps = getgrent(); + grpc = cap_getgrent(capgrp); + if (group_compare(grps, grpc)) + result |= GETGRENT2; + + grps = getgrnam("wheel"); + grpc = cap_getgrnam(capgrp, "wheel"); + if (group_compare(grps, grpc)) { + grps = getgrnam("operator"); + grpc = cap_getgrnam(capgrp, "operator"); + if (group_compare(grps, grpc)) + result |= GETGRNAM; + } + + getgrnam_r("wheel", &sts, bufs, sizeof(bufs), &grps); + cap_getgrnam_r(capgrp, "wheel", &stc, bufc, sizeof(bufc), &grpc); + if (group_compare(grps, grpc)) { + getgrnam_r("operator", &sts, bufs, sizeof(bufs), &grps); + cap_getgrnam_r(capgrp, "operator", &stc, bufc, sizeof(bufc), + &grpc); + if (group_compare(grps, grpc)) + result |= GETGRNAM_R; + } + + grps = getgrgid(GID_WHEEL); + grpc = cap_getgrgid(capgrp, GID_WHEEL); + if (group_compare(grps, grpc)) { + grps = getgrgid(GID_OPERATOR); + grpc = cap_getgrgid(capgrp, GID_OPERATOR); + if (group_compare(grps, grpc)) + result |= GETGRGID; + } + + getgrgid_r(GID_WHEEL, &sts, bufs, sizeof(bufs), &grps); + cap_getgrgid_r(capgrp, GID_WHEEL, &stc, bufc, sizeof(bufc), &grpc); + if (group_compare(grps, grpc)) { + getgrgid_r(GID_OPERATOR, &sts, bufs, sizeof(bufs), &grps); + cap_getgrgid_r(capgrp, GID_OPERATOR, &stc, bufc, sizeof(bufc), + &grpc); + if (group_compare(grps, grpc)) + result |= GETGRGID_R; + } + + return (result); +} + +static void +test_cmds(cap_channel_t *origcapgrp) +{ + cap_channel_t *capgrp; + const char *cmds[7], *fields[4], *names[5]; + gid_t gids[5]; + + fields[0] = "gr_name"; + fields[1] = "gr_passwd"; + fields[2] = "gr_gid"; + fields[3] = "gr_mem"; + + names[0] = "wheel"; + names[1] = "daemon"; + names[2] = "kmem"; + names[3] = "sys"; + names[4] = "operator"; + + gids[0] = 0; + gids[1] = 1; + gids[2] = 2; + gids[3] = 3; + gids[4] = 5; + + /* + * Allow: + * cmds: setgrent, getgrent, getgrent_r, getgrnam, getgrnam_r, + * getgrgid, getgrgid_r + * fields: gr_name, gr_passwd, gr_gid, gr_mem + * groups: + * names: wheel, daemon, kmem, sys, operator + * gids: + */ + capgrp = cap_clone(origcapgrp); + CHECK(capgrp != NULL); + + cmds[0] = "setgrent"; + cmds[1] = "getgrent"; + cmds[2] = "getgrent_r"; + cmds[3] = "getgrnam"; + cmds[4] = "getgrnam_r"; + cmds[5] = "getgrgid"; + cmds[6] = "getgrgid_r"; + CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == 0); + CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); + CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); + + CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | + GETGRNAM | GETGRNAM_R | GETGRGID | GETGRGID_R)); + + cap_close(capgrp); + + /* + * Allow: + * cmds: setgrent, getgrent, getgrent_r, getgrnam, getgrnam_r, + * getgrgid, getgrgid_r + * fields: gr_name, gr_passwd, gr_gid, gr_mem + * groups: + * names: + * gids: 0, 1, 2, 3, 5 + */ + capgrp = cap_clone(origcapgrp); + CHECK(capgrp != NULL); + + cmds[0] = "setgrent"; + cmds[1] = "getgrent"; + cmds[2] = "getgrent_r"; + cmds[3] = "getgrnam"; + cmds[4] = "getgrnam_r"; + cmds[5] = "getgrgid"; + cmds[6] = "getgrgid_r"; + CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == 0); + CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); + CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 5) == 0); + + CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | + GETGRNAM | GETGRNAM_R | GETGRGID | GETGRGID_R)); + + cap_close(capgrp); + + /* + * Allow: + * cmds: getgrent, getgrent_r, getgrnam, getgrnam_r, + * getgrgid, getgrgid_r + * fields: gr_name, gr_passwd, gr_gid, gr_mem + * groups: + * names: wheel, daemon, kmem, sys, operator + * gids: + * Disallow: + * cmds: setgrent + * fields: + * groups: + */ + capgrp = cap_clone(origcapgrp); + CHECK(capgrp != NULL); + + cmds[0] = "getgrent"; + cmds[1] = "getgrent_r"; + cmds[2] = "getgrnam"; + cmds[3] = "getgrnam_r"; + cmds[4] = "getgrgid"; + cmds[5] = "getgrgid_r"; + CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); + cmds[0] = "setgrent"; + cmds[1] = "getgrent"; + cmds[2] = "getgrent_r"; + cmds[3] = "getgrnam"; + cmds[4] = "getgrnam_r"; + cmds[5] = "getgrgid"; + cmds[6] = "getgrgid_r"; + CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); + cmds[0] = "setgrent"; + CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); + CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); + + CHECK(runtest_cmds(capgrp) == (GETGRENT0 | GETGRENT1 | GETGRENT_R0 | + GETGRENT_R1 | GETGRNAM | GETGRNAM_R | GETGRGID | GETGRGID_R)); + + cap_close(capgrp); + + /* + * Allow: + * cmds: getgrent, getgrent_r, getgrnam, getgrnam_r, + * getgrgid, getgrgid_r + * fields: gr_name, gr_passwd, gr_gid, gr_mem + * groups: + * names: + * gids: 0, 1, 2, 3, 5 + * Disallow: + * cmds: setgrent + * fields: + * groups: + */ + capgrp = cap_clone(origcapgrp); + CHECK(capgrp != NULL); + + cmds[0] = "getgrent"; + cmds[1] = "getgrent_r"; + cmds[2] = "getgrnam"; + cmds[3] = "getgrnam_r"; + cmds[4] = "getgrgid"; + cmds[5] = "getgrgid_r"; + CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); + cmds[0] = "setgrent"; + cmds[1] = "getgrent"; + cmds[2] = "getgrent_r"; + cmds[3] = "getgrnam"; + cmds[4] = "getgrnam_r"; + cmds[5] = "getgrgid"; + cmds[6] = "getgrgid_r"; + CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); + cmds[0] = "setgrent"; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 17:07:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 444E3DAD; Mon, 2 Dec 2013 17:07:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3006D14D3; Mon, 2 Dec 2013 17:07:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2H7NrX090691; Mon, 2 Dec 2013 17:07:23 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2H7MBZ090689; Mon, 2 Dec 2013 17:07:22 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312021707.rB2H7MBZ090689@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 2 Dec 2013 17:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258850 - in head/lib: libcapsicum libcasper X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 17:07:23 -0000 Author: pjd Date: Mon Dec 2 17:07:22 2013 New Revision: 258850 URL: http://svnweb.freebsd.org/changeset/base/258850 Log: Both libcasper and libcapsicum libraries have to be installed in /lib/, as they are used by /sbin/casperd. Modified: head/lib/libcapsicum/Makefile head/lib/libcasper/Makefile Modified: head/lib/libcapsicum/Makefile ============================================================================== --- head/lib/libcapsicum/Makefile Mon Dec 2 17:01:01 2013 (r258849) +++ head/lib/libcapsicum/Makefile Mon Dec 2 17:07:22 2013 (r258850) @@ -3,6 +3,7 @@ LIB= capsicum SHLIB_MAJOR= 0 +SHLIBDIR?= /lib SRCS= libcapsicum.c SRCS+= libcapsicum_dns.c Modified: head/lib/libcasper/Makefile ============================================================================== --- head/lib/libcasper/Makefile Mon Dec 2 17:01:01 2013 (r258849) +++ head/lib/libcasper/Makefile Mon Dec 2 17:07:22 2013 (r258850) @@ -3,6 +3,7 @@ LIB= casper SHLIB_MAJOR= 0 +SHLIBDIR?= /lib SRCS= libcasper.c INCS= libcasper.h From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 17:19:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D5384F1; Mon, 2 Dec 2013 17:19:10 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9DE0115BB; Mon, 2 Dec 2013 17:19:09 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rB2HJ7Kn055495 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Dec 2013 21:19:07 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rB2HJ7St055494; Mon, 2 Dec 2013 21:19:07 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 2 Dec 2013 21:19:07 +0400 From: Gleb Smirnoff To: Pawel Jakub Dawidek Subject: Re: svn commit: r258850 - in head/lib: libcapsicum libcasper Message-ID: <20131202171907.GN48919@FreeBSD.org> References: <201312021707.rB2H7MBZ090689@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201312021707.rB2H7MBZ090689@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 17:19:10 -0000 Pawel, On Mon, Dec 02, 2013 at 05:07:22PM +0000, Pawel Jakub Dawidek wrote: P> Author: pjd P> Date: Mon Dec 2 17:07:22 2013 P> New Revision: 258850 P> URL: http://svnweb.freebsd.org/changeset/base/258850 P> P> Log: P> Both libcasper and libcapsicum libraries have to be installed in /lib/, P> as they are used by /sbin/casperd. Although time window was small, still you need to put the files into ObsoletedFiles.inc. Couple of my hosts already got /usr/lib/libcasper.* installed. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 17:45:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B7067D3; Mon, 2 Dec 2013 17:45:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4764117C2; Mon, 2 Dec 2013 17:45:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2Hjilw004526; Mon, 2 Dec 2013 17:45:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2HjiDc004525; Mon, 2 Dec 2013 17:45:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312021745.rB2HjiDc004525@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 2 Dec 2013 17:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258851 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 17:45:44 -0000 Author: nwhitehorn Date: Mon Dec 2 17:45:43 2013 New Revision: 258851 URL: http://svnweb.freebsd.org/changeset/base/258851 Log: Remove fdtbus_bs_tag definition, which is now obsolete. The remainder of this file is also slated for future demolition. Modified: head/sys/powerpc/include/fdt.h Modified: head/sys/powerpc/include/fdt.h ============================================================================== --- head/sys/powerpc/include/fdt.h Mon Dec 2 17:07:22 2013 (r258850) +++ head/sys/powerpc/include/fdt.h Mon Dec 2 17:45:43 2013 (r258851) @@ -35,15 +35,7 @@ #include #include -/* Max interrupt number */ -#define FDT_INTR_MAX INTR_VECTORS - /* Map phandle/intpin pair to global IRQ number */ #define FDT_MAP_IRQ(node, pin) powerpc_get_irq(node, pin) -/* - * Bus space tag. XXX endianess info needs to be derived from the blob. - */ -#define fdtbus_bs_tag (&bs_be_tag) - #endif /* _MACHINE_FDT_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 18:20:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 596B258E; Mon, 2 Dec 2013 18:20:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 443DE1A17; Mon, 2 Dec 2013 18:20:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2IK8pC016205; Mon, 2 Dec 2013 18:20:08 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2IK8Nv016204; Mon, 2 Dec 2013 18:20:08 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312021820.rB2IK8Nv016204@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 2 Dec 2013 18:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258852 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 18:20:08 -0000 Author: rodrigc Date: Mon Dec 2 18:20:07 2013 New Revision: 258852 URL: http://svnweb.freebsd.org/changeset/base/258852 Log: MFC r258737 In keg_dtor(), print out the keg name in the "Freed UMA keg was not empty" message printed to the console. This makes it easier to track down the source of certain memory leaks. Suggested by: adrian Modified: stable/9/sys/vm/uma_core.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/uma_core.c ============================================================================== --- stable/9/sys/vm/uma_core.c Mon Dec 2 17:45:43 2013 (r258851) +++ stable/9/sys/vm/uma_core.c Mon Dec 2 18:20:07 2013 (r258852) @@ -1509,8 +1509,9 @@ keg_dtor(void *arg, int size, void *udat keg = (uma_keg_t)arg; KEG_LOCK(keg); if (keg->uk_free != 0) { - printf("Freed UMA keg was not empty (%d items). " + printf("Freed UMA keg (%s) was not empty (%d items). " " Lost %d pages of memory.\n", + keg->uk_name ? keg->uk_name : "", keg->uk_free, keg->uk_pages); } KEG_UNLOCK(keg); From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 18:47:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF14422D; Mon, 2 Dec 2013 18:47:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C105A1BC3; Mon, 2 Dec 2013 18:47: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 rB2IlvQ8026075; Mon, 2 Dec 2013 18:47:57 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2Ilvd2026073; Mon, 2 Dec 2013 18:47:57 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312021847.rB2Ilvd2026073@svn.freebsd.org> From: Glen Barber Date: Mon, 2 Dec 2013 18:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258853 - in head: release share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 18:47:58 -0000 Author: gjb Date: Mon Dec 2 18:47:57 2013 New Revision: 258853 URL: http://svnweb.freebsd.org/changeset/base/258853 Log: Turn off the dvdrom target by default. dvd1.iso is now built by specifying 'WITH_DVD=1' during 'make release'. This caused some problems during the freebsd-update builds for 10.0-BETA4. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile head/share/man/man7/release.7 Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Mon Dec 2 18:20:07 2013 (r258852) +++ head/release/Makefile Mon Dec 2 18:47:57 2013 (r258853) @@ -20,7 +20,7 @@ # NOPORTS: if set, do not distribute ports tree # NOSRC: if set, do not distribute source tree # NODOC: if set, do not generate release documentation -# NODVD: if set, do not generate dvd1.iso +# WITH_DVD: if set, generate dvd1.iso # TARGET/TARGET_ARCH: architecture of built release # @@ -79,7 +79,7 @@ IMAGES= .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) RELEASE_TARGETS+= cdrom IMAGES+= disc1.iso bootonly.iso -. if !defined(NODVD) +. if defined(WITH_DVD) RELEASE_TARGETS+= dvdrom IMAGES+= dvd1.iso . endif Modified: head/share/man/man7/release.7 ============================================================================== --- head/share/man/man7/release.7 Mon Dec 2 18:20:07 2013 (r258852) +++ head/share/man/man7/release.7 Mon Dec 2 18:47:57 2013 (r258853) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2013 +.Dd December 2, 2013 .Dt RELEASE 7 .Os .Sh NAME @@ -230,10 +230,6 @@ When set, will prevent the .Fa doc.txz distribution package from being created. -.It Va NODVD -Set to a non-empty value to skip the -.Cm dvdrom -target. .It Va NOPORTS Set to a non-empty value to skip the .Li ports/ @@ -245,6 +241,10 @@ will prevent the distribution package from being created. Setting this also sets .Va NODOC . +.It Va WITH_DVD +Set to a non-empty value to include the +.Cm dvdrom +target. .El .Sh MAKEFILE TARGETS The release makefile From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 19:02:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 576DF8AF; Mon, 2 Dec 2013 19:02:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4286D1CCD; Mon, 2 Dec 2013 19:02:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2J2xT3032334; Mon, 2 Dec 2013 19:02:59 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2J2x0o032333; Mon, 2 Dec 2013 19:02:59 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312021902.rB2J2x0o032333@svn.freebsd.org> From: Glen Barber Date: Mon, 2 Dec 2013 19:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258854 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 19:02:59 -0000 Author: gjb Date: Mon Dec 2 19:02:58 2013 New Revision: 258854 URL: http://svnweb.freebsd.org/changeset/base/258854 Log: Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since the format of 'pkg -vv' output has changed. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/bsdconfig/share/common.subr Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Mon Dec 2 18:47:57 2013 (r258853) +++ head/usr.sbin/bsdconfig/share/common.subr Mon Dec 2 19:02:58 2013 (r258854) @@ -65,7 +65,7 @@ export UNAME_R="$(uname -r)" # Release L if [ ! "${PKG_ABI+set}" ]; then export PKG_ABI="$( ASSUME_ALWAYS_YES=1 pkg -vv | - awk '$1=="ABI:"{print $2;exit}' 2> /dev/null + awk '$1=="ABI"{print $3;exit}' 2> /dev/null )" fi From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 19:49:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91535A41; Mon, 2 Dec 2013 19:49:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7C86F1FFD; Mon, 2 Dec 2013 19:49:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2JnqTY047126; Mon, 2 Dec 2013 19:49:52 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2JnqiT047125; Mon, 2 Dec 2013 19:49:52 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201312021949.rB2JnqiT047125@svn.freebsd.org> From: Joel Dahl Date: Mon, 2 Dec 2013 19:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258855 - head/usr.sbin/bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 19:49:52 -0000 Author: joel (doc committer) Date: Mon Dec 2 19:49:52 2013 New Revision: 258855 URL: http://svnweb.freebsd.org/changeset/base/258855 Log: mdoc: quote string properly. Modified: head/usr.sbin/bhyveload/bhyveload.8 Modified: head/usr.sbin/bhyveload/bhyveload.8 ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.8 Mon Dec 2 19:02:58 2013 (r258854) +++ head/usr.sbin/bhyveload/bhyveload.8 Mon Dec 2 19:49:52 2013 (r258855) @@ -131,7 +131,7 @@ and terminal I/O sent to the device .Pa /dev/nmdm1B .Pp -.Dl "bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm +.Dl "bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm" .Sh SEE ALSO .Xr bhyve 4 , .Xr bhyve 8 , From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 20:26:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3D2E3F1; Mon, 2 Dec 2013 20:26:42 +0000 (UTC) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A73E512BA; Mon, 2 Dec 2013 20:26:42 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id 5928FBBFCD; Mon, 2 Dec 2013 20:26:35 +0000 (UTC) Date: Mon, 2 Dec 2013 21:26:35 +0100 From: Jeremie Le Hen To: Pawel Jakub Dawidek Subject: Re: svn commit: r258791 - in head: . lib lib/libpjdlog share/mk Message-ID: <20131202202635.GN37879@caravan.chchile.org> Mail-Followup-To: Pawel Jakub Dawidek , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201312010941.rB19f7c6072073@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201312010941.rB19f7c6072073@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 20:26:43 -0000 Hi Pawel, On Sun, Dec 01, 2013 at 09:41:07AM +0000, Pawel Jakub Dawidek wrote: > > Log: > Move my simple logging API to a separate library. It is now already used > by hastctl(8), hastd(8) and auditdistd(8) and will soon be also used > by casperd(8) and its services. There is no documentation and pjdlog.h > header file is not installed in /usr/include/ to keep it private. > Unfortunately we don't have /lib/private/ at this point, only > /usr/lib/private/, so the library is installed in /lib/. What's wrong with creating /lib/private then? -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 20:38:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74DA396D; Mon, 2 Dec 2013 20:38:07 +0000 (UTC) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 3867A138B; Mon, 2 Dec 2013 20:38:06 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 07956BC2; Mon, 2 Dec 2013 21:31:33 +0100 (CET) Date: Mon, 2 Dec 2013 21:38:31 +0100 From: Pawel Jakub Dawidek To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r258791 - in head: . lib lib/libpjdlog share/mk Message-ID: <20131202203830.GB1407@garage.freebsd.pl> References: <201312010941.rB19f7c6072073@svn.freebsd.org> <20131202202635.GN37879@caravan.chchile.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline In-Reply-To: <20131202202635.GN37879@caravan.chchile.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 20:38:07 -0000 --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 02, 2013 at 09:26:35PM +0100, Jeremie Le Hen wrote: > Hi Pawel, >=20 > On Sun, Dec 01, 2013 at 09:41:07AM +0000, Pawel Jakub Dawidek wrote: > >=20 > > Log: > > Move my simple logging API to a separate library. It is now already u= sed > > by hastctl(8), hastd(8) and auditdistd(8) and will soon be also used > > by casperd(8) and its services. There is no documentation and pjdlog.h > > header file is not installed in /usr/include/ to keep it private. > > Unfortunately we don't have /lib/private/ at this point, only > > /usr/lib/private/, so the library is installed in /lib/. >=20 > What's wrong with creating /lib/private then? It seems to be non-trivial, from what des@ says. I'll be happy to move libpjdlog to /lib/private/ once we have it, but I don't have time to work on creating it. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlKc78YACgkQForvXbEpPzRrXACg65dBPC5pvmzIJ5x7dMnteh+l UAkAoMzyqaskzJW3sOy4p+GlJmUHSHKQ =wmB2 -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ-- From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 20:43:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A2DFBCA; Mon, 2 Dec 2013 20:43:00 +0000 (UTC) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id C16841442; Mon, 2 Dec 2013 20:42:59 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id D5639BBF; Mon, 2 Dec 2013 21:27:33 +0100 (CET) Date: Mon, 2 Dec 2013 21:34:30 +0100 From: Pawel Jakub Dawidek To: Gleb Smirnoff Subject: Re: svn commit: r258850 - in head/lib: libcapsicum libcasper Message-ID: <20131202203430.GA1407@garage.freebsd.pl> References: <201312021707.rB2H7MBZ090689@svn.freebsd.org> <20131202171907.GN48919@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <20131202171907.GN48919@FreeBSD.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 20:43:00 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 02, 2013 at 09:19:07PM +0400, Gleb Smirnoff wrote: > Pawel, >=20 > On Mon, Dec 02, 2013 at 05:07:22PM +0000, Pawel Jakub Dawidek wrote: > P> Author: pjd > P> Date: Mon Dec 2 17:07:22 2013 > P> New Revision: 258850 > P> URL: http://svnweb.freebsd.org/changeset/base/258850 > P>=20 > P> Log: > P> Both libcasper and libcapsicum libraries have to be installed in /li= b/, > P> as they are used by /sbin/casperd. >=20 > Although time window was small, still you need to put the files into > ObsoletedFiles.inc. >=20 > Couple of my hosts already got /usr/lib/libcasper.* installed. Something like this? http://people.freebsd.org/~pjd/patches/ObsoleteFiles.inc.patch --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlKc7tYACgkQForvXbEpPzRJ/gCgp0Z47e1mc8qSyVKoDnmOURrp AS8AmweguRZk/+RoI/xU56HHDgDfaqrr =n7Kw -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR-- From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 22:00:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 422511CE; Mon, 2 Dec 2013 22:00:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2EB961CEA; Mon, 2 Dec 2013 22:00:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2M0GXr012245; Mon, 2 Dec 2013 22:00:16 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2M0GeE012244; Mon, 2 Dec 2013 22:00:16 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312022200.rB2M0GeE012244@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 2 Dec 2013 22:00:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258857 - head/sys/powerpc/wii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 22:00:16 -0000 Author: nwhitehorn Date: Mon Dec 2 22:00:15 2013 New Revision: 258857 URL: http://svnweb.freebsd.org/changeset/base/258857 Log: Fix typo. Modified: head/sys/powerpc/wii/platform_wii.c Modified: head/sys/powerpc/wii/platform_wii.c ============================================================================== --- head/sys/powerpc/wii/platform_wii.c Mon Dec 2 21:58:09 2013 (r258856) +++ head/sys/powerpc/wii/platform_wii.c Mon Dec 2 22:00:15 2013 (r258857) @@ -136,7 +136,7 @@ wii_mem_regions(platform_t plat, struct */ avail_regions[1].mr_size -= WIIIPC_IOH_LEN + 1; - memcpy(phys, avail, 2*sizeof(*avail); + memcpy(phys, avail_regions, 2*sizeof(*avail_regions)); *physsz = *availsz = 2; } From owner-svn-src-all@FreeBSD.ORG Mon Dec 2 22:34:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88B10E9B; Mon, 2 Dec 2013 22:34:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 693F81110; Mon, 2 Dec 2013 22:34:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2MYmfP025532; Mon, 2 Dec 2013 22:34:48 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2MYlfZ025529; Mon, 2 Dec 2013 22:34:47 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201312022234.rB2MYlfZ025529@svn.freebsd.org> From: Attilio Rao Date: Mon, 2 Dec 2013 22:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258858 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 22:34:48 -0000 Author: attilio Date: Mon Dec 2 22:34:47 2013 New Revision: 258858 URL: http://svnweb.freebsd.org/changeset/base/258858 Log: Right now LOCK_DEBUG is enabled if KTR is on. This is to support LOCK_LOG_* functionality effectively in debugging environments but it is overkill because really LOCK_DEBUG should be on only if (KTR_COMPILE & KTR_LOCK) is true. Fix this by applying the correct logic. In this process, move the KTR classes to its own header to reduce namespace pollution. Sponsored by: EMC / Isilon storage division Reviewed by: jhb Added: head/sys/sys/ktr_class.h (contents, props changed) Modified: head/sys/sys/ktr.h head/sys/sys/lock.h Modified: head/sys/sys/ktr.h ============================================================================== --- head/sys/sys/ktr.h Mon Dec 2 22:00:15 2013 (r258857) +++ head/sys/sys/ktr.h Mon Dec 2 22:34:47 2013 (r258858) @@ -36,56 +36,7 @@ #ifndef _SYS_KTR_H_ #define _SYS_KTR_H_ -/* - * Trace classes - * - * Two of the trace classes (KTR_DEV and KTR_SUBSYS) are special in that - * they are really placeholders so that indvidual drivers and subsystems - * can map their internal tracing to the general class when they wish to - * have tracing enabled and map it to 0 when they don't. - */ -#define KTR_GEN 0x00000001 /* General (TR) */ -#define KTR_NET 0x00000002 /* Network */ -#define KTR_DEV 0x00000004 /* Device driver */ -#define KTR_LOCK 0x00000008 /* MP locking */ -#define KTR_SMP 0x00000010 /* MP general */ -#define KTR_SUBSYS 0x00000020 /* Subsystem. */ -#define KTR_PMAP 0x00000040 /* Pmap tracing */ -#define KTR_MALLOC 0x00000080 /* Malloc tracing */ -#define KTR_TRAP 0x00000100 /* Trap processing */ -#define KTR_INTR 0x00000200 /* Interrupt tracing */ -#define KTR_SIG 0x00000400 /* Signal processing */ -#define KTR_SPARE2 0x00000800 /* XXX Used by cxgb */ -#define KTR_PROC 0x00001000 /* Process scheduling */ -#define KTR_SYSC 0x00002000 /* System call */ -#define KTR_INIT 0x00004000 /* System initialization */ -#define KTR_SPARE3 0x00008000 /* XXX Used by cxgb */ -#define KTR_SPARE4 0x00010000 /* XXX Used by cxgb */ -#define KTR_EVH 0x00020000 /* Eventhandler */ -#define KTR_VFS 0x00040000 /* VFS events */ -#define KTR_VOP 0x00080000 /* Auto-generated vop events */ -#define KTR_VM 0x00100000 /* The virtual memory system */ -#define KTR_INET 0x00200000 /* IPv4 stack */ -#define KTR_RUNQ 0x00400000 /* Run queue */ -#define KTR_CONTENTION 0x00800000 /* Lock contention */ -#define KTR_UMA 0x01000000 /* UMA slab allocator */ -#define KTR_CALLOUT 0x02000000 /* Callouts and timeouts */ -#define KTR_GEOM 0x04000000 /* GEOM I/O events */ -#define KTR_BUSDMA 0x08000000 /* busdma(9) events */ -#define KTR_INET6 0x10000000 /* IPv6 stack */ -#define KTR_SCHED 0x20000000 /* Machine parsed sched info. */ -#define KTR_BUF 0x40000000 /* Buffer cache */ -#define KTR_ALL 0x7fffffff - -/* Trace classes to compile in */ -#ifdef KTR -#ifndef KTR_COMPILE -#define KTR_COMPILE (KTR_ALL) -#endif -#else /* !KTR */ -#undef KTR_COMPILE -#define KTR_COMPILE 0 -#endif /* KTR */ +#include /* * Version number for ktr_entry struct. Increment this when you break binary Added: head/sys/sys/ktr_class.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/ktr_class.h Mon Dec 2 22:34:47 2013 (r258858) @@ -0,0 +1,86 @@ +/*- + * Copyright (c) 1996 Berkeley Software Design, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Berkeley Software Design Inc's name may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``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 BERKELEY SOFTWARE DESIGN INC 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. + * + * from BSDI $Id: ktr.h,v 1.10.2.7 2000/03/16 21:44:42 cp Exp $ + * $FreeBSD$ + */ + +#ifndef _SYS_KTR_CLASS_H_ +#define _SYS_KTR_CLASS_H_ + +/* + * KTR trace classes + * + * Two of the trace classes (KTR_DEV and KTR_SUBSYS) are special in that + * they are really placeholders so that indvidual drivers and subsystems + * can map their internal tracing to the general class when they wish to + * have tracing enabled and map it to 0 when they don't. + */ +#define KTR_GEN 0x00000001 /* General (TR) */ +#define KTR_NET 0x00000002 /* Network */ +#define KTR_DEV 0x00000004 /* Device driver */ +#define KTR_LOCK 0x00000008 /* MP locking */ +#define KTR_SMP 0x00000010 /* MP general */ +#define KTR_SUBSYS 0x00000020 /* Subsystem. */ +#define KTR_PMAP 0x00000040 /* Pmap tracing */ +#define KTR_MALLOC 0x00000080 /* Malloc tracing */ +#define KTR_TRAP 0x00000100 /* Trap processing */ +#define KTR_INTR 0x00000200 /* Interrupt tracing */ +#define KTR_SIG 0x00000400 /* Signal processing */ +#define KTR_SPARE2 0x00000800 /* XXX Used by cxgb */ +#define KTR_PROC 0x00001000 /* Process scheduling */ +#define KTR_SYSC 0x00002000 /* System call */ +#define KTR_INIT 0x00004000 /* System initialization */ +#define KTR_SPARE3 0x00008000 /* XXX Used by cxgb */ +#define KTR_SPARE4 0x00010000 /* XXX Used by cxgb */ +#define KTR_EVH 0x00020000 /* Eventhandler */ +#define KTR_VFS 0x00040000 /* VFS events */ +#define KTR_VOP 0x00080000 /* Auto-generated vop events */ +#define KTR_VM 0x00100000 /* The virtual memory system */ +#define KTR_INET 0x00200000 /* IPv4 stack */ +#define KTR_RUNQ 0x00400000 /* Run queue */ +#define KTR_CONTENTION 0x00800000 /* Lock contention */ +#define KTR_UMA 0x01000000 /* UMA slab allocator */ +#define KTR_CALLOUT 0x02000000 /* Callouts and timeouts */ +#define KTR_GEOM 0x04000000 /* GEOM I/O events */ +#define KTR_BUSDMA 0x08000000 /* busdma(9) events */ +#define KTR_INET6 0x10000000 /* IPv6 stack */ +#define KTR_SCHED 0x20000000 /* Machine parsed sched info. */ +#define KTR_BUF 0x40000000 /* Buffer cache */ +#define KTR_ALL 0x7fffffff + +/* KTR trace classes to compile in */ +#ifdef KTR +#ifndef KTR_COMPILE +#define KTR_COMPILE (KTR_ALL) +#endif +#else /* !KTR */ +#undef KTR_COMPILE +#define KTR_COMPILE 0 +#endif /* KTR */ + +#endif /* !_SYS_KTR_CLASS_H_ */ Modified: head/sys/sys/lock.h ============================================================================== --- head/sys/sys/lock.h Mon Dec 2 22:00:15 2013 (r258857) +++ head/sys/sys/lock.h Mon Dec 2 22:34:47 2013 (r258858) @@ -34,6 +34,7 @@ #include #include +#include struct lock_list_entry; struct thread; @@ -123,7 +124,7 @@ struct lock_class { * calling conventions for this debugging code in modules so that modules can * work with both debug and non-debug kernels. */ -#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || defined(KTR) || defined(LOCK_PROFILING) +#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || defined(LOCK_PROFILING) || (defined(KTR) && (KTR_COMPILE & KTR_LOCK)) #define LOCK_DEBUG 1 #else #define LOCK_DEBUG 0 From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 00:43:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C5C5282; Tue, 3 Dec 2013 00:43:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2F49A17F8; Tue, 3 Dec 2013 00:43:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB30hWae070945; Tue, 3 Dec 2013 00:43:32 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB30hVvr070942; Tue, 3 Dec 2013 00:43:31 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201312030043.rB30hVvr070942@svn.freebsd.org> From: Neel Natu Date: Tue, 3 Dec 2013 00:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258859 - in head/sys/amd64: include vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 00:43:32 -0000 Author: neel Date: Tue Dec 3 00:43:31 2013 New Revision: 258859 URL: http://svnweb.freebsd.org/changeset/base/258859 Log: Rename 'vm_interrupt_hostcpu()' to 'vcpu_notify_event()' because the function has outgrown its original name. Originally this function simply sent an IPI to the host cpu that a vcpu was executing on but now it does a lot more than just that. Reviewed by: grehan@ Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_lapic.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Mon Dec 2 22:34:47 2013 (r258858) +++ head/sys/amd64/include/vmm.h Tue Dec 3 00:43:31 2013 (r258859) @@ -156,7 +156,7 @@ vcpu_is_running(struct vm *vm, int vcpu, } void *vcpu_stats(struct vm *vm, int vcpu); -void vm_interrupt_hostcpu(struct vm *vm, int vcpu); +void vcpu_notify_event(struct vm *vm, int vcpuid); struct vmspace *vm_get_vmspace(struct vm *vm); int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Mon Dec 2 22:34:47 2013 (r258858) +++ head/sys/amd64/vmm/vmm.c Tue Dec 3 00:43:31 2013 (r258859) @@ -1099,7 +1099,7 @@ vm_inject_nmi(struct vm *vm, int vcpuid) vcpu = &vm->vcpu[vcpuid]; vcpu->nmi_pending = 1; - vm_interrupt_hostcpu(vm, vcpuid); + vcpu_notify_event(vm, vcpuid); return (0); } @@ -1319,8 +1319,15 @@ vm_set_x2apic_state(struct vm *vm, int v return (0); } +/* + * This function is called to ensure that a vcpu "sees" a pending event + * as soon as possible: + * - If the vcpu thread is sleeping then it is woken up. + * - If the vcpu is running on a different host_cpu then an IPI will be directed + * to the host_cpu to cause the vcpu to trap into the hypervisor. + */ void -vm_interrupt_hostcpu(struct vm *vm, int vcpuid) +vcpu_notify_event(struct vm *vm, int vcpuid) { int hostcpu; struct vcpu *vcpu; Modified: head/sys/amd64/vmm/vmm_lapic.c ============================================================================== --- head/sys/amd64/vmm/vmm_lapic.c Mon Dec 2 22:34:47 2013 (r258858) +++ head/sys/amd64/vmm/vmm_lapic.c Tue Dec 3 00:43:31 2013 (r258859) @@ -75,7 +75,7 @@ lapic_set_intr(struct vm *vm, int cpu, i vlapic = vm_lapic(vm, cpu); vlapic_set_intr_ready(vlapic, vector, level); - vm_interrupt_hostcpu(vm, cpu); + vcpu_notify_event(vm, cpu); return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 01:21:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC04D65A; Tue, 3 Dec 2013 01:21:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B80001990; Tue, 3 Dec 2013 01:21:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB31LM92084507; Tue, 3 Dec 2013 01:21:22 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB31LMwR084500; Tue, 3 Dec 2013 01:21:22 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201312030121.rB31LMwR084500@svn.freebsd.org> From: Neel Natu Date: Tue, 3 Dec 2013 01:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258860 - in head/sys/amd64: include vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 01:21:22 -0000 Author: neel Date: Tue Dec 3 01:21:21 2013 New Revision: 258860 URL: http://svnweb.freebsd.org/changeset/base/258860 Log: The 'protection' field in the VM exit collateral for the PAGING exit is not used - get rid of it. Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Tue Dec 3 00:43:31 2013 (r258859) +++ head/sys/amd64/include/vmm.h Tue Dec 3 01:21:21 2013 (r258860) @@ -283,7 +283,6 @@ struct vm_exit { struct { uint64_t gpa; int fault_type; - int protection; } paging; struct { uint64_t gpa; Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Tue Dec 3 00:43:31 2013 (r258859) +++ head/sys/amd64/vmm/intel/vmx.c Tue Dec 3 01:21:21 2013 (r258860) @@ -1301,21 +1301,6 @@ ept_fault_type(uint64_t ept_qual) return (fault_type); } -static int -ept_protection(uint64_t ept_qual) -{ - int prot = 0; - - if (ept_qual & EPT_VIOLATION_GPA_READABLE) - prot |= VM_PROT_READ; - if (ept_qual & EPT_VIOLATION_GPA_WRITEABLE) - prot |= VM_PROT_WRITE; - if (ept_qual & EPT_VIOLATION_GPA_EXECUTABLE) - prot |= VM_PROT_EXECUTE; - - return (prot); -} - static boolean_t ept_emulation_fault(uint64_t ept_qual) { @@ -1485,7 +1470,6 @@ vmx_exit_process(struct vmx *vmx, int vc vmexit->exitcode = VM_EXITCODE_PAGING; vmexit->u.paging.gpa = gpa; vmexit->u.paging.fault_type = ept_fault_type(qual); - vmexit->u.paging.protection = ept_protection(qual); } else if (ept_emulation_fault(qual)) { vmexit->exitcode = VM_EXITCODE_INST_EMUL; vmexit->u.inst_emul.gpa = gpa; From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 03:40:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE713AD8; Tue, 3 Dec 2013 03:40:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9078B11A4; Tue, 3 Dec 2013 03:40:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB33elE0032963; Tue, 3 Dec 2013 03:40:47 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB33elU2032962; Tue, 3 Dec 2013 03:40:47 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312030340.rB33elU2032962@svn.freebsd.org> From: Mark Johnston Date: Tue, 3 Dec 2013 03:40:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258861 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 03:40:47 -0000 Author: markj Date: Tue Dec 3 03:40:47 2013 New Revision: 258861 URL: http://svnweb.freebsd.org/changeset/base/258861 Log: Use mkstemp(3) to create the temporary file used in the FreeBSD-specific portions of dtrace_program_link(). Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Tue Dec 3 01:21:21 2013 (r258860) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Tue Dec 3 03:40:47 2013 (r258861) @@ -1709,8 +1709,6 @@ dtrace_program_link(dtrace_hdl_t *dtp, d */ return (0); } - /* XXX Should get a temp file name here. */ - snprintf(tfile, sizeof(tfile), "%s.tmp", file); #endif /* @@ -1785,9 +1783,11 @@ dtrace_program_link(dtrace_hdl_t *dtp, d "failed to open %s: %s", file, strerror(errno))); } #else - if ((fd = open(tfile, O_RDWR | O_CREAT | O_TRUNC, 0666)) == -1) + snprintf(tfile, sizeof(tfile), "%s.XXXXXX", file); + if ((fd = mkstemp(tfile)) == -1) return (dt_link_error(dtp, NULL, -1, NULL, - "failed to open %s: %s", tfile, strerror(errno))); + "failed to create temporary file %s: %s", + tfile, strerror(errno))); #endif /* @@ -1830,13 +1830,15 @@ dtrace_program_link(dtrace_hdl_t *dtp, d status = dump_elf32(dtp, dof, fd); if (status != 0 || lseek(fd, 0, SEEK_SET) != 0) { -#else - /* We don't write the ELF header, just the DOF section */ - if (dt_write(dtp, fd, dof, dof->dofh_filesz) < dof->dofh_filesz) { -#endif return (dt_link_error(dtp, NULL, -1, NULL, "failed to write %s: %s", file, strerror(errno))); } +#else + /* We don't write the ELF header, just the DOF section */ + if (dt_write(dtp, fd, dof, dof->dofh_filesz) < dof->dofh_filesz) + return (dt_link_error(dtp, NULL, -1, NULL, + "failed to write %s: %s", tfile, strerror(errno))); +#endif if (!dtp->dt_lazyload) { #if defined(sun) From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 03:57:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EA24D19; Tue, 3 Dec 2013 03:57:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B432123C; Tue, 3 Dec 2013 03:57:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB33vN2G037136; Tue, 3 Dec 2013 03:57:23 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB33vNSY037135; Tue, 3 Dec 2013 03:57:23 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312030357.rB33vNSY037135@svn.freebsd.org> From: Eitan Adler Date: Tue, 3 Dec 2013 03:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258862 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 03:57:23 -0000 Author: eadler Date: Tue Dec 3 03:57:22 2013 New Revision: 258862 URL: http://svnweb.freebsd.org/changeset/base/258862 Log: Add the Short Message Peer-to-Peer protocol PR: conf/183398 Submitted by: olgeni Modified: head/etc/services Modified: head/etc/services ============================================================================== --- head/etc/services Tue Dec 3 03:40:47 2013 (r258861) +++ head/etc/services Tue Dec 3 03:57:22 2013 (r258862) @@ -2192,6 +2192,8 @@ ospf6d 2606/tcp #OSPF6d vty dict 2628/tcp #RFC 2229 dict 2628/udp #RFC 2229 listen 2766/tcp #System V listener port +smpp 2775/tcp #SMPP +smpp 2775/udp #SMPP www-dev 2784/tcp #world wide web - development www-dev 2784/udp #world wide web - development m2ua 2904/sctp #M2UA From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 04:03:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC271E9A; Tue, 3 Dec 2013 04:03:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B7EBE1284; Tue, 3 Dec 2013 04:03:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB343JNi040194; Tue, 3 Dec 2013 04:03:19 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB343JN5040193; Tue, 3 Dec 2013 04:03:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312030403.rB343JN5040193@svn.freebsd.org> From: Eitan Adler Date: Tue, 3 Dec 2013 04:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258863 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 04:03:19 -0000 Author: eadler Date: Tue Dec 3 04:03:19 2013 New Revision: 258863 URL: http://svnweb.freebsd.org/changeset/base/258863 Log: Add Veritas NetBackup Obtained From: DragonFly BSD Modified: head/etc/services Modified: head/etc/services ============================================================================== --- head/etc/services Tue Dec 3 03:57:22 2013 (r258862) +++ head/etc/services Tue Dec 3 04:03:19 2013 (r258863) @@ -2464,6 +2464,8 @@ amidxtape 10083/tcp #Amanda tape indexi wmereceiving 11997/sctp #WorldMailExpress wmedistribution 11998/sctp #WorldMailExpress wmereporting 11999/sctp #WorldMailExpress +bpcd 13782/tcp #Veritas NetBackup +bpcd 13782/udp #Veritas NetBackup sua 14001/sctp #SUA sua 14001/tcp #SUA isode-dua 17007/tcp From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 04:13:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5EE9D6; Tue, 3 Dec 2013 04:13:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D19AB12E9; Tue, 3 Dec 2013 04:13: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 rB34DtNX043907; Tue, 3 Dec 2013 04:13:55 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB34Dt8N043906; Tue, 3 Dec 2013 04:13:55 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312030413.rB34Dt8N043906@svn.freebsd.org> From: Eitan Adler Date: Tue, 3 Dec 2013 04:13:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258864 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 04:13:56 -0000 Author: eadler Date: Tue Dec 3 04:13:55 2013 New Revision: 258864 URL: http://svnweb.freebsd.org/changeset/base/258864 Log: Add an autologin entry for the console. Obtained From: DragonFly BSD (commit f95025e8c9a4471edb610557263b12acd8e7fb3a) Modified: head/etc/gettytab Modified: head/etc/gettytab ============================================================================== --- head/etc/gettytab Tue Dec 3 04:03:19 2013 (r258863) +++ head/etc/gettytab Tue Dec 3 04:13:55 2013 (r258864) @@ -214,6 +214,8 @@ al.115200:\ :al=root:tc=std.115200: al.230400:\ :al=root:tc=std.230400: +al.Pc:\ + :al=root:tc=Pc # # Entries for 3-wire serial terminals. These don't supply carrier, so From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 04:32:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 690713BE; Tue, 3 Dec 2013 04:32:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5530F13C1; Tue, 3 Dec 2013 04:32: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 rB34W3Nl050231; Tue, 3 Dec 2013 04:32:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB34W3x6050230; Tue, 3 Dec 2013 04:32:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312030432.rB34W3x6050230@svn.freebsd.org> From: Eitan Adler Date: Tue, 3 Dec 2013 04:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258865 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 04:32:03 -0000 Author: eadler Date: Tue Dec 3 04:32:02 2013 New Revision: 258865 URL: http://svnweb.freebsd.org/changeset/base/258865 Log: Add DragonFly BSD fingerprints to pf.os Obtained From: DragonFly BSD (commit 321b0bb006b0857d2c212dc8cd12a36d750bcf9a) Modified: head/etc/pf.os Modified: head/etc/pf.os ============================================================================== --- head/etc/pf.os Tue Dec 3 04:13:55 2013 (r258864) +++ head/etc/pf.os Tue Dec 3 04:32:02 2013 (r258865) @@ -315,6 +315,14 @@ S22:64:1:52:M*,N,N,S,N,W0: Linux:2.2:ts: 16384:64:1:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9::OpenBSD 4.9 16384:64:0:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9:no-df:OpenBSD 4.9 (scrub no-df) +# ----------------- DragonFly BSD ----------------- + +57344:64:1:60:M*,N,W0,N,N,T: DragonFly:1.0:A:DragonFly 1.0A +57344:64:0:64:M*,N,W0,N,N,S,N,N,T: DragonFly:1.2-1.12::DragonFly 1.2-1.12 +5840:64:1:60:M*,S,T,N,W4: DragonFly:2.0-2.1::DragonFly 2.0-2.1 +57344:64:0:64:M*,N,W0,N,N,S,N,N,T: DragonFly:2.2-2.3::DragonFly 2.2-2.3 +57344:64:0:64:M*,N,W5,N,N,S,N,N,T: DragonFly:2.4-2.7::DragonFly 2.4-2.7 + # ----------------- Solaris ----------------- S17:64:1:64:N,W3,N,N,T0,N,N,S,M*: Solaris:8:RFC1323:Solaris 8 RFC1323 From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 10:59:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2B4D917; Tue, 3 Dec 2013 10:59:59 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4519E18BD; Tue, 3 Dec 2013 10:59:58 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rB3Axo9d062181 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 3 Dec 2013 14:59:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rB3AxoG4062180; Tue, 3 Dec 2013 14:59:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 3 Dec 2013 14:59:50 +0400 From: Gleb Smirnoff To: Pawel Jakub Dawidek Subject: Re: svn commit: r258850 - in head/lib: libcapsicum libcasper Message-ID: <20131203105950.GT48919@FreeBSD.org> References: <201312021707.rB2H7MBZ090689@svn.freebsd.org> <20131202171907.GN48919@FreeBSD.org> <20131202203430.GA1407@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131202203430.GA1407@garage.freebsd.pl> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 10:59:59 -0000 On Mon, Dec 02, 2013 at 09:34:30PM +0100, Pawel Jakub Dawidek wrote: P> > On Mon, Dec 02, 2013 at 05:07:22PM +0000, Pawel Jakub Dawidek wrote: P> > P> Author: pjd P> > P> Date: Mon Dec 2 17:07:22 2013 P> > P> New Revision: 258850 P> > P> URL: http://svnweb.freebsd.org/changeset/base/258850 P> > P> P> > P> Log: P> > P> Both libcasper and libcapsicum libraries have to be installed in /lib/, P> > P> as they are used by /sbin/casperd. P> > P> > Although time window was small, still you need to put the files into P> > ObsoletedFiles.inc. P> > P> > Couple of my hosts already got /usr/lib/libcasper.* installed. P> P> Something like this? P> P> http://people.freebsd.org/~pjd/patches/ObsoleteFiles.inc.patch Looks okay. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 13:26:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4ED0C56; Tue, 3 Dec 2013 13:26:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A11FD124F; Tue, 3 Dec 2013 13:26: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 rB3DQb0o030758; Tue, 3 Dec 2013 13:26:37 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3DQb0I030757; Tue, 3 Dec 2013 13:26:37 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312031326.rB3DQb0I030757@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 3 Dec 2013 13:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258866 - head/lib/libcasper X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 13:26:37 -0000 Author: pjd Date: Tue Dec 3 13:26:37 2013 New Revision: 258866 URL: http://svnweb.freebsd.org/changeset/base/258866 Log: Fix comparisons in assertions. Reported by: Coverity Coverity CID: 1130048 Modified: head/lib/libcasper/libcasper.c Modified: head/lib/libcasper/libcasper.c ============================================================================== --- head/lib/libcasper/libcasper.c Tue Dec 3 04:32:02 2013 (r258865) +++ head/lib/libcasper/libcasper.c Tue Dec 3 13:26:37 2013 (r258866) @@ -114,7 +114,7 @@ service_free(struct service *service) { struct service_connection *sconn; - PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC); + PJDLOG_ASSERT(service->s_magic == SERVICE_MAGIC); service->s_magic = 0; while ((sconn = service_connection_first(service)) != NULL) @@ -130,7 +130,7 @@ service_connection_add(struct service *s struct service_connection *sconn; int serrno; - PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC); + PJDLOG_ASSERT(service->s_magic == SERVICE_MAGIC); sconn = malloc(sizeof(*sconn)); if (sconn == NULL) { @@ -168,7 +168,7 @@ service_connection_remove(struct service struct service_connection *sconn) { - PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC); + PJDLOG_ASSERT(service->s_magic == SERVICE_MAGIC); PJDLOG_ASSERT(sconn->sc_magic == SERVICE_CONNECTION_MAGIC); TAILQ_REMOVE(&service->s_connections, sconn, sc_next); @@ -206,7 +206,7 @@ service_connection_first(struct service { struct service_connection *sconn; - PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC); + PJDLOG_ASSERT(service->s_magic == SERVICE_MAGIC); sconn = TAILQ_FIRST(&service->s_connections); PJDLOG_ASSERT(sconn == NULL || From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 13:28:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67025DAC; Tue, 3 Dec 2013 13:28:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 532281262; Tue, 3 Dec 2013 13:28:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3DS6No030970; Tue, 3 Dec 2013 13:28:06 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3DS6s7030969; Tue, 3 Dec 2013 13:28:06 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312031328.rB3DS6s7030969@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 3 Dec 2013 13:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258867 - head/sbin/casperd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 13:28:06 -0000 Author: pjd Date: Tue Dec 3 13:28:05 2013 New Revision: 258867 URL: http://svnweb.freebsd.org/changeset/base/258867 Log: Initialize cookie before use. Reported by: Coverity Coverity CID: 1135292 Modified: head/sbin/casperd/casperd.c Modified: head/sbin/casperd/casperd.c ============================================================================== --- head/sbin/casperd/casperd.c Tue Dec 3 13:26:37 2013 (r258866) +++ head/sbin/casperd/casperd.c Tue Dec 3 13:28:05 2013 (r258867) @@ -206,6 +206,7 @@ casper_limit(const nvlist_t *oldlimits, int type; void *cookie; + cookie = NULL; while ((name = nvlist_next(newlimits, &type, &cookie)) != NULL) { if (type != NV_TYPE_NULL) return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 13:38:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2174A96; Tue, 3 Dec 2013 13:38:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E9AD12EB; Tue, 3 Dec 2013 13:38: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 rB3DcDip034291; Tue, 3 Dec 2013 13:38:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3DcDYv034289; Tue, 3 Dec 2013 13:38:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312031338.rB3DcDYv034289@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 3 Dec 2013 13:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258868 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 13:38:14 -0000 Author: pjd Date: Tue Dec 3 13:38:13 2013 New Revision: 258868 URL: http://svnweb.freebsd.org/changeset/base/258868 Log: Add libcapsicum and libcasper libraries that were moved from /usr/lib/ to /lib/. Reviewed by: glebius Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 3 13:28:05 2013 (r258867) +++ head/ObsoleteFiles.inc Tue Dec 3 13:38:13 2013 (r258868) @@ -38,6 +38,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20131202: libcapsicum and libcasper moved to /lib/ +OLD_FILES+=usr/lib/libcapsicum.a +OLD_FILES+=usr/lib/libcapsicum.so +OLD_LIBS+=usr/lib/libcapsicum.so.0 +OLD_FILES+=usr/lib/libcasper.a +OLD_FILES+=usr/lib/libcasper.so +OLD_LIBS+=usr/lib/libcasper.so.0 # 20131109: extattr(2) mlinks fixed OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 14:50:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D74FF26; Tue, 3 Dec 2013 14:50:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A7301870; Tue, 3 Dec 2013 14:50:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3EoDwb058397; Tue, 3 Dec 2013 14:50:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3EoDZe058396; Tue, 3 Dec 2013 14:50:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312031450.rB3EoDZe058396@svn.freebsd.org> From: John Baldwin Date: Tue, 3 Dec 2013 14:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258869 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 14:50:13 -0000 Author: jhb Date: Tue Dec 3 14:50:12 2013 New Revision: 258869 URL: http://svnweb.freebsd.org/changeset/base/258869 Log: Fix an off-by-one error in r228960. The maximum priority delta provided by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting priority value (before nice adjustment) is between SCHED_PRI_MIN and SCHED_PRI_MAX, inclusive. Submitted by: kib Reported by: pho MFC after: 1 week Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Tue Dec 3 13:38:13 2013 (r258868) +++ head/sys/kern/sched_ule.c Tue Dec 3 14:50:12 2013 (r258869) @@ -1532,7 +1532,7 @@ sched_priority(struct thread *td) pri = SCHED_PRI_MIN; if (td->td_sched->ts_ticks) pri += min(SCHED_PRI_TICKS(td->td_sched), - SCHED_PRI_RANGE); + SCHED_PRI_RANGE - 1); pri += SCHED_PRI_NICE(td->td_proc->p_nice); KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH, ("sched_priority: invalid priority %d: nice %d, " From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 16:07:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D0E27AF; Tue, 3 Dec 2013 16:07:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 56DBB1EA0; Tue, 3 Dec 2013 16:07:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3G7xg0085400; Tue, 3 Dec 2013 16:07:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3G7vYg085385; Tue, 3 Dec 2013 16:07:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312031607.rB3G7vYg085385@svn.freebsd.org> From: John Baldwin Date: Tue, 3 Dec 2013 16:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258870 - in stable/9: lib/libc/sys sys/dev/drm2/i915 sys/kern sys/sys sys/vm usr.bin/kdump usr.bin/truss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 16:07:59 -0000 Author: jhb Date: Tue Dec 3 16:07:56 2013 New Revision: 258870 URL: http://svnweb.freebsd.org/changeset/base/258870 Log: MFC 253471,253620,254430,254538: Change mmap() to more optimally use superpages and provide support for tweaking alignment of virtual mappings. - Add a new address space allocation method (VMFS_OPTIMAL_SPACE) for vm_map_find() that will try to alter the alignment of a mapping to match any existing superpage mappings of the object being mapped. If no suitable address range is found with the necessary alignment, vm_map_find() will fall back to using the simple first-fit strategy (VMFS_ANY_SPACE). - Change mmap() without MAP_FIXED, shmat(), shm_map(), and the GEM mapping ioctl to use VMFS_OPTIMAL_SPACE instead of VMFS_ANY_SPACE. - MAP_ALIGNED(n) requests a mapping aligned on a boundary of (1 << n). Requests for n >= number of bits in a pointer or less than the size of a page fail with EINVAL. This matches the API provided by NetBSD. - MAP_ALIGNED_SUPER is a special case of MAP_ALIGNED. It can be used to optimize the chances of using large pages. By default it will align the mapping on a large page boundary (the system is free to choose any large page size to align to that seems best for the mapping request). However, if the object being mapped is already using large pages, then it will align the virtual mapping to match the existing large pages in the object instead. - Internally, VMFS_ALIGNED_SPACE is now renamed to VMFS_SUPER_SPACE, and VMFS_ALIGNED_SPACE(n) is repurposed for specifying a specific alignment. MAP_ALIGNED(n) maps to using VMFS_ALIGNED_SPACE(n), while MAP_ALIGNED_SUPER maps to VMFS_SUPER_SPACE. - mmap() of a device object now uses VMFS_OPTIMAL_SPACE rather than explicitly using VMFS_SUPER_SPACE. All device objects are forced to use a specific color on creation, so VMFS_OPTIMAL_SPACE is effectively equivalent. PR: ports/184173 (exp-run) Modified: stable/9/lib/libc/sys/mmap.2 stable/9/sys/dev/drm2/i915/i915_gem.c stable/9/sys/kern/sysv_shm.c stable/9/sys/kern/uipc_shm.c stable/9/sys/sys/mman.h stable/9/sys/vm/vm_kern.c stable/9/sys/vm/vm_map.c stable/9/sys/vm/vm_map.h stable/9/sys/vm/vm_mmap.c stable/9/usr.bin/kdump/mksubr stable/9/usr.bin/truss/syscalls.c Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) stable/9/usr.bin/kdump/ (props changed) stable/9/usr.bin/truss/ (props changed) Modified: stable/9/lib/libc/sys/mmap.2 ============================================================================== --- stable/9/lib/libc/sys/mmap.2 Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/lib/libc/sys/mmap.2 Tue Dec 3 16:07:56 2013 (r258870) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd March 18, 2012 +.Dd August 16, 2013 .Dt MMAP 2 .Os .Sh NAME @@ -97,7 +97,30 @@ Sharing, mapping type and options are sp argument by .Em or Ns 'ing the following values: -.Bl -tag -width MAP_HASSEMAPHORE +.Bl -tag -width MAP_PREFAULT_READ +.It Dv MAP_ALIGNED Ns Pq Fa n +Align the region on a requested boundary. +If a suitable region cannot be found, +.Fn mmap +will fail. +The +.Fa n +argument specifies the binary logarithm of the desired alignment. +.It Dv MAP_ALIGNED_SUPER +Align the region to maximize the potential use of large +.Pq Dq super +pages. +If a suitable region cannot be found, +.Fn mmap +will fail. +The system will choose a suitable page size based on the size of +mapping. +The page size used as well as the alignment of the region may both be +affected by properties of the file being mapped. +In particular, +the physical address of existing pages of a file may require a specific +alignment. +The region is not guaranteed to be aligned on any specific boundary. .It Dv MAP_ANON Map anonymous memory not associated with any specific file. The file descriptor used for creating @@ -274,6 +297,25 @@ Although this implementation does not im the .Fa offset argument, a portable program must only use page-aligned values. +.Pp +Large page mappings require that the pages backing an object be +aligned in matching blocks in both the virtual address space and RAM. +The system will automatically attempt to use large page mappings when +mapping an object that is already backed by large pages in RAM by +aligning the mapping request in the virtual address space to match the +alignment of the large physical pages. +The system may also use large page mappings when mapping portions of an +object that are not yet backed by pages in RAM. +The +.Dv MAP_ALIGNED_SUPER +flag is an optimization that will align the mapping request to the +size of a large page similar to +.Dv MAP_ALIGNED , +except that the system will override this alignment if an object already +uses large pages so that the mapping will be consistent with the existing +large pages. +This flag is mostly useful for maximizing the use of large pages on the +first mapping of objects that do not yet have pages present in RAM. .Sh RETURN VALUES Upon successful completion, .Fn mmap @@ -325,6 +367,10 @@ The argument was equal to zero. .It Bq Er EINVAL +.Dv MAP_ALIGNED +was specified and the desired alignment was either larger than the +virtual address size of the machine or smaller than a page. +.It Bq Er EINVAL .Dv MAP_ANON was specified and the .Fa fd @@ -356,7 +402,8 @@ was specified and insufficient memory wa .Xr msync 2 , .Xr munlock 2 , .Xr munmap 2 , -.Xr getpagesize 3 +.Xr getpagesize 3 , +.Xr getpagesizes 3 .Sh BUGS The .Fa len Modified: stable/9/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- stable/9/sys/dev/drm2/i915/i915_gem.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/dev/drm2/i915/i915_gem.c Tue Dec 3 16:07:56 2013 (r258870) @@ -1289,7 +1289,7 @@ i915_gem_mmap_ioctl(struct drm_device *d vm_object_reference(obj->vm_obj); DRM_UNLOCK(dev); rv = vm_map_find(map, obj->vm_obj, args->offset, &addr, args->size, - VMFS_ANY_SPACE, VM_PROT_READ | VM_PROT_WRITE, + VMFS_OPTIMAL_SPACE, VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | VM_PROT_WRITE, MAP_INHERIT_SHARE); if (rv != KERN_SUCCESS) { vm_object_deallocate(obj->vm_obj); Modified: stable/9/sys/kern/sysv_shm.c ============================================================================== --- stable/9/sys/kern/sysv_shm.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/kern/sysv_shm.c Tue Dec 3 16:07:56 2013 (r258870) @@ -413,7 +413,7 @@ kern_shmat(td, shmid, shmaddr, shmflg) vm_object_reference(shmseg->object); rv = vm_map_find(&p->p_vmspace->vm_map, shmseg->object, 0, &attach_va, size, (flags & MAP_FIXED) ? VMFS_NO_SPACE : - VMFS_ANY_SPACE, prot, prot, MAP_INHERIT_SHARE); + VMFS_OPTIMAL_SPACE, prot, prot, MAP_INHERIT_SHARE); if (rv != KERN_SUCCESS) { vm_object_deallocate(shmseg->object); error = ENOMEM; Modified: stable/9/sys/kern/uipc_shm.c ============================================================================== --- stable/9/sys/kern/uipc_shm.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/kern/uipc_shm.c Tue Dec 3 16:07:56 2013 (r258870) @@ -778,7 +778,7 @@ shm_map(struct file *fp, size_t size, of offset = trunc_page(offset); size = round_page(size + ofs); rv = vm_map_find(kernel_map, obj, offset, &kva, size, - VMFS_ALIGNED_SPACE, VM_PROT_READ | VM_PROT_WRITE, + VMFS_OPTIMAL_SPACE, VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | VM_PROT_WRITE, 0); if (rv == KERN_SUCCESS) { rv = vm_map_wire(kernel_map, kva, kva + size, Modified: stable/9/sys/sys/mman.h ============================================================================== --- stable/9/sys/sys/mman.h Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/sys/mman.h Tue Dec 3 16:07:56 2013 (r258870) @@ -91,6 +91,17 @@ */ #define MAP_NOCORE 0x00020000 /* dont include these pages in a coredump */ #define MAP_PREFAULT_READ 0x00040000 /* prefault mapping for reading */ + +/* + * Request specific alignment (n == log2 of the desired alignment). + * + * MAP_ALIGNED_SUPER requests optimal superpage alignment, but does + * not enforce a specific alignment. + */ +#define MAP_ALIGNED(n) ((n) << MAP_ALIGNMENT_SHIFT) +#define MAP_ALIGNMENT_SHIFT 24 +#define MAP_ALIGNMENT_MASK MAP_ALIGNED(0xff) +#define MAP_ALIGNED_SUPER MAP_ALIGNED(1) /* align on a superpage */ #endif /* __BSD_VISIBLE */ #if __POSIX_VISIBLE >= 199309 Modified: stable/9/sys/vm/vm_kern.c ============================================================================== --- stable/9/sys/vm/vm_kern.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/vm/vm_kern.c Tue Dec 3 16:07:56 2013 (r258870) @@ -238,7 +238,7 @@ kmem_suballoc(vm_map_t parent, vm_offset *min = vm_map_min(parent); ret = vm_map_find(parent, NULL, 0, min, size, superpage_align ? - VMFS_ALIGNED_SPACE : VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, + VMFS_SUPER_SPACE : VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, MAP_ACC_NO_CHARGE); if (ret != KERN_SUCCESS) panic("kmem_suballoc: bad status return of %d", ret); Modified: stable/9/sys/vm/vm_map.c ============================================================================== --- stable/9/sys/vm/vm_map.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/vm/vm_map.c Tue Dec 3 16:07:56 2013 (r258870) @@ -1444,19 +1444,34 @@ vm_map_find(vm_map_t map, vm_object_t ob vm_size_t length, int find_space, vm_prot_t prot, vm_prot_t max, int cow) { - vm_offset_t start; + vm_offset_t alignment, initial_addr, start; int result; - start = *addr; + if (find_space == VMFS_OPTIMAL_SPACE && (object == NULL || + (object->flags & OBJ_COLORED) == 0)) + find_space = VMFS_ANY_SPACE; + if (find_space >> 8 != 0) { + KASSERT((find_space & 0xff) == 0, ("bad VMFS flags")); + alignment = (vm_offset_t)1 << (find_space >> 8); + } else + alignment = 0; + initial_addr = *addr; +again: + start = initial_addr; vm_map_lock(map); do { if (find_space != VMFS_NO_SPACE) { if (vm_map_findspace(map, start, length, addr)) { vm_map_unlock(map); + if (find_space == VMFS_OPTIMAL_SPACE) { + find_space = VMFS_ANY_SPACE; + goto again; + } return (KERN_NO_SPACE); } switch (find_space) { - case VMFS_ALIGNED_SPACE: + case VMFS_SUPER_SPACE: + case VMFS_OPTIMAL_SPACE: pmap_align_superpage(object, offset, addr, length); break; @@ -1465,7 +1480,13 @@ vm_map_find(vm_map_t map, vm_object_t ob pmap_align_tlb(addr); break; #endif + case VMFS_ANY_SPACE: + break; default: + if ((*addr & (alignment - 1)) != 0) { + *addr &= ~(alignment - 1); + *addr += alignment; + } break; } @@ -1473,11 +1494,8 @@ vm_map_find(vm_map_t map, vm_object_t ob } result = vm_map_insert(map, object, offset, start, start + length, prot, max, cow); - } while (result == KERN_NO_SPACE && (find_space == VMFS_ALIGNED_SPACE -#ifdef VMFS_TLB_ALIGNED_SPACE - || find_space == VMFS_TLB_ALIGNED_SPACE -#endif - )); + } while (result == KERN_NO_SPACE && find_space != VMFS_NO_SPACE && + find_space != VMFS_ANY_SPACE); vm_map_unlock(map); return (result); } Modified: stable/9/sys/vm/vm_map.h ============================================================================== --- stable/9/sys/vm/vm_map.h Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/vm/vm_map.h Tue Dec 3 16:07:56 2013 (r258870) @@ -339,14 +339,19 @@ long vmspace_resident_count(struct vmspa #define VM_FAULT_READ_AHEAD_MAX min(atop(MAXPHYS) - 1, UINT8_MAX) /* - * The following "find_space" options are supported by vm_map_find() + * The following "find_space" options are supported by vm_map_find(). + * + * For VMFS_ALIGNED_SPACE, the desired alignment is specified to + * the macro argument as log base 2 of the desired alignment. */ #define VMFS_NO_SPACE 0 /* don't find; use the given range */ #define VMFS_ANY_SPACE 1 /* find a range with any alignment */ -#define VMFS_ALIGNED_SPACE 2 /* find a superpage-aligned range */ +#define VMFS_SUPER_SPACE 2 /* find a superpage-aligned range */ +#define VMFS_ALIGNED_SPACE(x) ((x) << 8) /* find a range with fixed alignment */ #if defined(__mips__) #define VMFS_TLB_ALIGNED_SPACE 3 /* find a TLB entry aligned range */ #endif +#define VMFS_OPTIMAL_SPACE 4 /* find a range with optimal alignment*/ /* * vm_map_wire and vm_map_unwire option flags Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/vm/vm_mmap.c Tue Dec 3 16:07:56 2013 (r258870) @@ -201,7 +201,7 @@ sys_mmap(td, uap) vm_prot_t cap_maxprot, prot, maxprot; void *handle; objtype_t handle_type; - int flags, error; + int align, error, flags; off_t pos; struct vmspace *vms = td->td_proc->p_vmspace; cap_rights_t rights; @@ -251,6 +251,13 @@ sys_mmap(td, uap) size += pageoff; /* low end... */ size = (vm_size_t) round_page(size); /* hi end */ + /* Ensure alignment is at least a page and fits in a pointer. */ + align = flags & MAP_ALIGNMENT_MASK; + if (align != 0 && align != MAP_ALIGNED_SUPER && + (align >> MAP_ALIGNMENT_SHIFT >= sizeof(void *) * NBBY || + align >> MAP_ALIGNMENT_SHIFT < PAGE_SHIFT)) + return (EINVAL); + /* * Check for illegal addresses. Watch out for address wrap... Note * that VM_*_ADDRESS are not constants due to casts (argh). @@ -1486,7 +1493,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, boolean_t fitit; vm_object_t object = NULL; struct thread *td = curthread; - int docow, error, rv; + int docow, error, findspace, rv; boolean_t writecounted; if (size == 0) @@ -1601,11 +1608,17 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, if (flags & MAP_STACK) rv = vm_map_stack(map, *addr, size, prot, maxprot, docow | MAP_STACK_GROWS_DOWN); - else if (fitit) - rv = vm_map_find(map, object, foff, addr, size, - object != NULL && object->type == OBJT_DEVICE ? - VMFS_ALIGNED_SPACE : VMFS_ANY_SPACE, prot, maxprot, docow); - else + else if (fitit) { + if ((flags & MAP_ALIGNMENT_MASK) == MAP_ALIGNED_SUPER) + findspace = VMFS_SUPER_SPACE; + else if ((flags & MAP_ALIGNMENT_MASK) != 0) + findspace = VMFS_ALIGNED_SPACE(flags >> + MAP_ALIGNMENT_SHIFT); + else + findspace = VMFS_OPTIMAL_SPACE; + rv = vm_map_find(map, object, foff, addr, size, findspace, + prot, maxprot, docow); + } else rv = vm_map_fixed(map, object, foff, *addr, size, prot, maxprot, docow); Modified: stable/9/usr.bin/kdump/mksubr ============================================================================== --- stable/9/usr.bin/kdump/mksubr Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/usr.bin/kdump/mksubr Tue Dec 3 16:07:56 2013 (r258870) @@ -370,7 +370,6 @@ auto_switch_type "lio_listioname" " auto_switch_type "madvisebehavname" "_?MADV_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h" auto_switch_type "minheritname" "INHERIT_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h" auto_or_type "mlockallname" "MCL_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h" -auto_or_type "mmapflagsname" "MAP_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h" auto_or_type "mmapprotname" "PROT_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h" auto_or_type "modename" "S_[A-Z]+[[:space:]]+[0-6]{7}" "sys/stat.h" auto_or_type "mountflagsname" "MNT_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mount.h" @@ -448,6 +447,40 @@ cat <<_EOF_ /* * AUTO - Special * + * The MAP_ALIGNED flag requires special handling. + */ +void +mmapflagsname(int flags) +{ + int align; + int or = 0; + printf("%#x<", flags); +_EOF_ +egrep "^#[[:space:]]*define[[:space:]]+MAP_[A-Z_]+[[:space:]]+0x[0-9A-Fa-f]+[[:space:]]*" \ + $include_dir/sys/mman.h | grep -v MAP_ALIGNED | \ + awk '{ for (i = 1; i <= NF; i++) \ + if ($i ~ /define/) \ + break; \ + ++i; \ + printf "\tif (!((flags > 0) ^ ((%s) > 0)))\n\t\tif_print_or(flags, %s, or);\n", $i, $i }' +cat <<_EOF_ + align = flags & MAP_ALIGNMENT_MASK; + if (align != 0) { + if (align == MAP_ALIGNED_SUPER) + print_or("MAP_ALIGNED_SUPER", or); + else { + print_or("MAP_ALIGNED", or); + printf("(%d)", align >> MAP_ALIGNMENT_SHIFT); + } + } + printf(">"); + if (or == 0) + printf("%d", flags); +} + +/* + * AUTO - Special + * * The only reason this is not fully automated is due to the * grep -v RTP_PRIO statement. A better egrep line should * make this capable of being a auto_switch_type() function. Modified: stable/9/usr.bin/truss/syscalls.c ============================================================================== --- stable/9/usr.bin/truss/syscalls.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/usr.bin/truss/syscalls.c Tue Dec 3 16:07:56 2013 (r258870) @@ -296,7 +296,7 @@ static struct xlat mmap_flags[] = { X(MAP_SHARED) X(MAP_PRIVATE) X(MAP_FIXED) X(MAP_RENAME) X(MAP_NORESERVE) X(MAP_RESERVED0080) X(MAP_RESERVED0100) X(MAP_HASSEMAPHORE) X(MAP_STACK) X(MAP_NOSYNC) X(MAP_ANON) - X(MAP_NOCORE) XEND + X(MAP_NOCORE) X(MAP_PREFAULT_READ) XEND }; static struct xlat mprot_flags[] = { @@ -893,9 +893,41 @@ print_arg(struct syscall_args *sc, unsig case Mprot: tmp = strdup(xlookup_bits(mprot_flags, args[sc->offset])); break; - case Mmapflags: - tmp = strdup(xlookup_bits(mmap_flags, args[sc->offset])); + case Mmapflags: { + char *base, *alignstr; + int align, flags; + + /* + * MAP_ALIGNED can't be handled by xlookup_bits(), so + * generate that string manually and prepend it to the + * string from xlookup_bits(). Have to be careful to + * avoid outputting MAP_ALIGNED|0 if MAP_ALIGNED is + * the only flag. + */ + flags = args[sc->offset] & ~MAP_ALIGNMENT_MASK; + align = args[sc->offset] & MAP_ALIGNMENT_MASK; + if (align != 0) { + if (align == MAP_ALIGNED_SUPER) + alignstr = strdup("MAP_ALIGNED_SUPER"); + else + asprintf(&alignstr, "MAP_ALIGNED(%d)", + align >> MAP_ALIGNMENT_SHIFT); + if (flags == 0) { + tmp = alignstr; + break; + } + } else + alignstr = NULL; + base = strdup(xlookup_bits(mmap_flags, flags)); + if (alignstr == NULL) { + tmp = base; + break; + } + asprintf(&tmp, "%s|%s", alignstr, base); + free(alignstr); + free(base); break; + } case Whence: tmp = strdup(xlookup(whence_arg, args[sc->offset])); break; From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 18:04:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACBF1E6C; Tue, 3 Dec 2013 18:04:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98A991663; Tue, 3 Dec 2013 18:04: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 rB3I4E0l026036; Tue, 3 Dec 2013 18:04:14 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3I4El2026035; Tue, 3 Dec 2013 18:04:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312031804.rB3I4El2026035@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 3 Dec 2013 18:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258871 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:04:14 -0000 Author: trasz Date: Tue Dec 3 18:04:14 2013 New Revision: 258871 URL: http://svnweb.freebsd.org/changeset/base/258871 Log: Properly report an error instead of panicing when user tries to create LUN backed by non-disk device, e.g. /dev/null. Reviewed by: ken (earlier version) MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Tue Dec 3 16:07:56 2013 (r258870) +++ head/sys/cam/ctl/ctl_backend_block.c Tue Dec 3 18:04:14 2013 (r258871) @@ -1483,6 +1483,7 @@ ctl_be_block_close(struct ctl_be_block_l case CTL_BE_BLOCK_FILE: break; case CTL_BE_BLOCK_NONE: + break; default: panic("Unexpected backend type."); break; @@ -1501,6 +1502,7 @@ ctl_be_block_close(struct ctl_be_block_l } break; case CTL_BE_BLOCK_NONE: + break; default: panic("Unexpected backend type."); break; @@ -1587,7 +1589,7 @@ ctl_be_block_open(struct ctl_be_block_so } else { error = EINVAL; snprintf(req->error_str, sizeof(req->error_str), - "%s is not a disk or file", be_lun->dev_path); + "%s is not a disk or plain file", be_lun->dev_path); } VOP_UNLOCK(be_lun->vn, 0); From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 18:12:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 440D83D3; Tue, 3 Dec 2013 18:12:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 30C501704; Tue, 3 Dec 2013 18:12:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3ICq4u029749; Tue, 3 Dec 2013 18:12:52 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3ICqBW029748; Tue, 3 Dec 2013 18:12:52 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201312031812.rB3ICqBW029748@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Dec 2013 18:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258873 - head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:12:52 -0000 Author: emaste Date: Tue Dec 3 18:12:51 2013 New Revision: 258873 URL: http://svnweb.freebsd.org/changeset/base/258873 Log: Workaround lldb issue with main module base address On FreeBSD lldb sometimes reloads the the main module's (executable's) symbols at the wrong address. Work around this for now by explicitly reloading at base_address=0 when it happens. A proper fix is needed but early testers have reported this issue so this workaround should allow them to make further progress. http://llvm.org/bugs/show_bug.cgi?id=17880 Modified: head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Modified: head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Tue Dec 3 18:12:39 2013 (r258872) +++ head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Tue Dec 3 18:12:51 2013 (r258873) @@ -454,6 +454,17 @@ DynamicLoaderPOSIXDYLD::LoadAllCurrentMo const char *module_path = I->path.c_str(); FileSpec file(module_path, false); ModuleSP module_sp = LoadModuleAtAddress(file, I->link_addr, I->base_addr); +#ifdef __FreeBSD__ // llvm.org/pr17880 + if (module_sp == executable) + { + Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER)); + if (log) + log->Printf("DynamicLoaderPOSIXDYLD::%s reloading main module, ignoring rendezvous base addr %" PRIx64, + __FUNCTION__, I->base_addr); + ModuleSP module_sp = LoadModuleAtAddress(file, I->link_addr, 0); + } +#endif + if (module_sp.get()) { module_list.Append(module_sp); From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 18:18:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C3F4666; Tue, 3 Dec 2013 18:18:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E99CC173A; Tue, 3 Dec 2013 18:18: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 rB3IIZ1Z030710; Tue, 3 Dec 2013 18:18:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3IIZnT030709; Tue, 3 Dec 2013 18:18:35 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312031818.rB3IIZnT030709@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 3 Dec 2013 18:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258875 - stable/10/lib/libc/posix1e X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:18:36 -0000 Author: trasz Date: Tue Dec 3 18:18:35 2013 New Revision: 258875 URL: http://svnweb.freebsd.org/changeset/base/258875 Log: MFC r258041: Mention acl_get_brand_np(3). Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/posix1e/acl.3 Directory Properties: stable/10/lib/libc/ (props changed) Modified: stable/10/lib/libc/posix1e/acl.3 ============================================================================== --- stable/10/lib/libc/posix1e/acl.3 Tue Dec 3 18:15:27 2013 (r258874) +++ stable/10/lib/libc/posix1e/acl.3 Tue Dec 3 18:18:35 2013 (r258875) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 25, 2009 +.Dd November 12, 2013 .Dt ACL 3 .Os .Sh NAME @@ -131,6 +131,10 @@ This function is described in .Xr acl_from_text 3 , and may be used to convert a text-form ACL into working ACL state, if the ACL has POSIX.1e or NFSv4 semantics. +.It Fn acl_get_brand_np +This function is described in +.Xr acl_get_brand_np 3 +and may be used to determine whether the ACL has POSIX.1e or NFSv4 semantics. .It Fn acl_get_entry This function is described in .Xr acl_get_entry 3 , @@ -248,6 +252,7 @@ library. .Xr acl_free 3 , .Xr acl_from_text 3 , .Xr acl_get 3 , +.Xr acl_get_brand_np 3 , .Xr acl_get_entry_type_np 3 , .Xr acl_get_flagset_np 3 , .Xr acl_get_permset 3 , From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 18:28:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B5FA9EE; Tue, 3 Dec 2013 18:28:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4224B17B4; Tue, 3 Dec 2013 18:28:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3ISJoX034135; Tue, 3 Dec 2013 18:28:19 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3ISJms034134; Tue, 3 Dec 2013 18:28:19 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312031828.rB3ISJms034134@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 3 Dec 2013 18:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258877 - stable/10/lib/libc/posix1e X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:28:19 -0000 Author: trasz Date: Tue Dec 3 18:28:18 2013 New Revision: 258877 URL: http://svnweb.freebsd.org/changeset/base/258877 Log: MFC r258042: Fix description to actually make sense. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/posix1e/acl_is_trivial_np.3 Directory Properties: stable/10/lib/libc/ (props changed) Modified: stable/10/lib/libc/posix1e/acl_is_trivial_np.3 ============================================================================== --- stable/10/lib/libc/posix1e/acl_is_trivial_np.3 Tue Dec 3 18:27:10 2013 (r258876) +++ stable/10/lib/libc/posix1e/acl_is_trivial_np.3 Tue Dec 3 18:28:18 2013 (r258877) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2010 +.Dd November 12, 2013 .Dt ACL_STRIP_NP 3 .Os .Sh NAME @@ -56,9 +56,8 @@ ACL is trivial if it can be fully expres any access rules. For POSIX.1e ACLs, ACL is trivial if it has the three required entries, one for owner, one for owning group, and one for other. -For NFSv4 ACLs, ACL is trivial if is identical to the ACL generated by -.Fn acl_strip_np 3 -from the file mode. +For NFSv4 ACLs, ACL is trivial if it is identical to the ACL generated by +.Fn acl_strip_np 3 . Files that have non-trivial ACL have a plus sign appended after mode bits in "ls -l" output. .Sh RETURN VALUES From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 18:34:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B44CC73; Tue, 3 Dec 2013 18:34:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2261841; Tue, 3 Dec 2013 18:34:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3IYr72037174; Tue, 3 Dec 2013 18:34:53 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3IYrPZ037170; Tue, 3 Dec 2013 18:34:53 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201312031834.rB3IYrPZ037170@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 3 Dec 2013 18:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258879 - in head/sys/dev/cxgbe: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:34:54 -0000 Author: np Date: Tue Dec 3 18:34:52 2013 New Revision: 258879 URL: http://svnweb.freebsd.org/changeset/base/258879 Log: cxgbe(4): T4_SET_SCHED_CLASS and T4_SET_SCHED_QUEUE ioctls to program scheduling classes in the chip and to bind tx queue(s) to a scheduling class respectively. These can be used for various kinds of tx traffic throttling (to force selected tx queues to drain at a fixed Kbps rate, or a % of the port's total bandwidth, or at a fixed pps rate, etc.). Obtained from: Chelsio Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/t4_ioctl.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Tue Dec 3 18:31:27 2013 (r258878) +++ head/sys/dev/cxgbe/common/common.h Tue Dec 3 18:34:52 2013 (r258879) @@ -587,4 +587,8 @@ int t4_sge_ctxt_rd_bd(struct adapter *ad int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox); int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl); int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val); +int t4_sched_config(struct adapter *adapter, int type, int minmaxen); +int t4_sched_params(struct adapter *adapter, int type, int level, int mode, + int rateunit, int ratemode, int channel, int cl, + int minrate, int maxrate, int weight, int pktsize); #endif /* __CHELSIO_COMMON_H */ Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Tue Dec 3 18:31:27 2013 (r258878) +++ head/sys/dev/cxgbe/common/t4_hw.c Tue Dec 3 18:34:52 2013 (r258879) @@ -5664,3 +5664,50 @@ int __devinit t4_port_init(struct port_i return 0; } + +int t4_sched_config(struct adapter *adapter, int type, int minmaxen) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.config.sc = FW_SCHED_SC_CONFIG; + cmd.u.config.type = type; + cmd.u.config.minmaxen = minmaxen; + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, 1); +} + +int t4_sched_params(struct adapter *adapter, int type, int level, int mode, + int rateunit, int ratemode, int channel, int cl, + int minrate, int maxrate, int weight, int pktsize) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = type; + cmd.u.params.level = level; + cmd.u.params.mode = mode; + cmd.u.params.ch = channel; + cmd.u.params.cl = cl; + cmd.u.params.unit = rateunit; + cmd.u.params.rate = ratemode; + cmd.u.params.min = cpu_to_be32(minrate); + cmd.u.params.max = cpu_to_be32(maxrate); + cmd.u.params.weight = cpu_to_be16(weight); + cmd.u.params.pktsize = cpu_to_be16(pktsize); + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, 1); +} Modified: head/sys/dev/cxgbe/t4_ioctl.h ============================================================================== --- head/sys/dev/cxgbe/t4_ioctl.h Tue Dec 3 18:31:27 2013 (r258878) +++ head/sys/dev/cxgbe/t4_ioctl.h Tue Dec 3 18:34:52 2013 (r258879) @@ -208,6 +208,74 @@ struct t4_filter { struct t4_filter_specification fs; }; +/* + * Support for "sched-class" command to allow a TX Scheduling Class to be + * programmed with various parameters. + */ +struct t4_sched_params { + int8_t subcmd; /* sub-command */ + int8_t type; /* packet or flow */ + union { + struct { /* sub-command SCHED_CLASS_CONFIG */ + int8_t minmax; /* minmax enable */ + } config; + struct { /* sub-command SCHED_CLASS_PARAMS */ + int8_t level; /* scheduler hierarchy level */ + int8_t mode; /* per-class or per-flow */ + int8_t rateunit; /* bit or packet rate */ + int8_t ratemode; /* %port relative or kbps + absolute */ + int8_t channel; /* scheduler channel [0..N] */ + int8_t cl; /* scheduler class [0..N] */ + int32_t minrate; /* minimum rate */ + int32_t maxrate; /* maximum rate */ + int16_t weight; /* percent weight */ + int16_t pktsize; /* average packet size */ + } params; + uint8_t reserved[6 + 8 * 8]; + } u; +}; + +enum { + SCHED_CLASS_SUBCMD_CONFIG, /* config sub-command */ + SCHED_CLASS_SUBCMD_PARAMS, /* params sub-command */ +}; + +enum { + SCHED_CLASS_TYPE_PACKET, +}; + +enum { + SCHED_CLASS_LEVEL_CL_RL, /* class rate limiter */ + SCHED_CLASS_LEVEL_CL_WRR, /* class weighted round robin */ + SCHED_CLASS_LEVEL_CH_RL, /* channel rate limiter */ +}; + +enum { + SCHED_CLASS_MODE_CLASS, /* per-class scheduling */ + SCHED_CLASS_MODE_FLOW, /* per-flow scheduling */ +}; + +enum { + SCHED_CLASS_RATEUNIT_BITS, /* bit rate scheduling */ + SCHED_CLASS_RATEUNIT_PKTS, /* packet rate scheduling */ +}; + +enum { + SCHED_CLASS_RATEMODE_REL, /* percent of port bandwidth */ + SCHED_CLASS_RATEMODE_ABS, /* Kb/s */ +}; + +/* + * Support for "sched_queue" command to allow one or more NIC TX Queues to be + * bound to a TX Scheduling Class. + */ +struct t4_sched_queue { + uint8_t port; + int8_t queue; /* queue index; -1 => all queues */ + int8_t cl; /* class index; -1 => unbind */ +}; + #define T4_SGE_CONTEXT_SIZE 24 enum { SGE_CONTEXT_EGRESS, @@ -261,6 +329,10 @@ struct t4_tracer { #define CHELSIO_T4_GET_MEM _IOW('f', T4_GET_MEM, struct t4_mem_range) #define CHELSIO_T4_GET_I2C _IOWR('f', T4_GET_I2C, struct t4_i2c_data) #define CHELSIO_T4_CLEAR_STATS _IOW('f', T4_CLEAR_STATS, uint32_t) +#define CHELSIO_T4_SCHED_CLASS _IOW('f', T4_SET_SCHED_CLASS, \ + struct t4_sched_params) +#define CHELSIO_T4_SCHED_QUEUE _IOW('f', T4_SET_SCHED_QUEUE, \ + struct t4_sched_queue) #define CHELSIO_T4_GET_TRACER _IOWR('f', T4_GET_TRACER, struct t4_tracer) #define CHELSIO_T4_SET_TRACER _IOW('f', T4_SET_TRACER, struct t4_tracer) #endif Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Dec 3 18:31:27 2013 (r258878) +++ head/sys/dev/cxgbe/t4_main.c Tue Dec 3 18:34:52 2013 (r258879) @@ -425,6 +425,8 @@ static int get_sge_context(struct adapte static int load_fw(struct adapter *, struct t4_data *); static int read_card_mem(struct adapter *, int, struct t4_mem_range *); static int read_i2c(struct adapter *, struct t4_i2c_data *); +static int set_sched_class(struct adapter *, struct t4_sched_params *); +static int set_sched_queue(struct adapter *, struct t4_sched_queue *); #ifdef TCP_OFFLOAD static int toe_capability(struct port_info *, int); #endif @@ -7295,6 +7297,228 @@ read_i2c(struct adapter *sc, struct t4_i return (rc); } +static int +in_range(int val, int lo, int hi) +{ + + return (val < 0 || (val <= hi && val >= lo)); +} + +static int +set_sched_class(struct adapter *sc, struct t4_sched_params *p) +{ + int fw_subcmd, fw_type, rc; + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4setsc"); + if (rc) + return (rc); + + if (!(sc->flags & FULL_INIT_DONE)) { + rc = EAGAIN; + goto done; + } + + /* + * Translate the cxgbetool parameters into T4 firmware parameters. (The + * sub-command and type are in common locations.) + */ + if (p->subcmd == SCHED_CLASS_SUBCMD_CONFIG) + fw_subcmd = FW_SCHED_SC_CONFIG; + else if (p->subcmd == SCHED_CLASS_SUBCMD_PARAMS) + fw_subcmd = FW_SCHED_SC_PARAMS; + else { + rc = EINVAL; + goto done; + } + if (p->type == SCHED_CLASS_TYPE_PACKET) + fw_type = FW_SCHED_TYPE_PKTSCHED; + else { + rc = EINVAL; + goto done; + } + + if (fw_subcmd == FW_SCHED_SC_CONFIG) { + /* Vet our parameters ..*/ + if (p->u.config.minmax < 0) { + rc = EINVAL; + goto done; + } + + /* And pass the request to the firmware ...*/ + rc = -t4_sched_config(sc, fw_type, p->u.config.minmax); + goto done; + } + + if (fw_subcmd == FW_SCHED_SC_PARAMS) { + int fw_level; + int fw_mode; + int fw_rateunit; + int fw_ratemode; + + if (p->u.params.level == SCHED_CLASS_LEVEL_CL_RL) + fw_level = FW_SCHED_PARAMS_LEVEL_CL_RL; + else if (p->u.params.level == SCHED_CLASS_LEVEL_CL_WRR) + fw_level = FW_SCHED_PARAMS_LEVEL_CL_WRR; + else if (p->u.params.level == SCHED_CLASS_LEVEL_CH_RL) + fw_level = FW_SCHED_PARAMS_LEVEL_CH_RL; + else { + rc = EINVAL; + goto done; + } + + if (p->u.params.mode == SCHED_CLASS_MODE_CLASS) + fw_mode = FW_SCHED_PARAMS_MODE_CLASS; + else if (p->u.params.mode == SCHED_CLASS_MODE_FLOW) + fw_mode = FW_SCHED_PARAMS_MODE_FLOW; + else { + rc = EINVAL; + goto done; + } + + if (p->u.params.rateunit == SCHED_CLASS_RATEUNIT_BITS) + fw_rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; + else if (p->u.params.rateunit == SCHED_CLASS_RATEUNIT_PKTS) + fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE; + else { + rc = EINVAL; + goto done; + } + + if (p->u.params.ratemode == SCHED_CLASS_RATEMODE_REL) + fw_ratemode = FW_SCHED_PARAMS_RATE_REL; + else if (p->u.params.ratemode == SCHED_CLASS_RATEMODE_ABS) + fw_ratemode = FW_SCHED_PARAMS_RATE_ABS; + else { + rc = EINVAL; + goto done; + } + + /* Vet our parameters ... */ + if (!in_range(p->u.params.channel, 0, 3) || + !in_range(p->u.params.cl, 0, is_t4(sc) ? 15 : 16) || + !in_range(p->u.params.minrate, 0, 10000000) || + !in_range(p->u.params.maxrate, 0, 10000000) || + !in_range(p->u.params.weight, 0, 100)) { + rc = ERANGE; + goto done; + } + + /* + * Translate any unset parameters into the firmware's + * nomenclature and/or fail the call if the parameters + * are required ... + */ + if (p->u.params.rateunit < 0 || p->u.params.ratemode < 0 || + p->u.params.channel < 0 || p->u.params.cl < 0) { + rc = EINVAL; + goto done; + } + if (p->u.params.minrate < 0) + p->u.params.minrate = 0; + if (p->u.params.maxrate < 0) { + if (p->u.params.level == SCHED_CLASS_LEVEL_CL_RL || + p->u.params.level == SCHED_CLASS_LEVEL_CH_RL) { + rc = EINVAL; + goto done; + } else + p->u.params.maxrate = 0; + } + if (p->u.params.weight < 0) { + if (p->u.params.level == SCHED_CLASS_LEVEL_CL_WRR) { + rc = EINVAL; + goto done; + } else + p->u.params.weight = 0; + } + if (p->u.params.pktsize < 0) { + if (p->u.params.level == SCHED_CLASS_LEVEL_CL_RL || + p->u.params.level == SCHED_CLASS_LEVEL_CH_RL) { + rc = EINVAL; + goto done; + } else + p->u.params.pktsize = 0; + } + + /* See what the firmware thinks of the request ... */ + rc = -t4_sched_params(sc, fw_type, fw_level, fw_mode, + fw_rateunit, fw_ratemode, p->u.params.channel, + p->u.params.cl, p->u.params.minrate, p->u.params.maxrate, + p->u.params.weight, p->u.params.pktsize); + goto done; + } + + rc = EINVAL; +done: + end_synchronized_op(sc, 0); + return (rc); +} + +static int +set_sched_queue(struct adapter *sc, struct t4_sched_queue *p) +{ + struct port_info *pi = NULL; + struct sge_txq *txq; + uint32_t fw_mnem, fw_queue, fw_class; + int i, rc; + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4setsq"); + if (rc) + return (rc); + + if (!(sc->flags & FULL_INIT_DONE)) { + rc = EAGAIN; + goto done; + } + + if (p->port >= sc->params.nports) { + rc = EINVAL; + goto done; + } + + pi = sc->port[p->port]; + if (!in_range(p->queue, 0, pi->ntxq - 1) || !in_range(p->cl, 0, 7)) { + rc = EINVAL; + goto done; + } + + /* + * Create a template for the FW_PARAMS_CMD mnemonic and value (TX + * Scheduling Class in this case). + */ + fw_mnem = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH)); + fw_class = p->cl < 0 ? 0xffffffff : p->cl; + + /* + * If op.queue is non-negative, then we're only changing the scheduling + * on a single specified TX queue. + */ + if (p->queue >= 0) { + txq = &sc->sge.txq[pi->first_txq + p->queue]; + fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, + &fw_class); + goto done; + } + + /* + * Change the scheduling on all the TX queues for the + * interface. + */ + for_each_txq(pi, i, txq) { + fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, + &fw_class); + if (rc) + goto done; + } + + rc = 0; +done: + end_synchronized_op(sc, 0); + return (rc); +} + int t4_os_find_pci_capability(struct adapter *sc, int cap) { @@ -7538,6 +7762,12 @@ t4_ioctl(struct cdev *dev, unsigned long } break; } + case CHELSIO_T4_SCHED_CLASS: + rc = set_sched_class(sc, (struct t4_sched_params *)data); + break; + case CHELSIO_T4_SCHED_QUEUE: + rc = set_sched_queue(sc, (struct t4_sched_queue *)data); + break; case CHELSIO_T4_GET_TRACER: rc = t4_get_tracer(sc, (struct t4_tracer *)data); break; From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 18:35:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28A95DC0; Tue, 3 Dec 2013 18:35:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 15A16184B; Tue, 3 Dec 2013 18:35: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 rB3IZHZ3037310; Tue, 3 Dec 2013 18:35:17 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3IZH1Z037309; Tue, 3 Dec 2013 18:35:17 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312031835.rB3IZH1Z037309@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 3 Dec 2013 18:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258880 - stable/10/lib/libc/posix1e X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:35:18 -0000 Author: trasz Date: Tue Dec 3 18:35:17 2013 New Revision: 258880 URL: http://svnweb.freebsd.org/changeset/base/258880 Log: MFC r258043: Fix typo. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/posix1e/acl.3 Directory Properties: stable/10/lib/libc/ (props changed) Modified: stable/10/lib/libc/posix1e/acl.3 ============================================================================== --- stable/10/lib/libc/posix1e/acl.3 Tue Dec 3 18:34:52 2013 (r258879) +++ stable/10/lib/libc/posix1e/acl.3 Tue Dec 3 18:35:17 2013 (r258880) @@ -206,7 +206,7 @@ This function is described in .Xr acl_set_tag_type 3 , and may be used to set the tag type of an ACL. .It Fn acl_strip_np -This function is describe din +This function is described in .Xr acl-strip_np 3 , and may be used to remove extended entries from an ACL. .It Xo From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 18:52:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6391235B; Tue, 3 Dec 2013 18:52:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3181940; Tue, 3 Dec 2013 18:52: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 rB3Iq4ar043597; Tue, 3 Dec 2013 18:52:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3Iq065043552; Tue, 3 Dec 2013 18:52:00 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201312031852.rB3Iq065043552@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Dec 2013 18:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r258882 - in vendor/lldb/dist: include/lldb include/lldb/API include/lldb/Breakpoint include/lldb/Core include/lldb/DataFormatters include/lldb/Expression include/lldb/Host include/lldb... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:52:04 -0000 Author: emaste Date: Tue Dec 3 18:51:59 2013 New Revision: 258882 URL: http://svnweb.freebsd.org/changeset/base/258882 Log: Import lldb as of SVN r196259 (git 3be86e5) (A number of files not required for the FreeBSD build have been removed.) Sponsored by: DARPA, AFRL Added: vendor/lldb/dist/include/lldb/API/SBPlatform.h vendor/lldb/dist/include/lldb/Host/Debug.h vendor/lldb/dist/include/lldb/Target/RegisterCheckpoint.h vendor/lldb/dist/include/lldb/Utility/Iterable.h vendor/lldb/dist/source/API/SBPlatform.cpp vendor/lldb/dist/source/Plugins/Process/Utility/HistoryThread.cpp vendor/lldb/dist/source/Plugins/Process/Utility/HistoryThread.h vendor/lldb/dist/source/Plugins/Process/Utility/HistoryUnwind.cpp vendor/lldb/dist/source/Plugins/Process/Utility/HistoryUnwind.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextHistory.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextHistory.h Modified: vendor/lldb/dist/include/lldb/API/SBDebugger.h vendor/lldb/dist/include/lldb/API/SBError.h vendor/lldb/dist/include/lldb/API/SBExpressionOptions.h vendor/lldb/dist/include/lldb/API/SBFileSpec.h vendor/lldb/dist/include/lldb/API/SBModule.h vendor/lldb/dist/include/lldb/API/SBTarget.h vendor/lldb/dist/include/lldb/API/SBThread.h vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointList.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocationList.h vendor/lldb/dist/include/lldb/Core/Address.h vendor/lldb/dist/include/lldb/Core/Debugger.h vendor/lldb/dist/include/lldb/Core/Module.h vendor/lldb/dist/include/lldb/DataFormatters/CXXFormatterFunctions.h vendor/lldb/dist/include/lldb/DataFormatters/FormatCache.h vendor/lldb/dist/include/lldb/DataFormatters/FormatClasses.h vendor/lldb/dist/include/lldb/DataFormatters/FormatManager.h vendor/lldb/dist/include/lldb/DataFormatters/FormatNavigator.h vendor/lldb/dist/include/lldb/DataFormatters/TypeCategory.h vendor/lldb/dist/include/lldb/Expression/ClangFunction.h vendor/lldb/dist/include/lldb/Expression/ClangUserExpression.h vendor/lldb/dist/include/lldb/Host/File.h vendor/lldb/dist/include/lldb/Host/FileSpec.h vendor/lldb/dist/include/lldb/Host/Host.h vendor/lldb/dist/include/lldb/Host/OptionParser.h vendor/lldb/dist/include/lldb/Interpreter/PythonDataObjects.h vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreterPython.h vendor/lldb/dist/include/lldb/Symbol/TypeList.h vendor/lldb/dist/include/lldb/Target/ABI.h vendor/lldb/dist/include/lldb/Target/LanguageRuntime.h vendor/lldb/dist/include/lldb/Target/Platform.h vendor/lldb/dist/include/lldb/Target/Process.h vendor/lldb/dist/include/lldb/Target/RegisterContext.h vendor/lldb/dist/include/lldb/Target/SystemRuntime.h vendor/lldb/dist/include/lldb/Target/Target.h vendor/lldb/dist/include/lldb/Target/Thread.h vendor/lldb/dist/include/lldb/Target/ThreadList.h vendor/lldb/dist/include/lldb/Target/ThreadPlanCallFunction.h vendor/lldb/dist/include/lldb/Target/ThreadPlanCallUserExpression.h vendor/lldb/dist/include/lldb/Utility/PythonPointer.h vendor/lldb/dist/include/lldb/lldb-enumerations.h vendor/lldb/dist/include/lldb/lldb-forward.h vendor/lldb/dist/include/lldb/lldb-private-enumerations.h vendor/lldb/dist/include/lldb/lldb-python.h vendor/lldb/dist/source/API/SBDebugger.cpp vendor/lldb/dist/source/API/SBExpressionOptions.cpp vendor/lldb/dist/source/API/SBFileSpec.cpp vendor/lldb/dist/source/API/SBModule.cpp vendor/lldb/dist/source/API/SBProcess.cpp vendor/lldb/dist/source/API/SBStream.cpp vendor/lldb/dist/source/API/SBTarget.cpp vendor/lldb/dist/source/API/SBThread.cpp vendor/lldb/dist/source/Breakpoint/Breakpoint.cpp vendor/lldb/dist/source/Breakpoint/BreakpointList.cpp vendor/lldb/dist/source/Breakpoint/BreakpointLocation.cpp vendor/lldb/dist/source/Breakpoint/BreakpointLocationList.cpp vendor/lldb/dist/source/Commands/CommandObjectExpression.cpp vendor/lldb/dist/source/Commands/CommandObjectMemory.cpp vendor/lldb/dist/source/Commands/CommandObjectPlatform.cpp vendor/lldb/dist/source/Commands/CommandObjectPlugin.cpp vendor/lldb/dist/source/Commands/CommandObjectProcess.cpp vendor/lldb/dist/source/Commands/CommandObjectTarget.cpp vendor/lldb/dist/source/Commands/CommandObjectThread.cpp vendor/lldb/dist/source/Commands/CommandObjectWatchpoint.cpp vendor/lldb/dist/source/Core/Address.cpp vendor/lldb/dist/source/Core/ConnectionFileDescriptor.cpp vendor/lldb/dist/source/Core/Debugger.cpp vendor/lldb/dist/source/Core/Mangled.cpp vendor/lldb/dist/source/Core/Module.cpp vendor/lldb/dist/source/Core/StreamFile.cpp vendor/lldb/dist/source/Core/ValueObjectSyntheticFilter.cpp vendor/lldb/dist/source/DataFormatters/CXXFormatterFunctions.cpp vendor/lldb/dist/source/DataFormatters/FormatClasses.cpp vendor/lldb/dist/source/DataFormatters/FormatManager.cpp vendor/lldb/dist/source/DataFormatters/LibCxx.cpp vendor/lldb/dist/source/DataFormatters/LibStdcpp.cpp vendor/lldb/dist/source/DataFormatters/NSDictionary.cpp vendor/lldb/dist/source/DataFormatters/NSSet.cpp vendor/lldb/dist/source/DataFormatters/TypeCategory.cpp vendor/lldb/dist/source/DataFormatters/TypeCategoryMap.cpp vendor/lldb/dist/source/Expression/ClangFunction.cpp vendor/lldb/dist/source/Expression/ClangUserExpression.cpp vendor/lldb/dist/source/Expression/Materializer.cpp vendor/lldb/dist/source/Host/common/File.cpp vendor/lldb/dist/source/Host/common/FileSpec.cpp vendor/lldb/dist/source/Host/common/Host.cpp vendor/lldb/dist/source/Host/common/OptionParser.cpp vendor/lldb/dist/source/Host/common/Symbols.cpp vendor/lldb/dist/source/Interpreter/Args.cpp vendor/lldb/dist/source/Interpreter/CommandInterpreter.cpp vendor/lldb/dist/source/Interpreter/PythonDataObjects.cpp vendor/lldb/dist/source/Interpreter/ScriptInterpreterPython.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h vendor/lldb/dist/source/Plugins/Instruction/ARM/EmulateInstructionARM.h vendor/lldb/dist/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp vendor/lldb/dist/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.h vendor/lldb/dist/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp vendor/lldb/dist/source/Plugins/Platform/POSIX/PlatformPOSIX.h vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.h vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h vendor/lldb/dist/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp vendor/lldb/dist/source/Symbol/UnwindPlan.cpp vendor/lldb/dist/source/Target/Platform.cpp vendor/lldb/dist/source/Target/Process.cpp vendor/lldb/dist/source/Target/RegisterContext.cpp vendor/lldb/dist/source/Target/StackFrameList.cpp vendor/lldb/dist/source/Target/SystemRuntime.cpp vendor/lldb/dist/source/Target/Target.cpp vendor/lldb/dist/source/Target/Thread.cpp vendor/lldb/dist/source/Target/ThreadPlanCallFunction.cpp vendor/lldb/dist/source/Target/ThreadPlanCallUserExpression.cpp vendor/lldb/dist/source/Target/ThreadPlanStepInRange.cpp vendor/lldb/dist/source/Utility/StringExtractor.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.h vendor/lldb/dist/source/lldb.cpp vendor/lldb/dist/tools/lldb-platform/lldb-platform.cpp Modified: vendor/lldb/dist/include/lldb/API/SBDebugger.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBDebugger.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/API/SBDebugger.h Tue Dec 3 18:51:59 2013 (r258882) @@ -10,9 +10,11 @@ #ifndef LLDB_SBDebugger_h_ #define LLDB_SBDebugger_h_ -#include "lldb/API/SBDefines.h" #include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBPlatform.h" + namespace lldb { class SBDebugger @@ -153,6 +155,12 @@ public: void SetSelectedTarget (SBTarget& target); + lldb::SBPlatform + GetSelectedPlatform(); + + void + SetSelectedPlatform(lldb::SBPlatform &platform); + lldb::SBSourceManager GetSourceManager (); Modified: vendor/lldb/dist/include/lldb/API/SBError.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBError.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/API/SBError.h Tue Dec 3 18:51:59 2013 (r258882) @@ -72,6 +72,7 @@ protected: friend class SBCommunication; friend class SBHostOS; friend class SBInputReader; + friend class SBPlatform; friend class SBProcess; friend class SBThread; friend class SBTarget; Modified: vendor/lldb/dist/include/lldb/API/SBExpressionOptions.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBExpressionOptions.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/API/SBExpressionOptions.h Tue Dec 3 18:51:59 2013 (r258882) @@ -65,6 +65,12 @@ public: void SetTryAllThreads (bool run_others = true); + bool + GetTrapExceptions () const; + + void + SetTrapExceptions (bool trap_exceptions = true); + protected: SBExpressionOptions (lldb_private::EvaluateExpressionOptions &expression_options); Modified: vendor/lldb/dist/include/lldb/API/SBFileSpec.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBFileSpec.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/API/SBFileSpec.h Tue Dec 3 18:51:59 2013 (r258882) @@ -45,6 +45,12 @@ public: const char * GetDirectory() const; + void + SetFilename(const char *filename); + + void + SetDirectory(const char *directory); + uint32_t GetPath (char *dst_path, size_t dst_len) const; @@ -65,6 +71,7 @@ private: friend class SBLineEntry; friend class SBModule; friend class SBModuleSpec; + friend class SBPlatform; friend class SBProcess; friend class SBSourceManager; friend class SBThread; Modified: vendor/lldb/dist/include/lldb/API/SBModule.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBModule.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/API/SBModule.h Tue Dec 3 18:51:59 2013 (r258882) @@ -76,6 +76,42 @@ public: bool SetPlatformFileSpec (const lldb::SBFileSpec &platform_file); + //------------------------------------------------------------------ + /// Get accessor for the remote install path for a module. + /// + /// When debugging to a remote platform by connecting to a remote + /// platform, the install path of the module can be set. If the + /// install path is set, every time the process is about to launch + /// the target will install this module on the remote platform prior + /// to launching. + /// + /// @return + /// A file specification object. + //------------------------------------------------------------------ + lldb::SBFileSpec + GetRemoteInstallFileSpec (); + + //------------------------------------------------------------------ + /// Set accessor for the remote install path for a module. + /// + /// When debugging to a remote platform by connecting to a remote + /// platform, the install path of the module can be set. If the + /// install path is set, every time the process is about to launch + /// the target will install this module on the remote platform prior + /// to launching. + /// + /// If \a file specifies a full path to an install location, the + /// module will be installed to this path. If the path is relative + /// (no directory specified, or the path is partial like "usr/lib" + /// or "./usr/lib", then the install path will be resolved using + /// the platform's current working directory as the base path. + /// + /// @param[in] + /// A file specification object. + //------------------------------------------------------------------ + bool + SetRemoteInstallFileSpec (lldb::SBFileSpec &file); + lldb::ByteOrder GetByteOrder (); Added: vendor/lldb/dist/include/lldb/API/SBPlatform.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/SBPlatform.h Tue Dec 3 18:51:59 2013 (r258882) @@ -0,0 +1,198 @@ +//===-- SBPlatform.h --------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBPlatform_h_ +#define LLDB_SBPlatform_h_ + +#include "lldb/API/SBDefines.h" + +struct PlatformConnectOptions; +struct PlatformShellCommand; + +namespace lldb { + + class SBPlatformConnectOptions + { + public: + SBPlatformConnectOptions (const char *url); + + SBPlatformConnectOptions (const SBPlatformConnectOptions &rhs); + + ~SBPlatformConnectOptions (); + + void + operator=(const SBPlatformConnectOptions &rhs); + + const char * + GetURL(); + + void + SetURL(const char *url); + + bool + GetRsyncEnabled(); + + void + EnableRsync (const char *options, + const char *remote_path_prefix, + bool omit_remote_hostname); + + void + DisableRsync (); + + const char * + GetLocalCacheDirectory(); + + void + SetLocalCacheDirectory(const char *path); + protected: + PlatformConnectOptions *m_opaque_ptr; + }; + + class SBPlatformShellCommand + { + public: + SBPlatformShellCommand (const char *shell_command); + + SBPlatformShellCommand (const SBPlatformShellCommand &rhs); + + ~SBPlatformShellCommand(); + + void + Clear(); + + const char * + GetCommand(); + + void + SetCommand(const char *shell_command); + + const char * + GetWorkingDirectory (); + + void + SetWorkingDirectory (const char *path); + + uint32_t + GetTimeoutSeconds (); + + void + SetTimeoutSeconds (uint32_t sec); + + int + GetSignal (); + + int + GetStatus (); + + const char * + GetOutput (); + + protected: + friend class SBPlatform; + + PlatformShellCommand *m_opaque_ptr; + }; + + class SBPlatform + { + public: + + SBPlatform (); + + SBPlatform (const char *platform_name); + + ~SBPlatform(); + + bool + IsValid () const; + + void + Clear (); + + const char * + GetWorkingDirectory(); + + bool + SetWorkingDirectory(const char *path); + + const char * + GetName (); + + SBError + ConnectRemote (SBPlatformConnectOptions &connect_options); + + void + DisconnectRemote (); + + bool + IsConnected(); + + //---------------------------------------------------------------------- + // The following functions will work if the platform is connected + //---------------------------------------------------------------------- + const char * + GetTriple(); + + const char * + GetHostname (); + + const char * + GetOSBuild (); + + const char * + GetOSDescription (); + + uint32_t + GetOSMajorVersion (); + + uint32_t + GetOSMinorVersion (); + + uint32_t + GetOSUpdateVersion (); + + SBError + Put (SBFileSpec &src, SBFileSpec &dst); + + SBError + Get (SBFileSpec &src, SBFileSpec &dst); + + SBError + Install (SBFileSpec& src, SBFileSpec& dst); + + SBError + Run (SBPlatformShellCommand &shell_command); + + SBError + MakeDirectory (const char *path, uint32_t file_permissions = eFilePermissionsDirectoryDefault); + + uint32_t + GetFilePermissions (const char *path); + + SBError + SetFilePermissions (const char *path, uint32_t file_permissions); + + protected: + + friend class SBDebugger; + friend class SBTarget; + + lldb::PlatformSP + GetSP () const; + + void + SetSP (const lldb::PlatformSP& platform_sp); + + lldb::PlatformSP m_opaque_sp; + }; + +} // namespace lldb + +#endif // LLDB_SBPlatform_h_ Modified: vendor/lldb/dist/include/lldb/API/SBTarget.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBTarget.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/API/SBTarget.h Tue Dec 3 18:51:59 2013 (r258882) @@ -268,6 +268,23 @@ public: GetProcess (); //------------------------------------------------------------------ + /// Install any binaries that need to be installed. + /// + /// This function does nothing when debugging on the host system. + /// When connected to remote platforms, the target's main executable + /// and any modules that have their remote install path set will be + /// installed on the remote platform. If the main executable doesn't + /// have an install location set, it will be installed in the remote + /// platform's working directory. + /// + /// @return + /// An error describing anything that went wrong during + /// installation. + //------------------------------------------------------------------ + SBError + Install(); + + //------------------------------------------------------------------ /// Launch a new process. /// /// Launch a new process by spawning a new process using the Modified: vendor/lldb/dist/include/lldb/API/SBThread.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBThread.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/API/SBThread.h Tue Dec 3 18:51:59 2013 (r258882) @@ -202,7 +202,10 @@ public: GetStatus (lldb::SBStream &status) const; SBThread - GetExtendedBacktrace (const char *type); + GetExtendedBacktraceThread (const char *type); + + uint32_t + GetExtendedBacktraceOriginatingIndexID (); protected: friend class SBBreakpoint; Modified: vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h Tue Dec 3 18:51:59 2013 (r258882) @@ -311,6 +311,24 @@ public: //------------------------------------------------------------------ lldb::BreakpointLocationSP GetLocationAtIndex (size_t index); + + //------------------------------------------------------------------ + /// Removes all invalid breakpoint locations. + /// + /// Removes all breakpoint locations with architectures that aren't + /// compatible with \a arch. Also remove any breakpoint locations + /// with whose locations have address where the section has been + /// deleted (module and object files no longer exist). + /// + /// This is typically used after the process calls exec, or anytime + /// the architecture of the target changes. + /// + /// @param[in] arch + /// If valid, check the module in each breakpoint to make sure + /// they are compatible, otherwise, ignore architecture. + //------------------------------------------------------------------ + void + RemoveInvalidLocations (const ArchSpec &arch); //------------------------------------------------------------------ // The next section deals with various breakpoint options. Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointList.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointList.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointList.h Tue Dec 3 18:51:59 2013 (r258882) @@ -132,6 +132,25 @@ public: bool Remove (lldb::break_id_t breakID, bool notify); + + //------------------------------------------------------------------ + /// Removes all invalid breakpoint locations. + /// + /// Removes all breakpoint locations in the list with architectures + /// that aren't compatible with \a arch. Also remove any breakpoint + /// locations with whose locations have address where the section + /// has been deleted (module and object files no longer exist). + /// + /// This is typically used after the process calls exec, or anytime + /// the architecture of the target changes. + /// + /// @param[in] arch + /// If valid, check the module in each breakpoint to make sure + /// they are compatible, otherwise, ignore architecture. + //------------------------------------------------------------------ + void + RemoveInvalidLocations (const ArchSpec &arch); + void SetEnabledAll (bool enabled); Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocationList.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocationList.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocationList.h Tue Dec 3 18:51:59 2013 (r258882) @@ -250,6 +250,9 @@ protected: bool RemoveLocation (const lldb::BreakpointLocationSP &bp_loc_sp); + + void + RemoveInvalidLocations (const ArchSpec &arch); typedef std::vector collection; typedef std::map addr_map; Breakpoint &m_owner; - collection m_locations; + collection m_locations; // Vector of locations, sorted by ID addr_map m_address_to_location; mutable Mutex m_mutex; lldb::break_id_t m_next_id; Modified: vendor/lldb/dist/include/lldb/Core/Address.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Address.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/Core/Address.h Tue Dec 3 18:51:59 2013 (r258882) @@ -534,6 +534,16 @@ public: bool CalculateSymbolContextLineEntry (LineEntry &line_entry) const; + //------------------------------------------------------------------ + // Returns true if the section should be valid, but isn't because + // the shared pointer to the section can't be reconstructed from + // a weak pointer that contains a valid weak reference to a section. + // Returns false if the section weak pointer has no reference to + // a section, or if the section is still valid + //------------------------------------------------------------------ + bool + SectionWasDeleted() const; + protected: //------------------------------------------------------------------ // Member variables. @@ -550,7 +560,7 @@ protected: // have a valid section. //------------------------------------------------------------------ bool - SectionWasDeleted() const; + SectionWasDeletedPrivate() const; }; Modified: vendor/lldb/dist/include/lldb/Core/Debugger.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Debugger.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/Core/Debugger.h Tue Dec 3 18:51:59 2013 (r258882) @@ -17,9 +17,6 @@ #include #include "lldb/lldb-public.h" - -#include "lldb/API/SBDefines.h" - #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Communication.h" #include "lldb/Core/InputReaderStack.h" @@ -55,6 +52,10 @@ friend class SourceManager; // For GetS public: + typedef lldb::DynamicLibrarySP (*LoadPluginCallbackType) (const lldb::DebuggerSP &debugger_sp, + const FileSpec& spec, + Error& error); + static lldb::DebuggerSP CreateInstance (lldb::LogOutputCallback log_callback = NULL, void *baton = NULL); @@ -65,7 +66,7 @@ public: FindTargetWithProcess (Process *process); static void - Initialize (); + Initialize (LoadPluginCallbackType load_plugin_callback); static void Terminate (); @@ -333,9 +334,7 @@ public: { return m_instance_name; } - - typedef bool (*LLDBCommandPluginInit) (lldb::SBDebugger& debugger); - + bool LoadPlugin (const FileSpec& spec, Error& error); @@ -377,6 +376,7 @@ protected: LogStreamMap m_log_streams; lldb::StreamSP m_log_callback_stream_sp; ConstString m_instance_name; + static LoadPluginCallbackType g_load_plugin_callback; typedef std::vector LoadedPluginsList; LoadedPluginsList m_loaded_plugins; Modified: vendor/lldb/dist/include/lldb/Core/Module.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Module.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/Core/Module.h Tue Dec 3 18:51:59 2013 (r258882) @@ -570,6 +570,18 @@ public: } const FileSpec & + GetRemoteInstallFileSpec () const + { + return m_remote_install_file; + } + + void + SetRemoteInstallFileSpec (const FileSpec &file) + { + m_remote_install_file = file; + } + + const FileSpec & GetSymbolFileFileSpec () const { return m_symfile_spec; @@ -1059,6 +1071,7 @@ protected: lldb_private::UUID m_uuid; ///< Each module is assumed to have a unique identifier to help match it up to debug symbols. FileSpec m_file; ///< The file representation on disk for this module (if there is one). FileSpec m_platform_file;///< The path to the module on the platform on which it is being debugged + FileSpec m_remote_install_file; ///< If set when debugging on remote platforms, this module will be installed at this location FileSpec m_symfile_spec; ///< If this path is valid, then this is the file that _will_ be used as the symbol file for this module ConstString m_object_name; ///< The name an object within this module that is selected, or empty of the module is represented by \a m_file. uint64_t m_object_offset; Modified: vendor/lldb/dist/include/lldb/DataFormatters/CXXFormatterFunctions.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/CXXFormatterFunctions.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/DataFormatters/CXXFormatterFunctions.h Tue Dec 3 18:51:59 2013 (r258882) @@ -17,6 +17,8 @@ #include "lldb/Core/ConstString.h" #include "lldb/DataFormatters/FormatClasses.h" +#include "lldb/DataFormatters/TypeSynthetic.h" +#include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Target.h" #include "clang/AST/ASTContext.h" Modified: vendor/lldb/dist/include/lldb/DataFormatters/FormatCache.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/FormatCache.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/DataFormatters/FormatCache.h Tue Dec 3 18:51:59 2013 (r258882) @@ -18,6 +18,7 @@ // Project includes #include "lldb/lldb-public.h" #include "lldb/Core/ConstString.h" +#include "lldb/Host/Mutex.h" #include "lldb/DataFormatters/FormatClasses.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/DataFormatters/FormatClasses.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/FormatClasses.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/DataFormatters/FormatClasses.h Tue Dec 3 18:51:59 2013 (r258882) @@ -10,9 +10,6 @@ #ifndef lldb_FormatClasses_h_ #define lldb_FormatClasses_h_ -// C Includes -#include - // C++ Includes #include #include @@ -23,17 +20,86 @@ #include "lldb/lldb-public.h" #include "lldb/lldb-enumerations.h" -#include "lldb/Core/ValueObject.h" -#include "lldb/Interpreter/ScriptInterpreterPython.h" #include "lldb/Symbol/ClangASTType.h" #include "lldb/Symbol/Type.h" -#include "lldb/DataFormatters/TypeFormat.h" -#include "lldb/DataFormatters/TypeSummary.h" -#include "lldb/DataFormatters/TypeSynthetic.h" - namespace lldb_private { +class FormattersMatchCandidate +{ +public: + + FormattersMatchCandidate (ConstString name, + uint32_t reason, + bool strip_ptr, + bool strip_ref, + bool strip_tydef) : + m_type_name(name), + m_reason(reason), + m_stripped_pointer(strip_ptr), + m_stripped_reference(strip_ref), + m_stripped_typedef(strip_tydef) + { + } + + ~FormattersMatchCandidate () + {} + + ConstString + GetTypeName () const + { + return m_type_name; + } + + uint32_t + GetReason () const + { + return m_reason; + } + + bool + DidStripPointer () const + { + return m_stripped_pointer; + } + + bool + DidStripReference () const + { + return m_stripped_reference; + } + + bool + DidStripTypedef () const + { + return m_stripped_typedef; + } + + template + bool + IsMatch (const std::shared_ptr& formatter_sp) const + { + if (!formatter_sp) + return false; + if (formatter_sp->Cascades() == false && DidStripTypedef()) + return false; + if (formatter_sp->SkipsPointers() && DidStripPointer()) + return false; + if (formatter_sp->SkipsReferences() && DidStripReference()) + return false; + return true; + } + +private: + ConstString m_type_name; + uint32_t m_reason; + bool m_stripped_pointer; + bool m_stripped_reference; + bool m_stripped_typedef; +}; + +typedef std::vector FormattersMatchVector; + class TypeNameSpecifierImpl { public: Modified: vendor/lldb/dist/include/lldb/DataFormatters/FormatManager.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/FormatManager.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/DataFormatters/FormatManager.h Tue Dec 3 18:51:59 2013 (r258882) @@ -19,6 +19,7 @@ #include "lldb/lldb-enumerations.h" #include "lldb/DataFormatters/FormatCache.h" +#include "lldb/DataFormatters/FormatClasses.h" #include "lldb/DataFormatters/FormatNavigator.h" #include "lldb/DataFormatters/TypeCategory.h" #include "lldb/DataFormatters/TypeCategoryMap.h" @@ -213,7 +214,36 @@ public: { } + static FormattersMatchVector + GetPossibleMatches (ValueObject& valobj, + lldb::DynamicValueType use_dynamic) + { + FormattersMatchVector matches; + GetPossibleMatches (valobj, + valobj.GetClangType(), + lldb_private::eFormatterChoiceCriterionDirectChoice, + use_dynamic, + matches, + false, + false, + false, + true); + return matches; + } + private: + + static void + GetPossibleMatches (ValueObject& valobj, + ClangASTType clang_type, + uint32_t reason, + lldb::DynamicValueType use_dynamic, + FormattersMatchVector& entries, + bool did_strip_ptr, + bool did_strip_ref, + bool did_strip_typedef, + bool root_level = false); + FormatCache m_format_cache; NamedSummariesMap m_named_summaries_map; std::atomic m_last_revision; Modified: vendor/lldb/dist/include/lldb/DataFormatters/FormatNavigator.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/FormatNavigator.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/DataFormatters/FormatNavigator.h Tue Dec 3 18:51:59 2013 (r258882) @@ -26,6 +26,9 @@ #include "lldb/Core/ValueObject.h" #include "lldb/DataFormatters/FormatClasses.h" +#include "lldb/DataFormatters/TypeFormat.h" +#include "lldb/DataFormatters/TypeSummary.h" +#include "lldb/DataFormatters/TypeSynthetic.h" #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/ClangASTType.h" @@ -459,228 +462,29 @@ protected: } return false; } - - bool - Get_BitfieldMatch (ValueObject& valobj, - ConstString typeName, - MapValueType& entry, - uint32_t& reason) - { - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); - // for bitfields, append size to the typename so one can custom format them - StreamString sstring; - sstring.Printf("%s:%d",typeName.AsCString(),valobj.GetBitfieldBitSize()); - ConstString bitfieldname = ConstString(sstring.GetData()); - if (log) - log->Printf("[Get_BitfieldMatch] appended bitfield info, final result is %s", bitfieldname.GetCString()); - if (Get(bitfieldname, entry)) - { - if (log) - log->Printf("[Get_BitfieldMatch] bitfield direct match found, returning"); - return true; - } - else - { - reason |= lldb_private::eFormatterChoiceCriterionStrippedBitField; - if (log) - log->Printf("[Get_BitfieldMatch] no bitfield direct match"); - return false; - } - } - - bool Get_ObjC (ValueObject& valobj, - MapValueType& entry) - { - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); - lldb::ProcessSP process_sp = valobj.GetProcessSP(); - ObjCLanguageRuntime* runtime = process_sp->GetObjCLanguageRuntime(); - if (runtime == NULL) - { - if (log) - log->Printf("[Get_ObjC] no valid ObjC runtime, skipping dynamic"); - return false; - } - ObjCLanguageRuntime::ClassDescriptorSP objc_class_sp (runtime->GetClassDescriptor(valobj)); - if (!objc_class_sp) - { - if (log) - log->Printf("[Get_ObjC] invalid ISA, skipping dynamic"); - return false; - } - ConstString name (objc_class_sp->GetClassName()); - if (log) - log->Printf("[Get_ObjC] dynamic type inferred is %s - looking for direct dynamic match", name.GetCString()); - if (Get(name, entry)) - { - if (log) - log->Printf("[Get_ObjC] direct dynamic match found, returning"); - return true; - } - if (log) - log->Printf("[Get_ObjC] no dynamic match"); - return false; - } - + bool - Get_Impl (ValueObject& valobj, - ClangASTType clang_type, - MapValueType& entry, - lldb::DynamicValueType use_dynamic, - uint32_t& reason) + Get (const FormattersMatchVector& candidates, + MapValueType& entry, + uint32_t *reason) { - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); - - if (!clang_type.IsValid()) - { - if (log) - log->Printf("[Get_Impl] type is invalid, returning"); - return false; - } - - clang_type = clang_type.RemoveFastQualifiers(); - - ConstString typeName(clang_type.GetConstTypeName()); - - if (valobj.GetBitfieldBitSize() > 0) + for (const FormattersMatchCandidate& candidate : candidates) { - if (Get_BitfieldMatch(valobj, typeName, entry, reason)) - return true; - } - - if (log) - log->Printf("[Get_Impl] trying to get %s for VO name %s of type %s", - m_name.c_str(), - valobj.GetName().AsCString(), - typeName.AsCString()); - - if (Get(typeName, entry)) - { - if (log) - log->Printf("[Get] direct match found, returning"); - return true; - } - if (log) - log->Printf("[Get_Impl] no direct match"); - - // strip pointers and references and see if that helps - if (clang_type.IsReferenceType()) - { - if (log) - log->Printf("[Get_Impl] stripping reference"); - if (Get_Impl(valobj, clang_type.GetNonReferenceType(), entry, use_dynamic, reason) && !entry->SkipsReferences()) + if (Get(candidate.GetTypeName(),entry)) { - reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference; - return true; - } - } - else if (clang_type.IsPointerType()) - { - if (log) - log->Printf("[Get_Impl] stripping pointer"); - if (Get_Impl(valobj, clang_type.GetPointeeType(), entry, use_dynamic, reason) && !entry->SkipsPointers()) - { - reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference; - return true; - } - } - - bool canBeObjCDynamic = valobj.GetClangType().IsPossibleDynamicType (NULL, - false, // no C++ - true); // yes ObjC - - if (canBeObjCDynamic) - { - if (use_dynamic != lldb::eNoDynamicValues) - { - if (log) - log->Printf("[Get_Impl] allowed to figure out dynamic ObjC type"); - if (Get_ObjC(valobj,entry)) + if (candidate.IsMatch(entry) == false) { - reason |= lldb_private::eFormatterChoiceCriterionDynamicObjCDiscovery; - return true; + entry.reset(); + continue; } - } - if (log) - log->Printf("[Get_Impl] dynamic disabled or failed - stripping ObjC pointer"); - if (Get_Impl(valobj, clang_type.GetPointeeType(), entry, use_dynamic, reason) && !entry->SkipsPointers()) - { - reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference; - return true; - } - } - - // try to strip typedef chains - if (clang_type.IsTypedefType()) - { - if (log) - log->Printf("[Get_Impl] stripping typedef"); - if ((Get_Impl(valobj, clang_type.GetTypedefedType(), entry, use_dynamic, reason)) && entry->Cascades()) - { - reason |= lldb_private::eFormatterChoiceCriterionNavigatedTypedefs; - return true; - } - } - - // out of luck here - return false; - } - - // we are separately passing in valobj and type because the valobj is fixed (and is used for ObjC discovery and bitfield size) - // but the type can change (e.g. stripping pointers, ...) - bool Get (ValueObject& valobj, - ClangASTType clang_type, - MapValueType& entry, - lldb::DynamicValueType use_dynamic, - uint32_t& reason) - { - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); - - if (Get_Impl (valobj, clang_type, entry, use_dynamic, reason)) - return true; - - // try going to the unqualified type - do { - if (log) - log->Printf("[Get] trying the unqualified type"); - if (!clang_type.IsValid()) - break; - - ClangASTType unqual_clang_ast_type = clang_type.GetFullyUnqualifiedType(); - if (!unqual_clang_ast_type.IsValid()) - { - if (log) - log->Printf("[Get] could not get the unqual_clang_ast_type"); - break; - } - if (unqual_clang_ast_type.GetOpaqueQualType() != clang_type.GetOpaqueQualType()) - { - if (log) - log->Printf("[Get] unqualified type is there and is not the same, let's try"); - if (Get_Impl (valobj, unqual_clang_ast_type,entry, use_dynamic, reason)) - return true; - } - else if (log) - log->Printf("[Get] unqualified type same as original type"); - } while(false); - - // if all else fails, go to static type - if (valobj.IsDynamic()) - { - if (log) - log->Printf("[Get] going to static value"); - lldb::ValueObjectSP static_value_sp(valobj.GetStaticValue()); - if (static_value_sp) - { - if (log) - log->Printf("[Get] has a static value - actually use it"); - if (Get(*static_value_sp.get(), static_value_sp->GetClangType(), entry, use_dynamic, reason)) + else { - reason |= lldb_private::eFormatterChoiceCriterionWentToStaticValue; + if(reason) + *reason = candidate.GetReason(); return true; } } } - return false; } }; Modified: vendor/lldb/dist/include/lldb/DataFormatters/TypeCategory.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/TypeCategory.h Tue Dec 3 18:50:27 2013 (r258881) +++ vendor/lldb/dist/include/lldb/DataFormatters/TypeCategory.h Tue Dec 3 18:51:59 2013 (r258882) @@ -18,6 +18,7 @@ #include "lldb/lldb-public.h" #include "lldb/lldb-enumerations.h" +#include "lldb/DataFormatters/FormatClasses.h" #include "lldb/DataFormatters/FormatNavigator.h" namespace lldb_private { @@ -177,23 +178,22 @@ namespace lldb_private { return m_enabled_position; } - bool Get (ValueObject& valobj, + const FormattersMatchVector& candidates, lldb::TypeFormatImplSP& entry, - lldb::DynamicValueType use_dynamic, uint32_t* reason = NULL); bool Get (ValueObject& valobj, + const FormattersMatchVector& candidates, lldb::TypeSummaryImplSP& entry, - lldb::DynamicValueType use_dynamic, uint32_t* reason = NULL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 18:59:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23B3B51D; Tue, 3 Dec 2013 18:59:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA4911984; Tue, 3 Dec 2013 18:59:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3IxB4u044505; Tue, 3 Dec 2013 18:59:11 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3IxBrw044504; Tue, 3 Dec 2013 18:59:11 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201312031859.rB3IxBrw044504@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Dec 2013 18:59:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r258883 - vendor/lldb/lldb-r196259 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:59:12 -0000 Author: emaste Date: Tue Dec 3 18:59:11 2013 New Revision: 258883 URL: http://svnweb.freebsd.org/changeset/base/258883 Log: Tag (stripped) lldb r196259 Sponsored by: DARPA, AFRL Added: vendor/lldb/lldb-r196259/ - copied from r258882, vendor/lldb/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 19:23:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 904BDA86; Tue, 3 Dec 2013 19:23:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 783171B27; Tue, 3 Dec 2013 19:23:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3JNxwA055414; Tue, 3 Dec 2013 19:23:59 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3JNtSn055377; Tue, 3 Dec 2013 19:23:55 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201312031923.rB3JNtSn055377@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Dec 2013 19:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258884 - in head: contrib/llvm/tools/lldb/include/lldb contrib/llvm/tools/lldb/include/lldb/API contrib/llvm/tools/lldb/include/lldb/Breakpoint contrib/llvm/tools/lldb/include/lldb/Cor... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 19:23:59 -0000 Author: emaste Date: Tue Dec 3 19:23:54 2013 New Revision: 258884 URL: http://svnweb.freebsd.org/changeset/base/258884 Log: Update LLDB to upstream r196259 snapshot Sponsored by: DARPA, AFRL Added: head/contrib/llvm/tools/lldb/include/lldb/API/SBPlatform.h - copied unchanged from r258883, vendor/lldb/dist/include/lldb/API/SBPlatform.h head/contrib/llvm/tools/lldb/include/lldb/Host/Debug.h - copied unchanged from r258883, vendor/lldb/dist/include/lldb/Host/Debug.h head/contrib/llvm/tools/lldb/include/lldb/Target/RegisterCheckpoint.h - copied unchanged from r258883, vendor/lldb/dist/include/lldb/Target/RegisterCheckpoint.h head/contrib/llvm/tools/lldb/include/lldb/Utility/Iterable.h - copied unchanged from r258883, vendor/lldb/dist/include/lldb/Utility/Iterable.h head/contrib/llvm/tools/lldb/source/API/SBPlatform.cpp - copied unchanged from r258883, vendor/lldb/dist/source/API/SBPlatform.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryThread.cpp - copied unchanged from r258883, vendor/lldb/dist/source/Plugins/Process/Utility/HistoryThread.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryThread.h - copied unchanged from r258883, vendor/lldb/dist/source/Plugins/Process/Utility/HistoryThread.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp - copied unchanged from r258883, vendor/lldb/dist/source/Plugins/Process/Utility/HistoryUnwind.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryUnwind.h - copied unchanged from r258883, vendor/lldb/dist/source/Plugins/Process/Utility/HistoryUnwind.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextHistory.cpp - copied unchanged from r258883, vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextHistory.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextHistory.h - copied unchanged from r258883, vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextHistory.h Modified: head/contrib/llvm/tools/lldb/include/lldb/API/SBDebugger.h head/contrib/llvm/tools/lldb/include/lldb/API/SBError.h head/contrib/llvm/tools/lldb/include/lldb/API/SBExpressionOptions.h head/contrib/llvm/tools/lldb/include/lldb/API/SBFileSpec.h head/contrib/llvm/tools/lldb/include/lldb/API/SBModule.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTarget.h head/contrib/llvm/tools/lldb/include/lldb/API/SBThread.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Breakpoint.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationList.h head/contrib/llvm/tools/lldb/include/lldb/Core/Address.h head/contrib/llvm/tools/lldb/include/lldb/Core/Debugger.h head/contrib/llvm/tools/lldb/include/lldb/Core/Module.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/CXXFormatterFunctions.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatCache.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatClasses.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatManager.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatNavigator.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeCategory.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangFunction.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangUserExpression.h head/contrib/llvm/tools/lldb/include/lldb/Host/File.h head/contrib/llvm/tools/lldb/include/lldb/Host/FileSpec.h head/contrib/llvm/tools/lldb/include/lldb/Host/Host.h head/contrib/llvm/tools/lldb/include/lldb/Host/OptionParser.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/PythonDataObjects.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/TypeList.h head/contrib/llvm/tools/lldb/include/lldb/Target/ABI.h head/contrib/llvm/tools/lldb/include/lldb/Target/LanguageRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/Platform.h head/contrib/llvm/tools/lldb/include/lldb/Target/Process.h head/contrib/llvm/tools/lldb/include/lldb/Target/RegisterContext.h head/contrib/llvm/tools/lldb/include/lldb/Target/SystemRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/Target.h head/contrib/llvm/tools/lldb/include/lldb/Target/Thread.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadList.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallFunction.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallUserExpression.h head/contrib/llvm/tools/lldb/include/lldb/Utility/PythonPointer.h head/contrib/llvm/tools/lldb/include/lldb/lldb-enumerations.h head/contrib/llvm/tools/lldb/include/lldb/lldb-forward.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-enumerations.h head/contrib/llvm/tools/lldb/include/lldb/lldb-python.h head/contrib/llvm/tools/lldb/source/API/SBDebugger.cpp head/contrib/llvm/tools/lldb/source/API/SBExpressionOptions.cpp head/contrib/llvm/tools/lldb/source/API/SBFileSpec.cpp head/contrib/llvm/tools/lldb/source/API/SBModule.cpp head/contrib/llvm/tools/lldb/source/API/SBProcess.cpp head/contrib/llvm/tools/lldb/source/API/SBStream.cpp head/contrib/llvm/tools/lldb/source/API/SBTarget.cpp head/contrib/llvm/tools/lldb/source/API/SBThread.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationList.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectExpression.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectMemory.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlatform.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlugin.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectTarget.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectThread.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpoint.cpp head/contrib/llvm/tools/lldb/source/Core/Address.cpp head/contrib/llvm/tools/lldb/source/Core/ConnectionFileDescriptor.cpp head/contrib/llvm/tools/lldb/source/Core/Debugger.cpp head/contrib/llvm/tools/lldb/source/Core/Mangled.cpp head/contrib/llvm/tools/lldb/source/Core/Module.cpp head/contrib/llvm/tools/lldb/source/Core/StreamFile.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectSyntheticFilter.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/CXXFormatterFunctions.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/FormatClasses.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/FormatManager.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxx.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibStdcpp.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/NSDictionary.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/NSSet.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeCategory.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeCategoryMap.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangFunction.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangUserExpression.cpp head/contrib/llvm/tools/lldb/source/Expression/Materializer.cpp head/contrib/llvm/tools/lldb/source/Host/common/File.cpp head/contrib/llvm/tools/lldb/source/Host/common/FileSpec.cpp head/contrib/llvm/tools/lldb/source/Host/common/Host.cpp head/contrib/llvm/tools/lldb/source/Host/common/OptionParser.cpp head/contrib/llvm/tools/lldb/source/Interpreter/Args.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp head/contrib/llvm/tools/lldb/source/Interpreter/PythonDataObjects.cpp head/contrib/llvm/tools/lldb/source/Interpreter/ScriptInterpreterPython.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h head/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.h head/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp head/contrib/llvm/tools/lldb/source/Symbol/UnwindPlan.cpp head/contrib/llvm/tools/lldb/source/Target/Platform.cpp head/contrib/llvm/tools/lldb/source/Target/Process.cpp head/contrib/llvm/tools/lldb/source/Target/RegisterContext.cpp head/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp head/contrib/llvm/tools/lldb/source/Target/SystemRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/Target.cpp head/contrib/llvm/tools/lldb/source/Target/Thread.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallFunction.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallUserExpression.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInRange.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractor.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractorGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractorGDBRemote.h head/contrib/llvm/tools/lldb/source/lldb.cpp head/contrib/llvm/tools/lldb/tools/lldb-platform/lldb-platform.cpp head/lib/clang/liblldbAPI/Makefile head/lib/clang/liblldbPluginProcessUtility/Makefile Directory Properties: head/contrib/llvm/tools/lldb/ (props changed) Modified: head/contrib/llvm/tools/lldb/include/lldb/API/SBDebugger.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/API/SBDebugger.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/API/SBDebugger.h Tue Dec 3 19:23:54 2013 (r258884) @@ -10,9 +10,11 @@ #ifndef LLDB_SBDebugger_h_ #define LLDB_SBDebugger_h_ -#include "lldb/API/SBDefines.h" #include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBPlatform.h" + namespace lldb { class SBDebugger @@ -153,6 +155,12 @@ public: void SetSelectedTarget (SBTarget& target); + lldb::SBPlatform + GetSelectedPlatform(); + + void + SetSelectedPlatform(lldb::SBPlatform &platform); + lldb::SBSourceManager GetSourceManager (); Modified: head/contrib/llvm/tools/lldb/include/lldb/API/SBError.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/API/SBError.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/API/SBError.h Tue Dec 3 19:23:54 2013 (r258884) @@ -72,6 +72,7 @@ protected: friend class SBCommunication; friend class SBHostOS; friend class SBInputReader; + friend class SBPlatform; friend class SBProcess; friend class SBThread; friend class SBTarget; Modified: head/contrib/llvm/tools/lldb/include/lldb/API/SBExpressionOptions.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/API/SBExpressionOptions.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/API/SBExpressionOptions.h Tue Dec 3 19:23:54 2013 (r258884) @@ -65,6 +65,12 @@ public: void SetTryAllThreads (bool run_others = true); + bool + GetTrapExceptions () const; + + void + SetTrapExceptions (bool trap_exceptions = true); + protected: SBExpressionOptions (lldb_private::EvaluateExpressionOptions &expression_options); Modified: head/contrib/llvm/tools/lldb/include/lldb/API/SBFileSpec.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/API/SBFileSpec.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/API/SBFileSpec.h Tue Dec 3 19:23:54 2013 (r258884) @@ -45,6 +45,12 @@ public: const char * GetDirectory() const; + void + SetFilename(const char *filename); + + void + SetDirectory(const char *directory); + uint32_t GetPath (char *dst_path, size_t dst_len) const; @@ -65,6 +71,7 @@ private: friend class SBLineEntry; friend class SBModule; friend class SBModuleSpec; + friend class SBPlatform; friend class SBProcess; friend class SBSourceManager; friend class SBThread; Modified: head/contrib/llvm/tools/lldb/include/lldb/API/SBModule.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/API/SBModule.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/API/SBModule.h Tue Dec 3 19:23:54 2013 (r258884) @@ -76,6 +76,42 @@ public: bool SetPlatformFileSpec (const lldb::SBFileSpec &platform_file); + //------------------------------------------------------------------ + /// Get accessor for the remote install path for a module. + /// + /// When debugging to a remote platform by connecting to a remote + /// platform, the install path of the module can be set. If the + /// install path is set, every time the process is about to launch + /// the target will install this module on the remote platform prior + /// to launching. + /// + /// @return + /// A file specification object. + //------------------------------------------------------------------ + lldb::SBFileSpec + GetRemoteInstallFileSpec (); + + //------------------------------------------------------------------ + /// Set accessor for the remote install path for a module. + /// + /// When debugging to a remote platform by connecting to a remote + /// platform, the install path of the module can be set. If the + /// install path is set, every time the process is about to launch + /// the target will install this module on the remote platform prior + /// to launching. + /// + /// If \a file specifies a full path to an install location, the + /// module will be installed to this path. If the path is relative + /// (no directory specified, or the path is partial like "usr/lib" + /// or "./usr/lib", then the install path will be resolved using + /// the platform's current working directory as the base path. + /// + /// @param[in] + /// A file specification object. + //------------------------------------------------------------------ + bool + SetRemoteInstallFileSpec (lldb::SBFileSpec &file); + lldb::ByteOrder GetByteOrder (); Copied: head/contrib/llvm/tools/lldb/include/lldb/API/SBPlatform.h (from r258883, vendor/lldb/dist/include/lldb/API/SBPlatform.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/tools/lldb/include/lldb/API/SBPlatform.h Tue Dec 3 19:23:54 2013 (r258884, copy of r258883, vendor/lldb/dist/include/lldb/API/SBPlatform.h) @@ -0,0 +1,198 @@ +//===-- SBPlatform.h --------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBPlatform_h_ +#define LLDB_SBPlatform_h_ + +#include "lldb/API/SBDefines.h" + +struct PlatformConnectOptions; +struct PlatformShellCommand; + +namespace lldb { + + class SBPlatformConnectOptions + { + public: + SBPlatformConnectOptions (const char *url); + + SBPlatformConnectOptions (const SBPlatformConnectOptions &rhs); + + ~SBPlatformConnectOptions (); + + void + operator=(const SBPlatformConnectOptions &rhs); + + const char * + GetURL(); + + void + SetURL(const char *url); + + bool + GetRsyncEnabled(); + + void + EnableRsync (const char *options, + const char *remote_path_prefix, + bool omit_remote_hostname); + + void + DisableRsync (); + + const char * + GetLocalCacheDirectory(); + + void + SetLocalCacheDirectory(const char *path); + protected: + PlatformConnectOptions *m_opaque_ptr; + }; + + class SBPlatformShellCommand + { + public: + SBPlatformShellCommand (const char *shell_command); + + SBPlatformShellCommand (const SBPlatformShellCommand &rhs); + + ~SBPlatformShellCommand(); + + void + Clear(); + + const char * + GetCommand(); + + void + SetCommand(const char *shell_command); + + const char * + GetWorkingDirectory (); + + void + SetWorkingDirectory (const char *path); + + uint32_t + GetTimeoutSeconds (); + + void + SetTimeoutSeconds (uint32_t sec); + + int + GetSignal (); + + int + GetStatus (); + + const char * + GetOutput (); + + protected: + friend class SBPlatform; + + PlatformShellCommand *m_opaque_ptr; + }; + + class SBPlatform + { + public: + + SBPlatform (); + + SBPlatform (const char *platform_name); + + ~SBPlatform(); + + bool + IsValid () const; + + void + Clear (); + + const char * + GetWorkingDirectory(); + + bool + SetWorkingDirectory(const char *path); + + const char * + GetName (); + + SBError + ConnectRemote (SBPlatformConnectOptions &connect_options); + + void + DisconnectRemote (); + + bool + IsConnected(); + + //---------------------------------------------------------------------- + // The following functions will work if the platform is connected + //---------------------------------------------------------------------- + const char * + GetTriple(); + + const char * + GetHostname (); + + const char * + GetOSBuild (); + + const char * + GetOSDescription (); + + uint32_t + GetOSMajorVersion (); + + uint32_t + GetOSMinorVersion (); + + uint32_t + GetOSUpdateVersion (); + + SBError + Put (SBFileSpec &src, SBFileSpec &dst); + + SBError + Get (SBFileSpec &src, SBFileSpec &dst); + + SBError + Install (SBFileSpec& src, SBFileSpec& dst); + + SBError + Run (SBPlatformShellCommand &shell_command); + + SBError + MakeDirectory (const char *path, uint32_t file_permissions = eFilePermissionsDirectoryDefault); + + uint32_t + GetFilePermissions (const char *path); + + SBError + SetFilePermissions (const char *path, uint32_t file_permissions); + + protected: + + friend class SBDebugger; + friend class SBTarget; + + lldb::PlatformSP + GetSP () const; + + void + SetSP (const lldb::PlatformSP& platform_sp); + + lldb::PlatformSP m_opaque_sp; + }; + +} // namespace lldb + +#endif // LLDB_SBPlatform_h_ Modified: head/contrib/llvm/tools/lldb/include/lldb/API/SBTarget.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/API/SBTarget.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/API/SBTarget.h Tue Dec 3 19:23:54 2013 (r258884) @@ -268,6 +268,23 @@ public: GetProcess (); //------------------------------------------------------------------ + /// Install any binaries that need to be installed. + /// + /// This function does nothing when debugging on the host system. + /// When connected to remote platforms, the target's main executable + /// and any modules that have their remote install path set will be + /// installed on the remote platform. If the main executable doesn't + /// have an install location set, it will be installed in the remote + /// platform's working directory. + /// + /// @return + /// An error describing anything that went wrong during + /// installation. + //------------------------------------------------------------------ + SBError + Install(); + + //------------------------------------------------------------------ /// Launch a new process. /// /// Launch a new process by spawning a new process using the Modified: head/contrib/llvm/tools/lldb/include/lldb/API/SBThread.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/API/SBThread.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/API/SBThread.h Tue Dec 3 19:23:54 2013 (r258884) @@ -202,7 +202,10 @@ public: GetStatus (lldb::SBStream &status) const; SBThread - GetExtendedBacktrace (const char *type); + GetExtendedBacktraceThread (const char *type); + + uint32_t + GetExtendedBacktraceOriginatingIndexID (); protected: friend class SBBreakpoint; Modified: head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Breakpoint.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Breakpoint.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Breakpoint.h Tue Dec 3 19:23:54 2013 (r258884) @@ -311,6 +311,24 @@ public: //------------------------------------------------------------------ lldb::BreakpointLocationSP GetLocationAtIndex (size_t index); + + //------------------------------------------------------------------ + /// Removes all invalid breakpoint locations. + /// + /// Removes all breakpoint locations with architectures that aren't + /// compatible with \a arch. Also remove any breakpoint locations + /// with whose locations have address where the section has been + /// deleted (module and object files no longer exist). + /// + /// This is typically used after the process calls exec, or anytime + /// the architecture of the target changes. + /// + /// @param[in] arch + /// If valid, check the module in each breakpoint to make sure + /// they are compatible, otherwise, ignore architecture. + //------------------------------------------------------------------ + void + RemoveInvalidLocations (const ArchSpec &arch); //------------------------------------------------------------------ // The next section deals with various breakpoint options. Modified: head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointList.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointList.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointList.h Tue Dec 3 19:23:54 2013 (r258884) @@ -132,6 +132,25 @@ public: bool Remove (lldb::break_id_t breakID, bool notify); + + //------------------------------------------------------------------ + /// Removes all invalid breakpoint locations. + /// + /// Removes all breakpoint locations in the list with architectures + /// that aren't compatible with \a arch. Also remove any breakpoint + /// locations with whose locations have address where the section + /// has been deleted (module and object files no longer exist). + /// + /// This is typically used after the process calls exec, or anytime + /// the architecture of the target changes. + /// + /// @param[in] arch + /// If valid, check the module in each breakpoint to make sure + /// they are compatible, otherwise, ignore architecture. + //------------------------------------------------------------------ + void + RemoveInvalidLocations (const ArchSpec &arch); + void SetEnabledAll (bool enabled); Modified: head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationList.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationList.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationList.h Tue Dec 3 19:23:54 2013 (r258884) @@ -250,6 +250,9 @@ protected: bool RemoveLocation (const lldb::BreakpointLocationSP &bp_loc_sp); + + void + RemoveInvalidLocations (const ArchSpec &arch); typedef std::vector collection; typedef std::map addr_map; Breakpoint &m_owner; - collection m_locations; + collection m_locations; // Vector of locations, sorted by ID addr_map m_address_to_location; mutable Mutex m_mutex; lldb::break_id_t m_next_id; Modified: head/contrib/llvm/tools/lldb/include/lldb/Core/Address.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/Core/Address.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/Core/Address.h Tue Dec 3 19:23:54 2013 (r258884) @@ -534,6 +534,16 @@ public: bool CalculateSymbolContextLineEntry (LineEntry &line_entry) const; + //------------------------------------------------------------------ + // Returns true if the section should be valid, but isn't because + // the shared pointer to the section can't be reconstructed from + // a weak pointer that contains a valid weak reference to a section. + // Returns false if the section weak pointer has no reference to + // a section, or if the section is still valid + //------------------------------------------------------------------ + bool + SectionWasDeleted() const; + protected: //------------------------------------------------------------------ // Member variables. @@ -550,7 +560,7 @@ protected: // have a valid section. //------------------------------------------------------------------ bool - SectionWasDeleted() const; + SectionWasDeletedPrivate() const; }; Modified: head/contrib/llvm/tools/lldb/include/lldb/Core/Debugger.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/Core/Debugger.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/Core/Debugger.h Tue Dec 3 19:23:54 2013 (r258884) @@ -17,9 +17,6 @@ #include #include "lldb/lldb-public.h" - -#include "lldb/API/SBDefines.h" - #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Communication.h" #include "lldb/Core/InputReaderStack.h" @@ -55,6 +52,10 @@ friend class SourceManager; // For GetS public: + typedef lldb::DynamicLibrarySP (*LoadPluginCallbackType) (const lldb::DebuggerSP &debugger_sp, + const FileSpec& spec, + Error& error); + static lldb::DebuggerSP CreateInstance (lldb::LogOutputCallback log_callback = NULL, void *baton = NULL); @@ -65,7 +66,7 @@ public: FindTargetWithProcess (Process *process); static void - Initialize (); + Initialize (LoadPluginCallbackType load_plugin_callback); static void Terminate (); @@ -333,9 +334,7 @@ public: { return m_instance_name; } - - typedef bool (*LLDBCommandPluginInit) (lldb::SBDebugger& debugger); - + bool LoadPlugin (const FileSpec& spec, Error& error); @@ -377,6 +376,7 @@ protected: LogStreamMap m_log_streams; lldb::StreamSP m_log_callback_stream_sp; ConstString m_instance_name; + static LoadPluginCallbackType g_load_plugin_callback; typedef std::vector LoadedPluginsList; LoadedPluginsList m_loaded_plugins; Modified: head/contrib/llvm/tools/lldb/include/lldb/Core/Module.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/Core/Module.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/Core/Module.h Tue Dec 3 19:23:54 2013 (r258884) @@ -570,6 +570,18 @@ public: } const FileSpec & + GetRemoteInstallFileSpec () const + { + return m_remote_install_file; + } + + void + SetRemoteInstallFileSpec (const FileSpec &file) + { + m_remote_install_file = file; + } + + const FileSpec & GetSymbolFileFileSpec () const { return m_symfile_spec; @@ -1059,6 +1071,7 @@ protected: lldb_private::UUID m_uuid; ///< Each module is assumed to have a unique identifier to help match it up to debug symbols. FileSpec m_file; ///< The file representation on disk for this module (if there is one). FileSpec m_platform_file;///< The path to the module on the platform on which it is being debugged + FileSpec m_remote_install_file; ///< If set when debugging on remote platforms, this module will be installed at this location FileSpec m_symfile_spec; ///< If this path is valid, then this is the file that _will_ be used as the symbol file for this module ConstString m_object_name; ///< The name an object within this module that is selected, or empty of the module is represented by \a m_file. uint64_t m_object_offset; Modified: head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/CXXFormatterFunctions.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/CXXFormatterFunctions.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/CXXFormatterFunctions.h Tue Dec 3 19:23:54 2013 (r258884) @@ -17,6 +17,8 @@ #include "lldb/Core/ConstString.h" #include "lldb/DataFormatters/FormatClasses.h" +#include "lldb/DataFormatters/TypeSynthetic.h" +#include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Target.h" #include "clang/AST/ASTContext.h" Modified: head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatCache.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatCache.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatCache.h Tue Dec 3 19:23:54 2013 (r258884) @@ -18,6 +18,7 @@ // Project includes #include "lldb/lldb-public.h" #include "lldb/Core/ConstString.h" +#include "lldb/Host/Mutex.h" #include "lldb/DataFormatters/FormatClasses.h" namespace lldb_private { Modified: head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatClasses.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatClasses.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatClasses.h Tue Dec 3 19:23:54 2013 (r258884) @@ -10,9 +10,6 @@ #ifndef lldb_FormatClasses_h_ #define lldb_FormatClasses_h_ -// C Includes -#include - // C++ Includes #include #include @@ -23,17 +20,86 @@ #include "lldb/lldb-public.h" #include "lldb/lldb-enumerations.h" -#include "lldb/Core/ValueObject.h" -#include "lldb/Interpreter/ScriptInterpreterPython.h" #include "lldb/Symbol/ClangASTType.h" #include "lldb/Symbol/Type.h" -#include "lldb/DataFormatters/TypeFormat.h" -#include "lldb/DataFormatters/TypeSummary.h" -#include "lldb/DataFormatters/TypeSynthetic.h" - namespace lldb_private { +class FormattersMatchCandidate +{ +public: + + FormattersMatchCandidate (ConstString name, + uint32_t reason, + bool strip_ptr, + bool strip_ref, + bool strip_tydef) : + m_type_name(name), + m_reason(reason), + m_stripped_pointer(strip_ptr), + m_stripped_reference(strip_ref), + m_stripped_typedef(strip_tydef) + { + } + + ~FormattersMatchCandidate () + {} + + ConstString + GetTypeName () const + { + return m_type_name; + } + + uint32_t + GetReason () const + { + return m_reason; + } + + bool + DidStripPointer () const + { + return m_stripped_pointer; + } + + bool + DidStripReference () const + { + return m_stripped_reference; + } + + bool + DidStripTypedef () const + { + return m_stripped_typedef; + } + + template + bool + IsMatch (const std::shared_ptr& formatter_sp) const + { + if (!formatter_sp) + return false; + if (formatter_sp->Cascades() == false && DidStripTypedef()) + return false; + if (formatter_sp->SkipsPointers() && DidStripPointer()) + return false; + if (formatter_sp->SkipsReferences() && DidStripReference()) + return false; + return true; + } + +private: + ConstString m_type_name; + uint32_t m_reason; + bool m_stripped_pointer; + bool m_stripped_reference; + bool m_stripped_typedef; +}; + +typedef std::vector FormattersMatchVector; + class TypeNameSpecifierImpl { public: Modified: head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatManager.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatManager.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatManager.h Tue Dec 3 19:23:54 2013 (r258884) @@ -19,6 +19,7 @@ #include "lldb/lldb-enumerations.h" #include "lldb/DataFormatters/FormatCache.h" +#include "lldb/DataFormatters/FormatClasses.h" #include "lldb/DataFormatters/FormatNavigator.h" #include "lldb/DataFormatters/TypeCategory.h" #include "lldb/DataFormatters/TypeCategoryMap.h" @@ -213,7 +214,36 @@ public: { } + static FormattersMatchVector + GetPossibleMatches (ValueObject& valobj, + lldb::DynamicValueType use_dynamic) + { + FormattersMatchVector matches; + GetPossibleMatches (valobj, + valobj.GetClangType(), + lldb_private::eFormatterChoiceCriterionDirectChoice, + use_dynamic, + matches, + false, + false, + false, + true); + return matches; + } + private: + + static void + GetPossibleMatches (ValueObject& valobj, + ClangASTType clang_type, + uint32_t reason, + lldb::DynamicValueType use_dynamic, + FormattersMatchVector& entries, + bool did_strip_ptr, + bool did_strip_ref, + bool did_strip_typedef, + bool root_level = false); + FormatCache m_format_cache; NamedSummariesMap m_named_summaries_map; std::atomic m_last_revision; Modified: head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatNavigator.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatNavigator.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatNavigator.h Tue Dec 3 19:23:54 2013 (r258884) @@ -26,6 +26,9 @@ #include "lldb/Core/ValueObject.h" #include "lldb/DataFormatters/FormatClasses.h" +#include "lldb/DataFormatters/TypeFormat.h" +#include "lldb/DataFormatters/TypeSummary.h" +#include "lldb/DataFormatters/TypeSynthetic.h" #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/ClangASTType.h" @@ -459,228 +462,29 @@ protected: } return false; } - - bool - Get_BitfieldMatch (ValueObject& valobj, - ConstString typeName, - MapValueType& entry, - uint32_t& reason) - { - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); - // for bitfields, append size to the typename so one can custom format them - StreamString sstring; - sstring.Printf("%s:%d",typeName.AsCString(),valobj.GetBitfieldBitSize()); - ConstString bitfieldname = ConstString(sstring.GetData()); - if (log) - log->Printf("[Get_BitfieldMatch] appended bitfield info, final result is %s", bitfieldname.GetCString()); - if (Get(bitfieldname, entry)) - { - if (log) - log->Printf("[Get_BitfieldMatch] bitfield direct match found, returning"); - return true; - } - else - { - reason |= lldb_private::eFormatterChoiceCriterionStrippedBitField; - if (log) - log->Printf("[Get_BitfieldMatch] no bitfield direct match"); - return false; - } - } - - bool Get_ObjC (ValueObject& valobj, - MapValueType& entry) - { - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); - lldb::ProcessSP process_sp = valobj.GetProcessSP(); - ObjCLanguageRuntime* runtime = process_sp->GetObjCLanguageRuntime(); - if (runtime == NULL) - { - if (log) - log->Printf("[Get_ObjC] no valid ObjC runtime, skipping dynamic"); - return false; - } - ObjCLanguageRuntime::ClassDescriptorSP objc_class_sp (runtime->GetClassDescriptor(valobj)); - if (!objc_class_sp) - { - if (log) - log->Printf("[Get_ObjC] invalid ISA, skipping dynamic"); - return false; - } - ConstString name (objc_class_sp->GetClassName()); - if (log) - log->Printf("[Get_ObjC] dynamic type inferred is %s - looking for direct dynamic match", name.GetCString()); - if (Get(name, entry)) - { - if (log) - log->Printf("[Get_ObjC] direct dynamic match found, returning"); - return true; - } - if (log) - log->Printf("[Get_ObjC] no dynamic match"); - return false; - } - + bool - Get_Impl (ValueObject& valobj, - ClangASTType clang_type, - MapValueType& entry, - lldb::DynamicValueType use_dynamic, - uint32_t& reason) + Get (const FormattersMatchVector& candidates, + MapValueType& entry, + uint32_t *reason) { - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); - - if (!clang_type.IsValid()) - { - if (log) - log->Printf("[Get_Impl] type is invalid, returning"); - return false; - } - - clang_type = clang_type.RemoveFastQualifiers(); - - ConstString typeName(clang_type.GetConstTypeName()); - - if (valobj.GetBitfieldBitSize() > 0) + for (const FormattersMatchCandidate& candidate : candidates) { - if (Get_BitfieldMatch(valobj, typeName, entry, reason)) - return true; - } - - if (log) - log->Printf("[Get_Impl] trying to get %s for VO name %s of type %s", - m_name.c_str(), - valobj.GetName().AsCString(), - typeName.AsCString()); - - if (Get(typeName, entry)) - { - if (log) - log->Printf("[Get] direct match found, returning"); - return true; - } - if (log) - log->Printf("[Get_Impl] no direct match"); - - // strip pointers and references and see if that helps - if (clang_type.IsReferenceType()) - { - if (log) - log->Printf("[Get_Impl] stripping reference"); - if (Get_Impl(valobj, clang_type.GetNonReferenceType(), entry, use_dynamic, reason) && !entry->SkipsReferences()) + if (Get(candidate.GetTypeName(),entry)) { - reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference; - return true; - } - } - else if (clang_type.IsPointerType()) - { - if (log) - log->Printf("[Get_Impl] stripping pointer"); - if (Get_Impl(valobj, clang_type.GetPointeeType(), entry, use_dynamic, reason) && !entry->SkipsPointers()) - { - reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference; - return true; - } - } - - bool canBeObjCDynamic = valobj.GetClangType().IsPossibleDynamicType (NULL, - false, // no C++ - true); // yes ObjC - - if (canBeObjCDynamic) - { - if (use_dynamic != lldb::eNoDynamicValues) - { - if (log) - log->Printf("[Get_Impl] allowed to figure out dynamic ObjC type"); - if (Get_ObjC(valobj,entry)) + if (candidate.IsMatch(entry) == false) { - reason |= lldb_private::eFormatterChoiceCriterionDynamicObjCDiscovery; - return true; + entry.reset(); + continue; } - } - if (log) - log->Printf("[Get_Impl] dynamic disabled or failed - stripping ObjC pointer"); - if (Get_Impl(valobj, clang_type.GetPointeeType(), entry, use_dynamic, reason) && !entry->SkipsPointers()) - { - reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference; - return true; - } - } - - // try to strip typedef chains - if (clang_type.IsTypedefType()) - { - if (log) - log->Printf("[Get_Impl] stripping typedef"); - if ((Get_Impl(valobj, clang_type.GetTypedefedType(), entry, use_dynamic, reason)) && entry->Cascades()) - { - reason |= lldb_private::eFormatterChoiceCriterionNavigatedTypedefs; - return true; - } - } - - // out of luck here - return false; - } - - // we are separately passing in valobj and type because the valobj is fixed (and is used for ObjC discovery and bitfield size) - // but the type can change (e.g. stripping pointers, ...) - bool Get (ValueObject& valobj, - ClangASTType clang_type, - MapValueType& entry, - lldb::DynamicValueType use_dynamic, - uint32_t& reason) - { - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); - - if (Get_Impl (valobj, clang_type, entry, use_dynamic, reason)) - return true; - - // try going to the unqualified type - do { - if (log) - log->Printf("[Get] trying the unqualified type"); - if (!clang_type.IsValid()) - break; - - ClangASTType unqual_clang_ast_type = clang_type.GetFullyUnqualifiedType(); - if (!unqual_clang_ast_type.IsValid()) - { - if (log) - log->Printf("[Get] could not get the unqual_clang_ast_type"); - break; - } - if (unqual_clang_ast_type.GetOpaqueQualType() != clang_type.GetOpaqueQualType()) - { - if (log) - log->Printf("[Get] unqualified type is there and is not the same, let's try"); - if (Get_Impl (valobj, unqual_clang_ast_type,entry, use_dynamic, reason)) - return true; - } - else if (log) - log->Printf("[Get] unqualified type same as original type"); - } while(false); - - // if all else fails, go to static type - if (valobj.IsDynamic()) - { - if (log) - log->Printf("[Get] going to static value"); - lldb::ValueObjectSP static_value_sp(valobj.GetStaticValue()); - if (static_value_sp) - { - if (log) - log->Printf("[Get] has a static value - actually use it"); - if (Get(*static_value_sp.get(), static_value_sp->GetClangType(), entry, use_dynamic, reason)) + else { - reason |= lldb_private::eFormatterChoiceCriterionWentToStaticValue; + if(reason) + *reason = candidate.GetReason(); return true; } } } - return false; } }; Modified: head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeCategory.h ============================================================================== --- head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeCategory.h Tue Dec 3 18:59:11 2013 (r258883) +++ head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeCategory.h Tue Dec 3 19:23:54 2013 (r258884) @@ -18,6 +18,7 @@ #include "lldb/lldb-public.h" #include "lldb/lldb-enumerations.h" +#include "lldb/DataFormatters/FormatClasses.h" #include "lldb/DataFormatters/FormatNavigator.h" namespace lldb_private { @@ -177,23 +178,22 @@ namespace lldb_private { return m_enabled_position; } - bool Get (ValueObject& valobj, + const FormattersMatchVector& candidates, lldb::TypeFormatImplSP& entry, - lldb::DynamicValueType use_dynamic, uint32_t* reason = NULL); bool Get (ValueObject& valobj, + const FormattersMatchVector& candidates, lldb::TypeSummaryImplSP& entry, - lldb::DynamicValueType use_dynamic, uint32_t* reason = NULL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 19:40:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 111E61B6; Tue, 3 Dec 2013 19:40:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F06451D32; Tue, 3 Dec 2013 19:40:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3JeXwW061410; Tue, 3 Dec 2013 19:40:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3JeXAL061406; Tue, 3 Dec 2013 19:40:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312031940.rB3JeXAL061406@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Dec 2013 19:40:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258885 - in stable/10/sys: compat/freebsd32 kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 19:40:34 -0000 Author: kib Date: Tue Dec 3 19:40:32 2013 New Revision: 258885 URL: http://svnweb.freebsd.org/changeset/base/258885 Log: MFC r258661: Add sysctl KERN_PROC_SIGTRAMP to retrieve signal trampoline location for the given process. Approved by: re (gjb) Modified: stable/10/sys/compat/freebsd32/freebsd32.h stable/10/sys/kern/kern_proc.c stable/10/sys/sys/sysctl.h stable/10/sys/sys/user.h Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32.h Tue Dec 3 19:23:54 2013 (r258884) +++ stable/10/sys/compat/freebsd32/freebsd32.h Tue Dec 3 19:40:32 2013 (r258885) @@ -362,6 +362,12 @@ struct kinfo_proc32 { int ki_tdflags; }; +struct kinfo_sigtramp32 { + uint32_t ksigtramp_start; + uint32_t ksigtramp_end; + uint32_t ksigtramp_spare[4]; +}; + struct kld32_file_stat_1 { int version; /* set to sizeof(struct kld_file_stat_1) */ char name[MAXPATHLEN]; Modified: stable/10/sys/kern/kern_proc.c ============================================================================== --- stable/10/sys/kern/kern_proc.c Tue Dec 3 19:23:54 2013 (r258884) +++ stable/10/sys/kern/kern_proc.c Tue Dec 3 19:40:32 2013 (r258885) @@ -2632,6 +2632,60 @@ errout: return (error); } +static int +sysctl_kern_proc_sigtramp(SYSCTL_HANDLER_ARGS) +{ + int *name = (int *)arg1; + u_int namelen = arg2; + struct proc *p; + struct kinfo_sigtramp kst; + const struct sysentvec *sv; + int error; +#ifdef COMPAT_FREEBSD32 + struct kinfo_sigtramp32 kst32; +#endif + + if (namelen != 1) + return (EINVAL); + + error = pget((pid_t)name[0], PGET_CANDEBUG, &p); + if (error != 0) + return (error); + sv = p->p_sysent; +#ifdef COMPAT_FREEBSD32 + if ((req->flags & SCTL_MASK32) != 0) { + bzero(&kst32, sizeof(kst32)); + if (SV_PROC_FLAG(p, SV_ILP32)) { + if (sv->sv_sigcode_base != 0) { + kst32.ksigtramp_start = sv->sv_sigcode_base; + kst32.ksigtramp_end = sv->sv_sigcode_base + + *sv->sv_szsigcode; + } else { + kst32.ksigtramp_start = sv->sv_psstrings - + *sv->sv_szsigcode; + kst32.ksigtramp_end = sv->sv_psstrings; + } + } + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &kst32, sizeof(kst32)); + return (error); + } +#endif + bzero(&kst, sizeof(kst)); + if (sv->sv_sigcode_base != 0) { + kst.ksigtramp_start = (char *)sv->sv_sigcode_base; + kst.ksigtramp_end = (char *)sv->sv_sigcode_base + + *sv->sv_szsigcode; + } else { + kst.ksigtramp_start = (char *)sv->sv_psstrings - + *sv->sv_szsigcode; + kst.ksigtramp_end = (char *)sv->sv_psstrings; + } + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &kst, sizeof(kst)); + return (error); +} + SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT| @@ -2740,3 +2794,7 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC static SYSCTL_NODE(_kern_proc, KERN_PROC_OSREL, osrel, CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_osrel, "Process binary osreldate"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_SIGTRAMP, sigtramp, CTLFLAG_RD | + CTLFLAG_MPSAFE, sysctl_kern_proc_sigtramp, + "Process signal trampoline location"); Modified: stable/10/sys/sys/sysctl.h ============================================================================== --- stable/10/sys/sys/sysctl.h Tue Dec 3 19:23:54 2013 (r258884) +++ stable/10/sys/sys/sysctl.h Tue Dec 3 19:40:32 2013 (r258885) @@ -530,6 +530,7 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_PROC_PS_STRINGS 38 /* get ps_strings location */ #define KERN_PROC_UMASK 39 /* process umask */ #define KERN_PROC_OSREL 40 /* osreldate for process binary */ +#define KERN_PROC_SIGTRAMP 41 /* signal trampoline location */ /* * KERN_IPC identifiers Modified: stable/10/sys/sys/user.h ============================================================================== --- stable/10/sys/sys/user.h Tue Dec 3 19:23:54 2013 (r258884) +++ stable/10/sys/sys/user.h Tue Dec 3 19:40:32 2013 (r258885) @@ -498,6 +498,12 @@ struct kinfo_kstack { int _kkst_ispare[16]; /* Space for more stuff. */ }; +struct kinfo_sigtramp { + void *ksigtramp_start; + void *ksigtramp_end; + void *ksigtramp_spare[4]; +}; + #ifdef _KERNEL /* Flags for kern_proc_out function. */ #define KERN_PROC_NOTHREADS 0x1 From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 19:41:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D62F2EB; Tue, 3 Dec 2013 19:41:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48D331D60; Tue, 3 Dec 2013 19:41:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3JfnIa063243; Tue, 3 Dec 2013 19:41:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3JfmvR063238; Tue, 3 Dec 2013 19:41:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312031941.rB3JfmvR063238@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Dec 2013 19:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258886 - stable/10/sys/amd64/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 19:41:49 -0000 Author: kib Date: Tue Dec 3 19:41:48 2013 New Revision: 258886 URL: http://svnweb.freebsd.org/changeset/base/258886 Log: MFC r258660: Fix sys/sysctl.h use for cc -m32 on amd64. Approved by: re (gjb) Modified: stable/10/sys/amd64/include/pcb.h stable/10/sys/amd64/include/segments.h Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/amd64/include/pcb.h ============================================================================== --- stable/10/sys/amd64/include/pcb.h Tue Dec 3 19:40:32 2013 (r258885) +++ stable/10/sys/amd64/include/pcb.h Tue Dec 3 19:41:48 2013 (r258886) @@ -43,6 +43,7 @@ #include #include +#ifdef __amd64__ struct pcb { register_t pcb_r15; register_t pcb_r14; @@ -105,6 +106,7 @@ struct pcb { uint64_t pcb_pad[3]; }; +#endif #ifdef _KERNEL struct trapframe; Modified: stable/10/sys/amd64/include/segments.h ============================================================================== --- stable/10/sys/amd64/include/segments.h Tue Dec 3 19:40:32 2013 (r258885) +++ stable/10/sys/amd64/include/segments.h Tue Dec 3 19:41:48 2013 (r258886) @@ -82,8 +82,8 @@ struct soft_segment_descriptor { * region descriptors, used to load gdt/idt tables before segments yet exist. */ struct region_descriptor { - unsigned long rd_limit:16; /* segment extent */ - unsigned long rd_base:64 __packed; /* base address */ + uint64_t rd_limit:16; /* segment extent */ + uint64_t rd_base:64 __packed; /* base address */ } __packed; #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 19:42:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EDA6424; Tue, 3 Dec 2013 19:42:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 60D151D6D; Tue, 3 Dec 2013 19:42:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3JglFJ063391; Tue, 3 Dec 2013 19:42:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3JglBf063390; Tue, 3 Dec 2013 19:42:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312031942.rB3JglBf063390@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Dec 2013 19:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258887 - stable/10/contrib/gdb/gdb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 19:42:47 -0000 Author: kib Date: Tue Dec 3 19:42:46 2013 New Revision: 258887 URL: http://svnweb.freebsd.org/changeset/base/258887 Log: MFC r258663: Use sysctl KERN_PROC_SIGTRAMP to retrieve the signal trampoline location for the native amd64 ABI. This fixes unwinding over the signal frame after trampoline was moved to the shared page. Approved by: re (gjb) Modified: stable/10/contrib/gdb/gdb/amd64fbsd-nat.c Directory Properties: stable/10/contrib/gdb/ (props changed) Modified: stable/10/contrib/gdb/gdb/amd64fbsd-nat.c ============================================================================== --- stable/10/contrib/gdb/gdb/amd64fbsd-nat.c Tue Dec 3 19:41:48 2013 (r258886) +++ stable/10/contrib/gdb/gdb/amd64fbsd-nat.c Tue Dec 3 19:42:46 2013 (r258887) @@ -29,6 +29,7 @@ #include #include #include +#include #include #ifdef HAVE_SYS_PROCFS_H @@ -212,24 +213,23 @@ Please report this to . SC_RBP_OFFSET = offset; - /* FreeBSD provides a kern.ps_strings sysctl that we can use to + /* FreeBSD provides a kern.proc.sigtramp sysctl that we can use to locate the sigtramp. That way we can still recognize a sigtramp - if its location is changed in a new kernel. Of course this is - still based on the assumption that the sigtramp is placed - directly under the location where the program arguments and - environment can be found. */ + if its location is changed in a new kernel. */ { - int mib[2]; - long ps_strings; + int mib[4]; + struct kinfo_sigtramp kst; size_t len; mib[0] = CTL_KERN; - mib[1] = KERN_PS_STRINGS; - len = sizeof (ps_strings); - if (sysctl (mib, 2, &ps_strings, &len, NULL, 0) == 0) + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_SIGTRAMP; + mib[3] = getpid(); + len = sizeof (kst); + if (sysctl (mib, sizeof(mib) / sizeof(mib[0]), &kst, &len, NULL, 0) == 0) { - amd64fbsd_sigtramp_start_addr = ps_strings - 32; - amd64fbsd_sigtramp_end_addr = ps_strings; + amd64fbsd_sigtramp_start_addr = kst.ksigtramp_start; + amd64fbsd_sigtramp_end_addr = kst.ksigtramp_end; } } } From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 19:55:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C93D7B8; Tue, 3 Dec 2013 19:55:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3741A1E28; Tue, 3 Dec 2013 19:55:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3JtoHj067148; Tue, 3 Dec 2013 19:55:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3Jtn8H067141; Tue, 3 Dec 2013 19:55:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312031955.rB3Jtn8H067141@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Dec 2013 19:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258888 - in stable/9/sys: compat/freebsd32 kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 19:55:50 -0000 Author: kib Date: Tue Dec 3 19:55:49 2013 New Revision: 258888 URL: http://svnweb.freebsd.org/changeset/base/258888 Log: MFC r258661: Add sysctl KERN_PROC_SIGTRAMP to retrieve signal trampoline location for the given process. Modified: stable/9/sys/compat/freebsd32/freebsd32.h stable/9/sys/kern/kern_proc.c stable/9/sys/sys/sysctl.h stable/9/sys/sys/user.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32.h Tue Dec 3 19:42:46 2013 (r258887) +++ stable/9/sys/compat/freebsd32/freebsd32.h Tue Dec 3 19:55:49 2013 (r258888) @@ -351,6 +351,12 @@ struct kinfo_proc32 { int ki_tdflags; }; +struct kinfo_sigtramp32 { + uint32_t ksigtramp_start; + uint32_t ksigtramp_end; + uint32_t ksigtramp_spare[4]; +}; + struct kld32_file_stat_1 { int version; /* set to sizeof(struct kld_file_stat_1) */ char name[MAXPATHLEN]; Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Tue Dec 3 19:42:46 2013 (r258887) +++ stable/9/sys/kern/kern_proc.c Tue Dec 3 19:55:49 2013 (r258888) @@ -2636,6 +2636,60 @@ errout: return (error); } +static int +sysctl_kern_proc_sigtramp(SYSCTL_HANDLER_ARGS) +{ + int *name = (int *)arg1; + u_int namelen = arg2; + struct proc *p; + struct kinfo_sigtramp kst; + const struct sysentvec *sv; + int error; +#ifdef COMPAT_FREEBSD32 + struct kinfo_sigtramp32 kst32; +#endif + + if (namelen != 1) + return (EINVAL); + + error = pget((pid_t)name[0], PGET_CANDEBUG, &p); + if (error != 0) + return (error); + sv = p->p_sysent; +#ifdef COMPAT_FREEBSD32 + if ((req->flags & SCTL_MASK32) != 0) { + bzero(&kst32, sizeof(kst32)); + if (SV_PROC_FLAG(p, SV_ILP32)) { + if (sv->sv_sigcode_base != 0) { + kst32.ksigtramp_start = sv->sv_sigcode_base; + kst32.ksigtramp_end = sv->sv_sigcode_base + + *sv->sv_szsigcode; + } else { + kst32.ksigtramp_start = sv->sv_psstrings - + *sv->sv_szsigcode; + kst32.ksigtramp_end = sv->sv_psstrings; + } + } + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &kst32, sizeof(kst32)); + return (error); + } +#endif + bzero(&kst, sizeof(kst)); + if (sv->sv_sigcode_base != 0) { + kst.ksigtramp_start = (char *)sv->sv_sigcode_base; + kst.ksigtramp_end = (char *)sv->sv_sigcode_base + + *sv->sv_szsigcode; + } else { + kst.ksigtramp_start = (char *)sv->sv_psstrings - + *sv->sv_szsigcode; + kst.ksigtramp_end = (char *)sv->sv_psstrings; + } + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &kst, sizeof(kst)); + return (error); +} + SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT| @@ -2744,3 +2798,7 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC static SYSCTL_NODE(_kern_proc, KERN_PROC_OSREL, osrel, CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_osrel, "Process binary osreldate"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_SIGTRAMP, sigtramp, CTLFLAG_RD | + CTLFLAG_MPSAFE, sysctl_kern_proc_sigtramp, + "Process signal trampoline location"); Modified: stable/9/sys/sys/sysctl.h ============================================================================== --- stable/9/sys/sys/sysctl.h Tue Dec 3 19:42:46 2013 (r258887) +++ stable/9/sys/sys/sysctl.h Tue Dec 3 19:55:49 2013 (r258888) @@ -566,6 +566,7 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_PROC_PS_STRINGS 38 /* get ps_strings location */ #define KERN_PROC_UMASK 39 /* process umask */ #define KERN_PROC_OSREL 40 /* osreldate for process binary */ +#define KERN_PROC_SIGTRAMP 41 /* signal trampoline location */ /* * KERN_IPC identifiers Modified: stable/9/sys/sys/user.h ============================================================================== --- stable/9/sys/sys/user.h Tue Dec 3 19:42:46 2013 (r258887) +++ stable/9/sys/sys/user.h Tue Dec 3 19:55:49 2013 (r258888) @@ -496,6 +496,12 @@ struct kinfo_kstack { int _kkst_ispare[16]; /* Space for more stuff. */ }; +struct kinfo_sigtramp { + void *ksigtramp_start; + void *ksigtramp_end; + void *ksigtramp_spare[4]; +}; + #ifdef _KERNEL /* Flags for kern_proc_out function. */ #define KERN_PROC_NOTHREADS 0x1 From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 20:06:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 924ACACF; Tue, 3 Dec 2013 20:06:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 645781EC7; Tue, 3 Dec 2013 20:06:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3K6x6q071062; Tue, 3 Dec 2013 20:06:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3K6xE9071061; Tue, 3 Dec 2013 20:06:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312032006.rB3K6xE9071061@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Dec 2013 20:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258889 - stable/9/contrib/gdb/gdb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 20:06:59 -0000 Author: kib Date: Tue Dec 3 20:06:58 2013 New Revision: 258889 URL: http://svnweb.freebsd.org/changeset/base/258889 Log: MFC r258663: Use sysctl KERN_PROC_SIGTRAMP to retrieve the signal trampoline location for the native amd64 ABI. This fixes unwinding over the signal frame after trampoline was moved to the shared page. Modified: stable/9/contrib/gdb/gdb/amd64fbsd-nat.c Directory Properties: stable/9/contrib/gdb/ (props changed) Modified: stable/9/contrib/gdb/gdb/amd64fbsd-nat.c ============================================================================== --- stable/9/contrib/gdb/gdb/amd64fbsd-nat.c Tue Dec 3 19:55:49 2013 (r258888) +++ stable/9/contrib/gdb/gdb/amd64fbsd-nat.c Tue Dec 3 20:06:58 2013 (r258889) @@ -29,6 +29,7 @@ #include #include #include +#include #include #ifdef HAVE_SYS_PROCFS_H @@ -212,24 +213,23 @@ Please report this to . SC_RBP_OFFSET = offset; - /* FreeBSD provides a kern.ps_strings sysctl that we can use to + /* FreeBSD provides a kern.proc.sigtramp sysctl that we can use to locate the sigtramp. That way we can still recognize a sigtramp - if its location is changed in a new kernel. Of course this is - still based on the assumption that the sigtramp is placed - directly under the location where the program arguments and - environment can be found. */ + if its location is changed in a new kernel. */ { - int mib[2]; - long ps_strings; + int mib[4]; + struct kinfo_sigtramp kst; size_t len; mib[0] = CTL_KERN; - mib[1] = KERN_PS_STRINGS; - len = sizeof (ps_strings); - if (sysctl (mib, 2, &ps_strings, &len, NULL, 0) == 0) + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_SIGTRAMP; + mib[3] = getpid(); + len = sizeof (kst); + if (sysctl (mib, sizeof(mib) / sizeof(mib[0]), &kst, &len, NULL, 0) == 0) { - amd64fbsd_sigtramp_start_addr = ps_strings - 32; - amd64fbsd_sigtramp_end_addr = ps_strings; + amd64fbsd_sigtramp_start_addr = kst.ksigtramp_start; + amd64fbsd_sigtramp_end_addr = kst.ksigtramp_end; } } } From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 20:49:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CCC13F6 for ; Tue, 3 Dec 2013 20:49:20 +0000 (UTC) Received: from mail-qa0-x230.google.com (mail-qa0-x230.google.com [IPv6:2607:f8b0:400d:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 421C91138 for ; Tue, 3 Dec 2013 20:49:20 +0000 (UTC) Received: by mail-qa0-f48.google.com with SMTP id w5so6020969qac.14 for ; Tue, 03 Dec 2013 12:49:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Fw60nDgxAkH+j9HZJRnJMk23waXt/V5lOJDyjScnLcc=; b=XDLQmZUwtYs90tWqZhRiU3ebIhM9cOw4m+nlK5ozpPNL0ziVJDWQMLbCk6orhARZ8w 4bWNdR8ZXPSlI9OnL440aJhoIA9FsJYXAEL909qUtH2kVBxl6uaVePFDQ2kDR8T4v+BA x1qLDwkjWM1/M9naBpyKhVeTxx7CNpV0R020g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=Fw60nDgxAkH+j9HZJRnJMk23waXt/V5lOJDyjScnLcc=; b=cV9/Q66cymRUSvoFHcODUL4Lf5M8qT3od8ilz5lI33yzW8IdAlL53cKeqcrs2PhHWY L60G3J44chMSQ1dzev15gBkPoBg8pbUFDP+RfjvQwlvdcJteHiM7MnNsXuiH2uUIpojj XnvYu3tUx7CIcWpBEGgsithzOyDMkyNxYFYZcnLwSTc9xIf0UZzb86HVguOWVcWEdTtt kIe5xfc/jmONJ/FcEiw7c0mYGggFVum6ljYsvr9FV0b8yjNbwTcrbMMiYpE5gKi+i0sP Tz/NADKCzf9ME9iaciHLSakQlUC7zK2BvQhoo+0NnTq452PmHmvH1nSwRvmL32UPnYUJ mL/w== X-Gm-Message-State: ALoCoQmgYwZb60Colcy3tOrEzv4siXgjapcuID0HHdaUBrRLlCY11a4YTx2HBKR2xhIFjZZdpU3h X-Received: by 10.224.28.72 with SMTP id l8mr126453489qac.35.1386103759224; Tue, 03 Dec 2013 12:49:19 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.86.42 with HTTP; Tue, 3 Dec 2013 12:48:49 -0800 (PST) In-Reply-To: <201312031923.rB3JNtSn055377@svn.freebsd.org> References: <201312031923.rB3JNtSn055377@svn.freebsd.org> From: Eitan Adler Date: Tue, 3 Dec 2013 15:48:49 -0500 X-Google-Sender-Auth: Cqfg8vT1ku-vfpukISFm5KWir1Q Message-ID: Subject: Re: svn commit: r258884 - in head: contrib/llvm/tools/lldb/include/lldb contrib/llvm/tools/lldb/include/lldb/API contrib/llvm/tools/lldb/include/lldb/Breakpoint contrib/llvm/tools/lldb/include/lldb/Cor... To: Ed Maste Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 20:49:20 -0000 On Tue, Dec 3, 2013 at 2:23 PM, Ed Maste wrote: > Author: emaste > Date: Tue Dec 3 19:23:54 2013 > New Revision: 258884 > URL: http://svnweb.freebsd.org/changeset/base/258884 > > Log: > Update LLDB to upstream r196259 snapshot Thanks! When you update vendor sources can you please include a brief changelog? It would help to know if its worth updating or what new features to get excited about. :) -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 20:55:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 770C87E3; Tue, 3 Dec 2013 20:55:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47ADE11A3; Tue, 3 Dec 2013 20:55:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3Ktc0V087676; Tue, 3 Dec 2013 20:55:38 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3KtbKT087672; Tue, 3 Dec 2013 20:55:37 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201312032055.rB3KtbKT087672@svn.freebsd.org> From: Michael Tuexen Date: Tue, 3 Dec 2013 20:55:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258890 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 20:55:38 -0000 Author: tuexen Date: Tue Dec 3 20:55:37 2013 New Revision: 258890 URL: http://svnweb.freebsd.org/changeset/base/258890 Log: MFC r258574: Only initialize some mutexes for the default VNET. In r208160, sctp_it_ctl was made a global variable, across all VNETs. However, sctp_init() is called for every VNET that is created. This results in the same global mutexes which are part of sctp_it_ctl being initialized. This can result in crashes if many jails are created. To reproduce the problem: (1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS, INVARIANTS. (2) Run this command in a loop: jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html ) Witness will warn about the same mutex being initialized. Fix the problem by only initializing these mutexes in the default VNET. MFC r258765: In http://svnweb.freebsd.org/changeset/base/258221 I introduced a bug which initialized global locks whenever the SCTP stack initialized. This was fixed in http://svnweb.freebsd.org/changeset/base/258574 by rodrigc@. He just initialized the locks for the default vnet. This fix reverts to the old behaviour before r258221, which explicitly makes sure it is only called once, because this works also on other platforms. Approved by: re@ (gjb) Modified: stable/10/sys/netinet/sctp_bsd_addr.c stable/10/sys/netinet/sctp_pcb.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/netinet/sctp_bsd_addr.c ============================================================================== --- stable/10/sys/netinet/sctp_bsd_addr.c Tue Dec 3 20:06:58 2013 (r258889) +++ stable/10/sys/netinet/sctp_bsd_addr.c Tue Dec 3 20:55:37 2013 (r258890) @@ -100,6 +100,9 @@ sctp_startup_iterator(void) /* You only get one */ return; } + /* Initialize global locks here, thus only once. */ + SCTP_ITERATOR_LOCK_INIT(); + SCTP_IPI_ITERATOR_WQ_INIT(); TAILQ_INIT(&sctp_it_ctl.iteratorhead); kproc_create(sctp_iterator_thread, (void *)NULL, Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Tue Dec 3 20:06:58 2013 (r258889) +++ stable/10/sys/netinet/sctp_pcb.c Tue Dec 3 20:55:37 2013 (r258890) @@ -5864,8 +5864,6 @@ sctp_pcb_init() for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } - SCTP_ITERATOR_LOCK_INIT(); - SCTP_IPI_ITERATOR_WQ_INIT(); sctp_startup_iterator(); #if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 21:00:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B695954; Tue, 3 Dec 2013 21:00:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35F8911EA; Tue, 3 Dec 2013 21:00: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 rB3L0EUD088563; Tue, 3 Dec 2013 21:00:14 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3L0EqY088562; Tue, 3 Dec 2013 21:00:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312032100.rB3L0EqY088562@svn.freebsd.org> From: John Baldwin Date: Tue, 3 Dec 2013 21:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258891 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 21:00:14 -0000 Author: jhb Date: Tue Dec 3 21:00:13 2013 New Revision: 258891 URL: http://svnweb.freebsd.org/changeset/base/258891 Log: Various updates and tweaks to the wait(2) manpage. PR: docs/183904 Submitted by: Michael Galassi Reviewed by: kib, wblock (earlier version) Modified: head/lib/libc/sys/wait.2 Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Tue Dec 3 20:55:37 2013 (r258890) +++ head/lib/libc/sys/wait.2 Tue Dec 3 21:00:13 2013 (r258891) @@ -28,7 +28,7 @@ .\" @(#)wait.2 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd September 7, 2013 +.Dd December 3, 2013 .Dt WAIT 2 .Os .Sh NAME @@ -62,63 +62,76 @@ .Sh DESCRIPTION The .Fn wait -function suspends execution of its calling process until +function suspends execution of its calling thread until .Fa status -information is available for a terminated child process, +information is available for a child process or a signal is received. On return from a successful .Fn wait call, the .Fa status -area contains termination information about the process that exited +area contains information about the process that reported a status change as defined below. -The -.Fn wait -call is the same as -.Fn wait4 -with a -.Fa wpid -value of -1, -with an -.Fa options -value of zero, -and a -.Fa rusage -value of zero. .Pp The .Fn wait4 -system call provides a more general interface for programs -that need to wait for certain child processes, +and +.Fn wait6 +system calls provide a more general interface for programs +that need to wait for specific child processes, that need resource utilization statistics accumulated by child processes, or that require options. +The other wait functions are implemented using either +.Fn wait4 +or +.Fn wait6 . .Pp -The broadest interface of all functions in this family is +The .Fn wait6 -which is otherwise very much like +function is the most general function in this family and its distinct +features are: +.Pp +All of the desired process statuses to be waited on must be explicitly +specified in +.Fa options . +The +.Fn wait , +.Fn waitpid , +.Fn wait3 , +and .Fn wait4 -but with a few very important distinctions. -To wait for exited processes, the option flag +functions all implicitly wait for exited and trapped processes, +but the +.Fn waitid +and +.Fn wait6 +functions require the corresponding .Dv WEXITED -need to be explicitly specified. -This allows for waiting for processes which have experienced other -status changes without having to handle also the exit status from -the terminated processes. -Instead of the traditional -.Dv rusage -argument, a pointer to a new structure +and +.Dv WTRAPPED +flags to be explicitly specified. +This allows waiting for processes which have experienced other +status changes without having to also handle the exit status from +terminated processes. +.Pp +The +.Fn wait6 +function accepts a +.Fa wrusage +argument which points to a structure defined as: .Bd -literal struct __wrusage { struct rusage wru_self; struct rusage wru_children; }; .Ed -can be passed. +.Pp This allows the calling process to collect resource usage statistics from both its own child process as well as from its grand children. When no resource usage statistics are needed this pointer can be .Dv NULL . +.Pp The last argument .Fa infop must be either @@ -126,11 +139,13 @@ must be either or a pointer to a .Fa siginfo_t structure. -When specified, the structure is filled the same as for -.Dv SIGNCHLD -signal, delivered at the process state change. -.br -The process, which state is queried, is specified by two arguments +If +.Pf non- Dv NULL , +the structure is filled with the same data as for a +.Dv SIGCHLD +signal delivered when the process changed state. +.Pp +The set of child processes to be queried is specified by the arguments .Fa idtype and .Fa id . @@ -138,8 +153,8 @@ The separate .Fa idtype and .Fa id -arguments allows to support many other types of -IDs as well in addition to PID and PGID. +arguments support many other types of +identifers in addition to process IDs and process group IDs. .Bl -bullet -offset indent .It If @@ -188,50 +203,33 @@ and wait for any child process in the same process group as the caller. .El .Pp -Non-standard specifiers for the process to wait for, supported by this +Non-standard identifier types supported by this implementation of .Fn waitid and -.Fn wait6 , +.Fn wait6 are: -.Bl -bullet -offset indent -.It -The -.Fa idtype -value -.Dv P_UID -waits for processes which effective UID is equal to -.Dv (uid_t)id . -.It -The -.Fa idtype -value -.Dv P_GID -waits for processes which effective GID is equal to -.Dv (gid_t)id . -.It -The -.Fa idtype -value -.Dv P_SID -waits for processes which session ID is equal to -.Dv id . -In case the child process started its own new session, -SID will be the same as its own PID. -Otherwise the SID of a child process will match the caller's SID. -.It -The -.Fa idtype -value -.Dv P_JAILID -waits for processes within a jail which jail identifier is equal -to -.Dv id . +.Bl -tag -width P_JAILID +.It Dv P_UID +Wait for processes whose effective user ID is equal to +.Dv (uid_t) Fa id . +.It Dv P_GID +Wait for processes whose effective group ID is equal to +.Dv (gid_t) Fa id . +.It Dv P_SID +Wait for processes whose session ID is equal to +.Fa id . +.\" This is just how sessions work, not sure this needs to be documented here +If the child process started its own session, +its session ID will be the same as its process ID. +Otherwise the session ID of a child process will match the caller's session ID. +.It Dv P_JAILID +Waits for processes within a jail whose jail identifier is equal to +.Fa id . .El .Pp -For -.Fn wait , -.Fn wait3 , +For the +.Fn waitpid and .Fn wait4 functions, the single @@ -250,12 +248,12 @@ the call waits for any child process in .It If .Fa wpid -is greater than zero, the call waits for the process with process id +is greater than zero, the call waits for the process with process ID .Fa wpid . .It If .Fa wpid -is less than -1, the call waits for any process whose process group id +is less than -1, the call waits for any process whose process group ID equals the absolute value of .Fa wpid . .El @@ -267,30 +265,44 @@ argument is defined below. The .Fa options argument contains the bitwise OR of any of the following options. -.Bl -tag -width Ds +.Bl -tag -width WCONTINUED .It Dv WCONTINUED -indicates that children of the current process that -have continued from a job control stop, by receiving a +Report the status of selected processes that +have continued from a job control stop by receiving a .Dv SIGCONT -signal, should also have their status reported. +signal. .It Dv WNOHANG -is used to indicate that the call should not block when +Do not block when there are no processes wishing to report status. .It Dv WUNTRACED -indicates that children of the current process which are stopped -due to a +Report the status of selected processes which are stopped due to a .Dv SIGTTIN , SIGTTOU , SIGTSTP , or .Dv SIGSTOP -signal shall have their status reported. +signal. .It Dv WSTOPPED -is an alias for +An alias for .Dv WUNTRACED . .It Dv WTRAPPED -allows waiting for processes which have trapped or reached a breakpoint. +Report the status of selected processes which are being traced via +.Xr ptrace 2 +and have trapped or reached a breakpoint. +This flag is implicitly set for the functions +.Fn wait , +.Fn waitpid , +.Fn wait3 , +and +.Fn wait4 . +.br +For the +.Fn waitid +and +.Fn wait6 +functions, the flag has to be explicitly included in +.Fa options +if status reports from trapped processes are expected. .It Dv WEXITED -indicates that the caller is wants to receive status reports from -terminated processes. +Report the status of selected processes which have terminated. This flag is implicitly set for the functions .Fn wait , .Fn waitpid , @@ -302,11 +314,11 @@ For the .Fn waitid and .Fn wait6 -functions, the flag has to be explicitly included in the -.Fa options , +functions, the flag has to be explicitly included in +.Fa options if status reports from terminated processes are expected. .It Dv WNOWAIT -keeps the process whose status is returned in a waitable state. +Keep the process whose status is returned in a waitable state. The process may be waited for again after this call completes. .El .sp @@ -336,50 +348,68 @@ process and all its children is returned .Pp If .Fa wrusage -argument is non-NULL, a resource usage statistics -from both its own child process as well as from its grand children -is returned. +is non-NULL, separate summaries are returned for the resources used +by the terminated process and the resources used by all its children. .Pp If .Fa infop -is non-NULL, it must point to a +is non-NULL, a .Dv siginfo_t -structure which is filled on return such that the -.Dv si_signo -field is always +structure is returned with the +.Fa si_signo +field set to .Dv SIGCHLD -and the field -.Dv si_pid -if be non-zero, if there is a status change to report. -If there are no status changes to report and WNOHANG is applied, -both of these fields are returned zero. -When using the -.Fn waitid -function with the +and the +.Fa si_pid +field set to the process ID of the process reporting status. +.Pp +When the .Dv WNOHANG -option set, checking these fields is the only way to know whether -there were any status changes to report, because the return value -from +option is specified and no processes +wish to report status, .Fn waitid -is be zero as it is for any successful return from -.Fn waitid . +sets the +.Fa si_signo +and +.Fa si_pid +fields in +.Fa infop +to zero. +Checking these fields is the only way to know if a status change was reported. .Pp When the .Dv WNOHANG option is specified and no processes wish to report status, .Fn wait4 -returns a +and +.Fn wait6 +return a process id of 0. .Pp The +.Fn wait +call is the same as +.Fn wait4 +with a +.Fa wpid +value of -1, +with an +.Fa options +value of zero, +and a +.Fa rusage +value of +.Dv NULL . +The .Fn waitpid function is identical to .Fn wait4 with an .Fa rusage -value of zero. +value of +.Dv NULL . The older .Fn wait3 call is the same as @@ -388,29 +418,31 @@ with a .Fa wpid value of -1. The +.Fn wait4 +function is identical to .Fn wait6 -call, with the bits +with the flags .Dv WEXITED and .Dv WTRAPPED -set in the +set in .Fa options -and with +and .Fa infop set to -.Dv NULL , -is similar to -.Fn wait4 . +.Dv NULL . .Pp -The following macros may be used to test the manner of exit of the process. -One of the first four macros will evaluate to a non-zero (true) value: +The following macros may be used to test the current status of the process. +Exactly one of the following four macros will evaluate to a non-zero +.Pq true +value: .Bl -tag -width Ds .It Fn WIFCONTINUED status True if the process has not terminated, and has continued after a job control stop. This macro can be true only if the wait call specified the .Dv WCONTINUED -option). +option. .It Fn WIFEXITED status True if the process terminated normally by a call to .Xr _exit 2 @@ -481,7 +513,7 @@ in The implementation queues one .Dv SIGCHLD signal for each child process whose -status has changed, if +status has changed; if .Fn wait returns because the status of a child process is available, the pending SIGCHLD signal associated with the process ID of the child process will @@ -492,7 +524,7 @@ signals remain pending. .Pp If .Dv SIGCHLD -is blocked, +is blocked and .Fn wait returns because the status of a child process is available, the pending .Dv SIGCHLD @@ -538,13 +570,23 @@ If .Fn waitid returns because one or more processes have a state change to report, 0 is returned. -To indicate an error, -1 will be returned and -.Dv errno -set to an appropriate value. +If an error is detected, +a value of -1 +is returned and +.Va errno +is set to indicate the error. If .Dv WNOHANG -was used, 0 can be returned indicating no error, but no processes -may have changed state either, if si_signo and/or si_pid are zero. +is specified and there are +no stopped, continued or exited children, +0 is returned. +The +.Fa si_signo +and +.Fa si_pid +fields of +.Fa infop +must be checked against zero to determine if a process reported status. .Sh ERRORS The .Fn wait @@ -620,7 +662,7 @@ requires .Fn waitid to return the full 32 bits passed to .Xr _exit 2 ; -this implementation only returns 8 bits like in the other calls. +this implementation only returns 8 bits like the other calls. .Sh HISTORY The .Fn wait From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 21:29:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36B63F2A; Tue, 3 Dec 2013 21:29:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1F85B1348; Tue, 3 Dec 2013 21:29:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3LTm0U098654; Tue, 3 Dec 2013 21:29:48 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3LTjDZ098637; Tue, 3 Dec 2013 21:29:45 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201312032129.rB3LTjDZ098637@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Dec 2013 21:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258892 - in head: contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD contrib/llvm/tools/lldb/source/Plugins/Process/POSIX lib/clang/liblldbPluginProcessFreeBSD X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 21:29:48 -0000 Author: emaste Date: Tue Dec 3 21:29:45 2013 New Revision: 258892 URL: http://svnweb.freebsd.org/changeset/base/258892 Log: lldb: Threaded inferior support for FreeBSD This is in the process of being submitted to the upstream LLDB repository. The thread list functionality is modelled in part on GDBRemoteCommunicationClient. LLDB bug pr16696 and code review D2267 Sponsored by: DARPA, AFRL Added: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h head/lib/clang/liblldbPluginProcessFreeBSD/Makefile Added: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp Tue Dec 3 21:29:45 2013 (r258892) @@ -0,0 +1,69 @@ +//===-- FreeBSDThread.cpp ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// C Includes +// C++ Includes +// Other libraries and framework includes +#include "lldb/Core/State.h" + +// Project includes +#include "FreeBSDThread.h" +#include "ProcessFreeBSD.h" +#include "ProcessPOSIXLog.h" + +using namespace lldb; +using namespace lldb_private; + +//------------------------------------------------------------------------------ +// Constructors and destructors. + +FreeBSDThread::FreeBSDThread(Process &process, lldb::tid_t tid) + : POSIXThread(process, tid) +{ +} + +FreeBSDThread::~FreeBSDThread() +{ +} + +//------------------------------------------------------------------------------ +// ProcessInterface protocol. + +void +FreeBSDThread::WillResume(lldb::StateType resume_state) +{ + Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD)); + if (log) + log->Printf("tid %lu resume_state = %s", GetID(), + lldb_private::StateAsCString(resume_state)); + ProcessSP process_sp(GetProcess()); + ProcessFreeBSD *process = static_cast(process_sp.get()); + int signo = GetResumeSignal(); + bool signo_valid = process->GetUnixSignals().SignalIsValid(signo); + + switch (resume_state) + { + case eStateSuspended: + case eStateStopped: + process->m_suspend_tids.push_back(GetID()); + break; + case eStateRunning: + process->m_run_tids.push_back(GetID()); + if (signo_valid) + process->m_resume_signo = signo; + break; + case eStateStepping: + process->m_step_tids.push_back(GetID()); + if (signo_valid) + process->m_resume_signo = signo; + break; + default: + break; + } +} Added: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h Tue Dec 3 21:29:45 2013 (r258892) @@ -0,0 +1,39 @@ +//===-- FreeBSDThread.h -----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_FreeBSDThread_H_ +#define liblldb_FreeBSDThread_H_ + +// Other libraries and framework includes +#include "POSIXThread.h" + +//------------------------------------------------------------------------------ +// @class FreeBSDThread +// @brief Abstraction of a FreeBSD thread. +class FreeBSDThread + : public POSIXThread +{ +public: + + //------------------------------------------------------------------ + // Constructors and destructors + //------------------------------------------------------------------ + FreeBSDThread(lldb_private::Process &process, lldb::tid_t tid); + + virtual ~FreeBSDThread(); + + //-------------------------------------------------------------------------- + // FreeBSDThread internal API. + + // POSIXThread override + virtual void + WillResume(lldb::StateType resume_state); +}; + +#endif // #ifndef liblldb_FreeBSDThread_H_ Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp Tue Dec 3 21:00:13 2013 (r258891) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp Tue Dec 3 21:29:45 2013 (r258892) @@ -23,7 +23,7 @@ #include "ProcessPOSIXLog.h" #include "Plugins/Process/Utility/InferiorCallPOSIX.h" #include "ProcessMonitor.h" -#include "POSIXThread.h" +#include "FreeBSDThread.h" using namespace lldb; using namespace lldb_private; @@ -140,29 +140,136 @@ ProcessFreeBSD::DoDetach(bool keep_stopp return error; } +Error +ProcessFreeBSD::DoResume() +{ + Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS)); + + // FreeBSD's ptrace() uses 0 to indicate "no signal is to be sent." + int resume_signal = 0; + + SetPrivateState(eStateRunning); + + Mutex::Locker lock(m_thread_list.GetMutex()); + bool do_step = false; + + for (tid_collection::const_iterator t_pos = m_run_tids.begin(), t_end = m_run_tids.end(); t_pos != t_end; ++t_pos) + { + m_monitor->ThreadSuspend(*t_pos, false); + } + for (tid_collection::const_iterator t_pos = m_step_tids.begin(), t_end = m_step_tids.end(); t_pos != t_end; ++t_pos) + { + m_monitor->ThreadSuspend(*t_pos, false); + do_step = true; + } + for (tid_collection::const_iterator t_pos = m_suspend_tids.begin(), t_end = m_suspend_tids.end(); t_pos != t_end; ++t_pos) + { + m_monitor->ThreadSuspend(*t_pos, true); + // XXX Cannot PT_CONTINUE properly with suspended threads. + do_step = true; + } + + if (log) + log->Printf("process %lu resuming (%s)", GetID(), do_step ? "step" : "continue"); + if (do_step) + m_monitor->SingleStep(GetID(), resume_signal); + else + m_monitor->Resume(GetID(), resume_signal); + + return Error(); +} + bool ProcessFreeBSD::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thread_list) { - Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD)); - if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) - log->Printf ("ProcessFreeBSD::%s() (pid = %" PRIu64 ")", __FUNCTION__, GetID()); - - bool has_updated = false; - const lldb::pid_t pid = GetID(); - // Update the process thread list with this new thread. - // FIXME: We should be using tid, not pid. - assert(m_monitor); - ThreadSP thread_sp (old_thread_list.FindThreadByID (pid, false)); - if (!thread_sp) { - ProcessSP me = this->shared_from_this(); - thread_sp.reset(new POSIXThread(*me, pid)); - has_updated = true; + Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS)); + if (log) + log->Printf("ProcessFreeBSD::%s (pid = %" PRIu64 ")", __FUNCTION__, GetID()); + + std::vector tds; + if (!GetMonitor().GetCurrentThreadIDs(tds)) + { + return false; } - if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) - log->Printf ("ProcessFreeBSD::%s() updated tid = %" PRIu64, __FUNCTION__, pid); + ThreadList old_thread_list_copy(old_thread_list); + for (size_t i = 0; i < tds.size(); ++i) + { + tid_t tid = tds[i]; + ThreadSP thread_sp (old_thread_list_copy.RemoveThreadByID(tid, false)); + if (!thread_sp) + { + thread_sp.reset(new FreeBSDThread(*this, tid)); + if (log) + log->Printf("ProcessFreeBSD::%s new tid = %" PRIu64, __FUNCTION__, tid); + } + else + { + if (log) + log->Printf("ProcessFreeBSD::%s existing tid = %" PRIu64, __FUNCTION__, tid); + } + new_thread_list.AddThread(thread_sp); + } + for (size_t i = 0; i < old_thread_list_copy.GetSize(false); ++i) + { + ThreadSP old_thread_sp(old_thread_list_copy.GetThreadAtIndex(i, false)); + if (old_thread_sp) + { + if (log) + log->Printf("ProcessFreeBSD::%s remove tid", __FUNCTION__); + } + } - new_thread_list.AddThread(thread_sp); + return true; +} - return has_updated; // the list has been updated +Error +ProcessFreeBSD::WillResume() +{ + m_suspend_tids.clear(); + m_run_tids.clear(); + m_step_tids.clear(); + return ProcessPOSIX::WillResume(); } + +void +ProcessFreeBSD::SendMessage(const ProcessMessage &message) +{ + Mutex::Locker lock(m_message_mutex); + + switch (message.GetKind()) + { + case ProcessMessage::eInvalidMessage: + return; + + case ProcessMessage::eAttachMessage: + SetPrivateState(eStateStopped); + return; + + case ProcessMessage::eLimboMessage: + case ProcessMessage::eExitMessage: + m_exit_status = message.GetExitStatus(); + SetExitStatus(m_exit_status, NULL); + break; + + case ProcessMessage::eSignalMessage: + case ProcessMessage::eSignalDeliveredMessage: + case ProcessMessage::eBreakpointMessage: + case ProcessMessage::eTraceMessage: + case ProcessMessage::eWatchpointMessage: + case ProcessMessage::eCrashMessage: + SetPrivateState(eStateStopped); + break; + + case ProcessMessage::eNewThreadMessage: + assert(0 && "eNewThreadMessage unexpected on FreeBSD"); + break; + + case ProcessMessage::eExecMessage: + SetPrivateState(eStateStopped); + break; + } + + m_message_queue.push(message); +} + Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h Tue Dec 3 21:00:13 2013 (r258891) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h Tue Dec 3 21:29:45 2013 (r258892) @@ -60,6 +60,15 @@ public: virtual bool UpdateThreadList(lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list); + virtual lldb_private::Error + DoResume(); + + virtual lldb_private::Error + WillResume(); + + virtual void + SendMessage(const ProcessMessage &message); + //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ @@ -80,6 +89,16 @@ public: EnablePluginLogging(lldb_private::Stream *strm, lldb_private::Args &command); +protected: + friend class FreeBSDThread; + + typedef std::vector tid_collection; + tid_collection m_suspend_tids; + tid_collection m_run_tids; + tid_collection m_step_tids; + + int m_resume_signo; + }; #endif // liblldb_MacOSXProcess_H_ Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Tue Dec 3 21:00:13 2013 (r258891) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Tue Dec 3 21:29:45 2013 (r258892) @@ -560,6 +560,31 @@ LwpInfoOperation::Execute(ProcessMonitor } //------------------------------------------------------------------------------ +/// @class ThreadSuspendOperation +/// @brief Implements ProcessMonitor::ThreadSuspend. +class ThreadSuspendOperation : public Operation +{ +public: + ThreadSuspendOperation(lldb::tid_t tid, bool suspend, bool &result) + : m_tid(tid), m_suspend(suspend), m_result(result) { } + + void Execute(ProcessMonitor *monitor); + +private: + lldb::tid_t m_tid; + bool m_suspend; + bool &m_result; +} ; + +void +ThreadSuspendOperation::Execute(ProcessMonitor *monitor) +{ + m_result = !PTRACE(m_suspend ? PT_SUSPEND : PT_RESUME, m_tid, NULL, 0); +} + + + +//------------------------------------------------------------------------------ /// @class EventMessageOperation /// @brief Implements ProcessMonitor::GetEventMessage. class EventMessageOperation : public Operation @@ -1041,6 +1066,29 @@ FINISH: return args->m_error.Success(); } +size_t +ProcessMonitor::GetCurrentThreadIDs(std::vector&thread_ids) +{ + lwpid_t *tids; + int tdcnt; + + thread_ids.clear(); + + tdcnt = PTRACE(PT_GETNUMLWPS, m_pid, NULL, 0); + if (tdcnt <= 0) + return 0; + tids = (lwpid_t *)malloc(tdcnt * sizeof(*tids)); + if (tids == NULL) + return 0; + if (PTRACE(PT_GETLWPLIST, m_pid, (void *)tids, tdcnt) < 0) { + free(tids); + return 0; + } + thread_ids = std::vector(tids, tids + tdcnt); + free(tids); + return thread_ids.size(); +} + bool ProcessMonitor::MonitorCallback(void *callback_baton, lldb::pid_t pid, @@ -1073,11 +1121,11 @@ ProcessMonitor::MonitorCallback(void *ca switch (plwp.pl_siginfo.si_signo) { case SIGTRAP: - message = MonitorSIGTRAP(monitor, &plwp.pl_siginfo, pid); + message = MonitorSIGTRAP(monitor, &plwp.pl_siginfo, plwp.pl_lwpid); break; default: - message = MonitorSignal(monitor, &plwp.pl_siginfo, pid); + message = MonitorSignal(monitor, &plwp.pl_siginfo, plwp.pl_lwpid); break; } @@ -1090,7 +1138,7 @@ ProcessMonitor::MonitorCallback(void *ca ProcessMessage ProcessMonitor::MonitorSIGTRAP(ProcessMonitor *monitor, - const siginfo_t *info, lldb::pid_t pid) + const siginfo_t *info, lldb::tid_t tid) { ProcessMessage message; @@ -1111,26 +1159,26 @@ ProcessMonitor::MonitorSIGTRAP(ProcessMo // state of "limbo" until we are explicitly commanded to detach, // destroy, resume, etc. unsigned long data = 0; - if (!monitor->GetEventMessage(pid, &data)) + if (!monitor->GetEventMessage(tid, &data)) data = -1; if (log) - log->Printf ("ProcessMonitor::%s() received exit? event, data = %lx, pid = %" PRIu64, __FUNCTION__, data, pid); - message = ProcessMessage::Limbo(pid, (data >> 8)); + log->Printf ("ProcessMonitor::%s() received exit? event, data = %lx, tid = %" PRIu64, __FUNCTION__, data, tid); + message = ProcessMessage::Limbo(tid, (data >> 8)); break; } case 0: case TRAP_TRACE: if (log) - log->Printf ("ProcessMonitor::%s() received trace event, pid = %" PRIu64, __FUNCTION__, pid); - message = ProcessMessage::Trace(pid); + log->Printf ("ProcessMonitor::%s() received trace event, tid = %" PRIu64, __FUNCTION__, tid); + message = ProcessMessage::Trace(tid); break; case SI_KERNEL: case TRAP_BRKPT: if (log) - log->Printf ("ProcessMonitor::%s() received breakpoint event, pid = %" PRIu64, __FUNCTION__, pid); - message = ProcessMessage::Break(pid); + log->Printf ("ProcessMonitor::%s() received breakpoint event, tid = %" PRIu64, __FUNCTION__, tid); + message = ProcessMessage::Break(tid); break; } @@ -1139,7 +1187,7 @@ ProcessMonitor::MonitorSIGTRAP(ProcessMo ProcessMessage ProcessMonitor::MonitorSignal(ProcessMonitor *monitor, - const siginfo_t *info, lldb::pid_t pid) + const siginfo_t *info, lldb::tid_t tid) { ProcessMessage message; int signo = info->si_signo; @@ -1163,9 +1211,9 @@ ProcessMonitor::MonitorSignal(ProcessMon "SI_USER", info->si_pid); if (info->si_pid == getpid()) - return ProcessMessage::SignalDelivered(pid, signo); + return ProcessMessage::SignalDelivered(tid, signo); else - return ProcessMessage::Signal(pid, signo); + return ProcessMessage::Signal(tid, signo); } if (log) @@ -1174,30 +1222,30 @@ ProcessMonitor::MonitorSignal(ProcessMon if (signo == SIGSEGV) { lldb::addr_t fault_addr = reinterpret_cast(info->si_addr); ProcessMessage::CrashReason reason = GetCrashReasonForSIGSEGV(info); - return ProcessMessage::Crash(pid, reason, signo, fault_addr); + return ProcessMessage::Crash(tid, reason, signo, fault_addr); } if (signo == SIGILL) { lldb::addr_t fault_addr = reinterpret_cast(info->si_addr); ProcessMessage::CrashReason reason = GetCrashReasonForSIGILL(info); - return ProcessMessage::Crash(pid, reason, signo, fault_addr); + return ProcessMessage::Crash(tid, reason, signo, fault_addr); } if (signo == SIGFPE) { lldb::addr_t fault_addr = reinterpret_cast(info->si_addr); ProcessMessage::CrashReason reason = GetCrashReasonForSIGFPE(info); - return ProcessMessage::Crash(pid, reason, signo, fault_addr); + return ProcessMessage::Crash(tid, reason, signo, fault_addr); } if (signo == SIGBUS) { lldb::addr_t fault_addr = reinterpret_cast(info->si_addr); ProcessMessage::CrashReason reason = GetCrashReasonForSIGBUS(info); - return ProcessMessage::Crash(pid, reason, signo, fault_addr); + return ProcessMessage::Crash(tid, reason, signo, fault_addr); } // Everything else is "normal" and does not require any special action on // our part. - return ProcessMessage::Signal(pid, signo); + return ProcessMessage::Signal(tid, signo); } ProcessMessage::CrashReason @@ -1508,6 +1556,15 @@ ProcessMonitor::GetLwpInfo(lldb::tid_t t } bool +ProcessMonitor::ThreadSuspend(lldb::tid_t tid, bool suspend) +{ + bool result; + ThreadSuspendOperation op(tid, suspend, result); + DoOperation(&op); + return result; +} + +bool ProcessMonitor::GetEventMessage(lldb::tid_t tid, unsigned long *message) { bool result; Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h Tue Dec 3 21:00:13 2013 (r258891) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h Tue Dec 3 21:29:45 2013 (r258892) @@ -164,11 +164,19 @@ public: bool ReadThreadPointer(lldb::tid_t tid, lldb::addr_t &value); + /// Returns current thread IDs in process + size_t + GetCurrentThreadIDs(std::vector &thread_ids); + /// Writes a ptrace_lwpinfo structure corresponding to the given thread ID /// to the memory region pointed to by @p lwpinfo. bool GetLwpInfo(lldb::tid_t tid, void *lwpinfo, int &error_no); + /// Suspends or unsuspends a thread prior to process resume or step. + bool + ThreadSuspend(lldb::tid_t tid, bool suspend); + /// Writes the raw event message code (vis-a-vis PTRACE_GETEVENTMSG) /// corresponding to the given thread IDto the memory pointed to by @p /// message. Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp Tue Dec 3 21:00:13 2013 (r258891) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp Tue Dec 3 21:29:45 2013 (r258892) @@ -83,6 +83,7 @@ POSIXThread::GetMonitor() return process.GetMonitor(); } +// Overridden by FreeBSDThread; this is used only on Linux. void POSIXThread::RefreshStateAfterStop() { @@ -257,6 +258,7 @@ POSIXThread::GetUnwinder() return m_unwinder_ap.get(); } +// Overridden by FreeBSDThread; this is used only on Linux. void POSIXThread::WillResume(lldb::StateType resume_state) { @@ -274,43 +276,6 @@ POSIXThread::DidStop() // Don't set the thread state to stopped unless we really stopped. } -bool -POSIXThread::Resume() -{ - lldb::StateType resume_state = GetResumeState(); - ProcessMonitor &monitor = GetMonitor(); - bool status; - - Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD)); - if (log) - log->Printf ("POSIXThread::%s (), resume_state = %s", __FUNCTION__, - StateAsCString(resume_state)); - - switch (resume_state) - { - default: - assert(false && "Unexpected state for resume!"); - status = false; - break; - - case lldb::eStateRunning: - SetState(resume_state); - status = monitor.Resume(GetID(), GetResumeSignal()); - break; - - case lldb::eStateStepping: - SetState(resume_state); - status = monitor.SingleStep(GetID(), GetResumeSignal()); - break; - case lldb::eStateStopped: - case lldb::eStateSuspended: - status = true; - break; - } - - return status; -} - void POSIXThread::Notify(const ProcessMessage &message) { Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.h ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.h Tue Dec 3 21:00:13 2013 (r258891) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.h Tue Dec 3 21:29:45 2013 (r258892) @@ -79,8 +79,6 @@ public: //-------------------------------------------------------------------------- // These methods form a specialized interface to POSIX threads. // - bool Resume(); - void Notify(const ProcessMessage &message); //-------------------------------------------------------------------------- Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Tue Dec 3 21:00:13 2013 (r258891) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Tue Dec 3 21:29:45 2013 (r258892) @@ -259,31 +259,6 @@ ProcessPOSIX::DidLaunch() { } -Error -ProcessPOSIX::DoResume() -{ - StateType state = GetPrivateState(); - - assert(state == eStateStopped); - - SetPrivateState(eStateRunning); - - bool did_resume = false; - - Mutex::Locker lock(m_thread_list.GetMutex()); - - uint32_t thread_count = m_thread_list.GetSize(false); - for (uint32_t i = 0; i < thread_count; ++i) - { - POSIXThread *thread = static_cast( - m_thread_list.GetThreadAtIndex(i, false).get()); - did_resume = thread->Resume() || did_resume; - } - assert(did_resume && "Process resume failed!"); - - return Error(); -} - addr_t ProcessPOSIX::GetImageInfoAddress() { @@ -376,107 +351,6 @@ ProcessPOSIX::DoDidExec() } } -void -ProcessPOSIX::SendMessage(const ProcessMessage &message) -{ - Mutex::Locker lock(m_message_mutex); - - Mutex::Locker thread_lock(m_thread_list.GetMutex()); - - POSIXThread *thread = static_cast( - m_thread_list.FindThreadByID(message.GetTID(), false).get()); - - switch (message.GetKind()) - { - case ProcessMessage::eInvalidMessage: - return; - - case ProcessMessage::eAttachMessage: - SetPrivateState(eStateStopped); - return; - - case ProcessMessage::eLimboMessage: - assert(thread); - thread->SetState(eStateStopped); - if (message.GetTID() == GetID()) - { - m_exit_status = message.GetExitStatus(); - if (m_exit_now) - { - SetPrivateState(eStateExited); - m_monitor->Detach(GetID()); - } - else - { - StopAllThreads(message.GetTID()); - SetPrivateState(eStateStopped); - } - } - else - { - StopAllThreads(message.GetTID()); - SetPrivateState(eStateStopped); - } - break; - - case ProcessMessage::eExitMessage: - assert(thread); - thread->SetState(eStateExited); - // FIXME: I'm not sure we need to do this. - if (message.GetTID() == GetID()) - { - m_exit_status = message.GetExitStatus(); - SetExitStatus(m_exit_status, NULL); - } - else if (!IsAThreadRunning()) - SetPrivateState(eStateStopped); - break; - - case ProcessMessage::eSignalMessage: - case ProcessMessage::eSignalDeliveredMessage: - if (message.GetSignal() == SIGSTOP && - AddThreadForInitialStopIfNeeded(message.GetTID())) - return; - // Intentional fall-through - - case ProcessMessage::eBreakpointMessage: - case ProcessMessage::eTraceMessage: - case ProcessMessage::eWatchpointMessage: - case ProcessMessage::eCrashMessage: - assert(thread); - thread->SetState(eStateStopped); - StopAllThreads(message.GetTID()); - SetPrivateState(eStateStopped); - break; - - case ProcessMessage::eNewThreadMessage: - { - lldb::tid_t new_tid = message.GetChildTID(); - if (WaitingForInitialStop(new_tid)) - { - m_monitor->WaitForInitialTIDStop(new_tid); - } - assert(thread); - thread->SetState(eStateStopped); - StopAllThreads(message.GetTID()); - SetPrivateState(eStateStopped); - break; - } - - case ProcessMessage::eExecMessage: - { - assert(thread); - thread->SetState(eStateStopped); - StopAllThreads(message.GetTID()); - SetPrivateState(eStateStopped); - break; - } - } - - - m_message_queue.push(message); -} - void ProcessPOSIX::StopAllThreads(lldb::tid_t stop_tid) { Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h Tue Dec 3 21:00:13 2013 (r258891) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h Tue Dec 3 21:29:45 2013 (r258892) @@ -64,7 +64,7 @@ public: DidLaunch(); virtual lldb_private::Error - DoResume(); + DoResume() = 0; virtual lldb_private::Error DoHalt(bool &caused_stop); @@ -148,7 +148,8 @@ public: // ProcessPOSIX internal API. /// Registers the given message with this process. - void SendMessage(const ProcessMessage &message); + virtual void + SendMessage(const ProcessMessage &message) = 0; ProcessMonitor & GetMonitor() { assert(m_monitor); return *m_monitor; } Modified: head/lib/clang/liblldbPluginProcessFreeBSD/Makefile ============================================================================== --- head/lib/clang/liblldbPluginProcessFreeBSD/Makefile Tue Dec 3 21:00:13 2013 (r258891) +++ head/lib/clang/liblldbPluginProcessFreeBSD/Makefile Tue Dec 3 21:29:45 2013 (r258892) @@ -9,7 +9,8 @@ CFLAGS+=-I${.CURDIR}/../../../contrib/ll CFLAGS+=-I${.CURDIR}/../../../contrib/llvm/tools/lldb/source/Plugins/Process/POSIX SRCDIR= tools/lldb/source/Plugins/Process/FreeBSD -SRCS= ProcessFreeBSD.cpp \ +SRCS= FreeBSDThread.cpp \ + ProcessFreeBSD.cpp \ ProcessMonitor.cpp TGHDRS= DiagnosticCommonKinds \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 21:35:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 870DB260; Tue, 3 Dec 2013 21:35:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7261B13B9; Tue, 3 Dec 2013 21:35:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3LZQ3W001730; Tue, 3 Dec 2013 21:35:26 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3LZQbw001729; Tue, 3 Dec 2013 21:35:26 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201312032135.rB3LZQbw001729@svn.freebsd.org> From: Colin Percival Date: Tue, 3 Dec 2013 21:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258893 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 21:35:26 -0000 Author: cperciva Date: Tue Dec 3 21:35:25 2013 New Revision: 258893 URL: http://svnweb.freebsd.org/changeset/base/258893 Log: Add a new sysctl / loader tunable kern.panic_reboot_wait_time which defaults to PANIC_REBOOT_WAIT_TIME (a long-existing kernel config setting). Use this now-variable value in place of the defined constant to control how long the system waits after a panic before rebooting. Modified: head/sys/kern/kern_shutdown.c Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Tue Dec 3 21:29:45 2013 (r258892) +++ head/sys/kern/kern_shutdown.c Tue Dec 3 21:35:25 2013 (r258893) @@ -89,6 +89,11 @@ __FBSDID("$FreeBSD$"); #ifndef PANIC_REBOOT_WAIT_TIME #define PANIC_REBOOT_WAIT_TIME 15 /* default to 15 seconds */ #endif +int panic_reboot_wait_time = PANIC_REBOOT_WAIT_TIME; +SYSCTL_INT(_kern, OID_AUTO, panic_reboot_wait_time, CTLFLAG_RW | CTLFLAG_TUN, + &panic_reboot_wait_time, 0, + "Seconds to wait before rebooting after a panic"); +TUNABLE_INT("kern.panic_reboot_wait_time", &panic_reboot_wait_time); /* * Note that stdarg.h and the ANSI style va_start macro is used for both @@ -485,12 +490,12 @@ shutdown_panic(void *junk, int howto) int loop; if (howto & RB_DUMP) { - if (PANIC_REBOOT_WAIT_TIME != 0) { - if (PANIC_REBOOT_WAIT_TIME != -1) { + if (panic_reboot_wait_time != 0) { + if (panic_reboot_wait_time != -1) { printf("Automatic reboot in %d seconds - " "press a key on the console to abort\n", - PANIC_REBOOT_WAIT_TIME); - for (loop = PANIC_REBOOT_WAIT_TIME * 10; + panic_reboot_wait_time); + for (loop = panic_reboot_wait_time * 10; loop > 0; --loop) { DELAY(1000 * 100); /* 1/10th second */ /* Did user type a key? */ From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 21:51:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 005F7644; Tue, 3 Dec 2013 21:51:16 +0000 (UTC) Received: from mail-qa0-x22a.google.com (mail-qa0-x22a.google.com [IPv6:2607:f8b0:400d:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A9081538; Tue, 3 Dec 2013 21:51:16 +0000 (UTC) Received: by mail-qa0-f42.google.com with SMTP id k4so5969693qaq.8 for ; Tue, 03 Dec 2013 13:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=HzvP7JziIVBW+ME38aFS74G0bcrEPmzyrzNa9nVU318=; b=VLHFM3q7jFRNH0/hbOc4LmFs7pmMJnkM0ujzWtN/V1N+GEpnCYI9QgN/5MmFs8gKgQ oVYvjWymBwEIxlUTEIHo+QZmn4gRNwwRmIW4/vGw0yEQVZgqNcMyCATZn15TyO+l+lrO +u10HnPHV8N65at3nHQTiV7tiA+Cwg6vVnKcyEAbjS812iZV7rZFWI3j+8U6BzVhQXhg E5bBNfbQvgvIonLgLaqErkro6vlAYXViCZooCsG8+Y0BnXMNoJq50WzR3WXfTZgXncy7 inqJXqkGLY7LbVZ0mmqR0PDwXnpNVAuk8V6p/brDbWNdiAKpzpLjVViM/9QBn6MbGkns fX0g== MIME-Version: 1.0 X-Received: by 10.49.15.3 with SMTP id t3mr26839022qec.22.1386107475658; Tue, 03 Dec 2013 13:51:15 -0800 (PST) Sender: carpeddiem@gmail.com Received: by 10.224.134.196 with HTTP; Tue, 3 Dec 2013 13:51:15 -0800 (PST) In-Reply-To: References: <201312031923.rB3JNtSn055377@svn.freebsd.org> Date: Tue, 3 Dec 2013 16:51:15 -0500 X-Google-Sender-Auth: cac9ZYSwEO6z-vcBOgtf2QEQw-g Message-ID: Subject: Re: svn commit: r258884 - in head: contrib/llvm/tools/lldb/include/lldb contrib/llvm/tools/lldb/include/lldb/API contrib/llvm/tools/lldb/include/lldb/Breakpoint contrib/llvm/tools/lldb/include/lldb/Cor... From: Ed Maste To: Eitan Adler Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 21:51:17 -0000 On 3 December 2013 15:48, Eitan Adler wrote: > On Tue, Dec 3, 2013 at 2:23 PM, Ed Maste wrote: >> Author: emaste >> Date: Tue Dec 3 19:23:54 2013 >> New Revision: 258884 >> URL: http://svnweb.freebsd.org/changeset/base/258884 >> >> Log: >> Update LLDB to upstream r196259 snapshot > > Thanks! > > When you update vendor sources can you please include a brief > changelog? It would help to know if its worth updating or what new > features to get excited about. :) LLDB is in sort of a "technology preview" state on FreeBSD at the moment, and each new snapshot brings a slew of bug fixes and improvements. At this point each snapshot is worth an update and rebuild for anyone testing. Before too long we'll be able to track LLDB releases (e.g. 3.5, 3.6) in FreeBSD just as we do with clang and llvm, and you can refer to the upstream changelogs. In this specific case the snapshot update was done as a prerequisite to the threaded inferior support, which I just committed in r258892. You can see the current state of the port at https://wiki.freebsd.org/lldb, and I'm very interested in hearing about any test results. From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 21:55:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E8BF84C; Tue, 3 Dec 2013 21:55:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A265159B; Tue, 3 Dec 2013 21:55:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3LtwvY008302; Tue, 3 Dec 2013 21:55:58 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3LtwfQ008301; Tue, 3 Dec 2013 21:55:58 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201312032155.rB3LtwfQ008301@svn.freebsd.org> From: Colin Percival Date: Tue, 3 Dec 2013 21:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258894 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 21:55:58 -0000 Author: cperciva Date: Tue Dec 3 21:55:57 2013 New Revision: 258894 URL: http://svnweb.freebsd.org/changeset/base/258894 Log: The rc system aggressively caches the contents of /etc/rc.conf in order to improve boot performance; this produces arguably astonishing (non-)results if /etc/rc.conf is modified during the boot process. Since performance considerations make it infeasible to automatically detect if the cached /etc/rc.conf parameters should be invalidated, provide a mechanism for explicitly requesting that /etc/rc.conf be reloaded: Catch SIGALRM and reload /etc/rc.conf if it is received. Discussed on: freebsd-rc MFC after: 3 days Modified: head/etc/rc Modified: head/etc/rc ============================================================================== --- head/etc/rc Tue Dec 3 21:35:25 2013 (r258893) +++ head/etc/rc Tue Dec 3 21:55:57 2013 (r258894) @@ -71,6 +71,11 @@ fi . /etc/rc.subr load_rc_config 'XXX' +# If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d +# scripts to perform "boot-time configuration" including enabling and +# disabling rc.d scripts which appear later in the boot order. +trap "_rc_conf_loaded=false; load_rc_config 'XXX'" ALRM + skip="-s nostart" if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then skip="$skip -s nojail" From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 22:13:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85509EC6; Tue, 3 Dec 2013 22:13:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 70E4416BD; Tue, 3 Dec 2013 22:13:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3MDYXK015840; Tue, 3 Dec 2013 22:13:34 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3MDYV0015838; Tue, 3 Dec 2013 22:13:34 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201312032213.rB3MDYV0015838@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Dec 2013 22:13:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r258895 - in vendor/lldb/dist/source: Breakpoint Symbol X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 22:13:34 -0000 Author: emaste Date: Tue Dec 3 22:13:33 2013 New Revision: 258895 URL: http://svnweb.freebsd.org/changeset/base/258895 Log: Import lldb as of SVN r196322 (git 49c127ae) (A number of files not required for the FreeBSD build have been removed.) Sponsored by: DARPA, AFRL Modified: vendor/lldb/dist/source/Breakpoint/BreakpointLocationList.cpp vendor/lldb/dist/source/Symbol/UnwindPlan.cpp Modified: vendor/lldb/dist/source/Breakpoint/BreakpointLocationList.cpp ============================================================================== --- vendor/lldb/dist/source/Breakpoint/BreakpointLocationList.cpp Tue Dec 3 21:55:57 2013 (r258894) +++ vendor/lldb/dist/source/Breakpoint/BreakpointLocationList.cpp Tue Dec 3 22:13:33 2013 (r258895) @@ -86,16 +86,13 @@ Compare (BreakpointLocationSP lhs, lldb: BreakpointLocationSP BreakpointLocationList::FindByID (lldb::break_id_t break_id) const { - BreakpointLocationSP bp_loc_sp; Mutex::Locker locker (m_mutex); - - collection::const_iterator begin = m_locations.begin(), end = m_locations.end(); - collection::const_iterator result; - result = std::lower_bound(begin, end, break_id, Compare); - if (result == end) - return bp_loc_sp; + collection::const_iterator end = m_locations.end(); + collection::const_iterator pos = std::lower_bound(m_locations.begin(), end, break_id, Compare); + if (pos != end && (*pos)->GetID() == break_id) + return *(pos); else - return *(result); + return BreakpointLocationSP(); } size_t Modified: vendor/lldb/dist/source/Symbol/UnwindPlan.cpp ============================================================================== --- vendor/lldb/dist/source/Symbol/UnwindPlan.cpp Tue Dec 3 21:55:57 2013 (r258894) +++ vendor/lldb/dist/source/Symbol/UnwindPlan.cpp Tue Dec 3 22:13:33 2013 (r258895) @@ -379,7 +379,19 @@ UnwindPlan::PlanValidAtAddress (Address { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND)); if (log) - log->Printf ("Testing if UnwindPlan is valid at pc 0x%" PRIx64 ": No unwind rows - is invalid."); + { + StreamString s; + if (addr.Dump (&s, NULL, Address::DumpStyleSectionNameOffset)) + { + log->Printf ("UnwindPlan is invalid -- no unwind rows for UnwindPlan '%s' at address %s", + m_source_name.GetCString(), s.GetData()); + } + else + { + log->Printf ("UnwindPlan is invalid -- no unwind rows for UnwindPlan '%s'", + m_source_name.GetCString()); + } + } return false; } @@ -389,7 +401,19 @@ UnwindPlan::PlanValidAtAddress (Address { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND)); if (log) - log->Printf ("Testing if UnwindPlan is valid at pc 0x%" PRIx64 ": No CFA register - is invalid."); + { + StreamString s; + if (addr.Dump (&s, NULL, Address::DumpStyleSectionNameOffset)) + { + log->Printf ("UnwindPlan is invalid -- no CFA register defined in row 0 for UnwindPlan '%s' at address %s", + m_source_name.GetCString(), s.GetData()); + } + else + { + log->Printf ("UnwindPlan is invalid -- no CFA register defined in row 0 for UnwindPlan '%s'", + m_source_name.GetCString()); + } + } return false; } From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 22:16:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6474FB1; Tue, 3 Dec 2013 22:16:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 37B9416E9; Tue, 3 Dec 2013 22:16:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3MGY8w016305; Tue, 3 Dec 2013 22:16:34 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3MGYmv016304; Tue, 3 Dec 2013 22:16:34 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201312032216.rB3MGYmv016304@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Dec 2013 22:16:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r258896 - vendor/lldb/lldb-r196322 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 22:16:34 -0000 Author: emaste Date: Tue Dec 3 22:16:33 2013 New Revision: 258896 URL: http://svnweb.freebsd.org/changeset/base/258896 Log: Tag (stripped) lldb r196322 Sponsored by: DARPA, AFRL Added: vendor/lldb/lldb-r196322/ - copied from r258895, vendor/lldb/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 22:26:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E64B43F5; Tue, 3 Dec 2013 22:26:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D1D3F179D; Tue, 3 Dec 2013 22:26:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3MQccF019606; Tue, 3 Dec 2013 22:26:38 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3MQcJ4019604; Tue, 3 Dec 2013 22:26:38 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201312032226.rB3MQcJ4019604@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Dec 2013 22:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258897 - in head/contrib/llvm/tools/lldb/source: Breakpoint Symbol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 22:26:39 -0000 Author: emaste Date: Tue Dec 3 22:26:38 2013 New Revision: 258897 URL: http://svnweb.freebsd.org/changeset/base/258897 Log: Update LLDB to upstream r196322 snapshot Upstream revisions of note: r196298 - Fix use of std::lower_bound r196322 - Fix log message for new invalidation checks Sponsored by: DARPA, AFRL Modified: head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationList.cpp head/contrib/llvm/tools/lldb/source/Symbol/UnwindPlan.cpp Directory Properties: head/contrib/llvm/tools/lldb/ (props changed) Modified: head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationList.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationList.cpp Tue Dec 3 22:16:33 2013 (r258896) +++ head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationList.cpp Tue Dec 3 22:26:38 2013 (r258897) @@ -86,16 +86,13 @@ Compare (BreakpointLocationSP lhs, lldb: BreakpointLocationSP BreakpointLocationList::FindByID (lldb::break_id_t break_id) const { - BreakpointLocationSP bp_loc_sp; Mutex::Locker locker (m_mutex); - - collection::const_iterator begin = m_locations.begin(), end = m_locations.end(); - collection::const_iterator result; - result = std::lower_bound(begin, end, break_id, Compare); - if (result == end) - return bp_loc_sp; + collection::const_iterator end = m_locations.end(); + collection::const_iterator pos = std::lower_bound(m_locations.begin(), end, break_id, Compare); + if (pos != end && (*pos)->GetID() == break_id) + return *(pos); else - return *(result); + return BreakpointLocationSP(); } size_t Modified: head/contrib/llvm/tools/lldb/source/Symbol/UnwindPlan.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Symbol/UnwindPlan.cpp Tue Dec 3 22:16:33 2013 (r258896) +++ head/contrib/llvm/tools/lldb/source/Symbol/UnwindPlan.cpp Tue Dec 3 22:26:38 2013 (r258897) @@ -379,7 +379,19 @@ UnwindPlan::PlanValidAtAddress (Address { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND)); if (log) - log->Printf ("Testing if UnwindPlan is valid at pc 0x%" PRIx64 ": No unwind rows - is invalid."); + { + StreamString s; + if (addr.Dump (&s, NULL, Address::DumpStyleSectionNameOffset)) + { + log->Printf ("UnwindPlan is invalid -- no unwind rows for UnwindPlan '%s' at address %s", + m_source_name.GetCString(), s.GetData()); + } + else + { + log->Printf ("UnwindPlan is invalid -- no unwind rows for UnwindPlan '%s'", + m_source_name.GetCString()); + } + } return false; } @@ -389,7 +401,19 @@ UnwindPlan::PlanValidAtAddress (Address { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND)); if (log) - log->Printf ("Testing if UnwindPlan is valid at pc 0x%" PRIx64 ": No CFA register - is invalid."); + { + StreamString s; + if (addr.Dump (&s, NULL, Address::DumpStyleSectionNameOffset)) + { + log->Printf ("UnwindPlan is invalid -- no CFA register defined in row 0 for UnwindPlan '%s' at address %s", + m_source_name.GetCString(), s.GetData()); + } + else + { + log->Printf ("UnwindPlan is invalid -- no CFA register defined in row 0 for UnwindPlan '%s'", + m_source_name.GetCString()); + } + } return false; } From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 22:31:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D70AE5A0; Tue, 3 Dec 2013 22:31:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B75C5181B; Tue, 3 Dec 2013 22:31:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3MVA9j022334; Tue, 3 Dec 2013 22:31:10 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3MV8LC022321; Tue, 3 Dec 2013 22:31:08 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201312032231.rB3MV8LC022321@svn.freebsd.org> From: David C Somayajulu Date: Tue, 3 Dec 2013 22:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258898 - in stable/9: share/man/man4 sys/conf sys/dev/qlxgbe sys/modules sys/modules/qlxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 22:31:10 -0000 Author: davidcs Date: Tue Dec 3 22:31:08 2013 New Revision: 258898 URL: http://svnweb.freebsd.org/changeset/base/258898 Log: MFC 250661,251076,251605,252580,254976,255003,258155 port dev/qlxgbe from HEAD Added: stable/9/share/man/man4/qlxgbe.4 - copied unchanged from r250661, head/share/man/man4/qlxgbe.4 stable/9/sys/dev/qlxgbe/ - copied from r250661, head/sys/dev/qlxgbe/ stable/9/sys/modules/qlxgbe/ - copied from r250661, head/sys/modules/qlxgbe/ Modified: stable/9/share/man/man4/Makefile stable/9/sys/conf/files.amd64 stable/9/sys/dev/qlxgbe/ql_hw.c stable/9/sys/dev/qlxgbe/ql_hw.h stable/9/sys/dev/qlxgbe/ql_ioctl.c stable/9/sys/dev/qlxgbe/ql_isr.c stable/9/sys/dev/qlxgbe/ql_misc.c stable/9/sys/dev/qlxgbe/ql_os.c stable/9/sys/modules/Makefile Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Tue Dec 3 22:26:38 2013 (r258897) +++ stable/9/share/man/man4/Makefile Tue Dec 3 22:31:08 2013 (r258898) @@ -362,6 +362,7 @@ MAN= aac.4 \ pty.4 \ puc.4 \ ${_qlxgb.4} \ + ${_qlxgbe.4} \ ral.4 \ random.4 \ rc.4 \ @@ -771,9 +772,11 @@ MLINKS+=lindev.4 full.4 .if ${MACHINE_CPUARCH} == "amd64" _qlxgb.4= qlxgb.4 +_qlxgbe.4= qlxgbe.4 _sfxge.4= sfxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 +MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 .endif Copied: stable/9/share/man/man4/qlxgbe.4 (from r250661, head/share/man/man4/qlxgbe.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/qlxgbe.4 Tue Dec 3 22:31:08 2013 (r258898, copy of r250661, head/share/man/man4/qlxgbe.4) @@ -0,0 +1,91 @@ +.\"- +.\" Copyright (c) 2013 Qlogic Corportaion +.\" 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$ +.\" +.Dd April 1, 2013 +.Dt QLXGBE 4 +.Os +.Sh NAME +.Nm qlxgbe +.Nd "QLogic 10 Gigabit Ethernet & CNA Adapter Driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device qlxgbe" +.Ed +.Pp +To load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_qlxgbe_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver supports IPv4 checksum offload, +TCP and UDP checksum offload for both IPv4 and IPv6, +Large Segment Offload for both IPv4 and IPv6, +Jumbo frames, VLAN Tag, and +Receive Side scaling. +For further hardware information, see +.Pa http://www.qlogic.com/ . +.Sh HARDWARE +The +.Nm +driver supports 10 Gigabit Ethernet & CNA Adapter based on the following +chipsets: +.Pp +.Bl -bullet -compact +.It +QLogic 8300 series +.El +.Sh SUPPORT +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An David C Somayajulu +at QLogic Corporation. Modified: stable/9/sys/conf/files.amd64 ============================================================================== --- stable/9/sys/conf/files.amd64 Tue Dec 3 22:26:38 2013 (r258897) +++ stable/9/sys/conf/files.amd64 Tue Dec 3 22:31:08 2013 (r258898) @@ -243,6 +243,13 @@ dev/qlxgb/qla_ioctl.c optional qlxgb pc dev/qlxgb/qla_isr.c optional qlxgb pci dev/qlxgb/qla_misc.c optional qlxgb pci dev/qlxgb/qla_os.c optional qlxgb pci +dev/qlxgbe/ql_dbg.c optional qlxgbe pci +dev/qlxgbe/ql_hw.c optional qlxgbe pci +dev/qlxgbe/ql_ioctl.c optional qlxgbe pci +dev/qlxgbe/ql_isr.c optional qlxgbe pci +dev/qlxgbe/ql_misc.c optional qlxgbe pci +dev/qlxgbe/ql_os.c optional qlxgbe pci +dev/qlxgbe/ql_reset.c optional qlxgbe pci dev/sfxge/common/efx_bootcfg.c optional sfxge inet pci dev/sfxge/common/efx_ev.c optional sfxge inet pci dev/sfxge/common/efx_filter.c optional sfxge inet pci Modified: stable/9/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.c Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_hw.c Tue Dec 3 22:31:08 2013 (r258898) @@ -212,6 +212,12 @@ ql_hw_add_sysctls(qla_host_t *ha) "Number of Rcv Rings Entries to post before updating" " RDS Ring Producer Index"); + ha->hw.min_lro_pkt_size = 512; + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "min_lro_pkt_size", CTLFLAG_RD, &ha->hw.min_lro_pkt_size, + ha->hw.min_lro_pkt_size, "minimum packet size to trigger lro"); + ha->hw.mdump_active = 0; SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), @@ -1069,6 +1075,11 @@ qla_config_fw_lro(qla_host_t *ha, uint16 fw_lro->cntxt_id = cntxt_id; + if (ha->hw.min_lro_pkt_size) { + fw_lro->flags |= Q8_MBX_FW_LRO_LOW_THRESHOLD; + fw_lro->low_threshold = ha->hw.min_lro_pkt_size; + } + if (qla_mbx_cmd(ha, (uint32_t *)fw_lro, (sizeof (q80_config_fw_lro_t) >> 2), ha->hw.mbox, (sizeof (q80_config_fw_lro_rsp_t) >> 2), 0)) { Modified: stable/9/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.h Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_hw.h Tue Dec 3 22:31:08 2013 (r258898) @@ -568,9 +568,13 @@ typedef struct _q80_config_fw_lro { #define Q8_MBX_FW_LRO_IPV6 0x2 #define Q8_MBX_FW_LRO_IPV4_WO_DST_IP_CHK 0x4 #define Q8_MBX_FW_LRO_IPV6_WO_DST_IP_CHK 0x8 +#define Q8_MBX_FW_LRO_LOW_THRESHOLD 0x10 uint8_t rsrvd; uint16_t cntxt_id; + + uint16_t low_threshold; + uint16_t rsrvd0; } __packed q80_config_fw_lro_t; typedef struct _q80_config_fw_lro_rsp { @@ -1521,6 +1525,7 @@ typedef struct _qla_hw { uint32_t health_count; uint32_t max_tx_segs; + uint32_t min_lro_pkt_size; /* Flash Descriptor Table */ qla_flash_desc_table_t fdt; @@ -1533,16 +1538,16 @@ typedef struct _qla_hw { } qla_hw_t; #define QL_UPDATE_RDS_PRODUCER_INDEX(ha, prod_reg, val) \ - WRITE_REG32(ha, prod_reg, val); + bus_write_4((ha->pci_reg), prod_reg, val); #define QL_UPDATE_TX_PRODUCER_INDEX(ha, val, i) \ - WRITE_REG32(ha, ha->hw.tx_cntxt[i].tx_prod_reg, val) + WRITE_REG32(ha, ha->hw.tx_cntxt[i].tx_prod_reg, val) #define QL_UPDATE_SDS_CONSUMER_INDEX(ha, i, val) \ - WRITE_REG32(ha, ha->hw.sds[i].sds_consumer, val) - -#define QL_ENABLE_INTERRUPTS(ha, i) WRITE_REG32(ha, ha->hw.intr_src[i], 0); + bus_write_4((ha->pci_reg), (ha->hw.sds[i].sds_consumer), val); +#define QL_ENABLE_INTERRUPTS(ha, i) \ + bus_write_4((ha->pci_reg), (ha->hw.intr_src[i]), 0); #define QL_BUFFER_ALIGN 16 Modified: stable/9/sys/dev/qlxgbe/ql_ioctl.c ============================================================================== --- head/sys/dev/qlxgbe/ql_ioctl.c Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_ioctl.c Tue Dec 3 22:31:08 2013 (r258898) @@ -223,6 +223,13 @@ ql_eioctl(struct cdev *dev, u_long cmd, } fw_dump = (qla_rd_fw_dump_t *)data; + + if ((fw_dump->md_template == NULL) || + (fw_dump->template_size != ha->hw.dma_buf.minidump.size)) { + rval = EINVAL; + break; + } + if ((rval = copyout(ha->hw.dma_buf.minidump.dma_b, fw_dump->md_template, fw_dump->template_size))) rval = ENXIO; Modified: stable/9/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- head/sys/dev/qlxgbe/ql_isr.c Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_isr.c Tue Dec 3 22:31:08 2013 (r258898) @@ -858,7 +858,6 @@ ql_isr(void *arg) int idx; qla_hw_t *hw; struct ifnet *ifp; - uint32_t data = 0; uint32_t ret = 0; ha = ivec->ha; @@ -871,12 +870,7 @@ ql_isr(void *arg) if (idx == 0) taskqueue_enqueue(ha->tx_tq, &ha->tx_task); - - - data = READ_REG32(ha, ha->hw.intr_src[idx]); - - if (data & 0x1 ) - ret = qla_rcv_isr(ha, idx, -1); + ret = qla_rcv_isr(ha, idx, -1); if (idx == 0) taskqueue_enqueue(ha->tx_tq, &ha->tx_task); Modified: stable/9/sys/dev/qlxgbe/ql_misc.c ============================================================================== --- head/sys/dev/qlxgbe/ql_misc.c Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_misc.c Tue Dec 3 22:31:08 2013 (r258898) @@ -321,7 +321,7 @@ qla_get_fdt(qla_host_t *ha) } while ((count < 10000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { qla_sem_unlock(ha, Q8_FLASH_UNLOCK); device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", @@ -401,7 +401,7 @@ qla_flash_write_enable(qla_host_t *ha, i } while ((count < 10000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); @@ -432,7 +432,7 @@ qla_erase_flash_sector(qla_host_t *ha, u } while (((count++) < 1000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); @@ -479,7 +479,7 @@ qla_erase_flash_sector(qla_host_t *ha, u } while (((count++) < 1000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); @@ -575,7 +575,7 @@ qla_wr_flash32(qla_host_t *ha, uint32_t } while ((count < 10000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); Modified: stable/9/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_os.c Tue Dec 3 22:31:08 2013 (r258898) @@ -1642,18 +1642,20 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha, __func__); - ql_minidump(ha); - if ((ha->pci_func & 0x1) == 0) { - if (!ha->msg_from_peer) + if (!ha->msg_from_peer) { qla_send_msg_to_peer(ha, QL_PEER_MSG_RESET); - while ((ha->msg_from_peer != QL_PEER_MSG_ACK) && msecs_100--) - qla_mdelay(__func__, 100); + while ((ha->msg_from_peer != QL_PEER_MSG_ACK) && + msecs_100--) + qla_mdelay(__func__, 100); + } ha->msg_from_peer = 0; + ql_minidump(ha); + (void) ql_init_hw(ha); qla_free_xmt_bufs(ha); qla_free_rcv_bufs(ha); Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Tue Dec 3 22:26:38 2013 (r258897) +++ stable/9/sys/modules/Makefile Tue Dec 3 22:31:08 2013 (r258898) @@ -271,6 +271,7 @@ SUBDIR= \ pty \ puc \ ${_qlxgb} \ + ${_qlxgbe} \ ral \ ${_ralfw} \ ${_random} \ @@ -713,7 +714,8 @@ _padlock= padlock .endif _pccard= pccard _qlxgb= qlxgb -_rdma= rdma +_qlxgbe= qlxgbe +_rdma= rdma _s3= s3 _safe= safe _scsi_low= scsi_low From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 23:16:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A893E58; Tue, 3 Dec 2013 23:16:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 677121A8D; Tue, 3 Dec 2013 23:16: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 rB3NG9jH036823; Tue, 3 Dec 2013 23:16:09 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3NG92u036822; Tue, 3 Dec 2013 23:16:09 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312032316.rB3NG92u036822@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 3 Dec 2013 23:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258899 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 23:16:09 -0000 Author: pjd Date: Tue Dec 3 23:16:08 2013 New Revision: 258899 URL: http://svnweb.freebsd.org/changeset/base/258899 Log: Only the shared library is installed in /lib/. Static library and symlink to shared library stays in /usr/lib/. Don't delete them. Reported by: jkim Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 3 22:31:08 2013 (r258898) +++ head/ObsoleteFiles.inc Tue Dec 3 23:16:08 2013 (r258899) @@ -39,11 +39,7 @@ # done # 20131202: libcapsicum and libcasper moved to /lib/ -OLD_FILES+=usr/lib/libcapsicum.a -OLD_FILES+=usr/lib/libcapsicum.so OLD_LIBS+=usr/lib/libcapsicum.so.0 -OLD_FILES+=usr/lib/libcasper.a -OLD_FILES+=usr/lib/libcasper.so OLD_LIBS+=usr/lib/libcasper.so.0 # 20131109: extattr(2) mlinks fixed OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 23:25:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2AA449E; Tue, 3 Dec 2013 23:25:39 +0000 (UTC) Received: from mail.egr.msu.edu (boomhauer.egr.msu.edu [35.9.37.167]) by mx1.freebsd.org (Postfix) with ESMTP id C2B5F1B1C; Tue, 3 Dec 2013 23:25:39 +0000 (UTC) Received: from boomhauer (localhost [127.0.0.1]) by mail.egr.msu.edu (Postfix) with ESMTP id 7C1641BC5; Tue, 3 Dec 2013 18:18:20 -0500 (EST) X-Virus-Scanned: amavisd-new at egr.msu.edu Received: from mail.egr.msu.edu ([127.0.0.1]) by boomhauer (boomhauer.egr.msu.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N6MCVXpCohEI; Tue, 3 Dec 2013 18:18:20 -0500 (EST) Received: from daemon.localdomain (daemon.egr.msu.edu [35.9.44.65]) by mail.egr.msu.edu (Postfix) with ESMTP id 53BE91BC0; Tue, 3 Dec 2013 18:18:20 -0500 (EST) Received: by daemon.localdomain (Postfix, from userid 21281) id 4F2B63412F; Tue, 3 Dec 2013 18:18:20 -0500 (EST) Date: Tue, 3 Dec 2013 18:18:20 -0500 From: Adam McDougall To: "Justin T. Gibbs" , royger@FreeBSD.org Subject: Re: svn commit: r257876 - head/sys/dev/xen/control Message-ID: <20131203231820.GH5386@egr.msu.edu> References: <201311090307.rA937nP7076076@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201311090307.rA937nP7076076@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 23:25:40 -0000 If 're' permits, could this be MFC'ed for 10.0? It isn't important but it would be convenient. Thanks. On Sat, Nov 09, 2013 at 03:07:49AM +0000, Justin T. Gibbs wrote: Author: gibbs Date: Sat Nov 9 03:07:48 2013 New Revision: 257876 URL: http://svnweb.freebsd.org/changeset/base/257876 Log: On XenServer the "halt" message is used instead of "poweroff", which makes FreeBSD halt but not poweroff (as expected when issuing a shutdown from the VM manager). Fix this by using the same handler for both "halt" and "poweroff". NB: The "halt" signal seems to be used on XenServer only. The OSS Xen toolstack (xl) uses "poweroff" instead. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs MFC after: 2 days Modified: head/sys/dev/xen/control/control.c Modified: head/sys/dev/xen/control/control.c ============================================================================== --- head/sys/dev/xen/control/control.c Sat Nov 9 00:59:31 2013 (r257875) +++ head/sys/dev/xen/control/control.c Sat Nov 9 03:07:48 2013 (r257876) @@ -158,7 +158,6 @@ static xctrl_shutdown_handler_t xctrl_po static xctrl_shutdown_handler_t xctrl_reboot; static xctrl_shutdown_handler_t xctrl_suspend; static xctrl_shutdown_handler_t xctrl_crash; -static xctrl_shutdown_handler_t xctrl_halt; /*-------------------------- Private Data Structures -------------------------*/ /** Element type for lookup table of event name to handler. */ @@ -173,7 +172,7 @@ static const struct xctrl_shutdown_reaso { "reboot", xctrl_reboot }, { "suspend", xctrl_suspend }, { "crash", xctrl_crash }, - { "halt", xctrl_halt }, + { "halt", xctrl_poweroff }, }; struct xctrl_softc { @@ -441,12 +440,6 @@ xctrl_crash() panic("Xen directed crash"); } -static void -xctrl_halt() -{ - shutdown_nice(RB_HALT); -} - /*------------------------------ Event Reception -----------------------------*/ static void xctrl_on_watch_event(struct xs_watch *watch, const char **vec, unsigned int len) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Tue Dec 3 23:42:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18D2761A; Tue, 3 Dec 2013 23:42:23 +0000 (UTC) Received: from aslan.scsiguy.com (aslan.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D31E51D02; Tue, 3 Dec 2013 23:42:22 +0000 (UTC) Received: from [10.85.60.86] (207-225-98-3.dia.static.qwest.net [207.225.98.3]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id rB3Ng8qM026379 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 3 Dec 2013 16:42:12 -0700 (MST) (envelope-from gibbs@FreeBSD.org) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: svn commit: r257876 - head/sys/dev/xen/control From: "Justin T. Gibbs" In-Reply-To: <20131203231820.GH5386@egr.msu.edu> Date: Tue, 3 Dec 2013 16:42:04 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <9D8F6047-59FE-4B0A-997F-6390209CFEE6@FreeBSD.org> References: <201311090307.rA937nP7076076@svn.freebsd.org> <20131203231820.GH5386@egr.msu.edu> To: Adam McDougall X-Mailer: Apple Mail (2.1822) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Tue, 03 Dec 2013 16:42:12 -0700 (MST) Cc: svn-src-all@freebsd.org, =?windows-1252?Q?Roger_Pau_Monn=E9?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 23:42:23 -0000 A request to merge is currently pending with re@. =97 Justin On Dec 3, 2013, at 4:18 PM, Adam McDougall wrote: > If 're' permits, could this be MFC'ed for 10.0? It isn't important > but it would be convenient. Thanks. >=20 > On Sat, Nov 09, 2013 at 03:07:49AM +0000, Justin T. Gibbs wrote: >=20 > Author: gibbs > Date: Sat Nov 9 03:07:48 2013 > New Revision: 257876 > URL: http://svnweb.freebsd.org/changeset/base/257876 >=20 > Log: > On XenServer the "halt" message is used instead of "poweroff", = which > makes FreeBSD halt but not poweroff (as expected when issuing a > shutdown from the VM manager). Fix this by using the same handler > for both "halt" and "poweroff". >=20 > NB: The "halt" signal seems to be used on XenServer only. The OSS > Xen toolstack (xl) uses "poweroff" instead. >=20 > Submitted by: Roger Pau Monn=E9 > Sponsored by: Citrix Systems R&D > Reviewed by: gibbs > MFC after: 2 days >=20 > Modified: > head/sys/dev/xen/control/control.c >=20 > Modified: head/sys/dev/xen/control/control.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/xen/control/control.c Sat Nov 9 00:59:31 2013 = (r257875) > +++ head/sys/dev/xen/control/control.c Sat Nov 9 03:07:48 2013 = (r257876) > @@ -158,7 +158,6 @@ static xctrl_shutdown_handler_t xctrl_po > static xctrl_shutdown_handler_t xctrl_reboot; > static xctrl_shutdown_handler_t xctrl_suspend; > static xctrl_shutdown_handler_t xctrl_crash; > -static xctrl_shutdown_handler_t xctrl_halt; >=20 > /*-------------------------- Private Data Structures = -------------------------*/ > /** Element type for lookup table of event name to handler. */ > @@ -173,7 +172,7 @@ static const struct xctrl_shutdown_reaso > { "reboot", xctrl_reboot }, > { "suspend", xctrl_suspend }, > { "crash", xctrl_crash }, > - { "halt", xctrl_halt }, > + { "halt", xctrl_poweroff }, > }; >=20 > struct xctrl_softc { > @@ -441,12 +440,6 @@ xctrl_crash() > panic("Xen directed crash"); > } >=20 > -static void > -xctrl_halt() > -{ > - shutdown_nice(RB_HALT); > -} > - > /*------------------------------ Event Reception = -----------------------------*/ > static void > xctrl_on_watch_event(struct xs_watch *watch, const char **vec, = unsigned int len) > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to = "svn-src-all-unsubscribe@freebsd.org" >=20 From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 00:10:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 824C29E0; Wed, 4 Dec 2013 00:10:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F2F71ED2; Wed, 4 Dec 2013 00:10:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB40Ac82056906; Wed, 4 Dec 2013 00:10:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB40AcCV056904; Wed, 4 Dec 2013 00:10:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312040010.rB40AcCV056904@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 4 Dec 2013 00:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258900 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 00:10:38 -0000 Author: pjd Date: Wed Dec 4 00:10:37 2013 New Revision: 258900 URL: http://svnweb.freebsd.org/changeset/base/258900 Log: Break the loop once we know we have the SYF_CAPENABLED flag. Modified: head/sys/kern/makesyscalls.sh Modified: head/sys/kern/makesyscalls.sh ============================================================================== --- head/sys/kern/makesyscalls.sh Tue Dec 3 23:16:08 2013 (r258899) +++ head/sys/kern/makesyscalls.sh Wed Dec 4 00:10:37 2013 (r258900) @@ -326,6 +326,7 @@ s/\$//g for (cap in capenabled) { if (funcname == capenabled[cap]) { flags = "SYF_CAPENABLED"; + break; } } From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 00:28:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FAD1C6A; Wed, 4 Dec 2013 00:28:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7C0031F95; Wed, 4 Dec 2013 00:28:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB40SjZb061475; Wed, 4 Dec 2013 00:28:45 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB40Sj9l061474; Wed, 4 Dec 2013 00:28:45 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201312040028.rB40Sj9l061474@svn.freebsd.org> From: Sean Bruno Date: Wed, 4 Dec 2013 00:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258901 - head/usr.sbin/mfiutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 00:28:45 -0000 Author: sbruno Date: Wed Dec 4 00:28:44 2013 New Revision: 258901 URL: http://svnweb.freebsd.org/changeset/base/258901 Log: svn r251516 resized the buf argument a bit too much. Pass a hardcoded size of 6 to humanize_number() to resolve this. PR: 184405 Submitted by: jhb MFC after: 2 weeks Modified: head/usr.sbin/mfiutil/mfi_show.c Modified: head/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_show.c Wed Dec 4 00:10:37 2013 (r258900) +++ head/usr.sbin/mfiutil/mfi_show.c Wed Dec 4 00:28:44 2013 (r258901) @@ -320,7 +320,7 @@ print_pd(struct mfi_pd_info *info, int s const char *s; char buf[256]; - humanize_number(buf, sizeof(buf), info->raw_size * 512, "", + humanize_number(buf, 6, info->raw_size * 512, "", HN_AUTOSCALE, HN_B | HN_NOSPACE |HN_DECIMAL); printf("(%6s) ", buf); if (info->state.ddf.v.pd_type.is_foreign) { From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 01:35:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47C55ED6; Wed, 4 Dec 2013 01:35:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A1F61389; Wed, 4 Dec 2013 01:35: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 rB41Z4cg084689; Wed, 4 Dec 2013 01:35:04 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB41Z4GD084688; Wed, 4 Dec 2013 01:35:04 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312040135.rB41Z4GD084688@svn.freebsd.org> From: Mark Johnston Date: Wed, 4 Dec 2013 01:35:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258902 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 01:35:05 -0000 Author: markj Date: Wed Dec 4 01:35:04 2013 New Revision: 258902 URL: http://svnweb.freebsd.org/changeset/base/258902 Log: The uaddr, ufunc, umod and usym functions all seem to work as expected on FreeBSD, so stop hiding them behind a "#if defined(sun)". Reported by: Prashanth Kumar Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Wed Dec 4 00:28:44 2013 (r258901) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Wed Dec 4 01:35:04 2013 (r258902) @@ -487,22 +487,16 @@ static const dt_ident_t _dtrace_globals[ DT_VERS_1_0, &dt_idops_func, "void(...)" }, { "typeref", DT_IDENT_FUNC, 0, DIF_SUBR_TYPEREF, DT_ATTR_STABCMN, DT_VERS_1_1, &dt_idops_func, "uintptr_t *(void *, size_t, string, size_t)" }, -#if defined(sun) { "uaddr", DT_IDENT_ACTFUNC, 0, DT_ACT_UADDR, DT_ATTR_STABCMN, DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" }, -#endif { "ucaller", DT_IDENT_SCALAR, 0, DIF_VAR_UCALLER, DT_ATTR_STABCMN, DT_VERS_1_2, &dt_idops_type, "uint64_t" }, -#if defined(sun) { "ufunc", DT_IDENT_ACTFUNC, 0, DT_ACT_USYM, DT_ATTR_STABCMN, DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" }, -#endif { "uid", DT_IDENT_SCALAR, 0, DIF_VAR_UID, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "uid_t" }, -#if defined(sun) { "umod", DT_IDENT_ACTFUNC, 0, DT_ACT_UMOD, DT_ATTR_STABCMN, DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" }, -#endif { "uregs", DT_IDENT_ARRAY, 0, DIF_VAR_UREGS, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_regs, NULL }, { "ustack", DT_IDENT_ACTFUNC, 0, DT_ACT_USTACK, DT_ATTR_STABCMN, DT_VERS_1_0, @@ -510,10 +504,8 @@ static const dt_ident_t _dtrace_globals[ { "ustackdepth", DT_IDENT_SCALAR, 0, DIF_VAR_USTACKDEPTH, DT_ATTR_STABCMN, DT_VERS_1_2, &dt_idops_type, "uint32_t" }, -#if defined(sun) { "usym", DT_IDENT_ACTFUNC, 0, DT_ACT_USYM, DT_ATTR_STABCMN, DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" }, -#endif { "vtimestamp", DT_IDENT_SCALAR, 0, DIF_VAR_VTIMESTAMP, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "uint64_t" }, From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 01:40:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF7EC115; Wed, 4 Dec 2013 01:40:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9ADDF13C1; Wed, 4 Dec 2013 01:40:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB41eeXl087711; Wed, 4 Dec 2013 01:40:40 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB41edKD087704; Wed, 4 Dec 2013 01:40:39 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312040140.rB41edKD087704@svn.freebsd.org> From: Mark Johnston Date: Wed, 4 Dec 2013 01:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258903 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n tools/test/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 01:40:40 -0000 Author: markj Date: Wed Dec 4 01:40:39 2013 New Revision: 258903 URL: http://svnweb.freebsd.org/changeset/base/258903 Log: Enable some previously-disabled DTrace tests for umod, ufunc and usym. They expect the installed ksh binary to be named "ksh", which is not the case when it's installed on FreeBSD via the shells/ksh93 port. Allow for it to be "ksh93" as well so that the tests can actually pass. Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh head/tools/test/dtrace/Makefile Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh Wed Dec 4 01:35:04 2013 (r258902) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh Wed Dec 4 01:40:39 2013 (r258903) @@ -64,7 +64,7 @@ child=$! # ksh doing work. (This actually goes one step further and assumes that we # catch some non-static function in ksh.) # -script | tee /dev/fd/2 | grep 'ksh`[a-zA-Z_]' > /dev/null +script | tee /dev/fd/2 | egrep 'ksh(93)?`[a-zA-Z_]' > /dev/null status=$? kill $child Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh Wed Dec 4 01:35:04 2013 (r258902) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh Wed Dec 4 01:40:39 2013 (r258903) @@ -62,7 +62,7 @@ child=$! # # The only thing we can be sure of here is that ksh is doing some work. # -script | tee /dev/fd/2 | grep -w ksh > /dev/null +script | tee /dev/fd/2 | egrep -w 'ksh(93)?' > /dev/null status=$? kill $child Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh Wed Dec 4 01:35:04 2013 (r258902) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh Wed Dec 4 01:40:39 2013 (r258903) @@ -63,7 +63,7 @@ child=$! # This test is essentially the same as that in the ufunc test; see that # test for the rationale. # -script | tee /dev/fd/2 | grep 'ksh`[a-zA-Z_]' > /dev/null +script | tee /dev/fd/2 | egrep 'ksh(93)?`[a-zA-Z_]' > /dev/null status=$? kill $child Modified: head/tools/test/dtrace/Makefile ============================================================================== --- head/tools/test/dtrace/Makefile Wed Dec 4 01:35:04 2013 (r258902) +++ head/tools/test/dtrace/Makefile Wed Dec 4 01:40:39 2013 (r258903) @@ -59,7 +59,6 @@ IGNORE= \ ${TESTSRCDIR}/tst/common/proc/tst.discard.ksh \ ${TESTSRCDIR}/tst/common/proc/tst.signal.ksh \ ${TESTSRCDIR}/tst/common/proc/tst.startexit.ksh \ - ${TESTSRCDIR}/tst/common/profile-n/tst.ufuncsort.c \ ${TESTSRCDIR}/tst/common/scalars/tst.misc.d \ ${TESTSRCDIR}/tst/common/scalars/tst.selfarray2.d \ ${TESTSRCDIR}/tst/common/sysevent/tst.post.c \ @@ -115,10 +114,6 @@ NOTWORK+= \ ${TESTSRCDIR}/tst/common/profile-n/tst.func.ksh \ ${TESTSRCDIR}/tst/common/profile-n/tst.mod.ksh \ ${TESTSRCDIR}/tst/common/profile-n/tst.sym.ksh \ - ${TESTSRCDIR}/tst/common/profile-n/tst.ufunc.ksh \ - ${TESTSRCDIR}/tst/common/profile-n/tst.ufuncsort.ksh \ - ${TESTSRCDIR}/tst/common/profile-n/tst.umod.ksh \ - ${TESTSRCDIR}/tst/common/profile-n/tst.usym.ksh \ ${TESTSRCDIR}/tst/common/safety/tst.basename.d \ ${TESTSRCDIR}/tst/common/safety/tst.caller.d \ ${TESTSRCDIR}/tst/common/safety/tst.cleanpath.d \ From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 02:27:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7BB0EC5; Wed, 4 Dec 2013 02:27:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 945AC1752; Wed, 4 Dec 2013 02:27:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB42Rq2W002564; Wed, 4 Dec 2013 02:27:52 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB42RqUZ002563; Wed, 4 Dec 2013 02:27:52 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312040227.rB42RqUZ002563@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 4 Dec 2013 02:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258904 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 02:27:52 -0000 Author: pfg Date: Wed Dec 4 02:27:52 2013 New Revision: 258904 URL: http://svnweb.freebsd.org/changeset/base/258904 Log: ext2fs: add two new reserved inodes. According to online documentation [1], Ext4 has two new "special" inodes so add the new exclude and replica inodes. Reference: [1] https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout Reported by: Mike Ma MFC after: 3 weeks Modified: head/sys/fs/ext2fs/ext2_dinode.h Modified: head/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- head/sys/fs/ext2fs/ext2_dinode.h Wed Dec 4 01:40:39 2013 (r258903) +++ head/sys/fs/ext2fs/ext2_dinode.h Wed Dec 4 02:27:52 2013 (r258904) @@ -44,6 +44,8 @@ #define EXT2_UNDELDIRINO ((ino_t)6) #define EXT2_RESIZEINO ((ino_t)7) #define EXT2_JOURNALINO ((ino_t)8) +#define EXT2_EXCLUDEINO ((ino_t)9) +#define EXT2_REPLICAINO ((ino_t)10) #define EXT2_FIRSTINO ((ino_t)11) /* From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 04:28:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F52D2F5; Wed, 4 Dec 2013 04:28:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F04A11EDE; Wed, 4 Dec 2013 04:28:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB44S0rA045017; Wed, 4 Dec 2013 04:28:00 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB44S0Zf045016; Wed, 4 Dec 2013 04:28:00 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312040428.rB44S0Zf045016@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Dec 2013 04:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258905 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 04:28:01 -0000 Author: eadler Date: Wed Dec 4 04:28:00 2013 New Revision: 258905 URL: http://svnweb.freebsd.org/changeset/base/258905 Log: Turn 'n' into a local variable. This is required for additional changes. Submitted by: Sebastian Huber Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Dec 4 02:27:52 2013 (r258904) +++ head/sbin/route/route.c Wed Dec 4 04:28:00 2013 (r258905) @@ -497,7 +497,8 @@ routename(struct sockaddr *sa) const char *cp; static char line[NI_MAXHOST]; static char domain[MAXHOSTNAMELEN + 1]; - static int first = 1, n; + static int first = 1; + int n; if (first) { first = 0; From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 04:28:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C16A6433; Wed, 4 Dec 2013 04:28:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ADE691EE6; Wed, 4 Dec 2013 04:28:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB44Snu1045143; Wed, 4 Dec 2013 04:28:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB44Snu7045141; Wed, 4 Dec 2013 04:28:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312040428.rB44Snu7045141@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Dec 2013 04:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258906 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 04:28:49 -0000 Author: eadler Date: Wed Dec 4 04:28:49 2013 New Revision: 258906 URL: http://svnweb.freebsd.org/changeset/base/258906 Log: Add const qualifier where appropriate Submitted by: Sebastian Huber Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Dec 4 04:28:00 2013 (r258905) +++ head/sbin/route/route.c Wed Dec 4 04:28:49 2013 (r258906) @@ -1554,7 +1554,7 @@ rtmsg(int cmd, int flags, int fib) return (0); } -static const char *msgtypes[] = { +static const char *const msgtypes[] = { "", "RTM_ADD: Add Route", "RTM_DELETE: Delete Route", From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 04:29:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2F7D580; Wed, 4 Dec 2013 04:29:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A02061EF1; Wed, 4 Dec 2013 04:29:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB44TqAa045295; Wed, 4 Dec 2013 04:29:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB44TqWJ045294; Wed, 4 Dec 2013 04:29:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312040429.rB44TqWJ045294@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Dec 2013 04:29:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258907 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 04:29:52 -0000 Author: eadler Date: Wed Dec 4 04:29:52 2013 New Revision: 258907 URL: http://svnweb.freebsd.org/changeset/base/258907 Log: Add const qualifier where appropriate Submitted by: Sebastian Huber Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Dec 4 04:28:49 2013 (r258906) +++ head/sbin/route/route.c Wed Dec 4 04:29:52 2013 (r258907) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); static struct keytab { const char *kt_cp; int kt_i; -} keywords[] = { +} const keywords[] = { #include "keywords.h" {0, 0} }; @@ -1848,7 +1848,7 @@ printb(int b, const char *str) int keyword(const char *cp) { - struct keytab *kt = keywords; + const struct keytab *kt = keywords; while (kt->kt_cp != NULL && strcmp(kt->kt_cp, cp) != 0) kt++; From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 05:00:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5243995F for ; Wed, 4 Dec 2013 05:00:48 +0000 (UTC) Received: from mail-qe0-x22b.google.com (mail-qe0-x22b.google.com [IPv6:2607:f8b0:400d:c02::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0556910AA for ; Wed, 4 Dec 2013 05:00:47 +0000 (UTC) Received: by mail-qe0-f43.google.com with SMTP id 2so15565614qeb.2 for ; Tue, 03 Dec 2013 21:00:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=L2FHVNvNdhh24ipcKJPKKWNLgKLcxFIWxmfwv+MJPi0=; b=oaxQlas3cmTCxOkHAW/G5VAZWyC5CPPuuQgAaBBP6KwE8jsuduzOEFURhb+JpJmXUG Omivi7tUnId4xkO0LqfhecL8Z9MPLqoXTDthgVHKnMWWXA354IWZY4zbB0NYesUG3vjm TCh8zGwSmI53ShTy5vF0arnfjNUz/5Ofzjftc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=L2FHVNvNdhh24ipcKJPKKWNLgKLcxFIWxmfwv+MJPi0=; b=XXm9HlGnfbqIuFuEdNAUfIpctlbsGVqqaM/alzFZFQRKryUdOMGktHruvju3exQud0 8T9wZdszKiPYdJErwTMJsUDzEt+64cgnUj5YG6o6THkjqPr+3M72Gg+fGMIVUhiGuM3k ST0biJ2E66+W7kLSFP2cZ6CoWLIYDd1ua6lyexTQ+9mvxguQRqErUc6QyL4FhDGv5cN4 sPoJwvpaNJkxTfVBxduQHC/TuM9kYD0ckPdjciPgpLxIfQ9KxzOUBG/Ba6DX7NooYE+J ONQH4qiBLNhA0xF7hYNVryO0+gGGQPPTu2V1MeYQZ6dLN8r8P3nmYsRJb5tp3bkSPwgb temw== X-Gm-Message-State: ALoCoQmWnVUDeP92jcK/wdswmymSzvZZajaBZ0mRT4nV7tI+gyOVv0ygMY2velfkYxkCq4IrhQwf X-Received: by 10.224.26.140 with SMTP id e12mr76218447qac.54.1386133246856; Tue, 03 Dec 2013 21:00:46 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.86.42 with HTTP; Tue, 3 Dec 2013 21:00:16 -0800 (PST) In-Reply-To: <201312040028.rB40Sj9l061474@svn.freebsd.org> References: <201312040028.rB40Sj9l061474@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Dec 2013 00:00:16 -0500 X-Google-Sender-Auth: wK39qHzAxQrPEpHglR909JAdiwE Message-ID: Subject: Re: svn commit: r258901 - head/usr.sbin/mfiutil To: Sean Bruno Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 05:00:48 -0000 On Tue, Dec 3, 2013 at 7:28 PM, Sean Bruno wrote: > Author: sbruno > Date: Wed Dec 4 00:28:44 2013 > New Revision: 258901 > URL: http://svnweb.freebsd.org/changeset/base/258901 > > Log: > svn r251516 resized the buf argument a bit too much. Pass a hardcoded > size of 6 to humanize_number() to resolve this. Where is the value of 6 derived from? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 05:06:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06631BD6; Wed, 4 Dec 2013 05:06:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DAFB910DA; Wed, 4 Dec 2013 05:06: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 rB456ugO058513; Wed, 4 Dec 2013 05:06:56 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB456u6r058512; Wed, 4 Dec 2013 05:06:56 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312040506.rB456u6r058512@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Dec 2013 05:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258908 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 05:06:57 -0000 Author: eadler Date: Wed Dec 4 05:06:56 2013 New Revision: 258908 URL: http://svnweb.freebsd.org/changeset/base/258908 Log: Avoid using a static buffer in atalk_ntoa. This will help allow users to call route(1) as a library. Submitted by: Sebastian Huber (older version) Discussed on: -hackers Reviwed by: adri (different older version) Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Dec 4 04:29:52 2013 (r258907) +++ head/sbin/route/route.c Wed Dec 4 05:06:56 2013 (r258908) @@ -71,6 +71,8 @@ __FBSDID("$FreeBSD$"); #include #include +#define ATALK_BUF_SIZE 20 + static struct keytab { const char *kt_cp; int kt_i; @@ -92,7 +94,7 @@ static int defaultfib; static int numfibs; static int atalk_aton(const char *, struct at_addr *); -static char *atalk_ntoa(struct at_addr); +static char *atalk_ntoa(struct at_addr, char [ATALK_BUF_SIZE]); static void printb(int, const char *); static void flushroutes(int argc, char *argv[]); static int flushroutes_fib(int); @@ -495,6 +497,7 @@ routename(struct sockaddr *sa) { struct sockaddr_dl *sdl; const char *cp; + char atalk_buf[ATALK_BUF_SIZE]; static char line[NI_MAXHOST]; static char domain[MAXHOSTNAMELEN + 1]; static int first = 1; @@ -577,7 +580,8 @@ routename(struct sockaddr *sa) #endif case AF_APPLETALK: (void)snprintf(line, sizeof(line), "atalk %s", - atalk_ntoa(((struct sockaddr_at *)(void *)sa)->sat_addr)); + atalk_ntoa(((struct sockaddr_at *)(void *)sa)->sat_addr, + atalk_buf)); break; case AF_LINK: @@ -622,6 +626,7 @@ netname(struct sockaddr *sa) { struct sockaddr_dl *sdl; static char line[MAXHOSTNAMELEN + 1]; + char atalk_buf[ATALK_BUF_SIZE]; int n; #ifdef INET struct netent *np = NULL; @@ -685,7 +690,8 @@ netname(struct sockaddr *sa) case AF_APPLETALK: (void)snprintf(line, sizeof(line), "atalk %s", - atalk_ntoa(((struct sockaddr_at *)(void *)sa)->sat_addr)); + atalk_ntoa(((struct sockaddr_at *)(void *)sa)->sat_addr, + atalk_buf)); break; case AF_LINK: @@ -1858,6 +1864,7 @@ keyword(const char *cp) static void sodump(struct sockaddr *sa, const char *which) { + char atalk_buf[ATALK_BUF_SIZE]; #ifdef INET6 char nbuf[INET6_ADDRSTRLEN]; #endif @@ -1882,7 +1889,8 @@ sodump(struct sockaddr *sa, const char * #endif case AF_APPLETALK: (void)printf("%s: atalk %s; ", which, - atalk_ntoa(((struct sockaddr_at *)(void *)sa)->sat_addr)); + atalk_ntoa(((struct sockaddr_at *)(void *)sa)->sat_addr, + atalk_buf)); break; } (void)fflush(stdout); @@ -1952,11 +1960,9 @@ atalk_aton(const char *text, struct at_a } static char * -atalk_ntoa(struct at_addr at) +atalk_ntoa(struct at_addr at, char buf[ATALK_BUF_SIZE]) { - static char buf[20]; - - (void)snprintf(buf, sizeof(buf), "%u.%u", ntohs(at.s_net), at.s_node); - buf[sizeof(buf) - 1] = '\0'; + (void)snprintf(buf, ATALK_BUF_SIZE, "%u.%u", ntohs(at.s_net), at.s_node); + buf[ATALK_BUF_SIZE - 1] = '\0'; return(buf); } From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 05:17:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17081E64; Wed, 4 Dec 2013 05:17:31 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E6B14115A; Wed, 4 Dec 2013 05:17:29 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rB45HQ8R067366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 4 Dec 2013 09:17:26 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rB45HQbw067365; Wed, 4 Dec 2013 09:17:26 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 4 Dec 2013 09:17:26 +0400 From: Gleb Smirnoff To: Eitan Adler Subject: Re: svn commit: r258908 - head/sbin/route Message-ID: <20131204051726.GD48919@FreeBSD.org> References: <201312040506.rB456u6r058512@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201312040506.rB456u6r058512@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 05:17:31 -0000 On Wed, Dec 04, 2013 at 05:06:56AM +0000, Eitan Adler wrote: E> Author: eadler E> Date: Wed Dec 4 05:06:56 2013 E> New Revision: 258908 E> URL: http://svnweb.freebsd.org/changeset/base/258908 E> E> Log: E> Avoid using a static buffer in atalk_ntoa. This will help allow users to call route(1) as a library. E> E> Submitted by: Sebastian Huber (older version) E> Discussed on: -hackers E> Reviwed by: adri (different older version) Does this mean someone is still using atalk? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 07:38:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 163B4535; Wed, 4 Dec 2013 07:38:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA9891931; Wed, 4 Dec 2013 07:38:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB47cOhX009268; Wed, 4 Dec 2013 07:38:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB47cOsV009261; Wed, 4 Dec 2013 07:38:24 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312040738.rB47cOsV009261@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 4 Dec 2013 07:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258909 - in head: sbin/mdconfig sys/dev/md sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 07:38:25 -0000 Author: trasz Date: Wed Dec 4 07:38:23 2013 New Revision: 258909 URL: http://svnweb.freebsd.org/changeset/base/258909 Log: Add "null" backend to mdconfig(8). This does exactly what the name suggests, and is somewhat useful for benchmarking. MFC after: 1 month No objections from: kib Sponsored by: The FreeBSD Foundation Modified: head/sbin/mdconfig/mdconfig.8 head/sbin/mdconfig/mdconfig.c head/sys/dev/md/md.c head/sys/sys/mdioctl.h Modified: head/sbin/mdconfig/mdconfig.8 ============================================================================== --- head/sbin/mdconfig/mdconfig.8 Wed Dec 4 05:06:56 2013 (r258908) +++ head/sbin/mdconfig/mdconfig.8 Wed Dec 4 07:38:23 2013 (r258909) @@ -41,7 +41,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 26, 2013 +.Dd November 30, 2013 .Dt MDCONFIG 8 .Os .Sh NAME @@ -122,6 +122,8 @@ Using backing is generally preferred instead of using .Cm malloc backing. +.It Cm null +Bitsink; all writes do nothing, all reads return zeroes. .El .It Fl f Ar file Filename to use for the vnode type memory disk. Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Wed Dec 4 05:06:56 2013 (r258908) +++ head/sbin/mdconfig/mdconfig.c Wed Dec 4 07:38:23 2013 (r258909) @@ -155,6 +155,9 @@ main(int argc, char **argv) } else if (!strcmp(optarg, "swap")) { mdio.md_type = MD_SWAP; mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; + } else if (!strcmp(optarg, "null")) { + mdio.md_type = MD_NULL; + mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; } else errx(1, "unknown type: %s", optarg); break; @@ -287,9 +290,10 @@ main(int argc, char **argv) } } - if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP) && - sflag == NULL) - errx(1, "must specify -s for -t malloc or -t swap"); + if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP || + mdio.md_type == MD_NULL) && sflag == NULL) + errx(1, "must specify -s for -t malloc, -t swap, " + "or -t null"); if (mdio.md_type == MD_VNODE && mdio.md_file[0] == '\0') errx(1, "must specify -f for -t vnode"); } else { Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Wed Dec 4 05:06:56 2013 (r258908) +++ head/sys/dev/md/md.c Wed Dec 4 07:38:23 2013 (r258909) @@ -908,6 +908,22 @@ mdstart_swap(struct md_s *sc, struct bio return (rv != VM_PAGER_ERROR ? 0 : ENOSPC); } +static int +mdstart_null(struct md_s *sc, struct bio *bp) +{ + + switch (bp->bio_cmd) { + case BIO_READ: + bzero(bp->bio_data, bp->bio_length); + cpu_flush_dcache(bp->bio_data, bp->bio_length); + break; + case BIO_WRITE: + break; + } + bp->bio_resid = 0; + return (0); +} + static void md_kthread(void *arg) { @@ -1027,6 +1043,7 @@ mdinit(struct md_s *sc) pp->flags |= G_PF_ACCEPT_UNMAPPED; break; case MD_PRELOAD: + case MD_NULL: break; } sc->gp = gp; @@ -1245,6 +1262,7 @@ mdresize(struct md_s *sc, struct md_ioct switch (sc->type) { case MD_VNODE: + case MD_NULL: break; case MD_SWAP: if (mdio->md_mediasize <= 0 || @@ -1339,6 +1357,19 @@ mdcreate_swap(struct md_s *sc, struct md return (error); } +static int +mdcreate_null(struct md_s *sc, struct md_ioctl *mdio, struct thread *td) +{ + + /* + * Range check. Disallow negative sizes or any size less then the + * size of a page. Then round to a page. + */ + if (sc->mediasize <= 0 || (sc->mediasize % PAGE_SIZE) != 0) + return (EDOM); + + return (0); +} static int xmdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) @@ -1371,6 +1402,7 @@ xmdctlioctl(struct cdev *dev, u_long cmd case MD_PRELOAD: case MD_VNODE: case MD_SWAP: + case MD_NULL: break; default: return (EINVAL); @@ -1416,6 +1448,10 @@ xmdctlioctl(struct cdev *dev, u_long cmd sc->start = mdstart_swap; error = mdcreate_swap(sc, mdio, td); break; + case MD_NULL: + sc->start = mdstart_null; + error = mdcreate_null(sc, mdio, td); + break; } if (error != 0) { mddestroy(sc, td); @@ -1586,6 +1622,9 @@ g_md_dumpconf(struct sbuf *sb, const cha case MD_SWAP: type = "swap"; break; + case MD_NULL: + type = "null"; + break; default: type = "unknown"; break; Modified: head/sys/sys/mdioctl.h ============================================================================== --- head/sys/sys/mdioctl.h Wed Dec 4 05:06:56 2013 (r258908) +++ head/sys/sys/mdioctl.h Wed Dec 4 07:38:23 2013 (r258909) @@ -43,7 +43,7 @@ #ifndef _SYS_MDIOCTL_H_ #define _SYS_MDIOCTL_H_ -enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP}; +enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP, MD_NULL}; /* * Ioctl definitions for memory disk pseudo-device. From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 07:45:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E8C471A; Wed, 4 Dec 2013 07:45:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0AA2E19BE; Wed, 4 Dec 2013 07:45: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 rB47j8EK012231; Wed, 4 Dec 2013 07:45:08 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB47j8Ji012230; Wed, 4 Dec 2013 07:45:08 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312040745.rB47j8Ji012230@svn.freebsd.org> From: Craig Rodrigues Date: Wed, 4 Dec 2013 07:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258910 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 07:45:09 -0000 Author: rodrigc Date: Wed Dec 4 07:45:08 2013 New Revision: 258910 URL: http://svnweb.freebsd.org/changeset/base/258910 Log: MFC r258738 Also mention that drill(1) can be used, now that nslookup and dig are no longer in the base system. Suggested by: peter Approved by: re (gjb) Modified: stable/10/UPDATING (contents, props changed) Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Wed Dec 4 07:38:23 2013 (r258909) +++ stable/10/UPDATING Wed Dec 4 07:45:08 2013 (r258910) @@ -58,7 +58,7 @@ older version of current is a bit fragil available in the ports tree. The dns/bind99 port is one example. With this change, nslookup(1) and dig(1) are no longer in the base - system. Users should instead use host(1) which is still + system. Users should instead use host(1) and drill(1) which are in the base system. Alternatively, nslookup and dig can be obtained by installing the dns/bind-tools port. From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 07:46:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5D2B869; Wed, 4 Dec 2013 07:46:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1A4719D4; Wed, 4 Dec 2013 07:46:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB47krQK012455; Wed, 4 Dec 2013 07:46:53 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB47kr1h012453; Wed, 4 Dec 2013 07:46:53 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312040746.rB47kr1h012453@svn.freebsd.org> From: Craig Rodrigues Date: Wed, 4 Dec 2013 07:46:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258911 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 07:46:53 -0000 Author: rodrigc Date: Wed Dec 4 07:46:53 2013 New Revision: 258911 URL: http://svnweb.freebsd.org/changeset/base/258911 Log: MFC r258737 In keg_dtor(), print out the keg name in the "Freed UMA keg was not empty" message printed to the console. This makes it easier to track down the source of certain memory leaks. Suggested by: adrian Approved by: re (gjb) Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/vm/uma_core.c ============================================================================== --- stable/10/sys/vm/uma_core.c Wed Dec 4 07:45:08 2013 (r258910) +++ stable/10/sys/vm/uma_core.c Wed Dec 4 07:46:53 2013 (r258911) @@ -1571,8 +1571,9 @@ keg_dtor(void *arg, int size, void *udat keg = (uma_keg_t)arg; KEG_LOCK(keg); if (keg->uk_free != 0) { - printf("Freed UMA keg was not empty (%d items). " + printf("Freed UMA keg (%s) was not empty (%d items). " " Lost %d pages of memory.\n", + keg->uk_name ? keg->uk_name : "", keg->uk_free, keg->uk_pages); } KEG_UNLOCK(keg); From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 07:50:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAFF99F1; Wed, 4 Dec 2013 07:50:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E8E319F1; Wed, 4 Dec 2013 07:50: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 rB47oIFI013444; Wed, 4 Dec 2013 07:50:18 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB47oICn013416; Wed, 4 Dec 2013 07:50:18 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312040750.rB47oICn013416@svn.freebsd.org> From: Craig Rodrigues Date: Wed, 4 Dec 2013 07:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258912 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 07:50:18 -0000 Author: rodrigc Date: Wed Dec 4 07:50:18 2013 New Revision: 258912 URL: http://svnweb.freebsd.org/changeset/base/258912 Log: MFC r258588 In sys/netpfil/ipfw/ip_fw_nat.c:vnet_ipfw_nat_uninit() we call "IPFW_WLOCK(chain);". This lock gets deleted in sys/netpfil/ipfw/ip_fw2.c:vnet_ipfw_uninit(). Therefore, vnet_ipfw_nat_uninit() *must* be called before vnet_ipfw_uninit(), but this doesn't always happen, because the VNET_SYSINIT order is the same for both functions. In sys/net/netpfil/ipfw/ip_fw2.c and sys/net/netpfil/ipfw/ip_fw_nat.c, IPFW_SI_SUB_FIREWALL == IPFW_NAT_SI_SUB_FIREWALL == SI_SUB_PROTO_IFATTACHDOMAIN and IPFW_MODULE_ORDER == IPFW_NAT_MODULE_ORDER Consequently, if VIMAGE is enabled, and jails are created and destroyed, the system sometimes crashes, because we are trying to use a deleted lock. To reproduce the problem: (1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS, INVARIANTS. (2) Run this command in a loop: jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html ) Fix the problem by increasing the value of IPFW_NAT_SI_SUB_FIREWALL, so that vnet_ipfw_nat_uninit() runs after vnet_ipfw_uninit(). Approved by: re (gjb) Modified: stable/10/sys/netpfil/ipfw/ip_fw_nat.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_nat.c Wed Dec 4 07:46:53 2013 (r258911) +++ stable/10/sys/netpfil/ipfw/ip_fw_nat.c Wed Dec 4 07:50:18 2013 (r258912) @@ -674,7 +674,7 @@ static moduledata_t ipfw_nat_mod = { }; /* Define startup order. */ -#define IPFW_NAT_SI_SUB_FIREWALL SI_SUB_PROTO_IFATTACHDOMAIN +#define IPFW_NAT_SI_SUB_FIREWALL (SI_SUB_PROTO_IFATTACHDOMAIN + 1) #define IPFW_NAT_MODEVENT_ORDER (SI_ORDER_ANY - 255) #define IPFW_NAT_MODULE_ORDER (IPFW_NAT_MODEVENT_ORDER + 1) #define IPFW_NAT_VNET_ORDER (IPFW_NAT_MODEVENT_ORDER + 2) From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 07:54:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9604D35; Wed, 4 Dec 2013 07:54:43 +0000 (UTC) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C764D1A52; Wed, 4 Dec 2013 07:54:42 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id b13so11880620wgh.30 for ; Tue, 03 Dec 2013 23:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=RCh2u9OwQcRcMjMD7MFxSles3Iw1UWtnXGLMBVVh2fU=; b=XppKoO2rzQt8WB0cRCWMjHzw4q1KiIUVqVXbIWr8i5Dm9eFTvxx6tSqb5d6a8YI0dA Ne7sGeqn2BOoKvY1zkeL78WQtR0V08ZHsGfq7dnbedWd0gykqgqB3fO1gQaqcmmV9ZTx wBliPZElzlb+WoMqvlVaZzf2hlVBUx+fs13a8Fs0pIOONmaDK21OTEzAjkNBRxUaQtLf AD+e6ls70AEapd6QN8e6daQyAGTdgSYwodNAI6rYrpKBUCtfs1By6NHNU2bGJz0m7uxt Sx7144jAXZZhGc27hri/5Xtf3Is+8/58hSUorkUNLHkr3YJ8b2ZK/+s6XRud/Nae+gQb jh+g== X-Received: by 10.180.9.74 with SMTP id x10mr5930981wia.56.1386143681048; Tue, 03 Dec 2013 23:54:41 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id d2sm4426123wik.11.2013.12.03.23.54.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 03 Dec 2013 23:54:39 -0800 (PST) Date: Wed, 4 Dec 2013 08:54:37 +0100 From: Mateusz Guzik To: Edward Tomasz Napierala Subject: Re: svn commit: r258909 - in head: sbin/mdconfig sys/dev/md sys/sys Message-ID: <20131204075436.GA15763@dft-labs.eu> References: <201312040738.rB47cOsV009261@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201312040738.rB47cOsV009261@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 07:54:43 -0000 On Wed, Dec 04, 2013 at 07:38:24AM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Wed Dec 4 07:38:23 2013 > New Revision: 258909 > URL: http://svnweb.freebsd.org/changeset/base/258909 > > Log: > Add "null" backend to mdconfig(8). This does exactly what the name > suggests, and is somewhat useful for benchmarking. > There is already a 'geom zero' module which I believe provides equivalent functionality. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 07:55:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E431E77; Wed, 4 Dec 2013 07:55:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A7B91A5C; Wed, 4 Dec 2013 07:55:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB47to8e015688; Wed, 4 Dec 2013 07:55:50 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB47toWF015687; Wed, 4 Dec 2013 07:55:50 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312040755.rB47toWF015687@svn.freebsd.org> From: Craig Rodrigues Date: Wed, 4 Dec 2013 07:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258913 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 07:55:50 -0000 Author: rodrigc Date: Wed Dec 4 07:55:49 2013 New Revision: 258913 URL: http://svnweb.freebsd.org/changeset/base/258913 Log: MFC 258591 In vnet_route_uninit(), free some memory that is allocated in vnet_route_init(). To reproduce the problem: (1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS, INVARIANTS. (2) Run this command in a loop: jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo see: http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021291.html This doesn't eliminate all the "Freed UMA keg was not empty" warning messages on the console, but it helps. Approved by: re (gjb) Modified: stable/10/sys/net/route.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/net/route.c ============================================================================== --- stable/10/sys/net/route.c Wed Dec 4 07:50:18 2013 (r258912) +++ stable/10/sys/net/route.c Wed Dec 4 07:55:49 2013 (r258913) @@ -262,6 +262,9 @@ vnet_route_uninit(const void *unused __u dom->dom_rtdetach((void **)rnh, dom->dom_rtoffset); } } + + free(V_rt_tables, M_RTABLE); + uma_zdestroy(V_rtzone); } VNET_SYSUNINIT(vnet_route_uninit, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, vnet_route_uninit, 0); From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 08:20:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCD2C6F5; Wed, 4 Dec 2013 08:20:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD9111CF4; Wed, 4 Dec 2013 08: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 rB48K4pn023468; Wed, 4 Dec 2013 08:20:04 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB48K4Td023467; Wed, 4 Dec 2013 08:20:04 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312040820.rB48K4Td023467@svn.freebsd.org> From: Craig Rodrigues Date: Wed, 4 Dec 2013 08:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258914 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 08:20:05 -0000 Author: rodrigc Date: Wed Dec 4 08:20:04 2013 New Revision: 258914 URL: http://svnweb.freebsd.org/changeset/base/258914 Log: Update release notes. Submitted by: skreuzer Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Dec 4 07:55:49 2013 (r258913) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Dec 4 08:20:04 2013 (r258914) @@ -120,6 +120,9 @@ Kernel Changes + The maximum amount of memory the &os; kernel + can address has been increased from 1TB to 4TB. + A new &man.cpuset.2; API has been added for thread to CPU binding and CPU resource grouping and assignment. The &man.cpuset.1; userland utility has been added @@ -201,7 +204,9 @@ Multimedia Support - + Support for version 2.0 of the USB Audio reference design + has been added. New devices should support higher bandwidth, + increased sampling frequency and wider dynamic range. @@ -249,26 +254,23 @@ Network Protocols - The &man.bpf.4; packet filter and capture facility now - supports a zero-copy mode of operation, in which buffers are - loaned from a user process to the kernel. This feature can - be enabled by setting - the net.bpf.zerocopy_enable sysctl - variable to 1. - - ISDN4BSD(I4B), netatm, and all - related subsystems have been removed due to lack of - multi-processor support. - - A bug in TCP options padding, where the wrong padding - bytes were used, has been fixed. - - The IEEE 802.11s element identifiers have - been updated to reflect the final version of the amendment. This - update breaks compatibility with older mesh setups but is necessary - as the previous IDs are used by another amendment leading to - unexpected results when trying to associate with an accesspoint - using the affected IDs. + &man.carp.4; has been rewritten to make addresses + more sane from the viewpoint of routing daemons such as + quagga/zebra. It also brings support for a single redundant + address on the subnet (carpdev), switching state with + ifconfig, better locking and using modern kernel + interfaces to allocate multicast memberships. + + The &man.pf.4; firewall now supports fine-grain locking + and better utilization on multi-cpu machines resulting in + significant improvements in performance. + + Support for up to 65536 routing tables has been + introduced. + + Support for setting/matching differentiated services + codepoints (DSCP) in IP header has been added to + &man.ipfw.8;. @@ -293,19 +295,34 @@ File Systems - A problem with using &man.mmap.2; on ZFS filesystems has - been fixed. + A new kernel-based iSCSI target and initiator has been + added - A new kernel-mode NFS lock manager has been added, - improving performance and behavior of NFS locking. A new - &man.clear.locks.8; command has been added to clear locks held - on behalf of an NFS client. - - The ZFS file system - has been upgraded to version 28. Changes include Data - Deduplication, Triple parity RAIDZ, and zfs diff. + UFS filesystems can now be enlarged with &man.growfs.8; while + mounted read-write. This is especially useful for virtual + machines, allowing the addition of more harddrive space without + interruption of service. + + A state of the art FUSE implementation is now part of the + base system. It allows the use of nearly all fusefs file + systems + + Support for the high performance LZ4 compression algorithm + has been added to ZFS. LZ4 is usually faster and can achieve a + higher compression ratio than LZJB, the default compression + algorithm + + Support for L2ARC compression has been added to ZFS. + + ZFS will now compare the checksums of incoming writes to + the checksum of the existing on-disk data and avoid issuing any + write I/O for data that has not changed. This will reduce I/O + as well as space usage because if the old block is referenced + by a snapshot, both copies of the block are kept even though + both contain the same data. + @@ -443,8 +460,8 @@ bzip2 has been updated from 1.0.4 to 1.0.5. - CVS has been updated from 1.11.17 - to a post-1.11.22 snapshot from 10 March 2008. + CVS has been removed from the + base system, but is still available from ports FILE has been updated from 4.23 to 5.03. From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 09:12:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF1C6218; Wed, 4 Dec 2013 09:12:54 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 12E311039; Wed, 4 Dec 2013 09:12:53 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id en1so7877279wid.5 for ; Wed, 04 Dec 2013 01:12:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Pfhf7uI4LvGIk9ihblnbU0KFoTq9p20g5WqJiGTApd8=; b=loXgXLZYGL3UzYran2S2Zfn173tZM8NJtjidZb3FH07fNzHDa52g3eag5voOjqwZMO MM9TxZMlWJLEu1xSpTdPLI3gEeZMy+7Vkl4NToDU53ZU0l0TwFGexkgzGI18xN4vY7y9 WaKvf5jbgnz+JqOkWdyS1rOT6On+ITJH3w7bIceQjyo43FWN+xOFepoVW/2/6pUH7Khh rJL2ebL82gTGuCx65xzZyc9TjW5ViI/j7q3n8T4HT86q/UiIHL9RB2e5AE4sr6U262j7 4faS8sClEUP0j1itzFDtLMda2rN5jwWppWFA1uVRhKpHgKm3j2SCzkdCQ/LPMJzx0ZPi Dvnw== X-Received: by 10.180.13.142 with SMTP id h14mr6294813wic.3.1386148372478; Wed, 04 Dec 2013 01:12:52 -0800 (PST) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id dj8sm5098181wid.2.2013.12.04.01.12.50 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Dec 2013 01:12:51 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 4 Dec 2013 10:12:48 +0100 From: Baptiste Daroussin To: Glen Barber Subject: Re: svn commit: r258854 - head/usr.sbin/bsdconfig/share Message-ID: <20131204091248.GQ27759@ithaqua.etoilebsd.net> References: <201312021902.rB2J2x0o032333@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wc6dtGz1CZgs+5WP" Content-Disposition: inline In-Reply-To: <201312021902.rB2J2x0o032333@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 09:12:55 -0000 --wc6dtGz1CZgs+5WP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 02, 2013 at 07:02:59PM +0000, Glen Barber wrote: > Author: gjb > Date: Mon Dec 2 19:02:58 2013 > New Revision: 258854 > URL: http://svnweb.freebsd.org/changeset/base/258854 >=20 > Log: > Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since > the format of 'pkg -vv' output has changed. > =20 > MFC after: 3 days > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/usr.sbin/bsdconfig/share/common.subr >=20 > Modified: head/usr.sbin/bsdconfig/share/common.subr > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/bsdconfig/share/common.subr Mon Dec 2 18:47:57 2013 (r= 258853) > +++ head/usr.sbin/bsdconfig/share/common.subr Mon Dec 2 19:02:58 2013 (r= 258854) > @@ -65,7 +65,7 @@ export UNAME_R=3D"$(uname -r)" # Release L > if [ ! "${PKG_ABI+set}" ]; then > export PKG_ABI=3D"$( > ASSUME_ALWAYS_YES=3D1 pkg -vv | > - awk '$1=3D=3D"ABI:"{print $2;exit}' 2> /dev/null > + awk '$1=3D=3D"ABI"{print $3;exit}' 2> /dev/null > )" > fi You have: "pkg config abi" now :) that should allow you do avoid the awk :) regards, Bapt --wc6dtGz1CZgs+5WP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlKe8hAACgkQ8kTtMUmk6ExYtACeIVIR/Ojuq8So1dpaGMFxcN7a 0tMAoJGpb7fVmgL2YMRl/VuoL5Efk9hM =6Khw -----END PGP SIGNATURE----- --wc6dtGz1CZgs+5WP-- From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 09:43:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D5F28BE; Wed, 4 Dec 2013 09:43:30 +0000 (UTC) Received: from mail-ea0-x22d.google.com (mail-ea0-x22d.google.com [IPv6:2a00:1450:4013:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B3C811E5; Wed, 4 Dec 2013 09:43:29 +0000 (UTC) Received: by mail-ea0-f173.google.com with SMTP id g15so10490986eak.4 for ; Wed, 04 Dec 2013 01:43:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=W+HquYi7nQquBuesUZXbr0OONjI3JR4PTgdWb6iBrfc=; b=CfF1rqk6awn9ujTOKy4ghJeWEPcXwqHnj1a5I5nGUy5jz4dnSGIgkTXYlF4xCIUAkM elqBARXujWdj2jj7pABc5yVG+p/Kh3dDrSuw6HA9c3u1gVrrEDDdZ1m0TOPAykT8YaBU yVuilqYa+g70IBk/ueXbA2g2Nqvbnt5HAHAb68z+zM+RBT0yLbTaEIwXDz9tsAqll3vu XVDAyRqeIm37bJagQa3azGMg4g0FRLgkQe9qj0UbsYHa6dzjZt2D0ySQJGStWnCqgxKM u7a/q294i2Jz9Zp8xgC47MTpmEokFTjXhrNiDZuNti8A14yTc1q2nDT+qUWYxPDDqVfp VWNg== X-Received: by 10.14.93.197 with SMTP id l45mr10358595eef.53.1386150207838; Wed, 04 Dec 2013 01:43:27 -0800 (PST) Received: from [192.168.1.102] (45.81.datacomsa.pl. [195.34.81.45]) by mx.google.com with ESMTPSA id j46sm92244007eew.18.2013.12.04.01.43.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Dec 2013 01:43:27 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Subject: Re: svn commit: r258909 - in head: sbin/mdconfig sys/dev/md sys/sys Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <20131204075436.GA15763@dft-labs.eu> Date: Wed, 4 Dec 2013 10:43:24 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <61CD2D35-BEAD-4826-AA10-78F3EACEB2CC@FreeBSD.org> References: <201312040738.rB47cOsV009261@svn.freebsd.org> <20131204075436.GA15763@dft-labs.eu> To: Mateusz Guzik X-Mailer: Apple Mail (2.1283) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 09:43:30 -0000 Wiadomo=B6=E6 napisana przez Mateusz Guzik w dniu 4 gru 2013, o godz. = 08:54: > On Wed, Dec 04, 2013 at 07:38:24AM +0000, Edward Tomasz Napierala = wrote: >> Author: trasz >> Date: Wed Dec 4 07:38:23 2013 >> New Revision: 258909 >> URL: http://svnweb.freebsd.org/changeset/base/258909 >>=20 >> Log: >> Add "null" backend to mdconfig(8). This does exactly what the name >> suggests, and is somewhat useful for benchmarking. >>=20 >=20 > There is already a 'geom zero' module which I believe provides > equivalent functionality. Oh, the joys of software without manual pages. Still, I'm leaning = toward leaving this in, in case someone needs more than one instance, or a = particular size. --=20 If you cut off my head, what would I say? Me and my head, or me and my = body? From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 09:46:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEE53A2B; Wed, 4 Dec 2013 09:46:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA8D811FE; Wed, 4 Dec 2013 09:46: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 rB49kRYU053193; Wed, 4 Dec 2013 09:46:27 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB49kRlJ053192; Wed, 4 Dec 2013 09:46:27 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312040946.rB49kRlJ053192@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 4 Dec 2013 09:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258915 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 09:46:27 -0000 Author: trasz Date: Wed Dec 4 09:46:27 2013 New Revision: 258915 URL: http://svnweb.freebsd.org/changeset/base/258915 Log: MFC r258790: Fix hang on reboot with active iSCSI connections. Approved by: re (glebius) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed Dec 4 08:20:04 2013 (r258914) +++ stable/10/sys/dev/iscsi/iscsi.c Wed Dec 4 09:46:27 2013 (r258915) @@ -2110,10 +2110,12 @@ iscsi_load(void) sc->sc_cdev->si_drv1 = sc; /* - * XXX: For some reason this doesn't do its job; active sessions still hang out there - * after final sync, making the reboot effectively hang. + * Note that this needs to get run before dashutdown(). Otherwise, + * when rebooting with iSCSI session with outstanding requests, + * but disconnected, dashutdown() will hang on cam_periph_runccb(). */ - sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, iscsi_shutdown, sc, SHUTDOWN_PRI_DEFAULT); + sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, + iscsi_shutdown, sc, SHUTDOWN_PRI_FIRST); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 09:48:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8AFDC9C; Wed, 4 Dec 2013 09:48:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C55F4123E; Wed, 4 Dec 2013 09:48:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB49mq3V053487; Wed, 4 Dec 2013 09:48:52 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB49mq2u053486; Wed, 4 Dec 2013 09:48:52 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312040948.rB49mq2u053486@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 4 Dec 2013 09:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258916 - head/sys/dev/md X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 09:48:52 -0000 Author: trasz Date: Wed Dec 4 09:48:52 2013 New Revision: 258916 URL: http://svnweb.freebsd.org/changeset/base/258916 Log: Change comment to match code. Discussed with: thompsa Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Wed Dec 4 09:46:27 2013 (r258915) +++ head/sys/dev/md/md.c Wed Dec 4 09:48:52 2013 (r258916) @@ -1320,8 +1320,8 @@ mdcreate_swap(struct md_s *sc, struct md int error; /* - * Range check. Disallow negative sizes or any size less then the - * size of a page. Then round to a page. + * Range check. Disallow negative sizes and sizes not being + * multiple of page size. */ if (sc->mediasize <= 0 || (sc->mediasize % PAGE_SIZE) != 0) return (EDOM); @@ -1362,8 +1362,8 @@ mdcreate_null(struct md_s *sc, struct md { /* - * Range check. Disallow negative sizes or any size less then the - * size of a page. Then round to a page. + * Range check. Disallow negative sizes and sizes not being + * multiple of page size. */ if (sc->mediasize <= 0 || (sc->mediasize % PAGE_SIZE) != 0) return (EDOM); From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 10:54:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74107382; Wed, 4 Dec 2013 10:54:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4639F169F; Wed, 4 Dec 2013 10:54:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4AsOhE077306; Wed, 4 Dec 2013 10:54:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4AsOUJ077305; Wed, 4 Dec 2013 10:54:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312041054.rB4AsOUJ077305@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Dec 2013 10:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258918 - stable/10/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 10:54:24 -0000 Author: mav Date: Wed Dec 4 10:54:23 2013 New Revision: 258918 URL: http://svnweb.freebsd.org/changeset/base/258918 Log: MFC r258495: Update description of logical CPU handling in the latest releases and remove obsolete sysctl variable machdep.hlt_logical_cpus. Approved by: re (hrs) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Directory Properties: stable/10/release/doc/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Wed Dec 4 09:58:50 2013 (r258917) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Wed Dec 4 10:54:23 2013 (r258918) @@ -177,16 +177,13 @@ bugs may generate some problems. Perusal of the archives of the &a.smp; may yield some clues. - &os; will take advantage of HyperThreading (HTT) support - on &intel; CPUs that support this feature. The - default &os; scheduler treats the logical processors the same - as additional physical processors; in other words, no attempt - is made to optimize scheduling decisions given the shared - resources between logical processors within the same CPU. - Because this naive scheduling can result in suboptimal - performance, under certain circumstances it may be useful to - disable the logical processors with the - machdep.hyperthreading_allowed tunable. + &os; will take advantage of SMT (Symmetric MultiThreading, + also known as HyperThreading on &intel; CPUs) on the supported + CPUs. The GENERIC kernel which is + installed by default will automatically detect the additional + logical processors. The default &os; scheduler recognizes + processor topology on the system and selects logical and + physical processors to obtain optimal performance. The &man.smp.4; manual page has more details. &os; will take advantage of Physical Address Extensions From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 12:07:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56E0AFD1; Wed, 4 Dec 2013 12:07:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 42A0A1B13; Wed, 4 Dec 2013 12:07:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4C7m2a001716; Wed, 4 Dec 2013 12:07:48 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4C7lPI001704; Wed, 4 Dec 2013 12:07:47 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201312041207.rB4C7lPI001704@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 4 Dec 2013 12:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258919 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 12:07:48 -0000 Author: hselasky Date: Wed Dec 4 12:07:46 2013 New Revision: 258919 URL: http://svnweb.freebsd.org/changeset/base/258919 Log: Fix external compiler warning(s). Avoid pointer dereferencing. Modified: head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Wed Dec 4 10:54:23 2013 (r258918) +++ head/sys/dev/usb/wlan/if_rsu.c Wed Dec 4 12:07:46 2013 (r258919) @@ -1159,7 +1159,7 @@ rsu_event_survey(struct rsu_softc *sc, u wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_BEACON; wh->i_fc[1] = IEEE80211_FC1_DIR_NODS; - *(uint16_t *)wh->i_dur = 0; + USETW(wh->i_dur, 0); IEEE80211_ADDR_COPY(wh->i_addr1, ifp->if_broadcastaddr); IEEE80211_ADDR_COPY(wh->i_addr2, bss->macaddr); IEEE80211_ADDR_COPY(wh->i_addr3, bss->macaddr); Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Wed Dec 4 10:54:23 2013 (r258918) +++ head/sys/dev/usb/wlan/if_rum.c Wed Dec 4 12:07:46 2013 (r258919) @@ -1137,7 +1137,7 @@ rum_tx_mgt(struct rum_softc *sc, struct dur = ieee80211_ack_duration(ic->ic_rt, tp->mgmtrate, ic->ic_flags & IEEE80211_F_SHPREAMBLE); - *(uint16_t *)wh->i_dur = htole16(dur); + USETW(wh->i_dur, dur); /* tell hardware to add timestamp for probe responses */ if ((wh->i_fc[0] & @@ -1281,7 +1281,7 @@ rum_tx_data(struct rum_softc *sc, struct dur = ieee80211_ack_duration(ic->ic_rt, rate, ic->ic_flags & IEEE80211_F_SHPREAMBLE); - *(uint16_t *)wh->i_dur = htole16(dur); + USETW(wh->i_dur, dur); } rum_setup_tx_desc(sc, &data->desc, flags, 0, m0->m_pkthdr.len, rate); Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Wed Dec 4 10:54:23 2013 (r258918) +++ head/sys/dev/usb/wlan/if_run.c Wed Dec 4 12:07:46 2013 (r258919) @@ -3087,7 +3087,7 @@ run_tx(struct run_softc *sc, struct mbuf dur = rt2860_rates[ctl_ridx].sp_ack_dur; else dur = rt2860_rates[ctl_ridx].lp_ack_dur; - *(uint16_t *)wh->i_dur = htole16(dur); + USETW(wh->i_dur, dur); } /* reserve slots for mgmt packets, just in case */ @@ -3207,7 +3207,7 @@ run_tx_mgt(struct run_softc *sc, struct dur = ieee80211_ack_duration(ic->ic_rt, rt2860_rates[ridx].rate, ic->ic_flags & IEEE80211_F_SHPREAMBLE); - *(uint16_t *)wh->i_dur = htole16(dur); + USETW(wh->i_dur, dur); } if (sc->sc_epq[0].tx_nfree == 0) { Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Wed Dec 4 10:54:23 2013 (r258918) +++ head/sys/dev/usb/wlan/if_ural.c Wed Dec 4 12:07:46 2013 (r258919) @@ -1139,7 +1139,7 @@ ural_tx_mgt(struct ural_softc *sc, struc dur = ieee80211_ack_duration(ic->ic_rt, tp->mgmtrate, ic->ic_flags & IEEE80211_F_SHPREAMBLE); - *(uint16_t *)wh->i_dur = htole16(dur); + USETW(wh->i_dur, dur); /* tell hardware to add timestamp for probe responses */ if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == @@ -1330,7 +1330,7 @@ ural_tx_data(struct ural_softc *sc, stru dur = ieee80211_ack_duration(ic->ic_rt, rate, ic->ic_flags & IEEE80211_F_SHPREAMBLE); - *(uint16_t *)wh->i_dur = htole16(dur); + USETW(wh->i_dur, dur); } ural_setup_tx_desc(sc, &data->desc, flags, m0->m_pkthdr.len, rate); Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Wed Dec 4 10:54:23 2013 (r258918) +++ head/sys/dev/usb/wlan/if_urtw.c Wed Dec 4 12:07:46 2013 (r258919) @@ -1767,7 +1767,7 @@ urtw_tx_start(struct urtw_softc *sc, str else dur = URTW_ASIFS_TIME + acktime; } - *(uint16_t *)wh->i_dur = htole16(dur); + USETW(wh->i_dur, dur); xferlen = m0->m_pkthdr.len; xferlen += (sc->sc_flags & URTW_RTL8187B) ? (4 * 8) : (4 * 3); From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 12:30:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B5025E9; Wed, 4 Dec 2013 12:30:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 182C71D74; Wed, 4 Dec 2013 12:30:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4CUpiT010841; Wed, 4 Dec 2013 12:30:51 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4CUp3g010840; Wed, 4 Dec 2013 12:30:51 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201312041230.rB4CUp3g010840@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 4 Dec 2013 12:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258921 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 12:30:52 -0000 Author: hselasky Date: Wed Dec 4 12:30:51 2013 New Revision: 258921 URL: http://svnweb.freebsd.org/changeset/base/258921 Log: Fix what looks like a typo after r258732. Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Wed Dec 4 12:28:56 2013 (r258920) +++ head/sys/dev/usb/wlan/if_run.c Wed Dec 4 12:30:51 2013 (r258921) @@ -3672,7 +3672,7 @@ run_rt2870_set_chan(struct run_softc *sc } if (txpow2 >= 0) { txpow2 = (txpow2 > 0xf) ? (0xf) : (txpow2); - r4 |= (txpow1 << 7) | (1 << 6); + r4 |= (txpow2 << 7) | (1 << 6); } else { txpow2 += 7; r4 |= (txpow2 << 7); From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 14:46:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AD1B38D; Wed, 4 Dec 2013 14:46:59 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D4DAA15F0; Wed, 4 Dec 2013 14:46:58 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9E097B992; Wed, 4 Dec 2013 09:46:57 -0500 (EST) From: John Baldwin To: Colin Percival Subject: Re: svn commit: r258894 - head/etc Date: Wed, 4 Dec 2013 09:03:19 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201312032155.rB3LtwfQ008301@svn.freebsd.org> In-Reply-To: <201312032155.rB3LtwfQ008301@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201312040903.19767.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 04 Dec 2013 09:46:57 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 14:46:59 -0000 On Tuesday, December 03, 2013 4:55:58 pm Colin Percival wrote: > Author: cperciva > Date: Tue Dec 3 21:55:57 2013 > New Revision: 258894 > URL: http://svnweb.freebsd.org/changeset/base/258894 > > Log: > The rc system aggressively caches the contents of /etc/rc.conf in order to > improve boot performance; this produces arguably astonishing (non-)results > if /etc/rc.conf is modified during the boot process. > > Since performance considerations make it infeasible to automatically detect > if the cached /etc/rc.conf parameters should be invalidated, provide a > mechanism for explicitly requesting that /etc/rc.conf be reloaded: Catch > SIGALRM and reload /etc/rc.conf if it is received. Might have been worth mentioning explicitly why you didn't use SIGHUP in the log message (found it in the thread on rc@). ALRM does seem like an odd choice compared to, say, USR1. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 14:46:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BA77387; Wed, 4 Dec 2013 14:46:56 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6EA6415EF; Wed, 4 Dec 2013 14:46:56 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 63422B98E; Wed, 4 Dec 2013 09:46:55 -0500 (EST) From: John Baldwin To: Eitan Adler Subject: Re: svn commit: r258901 - head/usr.sbin/mfiutil Date: Wed, 4 Dec 2013 08:56:14 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201312040028.rB40Sj9l061474@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201312040856.14579.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 04 Dec 2013 09:46:55 -0500 (EST) Cc: "svn-src-head@freebsd.org" , Sean Bruno , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 14:46:56 -0000 On Wednesday, December 04, 2013 12:00:16 am Eitan Adler wrote: > On Tue, Dec 3, 2013 at 7:28 PM, Sean Bruno wrote: > > Author: sbruno > > Date: Wed Dec 4 00:28:44 2013 > > New Revision: 258901 > > URL: http://svnweb.freebsd.org/changeset/base/258901 > > > > Log: > > svn r251516 resized the buf argument a bit too much. Pass a hardcoded > > size of 6 to humanize_number() to resolve this. > > Where is the value of 6 derived from? It was the old size of buf. It's a value that allows humanize_number always use the largest 2^(10*n) unit. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 14:49:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32F6864E; Wed, 4 Dec 2013 14:49:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E1771619; Wed, 4 Dec 2013 14:49: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 rB4EnKCj055676; Wed, 4 Dec 2013 14:49:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4EnKjS055675; Wed, 4 Dec 2013 14:49:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201312041449.rB4EnKjS055675@svn.freebsd.org> From: Andriy Gapon Date: Wed, 4 Dec 2013 14:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r258922 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 14:49:21 -0000 Author: avg Date: Wed Dec 4 14:49:20 2013 New Revision: 258922 URL: http://svnweb.freebsd.org/changeset/base/258922 Log: 3580 Want zvols to return volblocksize when queried for physical block size illumos/illumos-gate@a0b60564dfc644f4bfaef1ce26d343b44cf68bc5 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Wed Dec 4 12:30:51 2013 (r258921) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Wed Dec 4 14:49:20 2013 (r258922) @@ -1627,8 +1627,6 @@ int zvol_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cr, int *rvalp) { zvol_state_t *zv; - struct dk_cinfo dki; - struct dk_minfo dkm; struct dk_callback *dkc; int error = 0; rl_t *rl; @@ -1646,6 +1644,9 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t switch (cmd) { case DKIOCINFO: + { + struct dk_cinfo dki; + bzero(&dki, sizeof (dki)); (void) strcpy(dki.dki_cname, "zvol"); (void) strcpy(dki.dki_dname, "zvol"); @@ -1656,8 +1657,12 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t if (ddi_copyout(&dki, (void *)arg, sizeof (dki), flag)) error = SET_ERROR(EFAULT); return (error); + } case DKIOCGMEDIAINFO: + { + struct dk_minfo dkm; + bzero(&dkm, sizeof (dkm)); dkm.dki_lbsize = 1U << zv->zv_min_bs; dkm.dki_capacity = zv->zv_volsize >> zv->zv_min_bs; @@ -1666,16 +1671,32 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t if (ddi_copyout(&dkm, (void *)arg, sizeof (dkm), flag)) error = SET_ERROR(EFAULT); return (error); + } + + case DKIOCGMEDIAINFOEXT: + { + struct dk_minfo_ext dkmext; + + bzero(&dkmext, sizeof (dkmext)); + dkmext.dki_lbsize = 1U << zv->zv_min_bs; + dkmext.dki_pbsize = zv->zv_volblocksize; + dkmext.dki_capacity = zv->zv_volsize >> zv->zv_min_bs; + dkmext.dki_media_type = DK_UNKNOWN; + mutex_exit(&zfsdev_state_lock); + if (ddi_copyout(&dkmext, (void *)arg, sizeof (dkmext), flag)) + error = SET_ERROR(EFAULT); + return (error); + } case DKIOCGETEFI: - { - uint64_t vs = zv->zv_volsize; - uint8_t bs = zv->zv_min_bs; + { + uint64_t vs = zv->zv_volsize; + uint8_t bs = zv->zv_min_bs; - mutex_exit(&zfsdev_state_lock); - error = zvol_getefi((void *)arg, flag, vs, bs); - return (error); - } + mutex_exit(&zfsdev_state_lock); + error = zvol_getefi((void *)arg, flag, vs, bs); + return (error); + } case DKIOCFLUSHWRITECACHE: dkc = (struct dk_callback *)arg; @@ -1688,31 +1709,31 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t return (error); case DKIOCGETWCE: - { - int wce = (zv->zv_flags & ZVOL_WCE) ? 1 : 0; - if (ddi_copyout(&wce, (void *)arg, sizeof (int), - flag)) - error = SET_ERROR(EFAULT); + { + int wce = (zv->zv_flags & ZVOL_WCE) ? 1 : 0; + if (ddi_copyout(&wce, (void *)arg, sizeof (int), + flag)) + error = SET_ERROR(EFAULT); + break; + } + case DKIOCSETWCE: + { + int wce; + if (ddi_copyin((void *)arg, &wce, sizeof (int), + flag)) { + error = SET_ERROR(EFAULT); break; } - case DKIOCSETWCE: - { - int wce; - if (ddi_copyin((void *)arg, &wce, sizeof (int), - flag)) { - error = SET_ERROR(EFAULT); - break; - } - if (wce) { - zv->zv_flags |= ZVOL_WCE; - mutex_exit(&zfsdev_state_lock); - } else { - zv->zv_flags &= ~ZVOL_WCE; - mutex_exit(&zfsdev_state_lock); - zil_commit(zv->zv_zilog, ZVOL_OBJ); - } - return (0); + if (wce) { + zv->zv_flags |= ZVOL_WCE; + mutex_exit(&zfsdev_state_lock); + } else { + zv->zv_flags &= ~ZVOL_WCE; + mutex_exit(&zfsdev_state_lock); + zil_commit(zv->zv_zilog, ZVOL_OBJ); } + return (0); + } case DKIOCGGEOM: case DKIOCGVTOC: From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 14:50:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76EB2790; Wed, 4 Dec 2013 14:50:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 625781629; Wed, 4 Dec 2013 14:50:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4EoiOF057813; Wed, 4 Dec 2013 14:50:44 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4Eoi7c057812; Wed, 4 Dec 2013 14:50:44 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201312041450.rB4Eoi7c057812@svn.freebsd.org> From: Andriy Gapon Date: Wed, 4 Dec 2013 14:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r258923 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 14:50:44 -0000 Author: avg Date: Wed Dec 4 14:50:43 2013 New Revision: 258923 URL: http://svnweb.freebsd.org/changeset/base/258923 Log: 4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0 illumos/illumos-gate@bb411a08b05466bfe0c7095b6373bbc1587e259a Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Wed Dec 4 14:49:20 2013 (r258922) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Wed Dec 4 14:50:43 2013 (r258923) @@ -635,9 +635,16 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t uint64_t start = off >> shift; uint64_t end = (off + len) >> shift; - ASSERT(dn->dn_datablkshift != 0); ASSERT(dn->dn_indblkshift != 0); + /* + * dnode_reallocate() can result in an object with indirect + * blocks having an odd data block size. In this case, + * just check the single block. + */ + if (dn->dn_datablkshift == 0) + start = end = 0; + zio = zio_root(tx->tx_pool->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); for (uint64_t i = start; i <= end; i++) { From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 15:13:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7E2CDF9 for ; Wed, 4 Dec 2013 15:13:46 +0000 (UTC) Received: from mail-qe0-x22e.google.com (mail-qe0-x22e.google.com [IPv6:2607:f8b0:400d:c02::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6DE8A17AD for ; Wed, 4 Dec 2013 15:13:46 +0000 (UTC) Received: by mail-qe0-f46.google.com with SMTP id a11so16390699qen.33 for ; Wed, 04 Dec 2013 07:13:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=hLAtlWQm1qPv9b6RmI3F6+eseeKeUiR5ltaYd89BDA8=; b=jmgj+MdCRGDYY/871/dVLPdbA6eTOOnqryB888jsSV4EC5h8qnxnvRJG6IdJ3Zy6kO eG+MYlRbyjQCwKGapVXk34W8FSC3+iaIVW2S2stntSKVB9eOq5kFer7+sJIulbugUMdh Lz8P1RUZTaSFZ/8l0tUqTU1wRhJ3fo4J2MeZE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=hLAtlWQm1qPv9b6RmI3F6+eseeKeUiR5ltaYd89BDA8=; b=EDdGrLrSUogQICUgLS2KvTne9Y8lFZCXDDMzKcAkw9N5o+myk72rbXB81559gdvNUr KVpHy7mZR7RWID2fD9BuQinosrpvzvb0Qgnje/tQMt150J53VD+91I4YZxzaYwSAI+GR N7r1yyDmEM/EPoKBtni1iwY728BaQZyOz8+QedSmutcRdFEyWnmqATT3cNPJTRGofa4c qWCVREgWdmmuVuXLYbU6TrIzK0HryGYum02Q4/LGkCdvUgdhbjQI3/wc8m5mvTFJfDeI ZTmPh7/4j1GXAKQFHkeAq94Q8My/PtAj2mLqKpx+UMs2etNAs+jfyznowwaseQdcIdX/ JDCQ== X-Gm-Message-State: ALoCoQlUCEiuRSdHerELjllUaWdMaVyJrFklt96OoTrHVe0hwdxOPMB0aUzdirMGTffBmtoUezNs X-Received: by 10.49.74.138 with SMTP id t10mr53626003qev.21.1386170025540; Wed, 04 Dec 2013 07:13:45 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.86.42 with HTTP; Wed, 4 Dec 2013 07:13:15 -0800 (PST) In-Reply-To: <20131204051726.GD48919@FreeBSD.org> References: <201312040506.rB456u6r058512@svn.freebsd.org> <20131204051726.GD48919@FreeBSD.org> From: Eitan Adler Date: Wed, 4 Dec 2013 10:13:15 -0500 X-Google-Sender-Auth: uq4zgR4C5CA__llkIJy78KUKrfM Message-ID: Subject: Re: svn commit: r258908 - head/sbin/route To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 15:13:46 -0000 On Wed, Dec 4, 2013 at 12:17 AM, Gleb Smirnoff wrote: > On Wed, Dec 04, 2013 at 05:06:56AM +0000, Eitan Adler wrote: > E> Author: eadler > E> Date: Wed Dec 4 05:06:56 2013 > E> New Revision: 258908 > E> URL: http://svnweb.freebsd.org/changeset/base/258908 > E> > E> Log: > E> Avoid using a static buffer in atalk_ntoa. This will help allow users to call route(1) as a library. > E> > E> Submitted by: Sebastian Huber (older version) > E> Discussed on: -hackers > E> Reviwed by: adri (different older version) > > Does this mean someone is still using atalk? No, it is part of a larger series of changes which will eventually allow route(1) to be statically linked into a larger program. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 15:58:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA94DED8; Wed, 4 Dec 2013 15:58:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A663C1AEF; Wed, 4 Dec 2013 15:58:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4Fwgri079190; Wed, 4 Dec 2013 15:58:42 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4FwgPQ079189; Wed, 4 Dec 2013 15:58:42 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201312041558.rB4FwgPQ079189@svn.freebsd.org> From: Bryan Drewery Date: Wed, 4 Dec 2013 15:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258924 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 15:58:42 -0000 Author: bdrewery (ports committer) Date: Wed Dec 4 15:58:42 2013 New Revision: 258924 URL: http://svnweb.freebsd.org/changeset/base/258924 Log: Add missing period for WITHOUT_PKGBOOTSTRAP so that it matches all other entries. Approved by: bapt MFC after: 3 days Modified: head/tools/build/options/WITHOUT_PKGBOOTSTRAP Modified: head/tools/build/options/WITHOUT_PKGBOOTSTRAP ============================================================================== --- head/tools/build/options/WITHOUT_PKGBOOTSTRAP Wed Dec 4 14:50:43 2013 (r258923) +++ head/tools/build/options/WITHOUT_PKGBOOTSTRAP Wed Dec 4 15:58:42 2013 (r258924) @@ -1,4 +1,4 @@ .\" $FreeBSD$ Set to not build .Xr pkg 7 -bootstrap tool +bootstrap tool. From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 16:03:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54D4E269; Wed, 4 Dec 2013 16:03:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 403591B4D; Wed, 4 Dec 2013 16:03:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4G3XN6082141; Wed, 4 Dec 2013 16:03:33 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4G3XP1082140; Wed, 4 Dec 2013 16:03:33 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201312041603.rB4G3XP1082140@svn.freebsd.org> From: Bryan Drewery Date: Wed, 4 Dec 2013 16:03:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258925 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 16:03:33 -0000 Author: bdrewery (ports committer) Date: Wed Dec 4 16:03:32 2013 New Revision: 258925 URL: http://svnweb.freebsd.org/changeset/base/258925 Log: Regenerate after r258924 MFC after: 3 days Approved by: bapt (implicit) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Dec 4 15:58:42 2013 (r258924) +++ head/share/man/man5/src.conf.5 Wed Dec 4 16:03:32 2013 (r258925) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd November 11, 2013 +.Dd December 4, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -851,10 +851,10 @@ When set, it also enforces the following .Va WITHOUT_AUTHPF .El .It Va WITHOUT_PKGBOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_PKGBOOTSTRAP 257440 2013-10-31 12:05:37Z bapt +.\" from FreeBSD: head/tools/build/options/WITHOUT_PKGBOOTSTRAP 258924 2013-12-04 15:58:42Z bdrewery Set to not build .Xr pkg 7 -bootstrap tool +bootstrap tool. .It Va WITHOUT_PMC .\" from FreeBSD: head/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam Set to not build From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 16:06:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D4474D4; Wed, 4 Dec 2013 16:06:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 88BA71C87; Wed, 4 Dec 2013 16:06:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4G6BiH082590; Wed, 4 Dec 2013 16:06:11 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4G6BpJ082589; Wed, 4 Dec 2013 16:06:11 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201312041606.rB4G6BpJ082589@svn.freebsd.org> From: Bryan Drewery Date: Wed, 4 Dec 2013 16:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258926 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 16:06:11 -0000 Author: bdrewery (ports committer) Date: Wed Dec 4 16:06:11 2013 New Revision: 258926 URL: http://svnweb.freebsd.org/changeset/base/258926 Log: Regenerate after r258838 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Dec 4 16:03:32 2013 (r258925) +++ head/share/man/man5/src.conf.5 Wed Dec 4 16:06:11 2013 (r258926) @@ -184,6 +184,9 @@ Set to not build .It Va WITHOUT_CAPSICUM .\" from FreeBSD: head/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. +.It Va WITHOUT_CASPER +.\" from FreeBSD: head/tools/build/options/WITHOUT_CASPER 258838 2013-12-02 08:21:28Z pjd +Set to not build Casper program and related libraries. .It Va WITHOUT_CDDL .\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 16:06:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 327CD60B; Wed, 4 Dec 2013 16:06:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E7D51C8D; Wed, 4 Dec 2013 16:06:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4G6NjY082662; Wed, 4 Dec 2013 16:06:23 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4G6NGY082661; Wed, 4 Dec 2013 16:06:23 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201312041606.rB4G6NGY082661@svn.freebsd.org> From: Devin Teske Date: Wed, 4 Dec 2013 16:06:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258927 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 16:06:24 -0000 Author: dteske Date: Wed Dec 4 16:06:23 2013 New Revision: 258927 URL: http://svnweb.freebsd.org/changeset/base/258927 Log: Fix a regression introduced by SVN r257842 that prevents Encryption from being enabled. MFC after: 3 days Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Wed Dec 4 16:06:11 2013 (r258926) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Wed Dec 4 16:06:23 2013 (r258927) @@ -961,7 +961,7 @@ zfs_create_boot() # If encryption is enabled, we need to create the GEOMs # if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then - local bootvdev= + local bootvdev= options= local geli_pool="$BSDINSTALL_CHROOT/$ZFSBOOT_GELI_POOL_NAME" local key="$ZFSBOOT_GELI_KEY_FILE" @@ -978,11 +978,13 @@ zfs_create_boot() f_dprintf "$funcname: %s %s %s" \ "ZFSBOOT_GELI_POOL_NAME=[$ZFSBOOT_GELI_POOL_NAME]" \ "bootvdev=[$bootvdev]" "unenc_list=[$unenc_list]" + options="-o altroot=\"\$BSDINSTALL_CHROOT\"" + options="$options -m \"/\$ZFSBOOT_GELI_POOL_NAME\"" + options="$options -f" f_eval_catch $funcname zpool "$ZPOOL_CREATE_WITH_OPTIONS" \ - "-o altroot=\"\$BSDINSTALL_CHROOT\" - -m \"/\$ZFSBOOT_GELI_POOL_NAME\" -f" \ - \$ZFSBOOT_GELI_POOL_NAME \$bootvdev \ + "$options" \$ZFSBOOT_GELI_POOL_NAME \$bootvdev \ \$unenc_list || return $FAILURE + f_dprintf "$funcname: geli_pool=[%s]" "$geli_pool" f_eval_catch $funcname mkdir "$MKDIR_P" \$geli_pool/boot || return $FAILURE From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 16:38:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87E6BE40; Wed, 4 Dec 2013 16:38:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73B671E5D; Wed, 4 Dec 2013 16:38:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4Gcflm093086; Wed, 4 Dec 2013 16:38:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4Gcf9g093085; Wed, 4 Dec 2013 16:38:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312041638.rB4Gcf9g093085@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 4 Dec 2013 16:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258928 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 16:38:41 -0000 Author: nwhitehorn Date: Wed Dec 4 16:38:40 2013 New Revision: 258928 URL: http://svnweb.freebsd.org/changeset/base/258928 Log: Rename sysctl kern.supported_abis to kern.supported_archs, since it gives the set of MACHINE_ARCH values that can be run. Modified: head/sys/kern/kern_mib.c Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Wed Dec 4 16:06:23 2013 (r258927) +++ head/sys/kern/kern_mib.c Wed Dec 4 16:38:40 2013 (r258928) @@ -261,11 +261,11 @@ sysctl_hw_machine_arch(SYSCTL_HANDLER_AR SYSCTL_PROC(_hw, HW_MACHINE_ARCH, machine_arch, CTLTYPE_STRING | CTLFLAG_RD, NULL, 0, sysctl_hw_machine_arch, "A", "System architecture"); -SYSCTL_STRING(_kern, OID_AUTO, supported_abis, CTLFLAG_RD | CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, OID_AUTO, supported_archs, CTLFLAG_RD | CTLFLAG_MPSAFE, #ifdef COMPAT_FREEBSD32 - MACHINE_ARCH " " MACHINE_ARCH32, 0, "List of supported ABIs"); + MACHINE_ARCH " " MACHINE_ARCH32, 0, "Supported architectures for binaries"); #else - MACHINE_ARCH, 0, "List of supported ABIs"); + MACHINE_ARCH, 0, "Supported architectures for binaries"); #endif static int From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 17:41:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EED62C05; Wed, 4 Dec 2013 17:41:30 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6598711F9; Wed, 4 Dec 2013 17:41:30 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rB4HfODJ014018; Wed, 4 Dec 2013 19:41:24 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rB4HfODJ014018 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rB4HfOFW014017; Wed, 4 Dec 2013 19:41:24 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 4 Dec 2013 19:41:24 +0200 From: Konstantin Belousov To: Nathan Whitehorn Subject: Re: svn commit: r258928 - head/sys/kern Message-ID: <20131204174123.GX59496@kib.kiev.ua> References: <201312041638.rB4Gcf9g093085@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9TTgLwHid9n6KRdB" Content-Disposition: inline In-Reply-To: <201312041638.rB4Gcf9g093085@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 17:41:31 -0000 --9TTgLwHid9n6KRdB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 04, 2013 at 04:38:41PM +0000, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Wed Dec 4 16:38:40 2013 > New Revision: 258928 > URL: http://svnweb.freebsd.org/changeset/base/258928 >=20 > Log: > Rename sysctl kern.supported_abis to kern.supported_archs, since it giv= es > the set of MACHINE_ARCH values that can be run. >=20 > Modified: > head/sys/kern/kern_mib.c >=20 > Modified: head/sys/kern/kern_mib.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_mib.c Wed Dec 4 16:06:23 2013 (r258927) > +++ head/sys/kern/kern_mib.c Wed Dec 4 16:38:40 2013 (r258928) > @@ -261,11 +261,11 @@ sysctl_hw_machine_arch(SYSCTL_HANDLER_AR > SYSCTL_PROC(_hw, HW_MACHINE_ARCH, machine_arch, CTLTYPE_STRING | CTLFLAG= _RD, > NULL, 0, sysctl_hw_machine_arch, "A", "System architecture"); > =20 > -SYSCTL_STRING(_kern, OID_AUTO, supported_abis, CTLFLAG_RD | CTLFLAG_MPSA= FE, > +SYSCTL_STRING(_kern, OID_AUTO, supported_archs, CTLFLAG_RD | CTLFLAG_MPS= AFE, > #ifdef COMPAT_FREEBSD32 > - MACHINE_ARCH " " MACHINE_ARCH32, 0, "List of supported ABIs"); > + MACHINE_ARCH " " MACHINE_ARCH32, 0, "Supported architectures for bin= aries"); > #else > - MACHINE_ARCH, 0, "List of supported ABIs"); > + MACHINE_ARCH, 0, "Supported architectures for binaries"); > #endif Solaris called the same concept an ISA, as far as I remember. You do not intend to list foreign systems ABI emulators there ? --9TTgLwHid9n6KRdB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSn2lDAAoJEJDCuSvBvK1B5hMP/ihMVS63mQbpdzl+v2WjnGgF INL9lKGs2yf9dFKYto+EFnWJCa6lFM4gDDucSgZklTJU3VjmQb1YPx+VUS9Qnmys uLasGZEBcNk5ent1AkaKJwS3j/dBJ3/UbCdx2IAj0YbeBGnU0/NL51duD93YCxpS pevHeRZqSc8nu3L1sRfMXYy/r+vzUarhqGxZk71jymQCrsyANXivdKa2/W2RnWIh 2bUdd+RejgJXAck8+lOfczOrW3uSpHujj9921WKg0Mmwcnkurk9sh/Dbj8VrQoV3 iwSkGgpgIXH99qW+tPgIxh3MrzakTZVpe4lSi++yFmd+B1cTin9/n57qhmr0cIct zfP/N3hnAt4s76HGqY/dr3TI+nOg4p6lrTqdvFmIh8D8drAPWgoWneuRjVxuBZGR uDrMHCRGGkZDOctgqSE+wLcaQs1N0GbTJbn4rPcRlBHBFDVJctsdfIiVuQsn8vwU xKx6ceVyPpTTzvzHEbnskqhl1U0Vh4S5suGswEpyTThcYXo5lQTS7L7yDEp0XFhX Wj8fvgzFN0WAO+t9frw+IDgHD1s4p48i0a6iP0zcf85mGPmSfMw50xqf5XWVZcUr bS4gKxOqzTVQ7YxKoAxjg1u32IqBuoBhfsypMbVPrW2N5iv3JfOr8/12Qz6dNiSW ckzW/XIZdeJ25EnXZZiC =jEc9 -----END PGP SIGNATURE----- --9TTgLwHid9n6KRdB-- From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 17:57:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F2D238F; Wed, 4 Dec 2013 17:57:36 +0000 (UTC) Received: from i3mail.icecube.wisc.edu (i3mail.icecube.wisc.edu [128.104.255.23]) by mx1.freebsd.org (Postfix) with ESMTP id 3627112F0; Wed, 4 Dec 2013 17:57:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by i3mail.icecube.wisc.edu (Postfix) with ESMTP id 8727E3812E; Wed, 4 Dec 2013 11:49:11 -0600 (CST) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from i3mail.icecube.wisc.edu ([127.0.0.1]) by localhost (i3mail.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id wUapFkAJf4gH; Wed, 4 Dec 2013 11:49:11 -0600 (CST) Received: from terminus.icecube.wisc.edu (terminus.icecube.wisc.edu [172.16.223.97]) by i3mail.icecube.wisc.edu (Postfix) with ESMTPSA id 6ED5538134; Wed, 4 Dec 2013 11:49:11 -0600 (CST) Message-ID: <529F6B17.2060302@freebsd.org> Date: Wed, 04 Dec 2013 11:49:11 -0600 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r258928 - head/sys/kern References: <201312041638.rB4Gcf9g093085@svn.freebsd.org> <20131204174123.GX59496@kib.kiev.ua> In-Reply-To: <20131204174123.GX59496@kib.kiev.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 17:57:36 -0000 On 12/04/13 11:41, Konstantin Belousov wrote: > On Wed, Dec 04, 2013 at 04:38:41PM +0000, Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Wed Dec 4 16:38:40 2013 >> New Revision: 258928 >> URL: http://svnweb.freebsd.org/changeset/base/258928 >> >> Log: >> Rename sysctl kern.supported_abis to kern.supported_archs, since it gives >> the set of MACHINE_ARCH values that can be run. >> >> Modified: >> head/sys/kern/kern_mib.c >> >> Modified: head/sys/kern/kern_mib.c >> ============================================================================== >> --- head/sys/kern/kern_mib.c Wed Dec 4 16:06:23 2013 (r258927) >> +++ head/sys/kern/kern_mib.c Wed Dec 4 16:38:40 2013 (r258928) >> @@ -261,11 +261,11 @@ sysctl_hw_machine_arch(SYSCTL_HANDLER_AR >> SYSCTL_PROC(_hw, HW_MACHINE_ARCH, machine_arch, CTLTYPE_STRING | CTLFLAG_RD, >> NULL, 0, sysctl_hw_machine_arch, "A", "System architecture"); >> >> -SYSCTL_STRING(_kern, OID_AUTO, supported_abis, CTLFLAG_RD | CTLFLAG_MPSAFE, >> +SYSCTL_STRING(_kern, OID_AUTO, supported_archs, CTLFLAG_RD | CTLFLAG_MPSAFE, >> #ifdef COMPAT_FREEBSD32 >> - MACHINE_ARCH " " MACHINE_ARCH32, 0, "List of supported ABIs"); >> + MACHINE_ARCH " " MACHINE_ARCH32, 0, "Supported architectures for binaries"); >> #else >> - MACHINE_ARCH, 0, "List of supported ABIs"); >> + MACHINE_ARCH, 0, "Supported architectures for binaries"); >> #endif > Solaris called the same concept an ISA, as far as I remember. > You do not intend to list foreign systems ABI emulators there ? The idea is to have something purely the same in meaning as hw.machine_arch, which does not involve listing foreign ABIs and is also why it is "arch" instead of "isa" (since it is "machine_arch"). I'm happy to rename it again if there is a clear consensus, though, although there is some risk of bikeshedding. I personally have no opinion on what it is called so long as it exists. -Nathan From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 18:25:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD57CF17; Wed, 4 Dec 2013 18:25:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 992D61580; Wed, 4 Dec 2013 18:25: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 rB4IP5Rh029970; Wed, 4 Dec 2013 18:25:05 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4IP57Z029968; Wed, 4 Dec 2013 18:25:05 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312041825.rB4IP57Z029968@svn.freebsd.org> From: Peter Wemm Date: Wed, 4 Dec 2013 18:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258929 - in stable/10/sys: compat/freebsd32 kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 18:25:05 -0000 Author: peter Date: Wed Dec 4 18:25:04 2013 New Revision: 258929 URL: http://svnweb.freebsd.org/changeset/base/258929 Log: MFC: r258718: fix emulated jail_v0 byte order Approved by: re (gjb) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/kern/kern_jail.c Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Dec 4 16:38:40 2013 (r258928) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Dec 4 18:25:04 2013 (r258929) @@ -1925,7 +1925,7 @@ freebsd32_jail(struct thread *td, struct CP(j32_v0, j, version); PTRIN_CP(j32_v0, j, path); PTRIN_CP(j32_v0, j, hostname); - j.ip4s = j32_v0.ip_number; + j.ip4s = htonl(j32_v0.ip_number); /* jail_v0 is host order */ break; } Modified: stable/10/sys/kern/kern_jail.c ============================================================================== --- stable/10/sys/kern/kern_jail.c Wed Dec 4 16:38:40 2013 (r258928) +++ stable/10/sys/kern/kern_jail.c Wed Dec 4 18:25:04 2013 (r258929) @@ -313,7 +313,7 @@ sys_jail(struct thread *td, struct jail_ j.version = j0.version; j.path = j0.path; j.hostname = j0.hostname; - j.ip4s = j0.ip_number; + j.ip4s = htonl(j0.ip_number); /* jail_v0 is host order */ break; } From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 19:04:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C72FD11; Wed, 4 Dec 2013 19:04:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 68B0717F8; Wed, 4 Dec 2013 19:04: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 rB4J4vvr043710; Wed, 4 Dec 2013 19:04:57 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4J4vbM043709; Wed, 4 Dec 2013 19:04:57 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201312041904.rB4J4vbM043709@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Wed, 4 Dec 2013 19:04:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258930 - head/sys/dev/drm2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 19:04:57 -0000 Author: dumbbell Date: Wed Dec 4 19:04:56 2013 New Revision: 258930 URL: http://svnweb.freebsd.org/changeset/base/258930 Log: drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge Before this fix, capabilities were read from vgapci and were incorrect. Modified: head/sys/dev/drm2/drm_pci.c Modified: head/sys/dev/drm2/drm_pci.c ============================================================================== --- head/sys/dev/drm2/drm_pci.c Wed Dec 4 18:25:04 2013 (r258929) +++ head/sys/dev/drm2/drm_pci.c Wed Dec 4 19:04:56 2013 (r258930) @@ -134,7 +134,11 @@ int drm_pcie_get_speed_cap_mask(struct d if (!drm_device_is_pcie(dev)) return -EINVAL; - root = device_get_parent(dev->device); + root = + device_get_parent( /* pcib */ + device_get_parent( /* `-- pci */ + device_get_parent( /* `-- vgapci */ + dev->device))); /* `-- drmn */ pos = 0; pci_find_cap(root, PCIY_EXPRESS, &pos); From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 19:15:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD859F56; Wed, 4 Dec 2013 19:15:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C9D101883; Wed, 4 Dec 2013 19:15: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 rB4JFuXC047567; Wed, 4 Dec 2013 19:15:56 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4JFuxA047566; Wed, 4 Dec 2013 19:15:56 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201312041915.rB4JFuxA047566@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 4 Dec 2013 19:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258931 - head/usr.bin/yacc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 19:15:56 -0000 Author: obrien Date: Wed Dec 4 19:15:56 2013 New Revision: 258931 URL: http://svnweb.freebsd.org/changeset/base/258931 Log: Add missing bits from the vendor's 2005-05-04 change to contrib/byacc/makefile.in ("add YYPATCH here so it can be tested by applications") so that applications have a hope of detecting newer FreeBSD YACC output from an older one. Submitted by: Juniper Networks Modified: head/usr.bin/yacc/Makefile Modified: head/usr.bin/yacc/Makefile ============================================================================== --- head/usr.bin/yacc/Makefile Wed Dec 4 19:04:56 2013 (r258930) +++ head/usr.bin/yacc/Makefile Wed Dec 4 19:15:56 2013 (r258931) @@ -1,7 +1,8 @@ # @(#)Makefile 5.3 (Berkeley) 5/12/90 # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/byacc +BYACC_SRC= ${.CURDIR}/../../contrib/byacc +.PATH: ${BYACC_SRC} PROG= yacc SRCS= closure.c error.c graph.c lalr.c lr0.c main.c mkpar.c output.c \ @@ -12,7 +13,10 @@ CFLAGS+= -DMIXEDCASE_FILENAMES=1 \ -DHAVE_FCNTL_H=1 \ -DHAVE_ATEXIT=1 \ -DHAVE_MKSTEMP=1 - + +YYPATCH!= cat ${BYACC_SRC}/VERSION +CFLAGS+= -DYYPATCH=${YYPATCH} + LINKS= ${BINDIR}/yacc ${BINDIR}/byacc MLINKS= yacc.1 byacc.1 From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 19:19:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76AE133F; Wed, 4 Dec 2013 19:19:39 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9463618AF; Wed, 4 Dec 2013 19:19:38 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id hq4so8500602wib.5 for ; Wed, 04 Dec 2013 11:19:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=vZeb8z2ByKwgRAsyJg/WVZnoB0tcWmfzJQvPkjVgAEc=; b=PdWYPWvIVOsdg8bc/uIVrcs/YteOEj49LUgZYtkuHIWZcpHrD3XhXG3ZA7nh2C72jI qtr7DFdnvucgdqfifkLbuufOjUGTQQco77vNonf6jV5En0za3iFlugESTOk8aINerx6w PBSTTqMr9rVN+FKzYbF2lOrddCwc5FOQ/eoyB+ZUAbOw+gAhMVpp/9jSmM3rVk7jpG3f MXsnW7PidRwdRrdsv0y3zRQ8EmCu6DFPi4GzBOJScCi+0BmEoBM2kkxnml+6OfuFPLpG BEXpByMGEC3L/+cyJAsJ48YEYHZsR9SrN0psq+/DomFFtT4ZGYeZ5x2z5/u8SrD9Yj56 9wvA== X-Received: by 10.180.89.68 with SMTP id bm4mr8870088wib.0.1386184773856; Wed, 04 Dec 2013 11:19:33 -0800 (PST) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id fj8sm1812892wib.1.2013.12.04.11.19.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Dec 2013 11:19:32 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 4 Dec 2013 20:19:30 +0100 From: Baptiste Daroussin To: "David E. O'Brien" Subject: Re: svn commit: r258931 - head/usr.bin/yacc Message-ID: <20131204191930.GB76976@ithaqua.etoilebsd.net> References: <201312041915.rB4JFuxA047566@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s/l3CgOIzMHHjg/5" Content-Disposition: inline In-Reply-To: <201312041915.rB4JFuxA047566@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 19:19:39 -0000 --s/l3CgOIzMHHjg/5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 04, 2013 at 07:15:56PM +0000, David E. O'Brien wrote: > Author: obrien > Date: Wed Dec 4 19:15:56 2013 > New Revision: 258931 > URL: http://svnweb.freebsd.org/changeset/base/258931 >=20 > Log: > Add missing bits from the vendor's 2005-05-04 change to > contrib/byacc/makefile.in ("add YYPATCH here so it can be tested by > applications") so that applications have a hope of detecting newer > FreeBSD YACC output from an older one. > =20 > Submitted by: Juniper Networks >=20 > Modified: > head/usr.bin/yacc/Makefile >=20 > Modified: head/usr.bin/yacc/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/yacc/Makefile Wed Dec 4 19:04:56 2013 (r258930) > +++ head/usr.bin/yacc/Makefile Wed Dec 4 19:15:56 2013 (r258931) > @@ -1,7 +1,8 @@ > # @(#)Makefile 5.3 (Berkeley) 5/12/90 > # $FreeBSD$ > =20 > -.PATH: ${.CURDIR}/../../contrib/byacc > +BYACC_SRC=3D ${.CURDIR}/../../contrib/byacc > +.PATH: ${BYACC_SRC} > =20 > PROG=3D yacc > SRCS=3D closure.c error.c graph.c lalr.c lr0.c main.c mkpar.c output.c \ > @@ -12,7 +13,10 @@ CFLAGS+=3D -DMIXEDCASE_FILENAMES=3D1 \ > -DHAVE_FCNTL_H=3D1 \ > -DHAVE_ATEXIT=3D1 \ > -DHAVE_MKSTEMP=3D1 > - =09 > + > +YYPATCH!=3D cat ${BYACC_SRC}/VERSION > +CFLAGS+=3D -DYYPATCH=3D${YYPATCH} > + > LINKS=3D ${BINDIR}/yacc ${BINDIR}/byacc > MLINKS=3D yacc.1 byacc.1 > =20 > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" Thanks Sorry I missed it, regards, Bapt --s/l3CgOIzMHHjg/5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlKfgEIACgkQ8kTtMUmk6ExEWwCfQFKWE8YVX6J7iNKkH//5pewd LXQAn2nWl9qfU6kfMj5jHwfbMyB/BxGu =8Rdz -----END PGP SIGNATURE----- --s/l3CgOIzMHHjg/5-- From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 20:03:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6F41D6; Wed, 4 Dec 2013 20:03:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93A3B1D0A; Wed, 4 Dec 2013 20:03: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 rB4K3thP063974; Wed, 4 Dec 2013 20:03:55 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4K3tjv063973; Wed, 4 Dec 2013 20:03:55 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312042003.rB4K3tjv063973@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Dec 2013 20:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258934 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 20:03:55 -0000 Author: eadler Date: Wed Dec 4 20:03:55 2013 New Revision: 258934 URL: http://svnweb.freebsd.org/changeset/base/258934 Log: route(1): Pull static buffer out of the function and into function scope. This will make it easier to link as a library. Submitted by: Sebastian Huber (older version) Discussed on: -hackers Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Dec 4 20:02:16 2013 (r258933) +++ head/sbin/route/route.c Wed Dec 4 20:03:55 2013 (r258934) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -92,6 +93,8 @@ static u_long rtm_inits; static uid_t uid; static int defaultfib; static int numfibs; +static char domain[MAXHOSTNAMELEN + 1]; +static bool domain_initialized; static int atalk_aton(const char *, struct at_addr *); static char *atalk_ntoa(struct at_addr, char [ATALK_BUF_SIZE]); @@ -499,12 +502,10 @@ routename(struct sockaddr *sa) const char *cp; char atalk_buf[ATALK_BUF_SIZE]; static char line[NI_MAXHOST]; - static char domain[MAXHOSTNAMELEN + 1]; - static int first = 1; int n; - if (first) { - first = 0; + if (!domain_initialized) { + domain_initialized = true; if (gethostname(domain, MAXHOSTNAMELEN) == 0 && (cp = strchr(domain, '.'))) { domain[MAXHOSTNAMELEN] = '\0'; From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 20:05:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4904D337; Wed, 4 Dec 2013 20:05:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 332A81D34; Wed, 4 Dec 2013 20:05:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4K5MSe064319; Wed, 4 Dec 2013 20:05:22 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4K5Ljs064309; Wed, 4 Dec 2013 20:05:21 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201312042005.rB4K5Ljs064309@svn.freebsd.org> From: David C Somayajulu Date: Wed, 4 Dec 2013 20:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258936 - in stable/9: share/man/man4 sys/conf sys/dev/qlxge sys/modules sys/modules/qlxge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 20:05:22 -0000 Author: davidcs Date: Wed Dec 4 20:05:20 2013 New Revision: 258936 URL: http://svnweb.freebsd.org/changeset/base/258936 Log: MFC: 252206,258156 port dev/qlxge from head Added: stable/9/share/man/man4/qlxge.4 - copied unchanged from r252206, head/share/man/man4/qlxge.4 stable/9/sys/dev/qlxge/ - copied from r252206, head/sys/dev/qlxge/ stable/9/sys/modules/qlxge/ - copied from r252206, head/sys/modules/qlxge/ Modified: stable/9/share/man/man4/Makefile stable/9/sys/conf/files.amd64 stable/9/sys/dev/qlxge/qls_ioctl.c stable/9/sys/modules/Makefile Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Wed Dec 4 20:04:34 2013 (r258935) +++ stable/9/share/man/man4/Makefile Wed Dec 4 20:05:20 2013 (r258936) @@ -361,6 +361,7 @@ MAN= aac.4 \ pts.4 \ pty.4 \ puc.4 \ + ${_qlxge.4} \ ${_qlxgb.4} \ ${_qlxgbe.4} \ ral.4 \ @@ -771,10 +772,12 @@ MLINKS+=lindev.4 full.4 .endif .if ${MACHINE_CPUARCH} == "amd64" +_qlxge.4= qlxge.4 _qlxgb.4= qlxgb.4 _qlxgbe.4= qlxgbe.4 _sfxge.4= sfxge.4 +MLINKS+=qlxge.4 if_qlxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 Copied: stable/9/share/man/man4/qlxge.4 (from r252206, head/share/man/man4/qlxge.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/qlxge.4 Wed Dec 4 20:05:20 2013 (r258936, copy of r252206, head/share/man/man4/qlxge.4) @@ -0,0 +1,91 @@ +.\"- +.\" Copyright (c) 2013-2014 Qlogic Corporation +.\" 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$ +.\" +.Dd June 21, 2013 +.Dt QLXGE 4 +.Os +.Sh NAME +.Nm qlxge +.Nd "QLogic 8100 Series 10 Gigabit Ethernet Adapter Driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device qlxge" +.Ed +.Pp +To load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_qlxge_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver supports IPv4 checksum offload, +TCP and UDP checksum offload for both IPv4 and IPv6, +Large Segment Offload for both IPv4 and IPv6, +Jumbo frames, VLAN Tag, and +Receive Side scaling. +For further hardware information, see +.Pa http://www.qlogic.com/ . +.Sh HARDWARE +The +.Nm +driver supports 10 Gigabit Ethernet & CNA Adapter based on the following +chipsets: +.Pp +.Bl -bullet -compact +.It +QLogic 8100 series +.El +.Sh SUPPORT +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An David C Somayajulu +at QLogic Corporation. Modified: stable/9/sys/conf/files.amd64 ============================================================================== --- stable/9/sys/conf/files.amd64 Wed Dec 4 20:04:34 2013 (r258935) +++ stable/9/sys/conf/files.amd64 Wed Dec 4 20:05:20 2013 (r258936) @@ -237,6 +237,12 @@ dev/nvme/nvme_util.c optional nvme dev/nvram/nvram.c optional nvram isa dev/random/ivy.c optional random rdrand_rng dev/random/nehemiah.c optional random padlock_rng +dev/qlxge/qls_dbg.c optional qlxge pci +dev/qlxge/qls_dump.c optional qlxge pci +dev/qlxge/qls_hw.c optional qlxge pci +dev/qlxge/qls_ioctl.c optional qlxge pci +dev/qlxge/qls_isr.c optional qlxge pci +dev/qlxge/qls_os.c optional qlxge pci dev/qlxgb/qla_dbg.c optional qlxgb pci dev/qlxgb/qla_hw.c optional qlxgb pci dev/qlxgb/qla_ioctl.c optional qlxgb pci Modified: stable/9/sys/dev/qlxge/qls_ioctl.c ============================================================================== --- head/sys/dev/qlxge/qls_ioctl.c Tue Jun 25 17:50:22 2013 (r252206) +++ stable/9/sys/dev/qlxge/qls_ioctl.c Wed Dec 4 20:05:20 2013 (r258936) @@ -100,13 +100,16 @@ qls_eioctl(struct cdev *dev, u_long cmd, if (mpi_dump->size == 0) { mpi_dump->size = sizeof (qls_mpi_coredump_t); } else { - if (mpi_dump->size < sizeof (qls_mpi_coredump_t)) + if ((mpi_dump->size != sizeof (qls_mpi_coredump_t)) || + (mpi_dump->dbuf == NULL)) rval = EINVAL; else { - qls_mpi_core_dump(ha); - rval = copyout( &ql_mpi_coredump, - mpi_dump->dbuf, - mpi_dump->size); + if (qls_mpi_core_dump(ha) == 0) { + rval = copyout(&ql_mpi_coredump, + mpi_dump->dbuf, + mpi_dump->size); + } else + rval = ENXIO; if (rval) { device_printf(ha->pci_dev, Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Wed Dec 4 20:04:34 2013 (r258935) +++ stable/9/sys/modules/Makefile Wed Dec 4 20:05:20 2013 (r258936) @@ -270,6 +270,7 @@ SUBDIR= \ ${_pst} \ pty \ puc \ + ${_qlxge} \ ${_qlxgb} \ ${_qlxgbe} \ ral \ @@ -713,6 +714,7 @@ _opensolaris= opensolaris _padlock= padlock .endif _pccard= pccard +_qlxge= qlxge _qlxgb= qlxgb _qlxgbe= qlxgbe _rdma= rdma From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 20:07:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 653504DD; Wed, 4 Dec 2013 20:07:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 51D481D78; Wed, 4 Dec 2013 20: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 rB4K7ZVr064772; Wed, 4 Dec 2013 20:07:35 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4K7ZSX064771; Wed, 4 Dec 2013 20:07:35 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312042007.rB4K7ZSX064771@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Dec 2013 20:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258937 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 20:07:35 -0000 Author: eadler Date: Wed Dec 4 20:07:34 2013 New Revision: 258937 URL: http://svnweb.freebsd.org/changeset/base/258937 Log: route(1): Pull static variable out of the function and into function scope. This will make it easier to link as a library. Submitted by: Sebastian Huber (older version) Discussed on: -hackers Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Dec 4 20:05:20 2013 (r258936) +++ head/sbin/route/route.c Wed Dec 4 20:07:34 2013 (r258937) @@ -95,6 +95,7 @@ static int defaultfib; static int numfibs; static char domain[MAXHOSTNAMELEN + 1]; static bool domain_initialized; +static int rtm_seq; static int atalk_aton(const char *, struct at_addr *); static char *atalk_ntoa(struct at_addr, char [ATALK_BUF_SIZE]); @@ -1490,7 +1491,6 @@ static struct { static int rtmsg(int cmd, int flags, int fib) { - static int seq; int rlen; char *cp = m_rtmsg.m_space; int l; @@ -1526,7 +1526,7 @@ rtmsg(int cmd, int flags, int fib) rtm.rtm_type = cmd; rtm.rtm_flags = flags; rtm.rtm_version = RTM_VERSION; - rtm.rtm_seq = ++seq; + rtm.rtm_seq = ++rtm_seq; rtm.rtm_addrs = rtm_addrs; rtm.rtm_rmx = rt_metrics; rtm.rtm_inits = rtm_inits; @@ -1551,7 +1551,7 @@ rtmsg(int cmd, int flags, int fib) if (cmd == RTM_GET) { do { l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg)); - } while (l > 0 && (rtm.rtm_seq != seq || rtm.rtm_pid != pid)); + } while (l > 0 && (rtm.rtm_seq != rtm_seq || rtm.rtm_pid != pid)); if (l < 0) warn("read from routing socket"); else From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 20:08:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43EDA661; Wed, 4 Dec 2013 20:08:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2478D1D98; Wed, 4 Dec 2013 20:08:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4K8wh7065013; Wed, 4 Dec 2013 20:08:58 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4K8vpb065012; Wed, 4 Dec 2013 20:08:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312042008.rB4K8vpb065012@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Dec 2013 20:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258938 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 20:08:58 -0000 Author: eadler Date: Wed Dec 4 20:08:57 2013 New Revision: 258938 URL: http://svnweb.freebsd.org/changeset/base/258938 Log: route(1): Pull static buffer out of the function and into function scope. This will make it easier to link as a library. Submitted by: Sebastian Huber (older version) Discussed on: -hackers Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Dec 4 20:07:34 2013 (r258937) +++ head/sbin/route/route.c Wed Dec 4 20:08:57 2013 (r258938) @@ -96,6 +96,7 @@ static int numfibs; static char domain[MAXHOSTNAMELEN + 1]; static bool domain_initialized; static int rtm_seq; +static char rt_line[NI_MAXHOST]; static int atalk_aton(const char *, struct at_addr *); static char *atalk_ntoa(struct at_addr, char [ATALK_BUF_SIZE]); @@ -502,7 +503,6 @@ routename(struct sockaddr *sa) struct sockaddr_dl *sdl; const char *cp; char atalk_buf[ATALK_BUF_SIZE]; - static char line[NI_MAXHOST]; int n; if (!domain_initialized) { @@ -564,24 +564,24 @@ routename(struct sockaddr *sa) else if (sa->sa_family == AF_INET6) ss.ss_len = sizeof(struct sockaddr_in6); error = getnameinfo((struct sockaddr *)&ss, ss.ss_len, - line, sizeof(line), NULL, 0, + rt_line, sizeof(rt_line), NULL, 0, (nflag == 0) ? 0 : NI_NUMERICHOST); if (error) { warnx("getnameinfo(): %s", gai_strerror(error)); - strncpy(line, "invalid", sizeof(line)); + strncpy(rt_line, "invalid", sizeof(rt_line)); } /* Remove the domain part if any. */ - p = strchr(line, '.'); + p = strchr(rt_line, '.'); if (p != NULL && strcmp(p + 1, domain) == 0) *p = '\0'; - return (line); + return (rt_line); break; } #endif case AF_APPLETALK: - (void)snprintf(line, sizeof(line), "atalk %s", + (void)snprintf(rt_line, sizeof(rt_line), "atalk %s", atalk_ntoa(((struct sockaddr_at *)(void *)sa)->sat_addr, atalk_buf)); break; @@ -592,11 +592,11 @@ routename(struct sockaddr *sa) if (sdl->sdl_nlen == 0 && sdl->sdl_alen == 0 && sdl->sdl_slen == 0) { - n = snprintf(line, sizeof(line), "link#%d", + n = snprintf(rt_line, sizeof(rt_line), "link#%d", sdl->sdl_index); - if (n > (int)sizeof(line)) - line[0] = '\0'; - return (line); + if (n > (int)sizeof(rt_line)) + rt_line[0] = '\0'; + return (rt_line); } else return (link_ntoa(sdl)); break; @@ -605,8 +605,8 @@ routename(struct sockaddr *sa) { u_short *sp = (u_short *)(void *)sa; u_short *splim = sp + ((sa->sa_len + 1) >> 1); - char *cps = line + sprintf(line, "(%d)", sa->sa_family); - char *cpe = line + sizeof(line); + char *cps = rt_line + sprintf(rt_line, "(%d)", sa->sa_family); + char *cpe = rt_line + sizeof(rt_line); while (++sp < splim && cps < cpe) /* start with sa->sa_data */ if ((n = snprintf(cps, cpe - cps, " %x", *sp)) > 0) @@ -616,7 +616,7 @@ routename(struct sockaddr *sa) break; } } - return (line); + return (rt_line); } /* From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 20:13:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B77486F; Wed, 4 Dec 2013 20:13:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC2811E19; Wed, 4 Dec 2013 20:13: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 rB4KDT4d067878; Wed, 4 Dec 2013 20:13:29 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4KDTkE067877; Wed, 4 Dec 2013 20:13:29 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312042013.rB4KDTkE067877@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Dec 2013 20:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258939 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 20:13:30 -0000 Author: eadler Date: Wed Dec 4 20:13:29 2013 New Revision: 258939 URL: http://svnweb.freebsd.org/changeset/base/258939 Log: route(1): Pull static buffer out of the function and into function scope. This will make it easier to link as a library. Submitted by: Sebastian Huber Discussed on: -hackers Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Dec 4 20:08:57 2013 (r258938) +++ head/sbin/route/route.c Wed Dec 4 20:13:29 2013 (r258939) @@ -97,6 +97,7 @@ static char domain[MAXHOSTNAMELEN + 1]; static bool domain_initialized; static int rtm_seq; static char rt_line[NI_MAXHOST]; +static char net_line[MAXHOSTNAMELEN + 1]; static int atalk_aton(const char *, struct at_addr *); static char *atalk_ntoa(struct at_addr, char [ATALK_BUF_SIZE]); @@ -627,7 +628,6 @@ static const char * netname(struct sockaddr *sa) { struct sockaddr_dl *sdl; - static char line[MAXHOSTNAMELEN + 1]; char atalk_buf[ATALK_BUF_SIZE]; int n; #ifdef INET @@ -653,17 +653,17 @@ netname(struct sockaddr *sa) } #define C(x) (unsigned)((x) & 0xff) if (cp != NULL) - strncpy(line, cp, sizeof(line)); + strncpy(net_line, cp, sizeof(net_line)); else if ((in.s_addr & 0xffffff) == 0) - (void)sprintf(line, "%u", C(in.s_addr >> 24)); + (void)sprintf(net_line, "%u", C(in.s_addr >> 24)); else if ((in.s_addr & 0xffff) == 0) - (void)sprintf(line, "%u.%u", C(in.s_addr >> 24), + (void)sprintf(net_line, "%u.%u", C(in.s_addr >> 24), C(in.s_addr >> 16)); else if ((in.s_addr & 0xff) == 0) - (void)sprintf(line, "%u.%u.%u", C(in.s_addr >> 24), + (void)sprintf(net_line, "%u.%u.%u", C(in.s_addr >> 24), C(in.s_addr >> 16), C(in.s_addr >> 8)); else - (void)sprintf(line, "%u.%u.%u.%u", C(in.s_addr >> 24), + (void)sprintf(net_line, "%u.%u.%u.%u", C(in.s_addr >> 24), C(in.s_addr >> 16), C(in.s_addr >> 8), C(in.s_addr)); #undef C @@ -683,15 +683,15 @@ netname(struct sockaddr *sa) if (nflag) niflags |= NI_NUMERICHOST; if (getnameinfo((struct sockaddr *)&sin6, sin6.sin6_len, - line, sizeof(line), NULL, 0, niflags) != 0) - strncpy(line, "invalid", sizeof(line)); + net_line, sizeof(net_line), NULL, 0, niflags) != 0) + strncpy(net_line, "invalid", sizeof(net_line)); - return(line); + return(net_line); } #endif case AF_APPLETALK: - (void)snprintf(line, sizeof(line), "atalk %s", + (void)snprintf(net_line, sizeof(net_line), "atalk %s", atalk_ntoa(((struct sockaddr_at *)(void *)sa)->sat_addr, atalk_buf)); break; @@ -702,11 +702,11 @@ netname(struct sockaddr *sa) if (sdl->sdl_nlen == 0 && sdl->sdl_alen == 0 && sdl->sdl_slen == 0) { - n = snprintf(line, sizeof(line), "link#%d", + n = snprintf(net_line, sizeof(net_line), "link#%d", sdl->sdl_index); - if (n > (int)sizeof(line)) - line[0] = '\0'; - return (line); + if (n > (int)sizeof(net_line)) + net_line[0] = '\0'; + return (net_line); } else return (link_ntoa(sdl)); break; @@ -715,8 +715,8 @@ netname(struct sockaddr *sa) { u_short *sp = (u_short *)(void *)sa->sa_data; u_short *splim = sp + ((sa->sa_len + 1)>>1); - char *cps = line + sprintf(line, "af %d:", sa->sa_family); - char *cpe = line + sizeof(line); + char *cps = net_line + sprintf(net_line, "af %d:", sa->sa_family); + char *cpe = net_line + sizeof(net_line); while (sp < splim && cps < cpe) if ((n = snprintf(cps, cpe - cps, " %x", *sp++)) > 0) @@ -726,7 +726,7 @@ netname(struct sockaddr *sa) break; } } - return (line); + return (net_line); } static void From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 20:15:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE4D6AF5; Wed, 4 Dec 2013 20:15:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DACF11E4A; Wed, 4 Dec 2013 20:15:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4KFrQX068337; Wed, 4 Dec 2013 20:15:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4KFrk1068336; Wed, 4 Dec 2013 20:15:53 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312042015.rB4KFrk1068336@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Dec 2013 20:15:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258940 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 20:15:54 -0000 Author: eadler Date: Wed Dec 4 20:15:53 2013 New Revision: 258940 URL: http://svnweb.freebsd.org/changeset/base/258940 Log: route(1): Pull static data to the top of the file. This is a pre-requisisite to some upcoming changes. Submitted by: Sebastian Huber Discussed on: -hackers Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Dec 4 20:13:29 2013 (r258939) +++ head/sbin/route/route.c Wed Dec 4 20:15:53 2013 (r258940) @@ -74,6 +74,14 @@ __FBSDID("$FreeBSD$"); #define ATALK_BUF_SIZE 20 +struct fibl { + TAILQ_ENTRY(fibl) fl_next; + + int fl_num; + int fl_error; + int fl_errno; +}; + static struct keytab { const char *kt_cp; int kt_i; @@ -99,6 +107,13 @@ static int rtm_seq; static char rt_line[NI_MAXHOST]; static char net_line[MAXHOSTNAMELEN + 1]; +static struct { + struct rt_msghdr m_rtm; + char m_space[512]; +} m_rtmsg; + +static TAILQ_HEAD(fibl_head_t, fibl) fibl_head; + static int atalk_aton(const char *, struct at_addr *); static char *atalk_ntoa(struct at_addr, char [ATALK_BUF_SIZE]); static void printb(int, const char *); @@ -129,16 +144,6 @@ static void set_metric(char *, int); static int set_sofib(int); static void sockaddr(char *, struct sockaddr *, size_t); static void sodump(struct sockaddr *, const char *); - -struct fibl { - TAILQ_ENTRY(fibl) fl_next; - - int fl_num; - int fl_error; - int fl_errno; -}; -static TAILQ_HEAD(fibl_head_t, fibl) fibl_head; - static int fiboptlist_csv(const char *, struct fibl_head_t *); static int fiboptlist_range(const char *, struct fibl_head_t *); @@ -1483,11 +1488,6 @@ monitor(int argc, char *argv[]) } } -static struct { - struct rt_msghdr m_rtm; - char m_space[512]; -} m_rtmsg; - static int rtmsg(int cmd, int flags, int fib) { From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 20:24:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FCCCE9B; Wed, 4 Dec 2013 20:24:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2BF9A1EF2; Wed, 4 Dec 2013 20:24:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4KOJTE071605; Wed, 4 Dec 2013 20:24:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4KOIs1071601; Wed, 4 Dec 2013 20:24:18 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312042024.rB4KOIs1071601@svn.freebsd.org> From: Xin LI Date: Wed, 4 Dec 2013 20:24:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258941 - head/sys/dev/oce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 20:24:19 -0000 Author: delphij Date: Wed Dec 4 20:24:18 2013 New Revision: 258941 URL: http://svnweb.freebsd.org/changeset/base/258941 Log: Apply vendor improvements to oce(4) driver: - Add support to 40Gbps devices; - Add support to control adaptive interrupt coalescing (AIC) via sysctl; - Improve support of BE3 devices; Many thanks to Emulex for their continued support of FreeBSD. Submitted by: Venkata Duvvuru MFC after: 3 days Modified: head/sys/dev/oce/oce_if.c head/sys/dev/oce/oce_if.h head/sys/dev/oce/oce_mbox.c head/sys/dev/oce/oce_sysctl.c Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Wed Dec 4 20:15:53 2013 (r258940) +++ head/sys/dev/oce/oce_if.c Wed Dec 4 20:24:18 2013 (r258941) @@ -829,6 +829,10 @@ oce_media_status(struct ifnet *ifp, stru req->ifm_active |= IFM_10G_SR | IFM_FDX; sc->speed = 10000; break; + case 7: /* 40 Gbps */ + req->ifm_active |= IFM_40G_SR4 | IFM_FDX; + sc->speed = 40000; + break; } return; @@ -1953,7 +1957,6 @@ done: /* Is there atleast one eq that needs to be modified? */ if(num) oce_mbox_eqd_modify_periodic(sc, set_eqd, num); - } static void oce_detect_hw_error(POCE_SOFTC sc) @@ -2153,11 +2156,6 @@ process_link_state(POCE_SOFTC sc, struct sc->link_status = ASYNC_EVENT_LINK_DOWN; if_link_state_change(sc->ifp, LINK_STATE_DOWN); } - - /* Update speed */ - sc->link_speed = acqe->u0.s.speed; - sc->qos_link_speed = (uint32_t) acqe->u0.s.qos_link_speed * 10; - } @@ -2342,18 +2340,17 @@ oce_get_config(POCE_SOFTC sc) max_rss = OCE_MAX_RSS; if (!IS_BE(sc)) { - rc = oce_get_func_config(sc); + rc = oce_get_profile_config(sc, max_rss); if (rc) { sc->nwqs = OCE_MAX_WQ; sc->nrssqs = max_rss; sc->nrqs = sc->nrssqs + 1; } } - else { - rc = oce_get_profile_config(sc); + else { /* For BE3 don't rely on fw for determining the resources */ sc->nrssqs = max_rss; sc->nrqs = sc->nrssqs + 1; - if (rc) - sc->nwqs = OCE_MAX_WQ; + sc->nwqs = OCE_MAX_WQ; + sc->max_vlans = MAX_VLANFILTER_SIZE; } } Modified: head/sys/dev/oce/oce_if.h ============================================================================== --- head/sys/dev/oce/oce_if.h Wed Dec 4 20:15:53 2013 (r258940) +++ head/sys/dev/oce/oce_if.h Wed Dec 4 20:24:18 2013 (r258941) @@ -884,8 +884,8 @@ typedef struct oce_softc { uint8_t hw_error; uint16_t qnq_debug_event; uint16_t qnqid; - uint16_t pvid; - uint16_t max_vlans; + uint32_t pvid; + uint32_t max_vlans; } OCE_SOFTC, *POCE_SOFTC; @@ -1057,7 +1057,7 @@ int oce_mbox_cq_create(struct oce_cq *cq int oce_mbox_read_transrecv_data(POCE_SOFTC sc, uint32_t page_num); void oce_mbox_eqd_modify_periodic(POCE_SOFTC sc, struct oce_set_eqd *set_eqd, int num); -int oce_get_profile_config(POCE_SOFTC sc); +int oce_get_profile_config(POCE_SOFTC sc, uint32_t max_rss); int oce_get_func_config(POCE_SOFTC sc); void mbx_common_req_hdr_init(struct mbx_hdr *hdr, uint8_t dom, @@ -1101,6 +1101,9 @@ extern uint32_t oce_max_rsp_handled; /* #define OCE_ONE_PORT_EXT_LOOPBACK 0x2 #define OCE_NO_LOOPBACK 0xff +#undef IFM_40G_SR4 +#define IFM_40G_SR4 28 + #define atomic_inc_32(x) atomic_add_32(x, 1) #define atomic_dec_32(x) atomic_subtract_32(x, 1) Modified: head/sys/dev/oce/oce_mbox.c ============================================================================== --- head/sys/dev/oce/oce_mbox.c Wed Dec 4 20:15:53 2013 (r258940) +++ head/sys/dev/oce/oce_mbox.c Wed Dec 4 20:24:18 2013 (r258941) @@ -935,7 +935,7 @@ oce_get_link_status(POCE_SOFTC sc, struc bzero(&mbx, sizeof(struct oce_mbx)); - IS_XE201(sc) ? (version = OCE_MBX_VER_V1) : (version = OCE_MBX_VER_V0); + IS_BE2(sc) ? (version = OCE_MBX_VER_V0) : (version = OCE_MBX_VER_V1); fwcmd = (struct mbx_query_common_link_config *)&mbx.payload; mbx_common_req_hdr_init(&fwcmd->hdr, 0, 0, @@ -2025,7 +2025,7 @@ oce_mbox_eqd_modify_periodic(POCE_SOFTC } int -oce_get_profile_config(POCE_SOFTC sc) +oce_get_profile_config(POCE_SOFTC sc, uint32_t max_rss) { struct oce_mbx mbx; struct mbx_common_get_profile_config *fwcmd; @@ -2050,7 +2050,7 @@ oce_get_profile_config(POCE_SOFTC sc) fwcmd = OCE_DMAPTR(&dma, struct mbx_common_get_profile_config); bzero(fwcmd, sizeof(struct mbx_common_get_profile_config)); - if (IS_BE3(sc)) + if (!IS_XE201(sc)) version = OCE_MBX_VER_V1; else version = OCE_MBX_VER_V0; @@ -2102,13 +2102,20 @@ oce_get_profile_config(POCE_SOFTC sc) goto error; } else { - sc->max_vlans = nic_desc->vlan_count; - sc->nwqs = HOST_32(nic_desc->txq_count); + sc->max_vlans = HOST_16(nic_desc->vlan_count); + sc->nwqs = HOST_16(nic_desc->txq_count); if (sc->nwqs) sc->nwqs = MIN(sc->nwqs, OCE_MAX_WQ); else sc->nwqs = OCE_MAX_WQ; + sc->nrssqs = HOST_16(nic_desc->rssq_count); + if (sc->nrssqs) + sc->nrssqs = MIN(sc->nrssqs, max_rss); + else + sc->nrssqs = max_rss; + sc->nrqs = sc->nrssqs + 1; /* 1 for def RX */; + } error: oce_dma_free(sc, &dma); Modified: head/sys/dev/oce/oce_sysctl.c ============================================================================== --- head/sys/dev/oce/oce_sysctl.c Wed Dec 4 20:15:53 2013 (r258940) +++ head/sys/dev/oce/oce_sysctl.c Wed Dec 4 20:24:18 2013 (r258941) @@ -44,6 +44,7 @@ static void copy_stats_to_sc_xe201(POCE_ static void copy_stats_to_sc_be3(POCE_SOFTC sc); static void copy_stats_to_sc_be2(POCE_SOFTC sc); static int oce_sysctl_loopback(SYSCTL_HANDLER_ARGS); +static int oce_sys_aic_enable(SYSCTL_HANDLER_ARGS); static int oce_be3_fwupgrade(POCE_SOFTC sc, const struct firmware *fw); static int oce_skyhawk_fwupgrade(POCE_SOFTC sc, const struct firmware *fw); static int oce_sys_fwupgrade(SYSCTL_HANDLER_ARGS); @@ -131,6 +132,10 @@ oce_add_sysctls(POCE_SOFTC sc) CTLTYPE_STRING | CTLFLAG_RW, (void *)sc, 0, oce_sys_fwupgrade, "A", "Firmware ufi file"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "aic_enable", + CTLTYPE_INT | CTLFLAG_RW, (void *)sc, 1, + oce_sys_aic_enable, "I", "aic flags"); + /* * Dumps Transceiver data * "sysctl dev.oce.0.sfp_vpd_dump=0" @@ -170,6 +175,35 @@ oce_loopback_test(struct oce_softc *sc, } static int +oce_sys_aic_enable(SYSCTL_HANDLER_ARGS) +{ + int value = 0; + uint32_t status, vector; + POCE_SOFTC sc = (struct oce_softc *)arg1; + struct oce_aic_obj *aic; + + status = sysctl_handle_int(oidp, &value, 0, req); + if (status || !req->newptr) + return status; + + for (vector = 0; vector < sc->intr_count; vector++) { + aic = &sc->aic_obj[vector]; + + if (value == 0){ + aic->max_eqd = aic->min_eqd = aic->et_eqd = 0; + aic->enable = 0; + } + else { + aic->max_eqd = OCE_MAX_EQD; + aic->min_eqd = OCE_MIN_EQD; + aic->et_eqd = OCE_MIN_EQD; + aic->enable = TRUE; + } + } + return 0; +} + +static int oce_sysctl_loopback(SYSCTL_HANDLER_ARGS) { int value = 0; From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 20:28:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16C9D184; Wed, 4 Dec 2013 20:28:33 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E2F2B1F14; Wed, 4 Dec 2013 20:28:32 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EAD2CB917; Wed, 4 Dec 2013 15:28:30 -0500 (EST) From: John Baldwin To: "Jean-Sebastien Pedron" Subject: Re: svn commit: r258930 - head/sys/dev/drm2 Date: Wed, 4 Dec 2013 15:18:33 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201312041904.rB4J4vbM043709@svn.freebsd.org> In-Reply-To: <201312041904.rB4J4vbM043709@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201312041518.33731.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 04 Dec 2013 15:28:31 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 20:28:33 -0000 On Wednesday, December 04, 2013 2:04:57 pm Jean-Sebastien Pedron wrote: > Author: dumbbell > Date: Wed Dec 4 19:04:56 2013 > New Revision: 258930 > URL: http://svnweb.freebsd.org/changeset/base/258930 > > Log: > drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge > > Before this fix, capabilities were read from vgapci and were incorrect. Eh, vgapci is the right place to read this. The LINK_CAP here is telling you the width of the slot you are plugged into, not the width of the card that is plugged into the slot. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 20:46:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C34FC7D6; Wed, 4 Dec 2013 20:46:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AFC64103A; Wed, 4 Dec 2013 20:46:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4KkPuV078658; Wed, 4 Dec 2013 20:46:25 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4KkPmu078657; Wed, 4 Dec 2013 20:46:25 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201312042046.rB4KkPmu078657@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 4 Dec 2013 20:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258942 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 20:46:25 -0000 Author: pluknet Date: Wed Dec 4 20:46:25 2013 New Revision: 258942 URL: http://svnweb.freebsd.org/changeset/base/258942 Log: Clean up paragraph remnants. Modified: head/share/man/man7/development.7 Modified: head/share/man/man7/development.7 ============================================================================== --- head/share/man/man7/development.7 Wed Dec 4 20:24:18 2013 (r258941) +++ head/share/man/man7/development.7 Wed Dec 4 20:46:25 2013 (r258942) @@ -454,8 +454,6 @@ This is a good time to also remind you t .Xr svn 1 operations you do will be done as .Dq Li root . -.Pp -.Xr cron 8 . .Sh SEE ALSO .Xr crontab 1 , .Xr crontab 5 , From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 21:17:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE1A725E; Wed, 4 Dec 2013 21:17:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B08C211D6; Wed, 4 Dec 2013 21:17:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4LHeoG089414; Wed, 4 Dec 2013 21:17:40 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4LHehG089412; Wed, 4 Dec 2013 21:17:40 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312042117.rB4LHehG089412@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 4 Dec 2013 21:17:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258943 - in head/contrib/gcc: . config/rs6000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 21:17:40 -0000 Author: pfg Date: Wed Dec 4 21:17:39 2013 New Revision: 258943 URL: http://svnweb.freebsd.org/changeset/base/258943 Log: gcc: On rs6000 update sp_offset depending only on size. This fixes a nasty bug introduced in r258651. Reported and tested by: Justin Hibbits Obtained from: gcc pre-4.3 (rev. 125116; GPLv2) MFC after: 2 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/config/rs6000/rs6000.c Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Wed Dec 4 20:46:25 2013 (r258942) +++ head/contrib/gcc/ChangeLog.gcc43 Wed Dec 4 21:17:39 2013 (r258943) @@ -51,12 +51,20 @@ * doc/extend.texi: Document the 0b-prefixed binary integer constant extension. -2007-05-31 Eric Christopher +2007-05-31 Eric Christopher (r125246) * expr.c (convert_move): Assert that we don't have a BLKmode operand. (store_expr): Handle BLKmode moves by calling emit_block_move. +2007-05-27 Eric Christopher (r125116) + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Update + sp_offset depending on stack size. Save r12 depending + on registers we're saving later. + (rs6000_emit_epilogue): Update sp_offset depending only + on stack size. + 2007-05-24 Richard Sandiford (r125037) * postreload-gcse.c (reg_changed_after_insn_p): New function. Modified: head/contrib/gcc/config/rs6000/rs6000.c ============================================================================== --- head/contrib/gcc/config/rs6000/rs6000.c Wed Dec 4 20:46:25 2013 (r258942) +++ head/contrib/gcc/config/rs6000/rs6000.c Wed Dec 4 21:17:39 2013 (r258943) @@ -14704,8 +14704,17 @@ rs6000_emit_prologue (void) if (!WORLD_SAVE_P (info) && info->push_p && !(DEFAULT_ABI == ABI_V4 || current_function_calls_eh_return)) { - rs6000_emit_allocate_stack (info->total_size, FALSE); + if (info->total_size < 32767) sp_offset = info->total_size; + else + frame_reg_rtx = frame_ptr_rtx; + rs6000_emit_allocate_stack (info->total_size, + (frame_reg_rtx != sp_reg_rtx + && ((info->altivec_size != 0) + || (info->vrsave_mask != 0) + ))); + if (frame_reg_rtx != sp_reg_rtx) + rs6000_emit_stack_tie (); } /* Set frame pointer, if needed. */ @@ -15046,8 +15055,7 @@ rs6000_emit_epilogue (int sibcall) } /* Set sp_offset based on the stack push from the prologue. */ - if ((DEFAULT_ABI == ABI_V4 || current_function_calls_eh_return) - && info->total_size < 32767) + if (info->total_size < 32767) sp_offset = info->total_size; /* Restore AltiVec registers if needed. */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 21:32:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDA796E6; Wed, 4 Dec 2013 21:32:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C063312CC; Wed, 4 Dec 2013 21:32:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4LWF7Y095351; Wed, 4 Dec 2013 21:32:15 GMT (envelope-from roberto@svn.freebsd.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4LWFkH095350; Wed, 4 Dec 2013 21:32:15 GMT (envelope-from roberto@svn.freebsd.org) Message-Id: <201312042132.rB4LWFkH095350@svn.freebsd.org> From: Ollivier Robert Date: Wed, 4 Dec 2013 21:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r258944 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 21:32:16 -0000 Author: roberto Date: Wed Dec 4 21:32:15 2013 New Revision: 258944 URL: http://svnweb.freebsd.org/changeset/base/258944 Log: Add my name for the ntpd vendor import. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Dec 4 21:17:39 2013 (r258943) +++ svnadmin/conf/sizelimit.conf Wed Dec 4 21:32:15 2013 (r258944) @@ -31,6 +31,7 @@ jeff kmacy lstewart obrien +roberto rpaulo rwatson sam From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 21:33:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BBA981C; Wed, 4 Dec 2013 21:33:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 722E312D9; Wed, 4 Dec 2013 21:33:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4LXJAO095553; Wed, 4 Dec 2013 21:33:19 GMT (envelope-from roberto@svn.freebsd.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4LXJJb095550; Wed, 4 Dec 2013 21:33:19 GMT (envelope-from roberto@svn.freebsd.org) Message-Id: <201312042133.rB4LXJJb095550@svn.freebsd.org> From: Ollivier Robert Date: Wed, 4 Dec 2013 21:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r258945 - in vendor/ntp/dist: . adjtimed arlib clockstuff conf html html/build html/build/hints html/build/scripts html/description_files html/drivers html/hints html/scripts include in... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 21:33:19 -0000 Author: roberto Date: Wed Dec 4 21:33:17 2013 New Revision: 258945 URL: http://svnweb.freebsd.org/changeset/base/258945 Log: Virgin import of ntpd 4.2.6p5. When the series of commits is complete, things like https://cert.litnet.lt/en/docs/ntp-distributed-reflection-dos-attacks should be fixed. PR: bin/148836 (except that we import a newer version) Asked by: Too many MFC after: 2 weeks Added: vendor/ntp/dist/deps-ver vendor/ntp/dist/depsver.mf vendor/ntp/dist/html/bugs.html (contents, props changed) vendor/ntp/dist/html/build.html (contents, props changed) vendor/ntp/dist/html/comdex.html (contents, props changed) vendor/ntp/dist/html/config.html (contents, props changed) vendor/ntp/dist/html/decode.html (contents, props changed) vendor/ntp/dist/html/description_files/ vendor/ntp/dist/html/description_files/description.jpg (contents, props changed) vendor/ntp/dist/html/drivers/mx4200data.html (contents, props changed) vendor/ntp/dist/html/hints.html (contents, props changed) vendor/ntp/dist/html/hints/a-ux vendor/ntp/dist/html/hints/aix vendor/ntp/dist/html/hints/bsdi vendor/ntp/dist/html/hints/changes vendor/ntp/dist/html/hints/decosf1 vendor/ntp/dist/html/hints/decosf2 vendor/ntp/dist/html/hints/freebsd vendor/ntp/dist/html/hints/hpux vendor/ntp/dist/html/hints/linux vendor/ntp/dist/html/hints/mpeix vendor/ntp/dist/html/hints/notes-xntp-v3 vendor/ntp/dist/html/hints/parse vendor/ntp/dist/html/hints/refclocks vendor/ntp/dist/html/hints/rs6000 vendor/ntp/dist/html/hints/sco.html (contents, props changed) vendor/ntp/dist/html/hints/sgi vendor/ntp/dist/html/hints/solaris-dosynctodr.html (contents, props changed) vendor/ntp/dist/html/hints/solaris.html (contents, props changed) vendor/ntp/dist/html/hints/solaris.xtra.4023118 vendor/ntp/dist/html/hints/solaris.xtra.4095849 vendor/ntp/dist/html/hints/solaris.xtra.S99ntpd vendor/ntp/dist/html/hints/solaris.xtra.patchfreq vendor/ntp/dist/html/hints/sun4 vendor/ntp/dist/html/hints/svr4-dell vendor/ntp/dist/html/hints/svr4_package vendor/ntp/dist/html/hints/todo vendor/ntp/dist/html/hints/vxworks.html (contents, props changed) vendor/ntp/dist/html/hints/winnt.html (contents, props changed) vendor/ntp/dist/html/kernpps.html (contents, props changed) vendor/ntp/dist/html/ntp-wait.html (contents, props changed) vendor/ntp/dist/html/quick.html (contents, props changed) vendor/ntp/dist/html/rate.html (contents, props changed) vendor/ntp/dist/html/scripts/accopt.txt (contents, props changed) vendor/ntp/dist/html/scripts/audio.txt (contents, props changed) vendor/ntp/dist/html/scripts/authopt.txt (contents, props changed) vendor/ntp/dist/html/scripts/clockopt.txt (contents, props changed) vendor/ntp/dist/html/scripts/command.txt (contents, props changed) vendor/ntp/dist/html/scripts/config.txt (contents, props changed) vendor/ntp/dist/html/scripts/confopt.txt (contents, props changed) vendor/ntp/dist/html/scripts/external.txt (contents, props changed) vendor/ntp/dist/html/scripts/install.txt (contents, props changed) vendor/ntp/dist/html/scripts/manual.txt (contents, props changed) vendor/ntp/dist/html/scripts/misc.txt (contents, props changed) vendor/ntp/dist/html/scripts/miscopt.txt (contents, props changed) vendor/ntp/dist/html/scripts/monopt.txt (contents, props changed) vendor/ntp/dist/html/scripts/refclock.txt (contents, props changed) vendor/ntp/dist/html/sitemap.html (contents, props changed) vendor/ntp/dist/html/xleave.html (contents, props changed) vendor/ntp/dist/include/lib_strbuf.h (contents, props changed) vendor/ntp/dist/include/ntp_assert.h (contents, props changed) vendor/ntp/dist/include/ntp_data_structures.h (contents, props changed) vendor/ntp/dist/include/ntp_intres.h (contents, props changed) vendor/ntp/dist/include/ntp_libopts.h (contents, props changed) vendor/ntp/dist/include/ntp_lineedit.h (contents, props changed) vendor/ntp/dist/include/ntp_lists.h (contents, props changed) vendor/ntp/dist/include/ntp_net.h (contents, props changed) vendor/ntp/dist/include/refclock_atom.h (contents, props changed) vendor/ntp/dist/include/ssl_applink.c (contents, props changed) vendor/ntp/dist/include/version.texi vendor/ntp/dist/lib/ vendor/ntp/dist/lib/isc/ vendor/ntp/dist/lib/isc/alpha/ vendor/ntp/dist/lib/isc/alpha/include/ vendor/ntp/dist/lib/isc/alpha/include/isc/ vendor/ntp/dist/lib/isc/alpha/include/isc/atomic.h (contents, props changed) vendor/ntp/dist/lib/isc/api vendor/ntp/dist/lib/isc/assertions.c (contents, props changed) vendor/ntp/dist/lib/isc/base32.c (contents, props changed) vendor/ntp/dist/lib/isc/base64.c (contents, props changed) vendor/ntp/dist/lib/isc/bitstring.c (contents, props changed) vendor/ntp/dist/lib/isc/buffer.c (contents, props changed) vendor/ntp/dist/lib/isc/bufferlist.c (contents, props changed) vendor/ntp/dist/lib/isc/commandline.c (contents, props changed) vendor/ntp/dist/lib/isc/entropy.c (contents, props changed) vendor/ntp/dist/lib/isc/error.c (contents, props changed) vendor/ntp/dist/lib/isc/event.c (contents, props changed) vendor/ntp/dist/lib/isc/fsaccess.c (contents, props changed) vendor/ntp/dist/lib/isc/hash.c (contents, props changed) vendor/ntp/dist/lib/isc/heap.c (contents, props changed) vendor/ntp/dist/lib/isc/hex.c (contents, props changed) vendor/ntp/dist/lib/isc/hmacmd5.c (contents, props changed) vendor/ntp/dist/lib/isc/hmacsha.c (contents, props changed) vendor/ntp/dist/lib/isc/httpd.c (contents, props changed) vendor/ntp/dist/lib/isc/ia64/ vendor/ntp/dist/lib/isc/ia64/include/ vendor/ntp/dist/lib/isc/ia64/include/isc/ vendor/ntp/dist/lib/isc/ia64/include/isc/atomic.h (contents, props changed) vendor/ntp/dist/lib/isc/include/ vendor/ntp/dist/lib/isc/include/isc/ vendor/ntp/dist/lib/isc/include/isc/app.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/assertions.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/base32.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/base64.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/bitstring.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/boolean.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/buffer.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/bufferlist.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/commandline.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/entropy.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/error.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/event.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/eventclass.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/file.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/formatcheck.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/fsaccess.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/hash.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/heap.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/hex.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/hmacmd5.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/hmacsha.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/httpd.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/interfaceiter.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/ipv6.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/iterated_hash.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/lang.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/lex.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/lfsr.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/lib.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/list.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/log.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/magic.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/md5.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/mem.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/msgcat.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/msgs.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/mutexblock.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/netaddr.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/netscope.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/ondestroy.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/os.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/parseint.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/platform.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/platform.h.in (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/portset.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/print.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/quota.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/radix.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/random.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/ratelimiter.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/refcount.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/region.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/resource.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/result.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/resultclass.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/rwlock.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/serial.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/sha1.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/sha2.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/sockaddr.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/socket.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/stats.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/stdio.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/stdlib.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/string.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/symtab.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/task.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/taskpool.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/timer.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/types.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/util.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/version.h (contents, props changed) vendor/ntp/dist/lib/isc/include/isc/xml.h (contents, props changed) vendor/ntp/dist/lib/isc/inet_aton.c (contents, props changed) vendor/ntp/dist/lib/isc/inet_ntop.c (contents, props changed) vendor/ntp/dist/lib/isc/inet_pton.c (contents, props changed) vendor/ntp/dist/lib/isc/iterated_hash.c (contents, props changed) vendor/ntp/dist/lib/isc/lex.c (contents, props changed) vendor/ntp/dist/lib/isc/lfsr.c (contents, props changed) vendor/ntp/dist/lib/isc/lib.c (contents, props changed) vendor/ntp/dist/lib/isc/log.c (contents, props changed) vendor/ntp/dist/lib/isc/md5.c (contents, props changed) vendor/ntp/dist/lib/isc/mem.c (contents, props changed) vendor/ntp/dist/lib/isc/mips/ vendor/ntp/dist/lib/isc/mips/include/ vendor/ntp/dist/lib/isc/mips/include/isc/ vendor/ntp/dist/lib/isc/mips/include/isc/atomic.h (contents, props changed) vendor/ntp/dist/lib/isc/mutexblock.c (contents, props changed) vendor/ntp/dist/lib/isc/netaddr.c (contents, props changed) vendor/ntp/dist/lib/isc/netscope.c (contents, props changed) vendor/ntp/dist/lib/isc/nls/ vendor/ntp/dist/lib/isc/nls/msgcat.c (contents, props changed) vendor/ntp/dist/lib/isc/noatomic/ vendor/ntp/dist/lib/isc/noatomic/include/ vendor/ntp/dist/lib/isc/noatomic/include/isc/ vendor/ntp/dist/lib/isc/noatomic/include/isc/atomic.h (contents, props changed) vendor/ntp/dist/lib/isc/nothreads/ vendor/ntp/dist/lib/isc/nothreads/condition.c (contents, props changed) vendor/ntp/dist/lib/isc/nothreads/include/ vendor/ntp/dist/lib/isc/nothreads/include/isc/ vendor/ntp/dist/lib/isc/nothreads/include/isc/condition.h (contents, props changed) vendor/ntp/dist/lib/isc/nothreads/include/isc/mutex.h (contents, props changed) vendor/ntp/dist/lib/isc/nothreads/include/isc/once.h (contents, props changed) vendor/ntp/dist/lib/isc/nothreads/include/isc/thread.h (contents, props changed) vendor/ntp/dist/lib/isc/nothreads/mutex.c (contents, props changed) vendor/ntp/dist/lib/isc/nothreads/thread.c (contents, props changed) vendor/ntp/dist/lib/isc/ondestroy.c (contents, props changed) vendor/ntp/dist/lib/isc/parseint.c (contents, props changed) vendor/ntp/dist/lib/isc/portset.c (contents, props changed) vendor/ntp/dist/lib/isc/powerpc/ vendor/ntp/dist/lib/isc/powerpc/include/ vendor/ntp/dist/lib/isc/powerpc/include/isc/ vendor/ntp/dist/lib/isc/powerpc/include/isc/atomic.h (contents, props changed) vendor/ntp/dist/lib/isc/print.c (contents, props changed) vendor/ntp/dist/lib/isc/pthreads/ vendor/ntp/dist/lib/isc/pthreads/condition.c (contents, props changed) vendor/ntp/dist/lib/isc/pthreads/include/ vendor/ntp/dist/lib/isc/pthreads/include/isc/ vendor/ntp/dist/lib/isc/pthreads/include/isc/condition.h (contents, props changed) vendor/ntp/dist/lib/isc/pthreads/include/isc/mutex.h (contents, props changed) vendor/ntp/dist/lib/isc/pthreads/include/isc/once.h (contents, props changed) vendor/ntp/dist/lib/isc/pthreads/include/isc/thread.h (contents, props changed) vendor/ntp/dist/lib/isc/pthreads/mutex.c (contents, props changed) vendor/ntp/dist/lib/isc/pthreads/thread.c (contents, props changed) vendor/ntp/dist/lib/isc/quota.c (contents, props changed) vendor/ntp/dist/lib/isc/radix.c (contents, props changed) vendor/ntp/dist/lib/isc/random.c (contents, props changed) vendor/ntp/dist/lib/isc/ratelimiter.c (contents, props changed) vendor/ntp/dist/lib/isc/refcount.c (contents, props changed) vendor/ntp/dist/lib/isc/region.c (contents, props changed) vendor/ntp/dist/lib/isc/result.c (contents, props changed) vendor/ntp/dist/lib/isc/rwlock.c (contents, props changed) vendor/ntp/dist/lib/isc/serial.c (contents, props changed) vendor/ntp/dist/lib/isc/sha1.c (contents, props changed) vendor/ntp/dist/lib/isc/sha2.c (contents, props changed) vendor/ntp/dist/lib/isc/sockaddr.c (contents, props changed) vendor/ntp/dist/lib/isc/sparc64/ vendor/ntp/dist/lib/isc/sparc64/include/ vendor/ntp/dist/lib/isc/sparc64/include/isc/ vendor/ntp/dist/lib/isc/sparc64/include/isc/atomic.h (contents, props changed) vendor/ntp/dist/lib/isc/stats.c (contents, props changed) vendor/ntp/dist/lib/isc/string.c (contents, props changed) vendor/ntp/dist/lib/isc/strtoul.c (contents, props changed) vendor/ntp/dist/lib/isc/symtab.c (contents, props changed) vendor/ntp/dist/lib/isc/task.c (contents, props changed) vendor/ntp/dist/lib/isc/task_p.h (contents, props changed) vendor/ntp/dist/lib/isc/taskpool.c (contents, props changed) vendor/ntp/dist/lib/isc/timer.c (contents, props changed) vendor/ntp/dist/lib/isc/timer_p.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/ vendor/ntp/dist/lib/isc/unix/app.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/dir.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/entropy.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/errno2result.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/errno2result.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/file.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/fsaccess.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/ifiter_getifaddrs.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/ifiter_ioctl.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/ifiter_sysctl.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/ vendor/ntp/dist/lib/isc/unix/include/isc/ vendor/ntp/dist/lib/isc/unix/include/isc/dir.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/isc/int.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/isc/keyboard.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/isc/net.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/isc/netdb.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/isc/offset.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/isc/stat.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/isc/stdtime.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/isc/strerror.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/isc/syslog.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/include/isc/time.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/interfaceiter.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/ipv6.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/keyboard.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/net.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/os.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/resource.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/socket.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/socket_p.h (contents, props changed) vendor/ntp/dist/lib/isc/unix/stdio.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/stdtime.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/strerror.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/syslog.c (contents, props changed) vendor/ntp/dist/lib/isc/unix/time.c (contents, props changed) vendor/ntp/dist/lib/isc/version.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/ vendor/ntp/dist/lib/isc/win32/DLLMain.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/app.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/condition.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/dir.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/entropy.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/errno2result.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/errno2result.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/file.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/fsaccess.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/ vendor/ntp/dist/lib/isc/win32/include/isc/ vendor/ntp/dist/lib/isc/win32/include/isc/bind_registry.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/bindevt.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/condition.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/dir.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/int.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/ipv6.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/keyboard.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/mutex.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/net.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/netdb.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/ntgroups.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/ntpaths.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/offset.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/once.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/platform.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/stat.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/stdtime.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/strerror.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/syslog.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/thread.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/time.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/include/isc/win32os.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/interfaceiter.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/ipv6.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/keyboard.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/libisc.def vendor/ntp/dist/lib/isc/win32/libisc.dsp vendor/ntp/dist/lib/isc/win32/libisc.dsw vendor/ntp/dist/lib/isc/win32/libisc.mak vendor/ntp/dist/lib/isc/win32/net.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/netdb.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/ntgroups.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/ntpaths.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/once.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/os.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/resource.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/socket.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/stdio.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/stdtime.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/strerror.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/syslog.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/syslog.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/thread.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/time.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/unistd.h (contents, props changed) vendor/ntp/dist/lib/isc/win32/version.c (contents, props changed) vendor/ntp/dist/lib/isc/win32/win32os.c (contents, props changed) vendor/ntp/dist/lib/isc/x86_32/ vendor/ntp/dist/lib/isc/x86_32/include/ vendor/ntp/dist/lib/isc/x86_32/include/isc/ vendor/ntp/dist/lib/isc/x86_32/include/isc/atomic.h (contents, props changed) vendor/ntp/dist/lib/isc/x86_64/ vendor/ntp/dist/lib/isc/x86_64/include/ vendor/ntp/dist/lib/isc/x86_64/include/isc/ vendor/ntp/dist/lib/isc/x86_64/include/isc/atomic.h (contents, props changed) vendor/ntp/dist/libntp/bsd_strerror.c (contents, props changed) vendor/ntp/dist/libntp/ntp_libopts.c (contents, props changed) vendor/ntp/dist/libntp/ntp_lineedit.c (contents, props changed) vendor/ntp/dist/libntp/ssl_init.c (contents, props changed) vendor/ntp/dist/m4/libtool.m4 vendor/ntp/dist/m4/ltoptions.m4 vendor/ntp/dist/m4/ltsugar.m4 vendor/ntp/dist/m4/ltversion.m4 vendor/ntp/dist/m4/lt~obsolete.m4 vendor/ntp/dist/m4/ntp_cacheversion.m4 vendor/ntp/dist/m4/ntp_dir_sep.m4 vendor/ntp/dist/m4/ntp_lib_m.m4 vendor/ntp/dist/m4/ntp_lineeditlibs.m4 vendor/ntp/dist/m4/ntp_openssl.m4 vendor/ntp/dist/m4/ntp_vpathhack.m4 vendor/ntp/dist/ntpd/complete.conf (contents, props changed) vendor/ntp/dist/ntpd/keyword-gen-utd vendor/ntp/dist/ntpd/keyword-gen.c (contents, props changed) vendor/ntp/dist/ntpd/ntp_data_structures.c (contents, props changed) vendor/ntp/dist/ntpd/ntp_keyword.h (contents, props changed) vendor/ntp/dist/ntpd/ntp_parser.c (contents, props changed) vendor/ntp/dist/ntpd/ntp_parser.h (contents, props changed) vendor/ntp/dist/ntpd/ntp_parser.y vendor/ntp/dist/ntpd/ntp_scanner.c (contents, props changed) vendor/ntp/dist/ntpd/ntp_scanner.h (contents, props changed) vendor/ntp/dist/ntpd/ntp_signd.c (contents, props changed) vendor/ntp/dist/ntpq/libntpq.c (contents, props changed) vendor/ntp/dist/ntpq/libntpq.h (contents, props changed) vendor/ntp/dist/ntpq/libntpq_subs.c (contents, props changed) vendor/ntp/dist/ntpsnmpd/ vendor/ntp/dist/ntpsnmpd/Makefile.am (contents, props changed) vendor/ntp/dist/ntpsnmpd/Makefile.in (contents, props changed) vendor/ntp/dist/ntpsnmpd/README vendor/ntp/dist/ntpsnmpd/netsnmp_daemonize.c (contents, props changed) vendor/ntp/dist/ntpsnmpd/ntpSnmpSubagentObject.c (contents, props changed) vendor/ntp/dist/ntpsnmpd/ntpSnmpSubagentObject.h (contents, props changed) vendor/ntp/dist/ntpsnmpd/ntp_snmp.h (contents, props changed) vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c (contents, props changed) vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.def vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h (contents, props changed) vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.menu vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.texi vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1 (contents, props changed) vendor/ntp/dist/ntpsnmpd/ntpsnmpd.c (contents, props changed) vendor/ntp/dist/ntpsnmpd/ntpv4-mib.mib vendor/ntp/dist/scripts/UpdatePoint (contents, props changed) vendor/ntp/dist/scripts/check--help (contents, props changed) vendor/ntp/dist/scripts/checkChangeLog (contents, props changed) vendor/ntp/dist/scripts/cvo.sh (contents, props changed) vendor/ntp/dist/sntp/crypto.c (contents, props changed) vendor/ntp/dist/sntp/crypto.h (contents, props changed) vendor/ntp/dist/sntp/data_formats.h (contents, props changed) vendor/ntp/dist/sntp/deps-ver vendor/ntp/dist/sntp/depsver.mf vendor/ntp/dist/sntp/kod_management.c (contents, props changed) vendor/ntp/dist/sntp/kod_management.h (contents, props changed) vendor/ntp/dist/sntp/libopts/COPYING.gplv3 vendor/ntp/dist/sntp/libopts/COPYING.lgplv3 vendor/ntp/dist/sntp/libopts/ag-char-map.h (contents, props changed) vendor/ntp/dist/sntp/libopts/autoopts/project.h (contents, props changed) vendor/ntp/dist/sntp/libopts/file.c (contents, props changed) vendor/ntp/dist/sntp/libopts/parse-duration.c (contents, props changed) vendor/ntp/dist/sntp/libopts/parse-duration.h (contents, props changed) vendor/ntp/dist/sntp/libopts/reset.c (contents, props changed) vendor/ntp/dist/sntp/libopts/time.c (contents, props changed) vendor/ntp/dist/sntp/libopts/value-type.c (contents, props changed) vendor/ntp/dist/sntp/libopts/value-type.h (contents, props changed) vendor/ntp/dist/sntp/libopts/xat-attribute.c (contents, props changed) vendor/ntp/dist/sntp/libopts/xat-attribute.h (contents, props changed) vendor/ntp/dist/sntp/log.c (contents, props changed) vendor/ntp/dist/sntp/log.h (contents, props changed) vendor/ntp/dist/sntp/main.h (contents, props changed) vendor/ntp/dist/sntp/networking.c (contents, props changed) vendor/ntp/dist/sntp/networking.h (contents, props changed) vendor/ntp/dist/sntp/sntp.c (contents, props changed) vendor/ntp/dist/sntp/sntp.html (contents, props changed) vendor/ntp/dist/sntp/sntp.texi vendor/ntp/dist/sntp/utilities.c (contents, props changed) vendor/ntp/dist/sntp/utilities.h (contents, props changed) vendor/ntp/dist/sntp/version.m4 vendor/ntp/dist/sntp/version.texi vendor/ntp/dist/ylwrap (contents, props changed) Deleted: vendor/ntp/dist/arlib/COPYING vendor/ntp/dist/arlib/INSTALL vendor/ntp/dist/arlib/Makefile.am vendor/ntp/dist/arlib/Makefile.in vendor/ntp/dist/arlib/README vendor/ntp/dist/arlib/UNSHAR.HDR vendor/ntp/dist/arlib/aclocal.m4 vendor/ntp/dist/arlib/arlib.3 vendor/ntp/dist/arlib/arlib.c vendor/ntp/dist/arlib/arlib.h vendor/ntp/dist/arlib/arplib.h vendor/ntp/dist/arlib/configure vendor/ntp/dist/arlib/configure.in vendor/ntp/dist/arlib/depcomp vendor/ntp/dist/arlib/install-sh vendor/ntp/dist/arlib/missing vendor/ntp/dist/arlib/sample.c vendor/ntp/dist/html/build/build.html vendor/ntp/dist/html/build/config.html vendor/ntp/dist/html/build/hints.html vendor/ntp/dist/html/build/hints/a-ux vendor/ntp/dist/html/build/hints/aix vendor/ntp/dist/html/build/hints/bsdi vendor/ntp/dist/html/build/hints/changes vendor/ntp/dist/html/build/hints/decosf1 vendor/ntp/dist/html/build/hints/decosf2 vendor/ntp/dist/html/build/hints/freebsd vendor/ntp/dist/html/build/hints/hpux vendor/ntp/dist/html/build/hints/linux vendor/ntp/dist/html/build/hints/mpeix vendor/ntp/dist/html/build/hints/netbsd vendor/ntp/dist/html/build/hints/notes-xntp-v3 vendor/ntp/dist/html/build/hints/parse vendor/ntp/dist/html/build/hints/refclocks vendor/ntp/dist/html/build/hints/rs6000 vendor/ntp/dist/html/build/hints/sco.html vendor/ntp/dist/html/build/hints/sgi vendor/ntp/dist/html/build/hints/solaris-dosynctodr.html vendor/ntp/dist/html/build/hints/solaris.html vendor/ntp/dist/html/build/hints/solaris.xtra.4023118 vendor/ntp/dist/html/build/hints/solaris.xtra.4095849 vendor/ntp/dist/html/build/hints/solaris.xtra.S99ntpd vendor/ntp/dist/html/build/hints/solaris.xtra.patchfreq vendor/ntp/dist/html/build/hints/sun4 vendor/ntp/dist/html/build/hints/svr4-dell vendor/ntp/dist/html/build/hints/svr4_package vendor/ntp/dist/html/build/hints/todo vendor/ntp/dist/html/build/hints/vxworks.html vendor/ntp/dist/html/build/hints/winnt.html vendor/ntp/dist/html/build/patches.html vendor/ntp/dist/html/build/porting.html vendor/ntp/dist/html/build/quick.html vendor/ntp/dist/html/build/scripts/footer.txt vendor/ntp/dist/html/build/scripts/links10.txt vendor/ntp/dist/html/build/scripts/links11.txt vendor/ntp/dist/html/build/scripts/links12.txt vendor/ntp/dist/html/build/scripts/links7.txt vendor/ntp/dist/html/build/scripts/links8.txt vendor/ntp/dist/html/build/scripts/links9.txt vendor/ntp/dist/html/build/scripts/style.css vendor/ntp/dist/html/groups.html vendor/ntp/dist/html/ldisc.html vendor/ntp/dist/html/measure.html vendor/ntp/dist/html/mx4200data.html vendor/ntp/dist/html/notes.html vendor/ntp/dist/html/scripts/links10.txt vendor/ntp/dist/html/scripts/links11.txt vendor/ntp/dist/html/scripts/links12.txt vendor/ntp/dist/html/scripts/links7.txt vendor/ntp/dist/html/scripts/links8.txt vendor/ntp/dist/html/scripts/links9.txt vendor/ntp/dist/include/global.h vendor/ntp/dist/include/isc/app.h vendor/ntp/dist/include/isc/assertions.h vendor/ntp/dist/include/isc/boolean.h vendor/ntp/dist/include/isc/buffer.h vendor/ntp/dist/include/isc/error.h vendor/ntp/dist/include/isc/formatcheck.h vendor/ntp/dist/include/isc/int.h vendor/ntp/dist/include/isc/interfaceiter.h vendor/ntp/dist/include/isc/ipv6.h vendor/ntp/dist/include/isc/lang.h vendor/ntp/dist/include/isc/lib.h vendor/ntp/dist/include/isc/list.h vendor/ntp/dist/include/isc/magic.h vendor/ntp/dist/include/isc/msgcat.h vendor/ntp/dist/include/isc/msgs.h vendor/ntp/dist/include/isc/mutex.h vendor/ntp/dist/include/isc/net.h vendor/ntp/dist/include/isc/netaddr.h vendor/ntp/dist/include/isc/netscope.h vendor/ntp/dist/include/isc/offset.h vendor/ntp/dist/include/isc/once.h vendor/ntp/dist/include/isc/platform.h vendor/ntp/dist/include/isc/print.h vendor/ntp/dist/include/isc/region.h vendor/ntp/dist/include/isc/result.h vendor/ntp/dist/include/isc/sockaddr.h vendor/ntp/dist/include/isc/strerror.h vendor/ntp/dist/include/isc/string.h vendor/ntp/dist/include/isc/types.h vendor/ntp/dist/include/isc/util.h vendor/ntp/dist/include/rsa_md5.h vendor/ntp/dist/libisc/assertions.c vendor/ntp/dist/libisc/error.c vendor/ntp/dist/libisc/ifiter_getifaddrs.c vendor/ntp/dist/libisc/ifiter_ioctl.c vendor/ntp/dist/libisc/ifiter_sysctl.c vendor/ntp/dist/libisc/inet_aton.c vendor/ntp/dist/libisc/inet_ntop.c vendor/ntp/dist/libisc/inet_pton.c vendor/ntp/dist/libisc/interfaceiter.c vendor/ntp/dist/libisc/isc_strerror.c vendor/ntp/dist/libisc/lib.c vendor/ntp/dist/libisc/mem.c vendor/ntp/dist/libisc/msgcat.c vendor/ntp/dist/libisc/net.c vendor/ntp/dist/libisc/netaddr.c vendor/ntp/dist/libisc/netscope.c vendor/ntp/dist/libisc/sockaddr.c vendor/ntp/dist/libisc/strerror.c vendor/ntp/dist/libntp/lib_strbuf.h vendor/ntp/dist/libntp/md5c.c vendor/ntp/dist/libntp/strerror.c vendor/ntp/dist/libntp/tvtoa.c vendor/ntp/dist/libntp/utvtoa.c vendor/ntp/dist/libopts/COPYING.lgpl vendor/ntp/dist/libopts/COPYING.mbsd vendor/ntp/dist/libopts/MakeDefs.inc vendor/ntp/dist/libopts/Makefile.am vendor/ntp/dist/libopts/Makefile.in vendor/ntp/dist/libopts/README vendor/ntp/dist/libopts/autoopts.c vendor/ntp/dist/libopts/autoopts.h vendor/ntp/dist/libopts/autoopts/options.h vendor/ntp/dist/libopts/autoopts/usage-txt.h vendor/ntp/dist/libopts/boolean.c vendor/ntp/dist/libopts/compat/compat.h vendor/ntp/dist/libopts/compat/pathfind.c vendor/ntp/dist/libopts/compat/snprintf.c vendor/ntp/dist/libopts/compat/strchr.c vendor/ntp/dist/libopts/compat/strdup.c vendor/ntp/dist/libopts/compat/windows-config.h vendor/ntp/dist/libopts/configfile.c vendor/ntp/dist/libopts/cook.c vendor/ntp/dist/libopts/enumeration.c vendor/ntp/dist/libopts/environment.c vendor/ntp/dist/libopts/genshell.c vendor/ntp/dist/libopts/genshell.h vendor/ntp/dist/libopts/libopts.c vendor/ntp/dist/libopts/load.c vendor/ntp/dist/libopts/m4/libopts.m4 vendor/ntp/dist/libopts/m4/liboptschk.m4 vendor/ntp/dist/libopts/makeshell.c vendor/ntp/dist/libopts/nested.c vendor/ntp/dist/libopts/numeric.c vendor/ntp/dist/libopts/pgusage.c vendor/ntp/dist/libopts/proto.h vendor/ntp/dist/libopts/putshell.c vendor/ntp/dist/libopts/restore.c vendor/ntp/dist/libopts/save.c vendor/ntp/dist/libopts/sort.c vendor/ntp/dist/libopts/stack.c vendor/ntp/dist/libopts/streqvcmp.c vendor/ntp/dist/libopts/text_mmap.c vendor/ntp/dist/libopts/tokenize.c vendor/ntp/dist/libopts/usage.c vendor/ntp/dist/libopts/version.c vendor/ntp/dist/m4/hs_ulong_const.m4 vendor/ntp/dist/ntpd/ntpdsim-opts.c vendor/ntp/dist/ntpd/ntpdsim-opts.def vendor/ntp/dist/ntpd/ntpdsim-opts.h vendor/ntp/dist/ntpd/ntpdsim-opts.menu vendor/ntp/dist/ntpd/ntpdsim-opts.texi vendor/ntp/dist/ntpd/ntpdsim.1 vendor/ntp/dist/sntp/README vendor/ntp/dist/sntp/internet.c vendor/ntp/dist/sntp/internet.h vendor/ntp/dist/sntp/kludges.h vendor/ntp/dist/sntp/libopts/COPYING.lgpl vendor/ntp/dist/sntp/socket.c vendor/ntp/dist/sntp/timing.c vendor/ntp/dist/sntp/unix.c Modified: vendor/ntp/dist/COPYRIGHT vendor/ntp/dist/ChangeLog vendor/ntp/dist/CommitLog vendor/ntp/dist/Makefile.am vendor/ntp/dist/Makefile.in vendor/ntp/dist/NEWS vendor/ntp/dist/README.hackers vendor/ntp/dist/WHERE-TO-START vendor/ntp/dist/aclocal.m4 vendor/ntp/dist/adjtimed/Makefile.am vendor/ntp/dist/adjtimed/Makefile.in vendor/ntp/dist/bincheck.mf vendor/ntp/dist/bootstrap vendor/ntp/dist/build vendor/ntp/dist/clockstuff/Makefile.am vendor/ntp/dist/clockstuff/Makefile.in vendor/ntp/dist/conf/beauregard.conf vendor/ntp/dist/config.guess vendor/ntp/dist/config.h.in vendor/ntp/dist/config.sub vendor/ntp/dist/configure vendor/ntp/dist/configure.ac vendor/ntp/dist/dot.emacs vendor/ntp/dist/flock-build vendor/ntp/dist/html/accopt.html vendor/ntp/dist/html/assoc.html vendor/ntp/dist/html/audio.html vendor/ntp/dist/html/authopt.html vendor/ntp/dist/html/clockopt.html vendor/ntp/dist/html/confopt.html vendor/ntp/dist/html/copyright.html vendor/ntp/dist/html/debug.html vendor/ntp/dist/html/drivers/driver1.html vendor/ntp/dist/html/drivers/driver10.html vendor/ntp/dist/html/drivers/driver11.html vendor/ntp/dist/html/drivers/driver18.html vendor/ntp/dist/html/drivers/driver19.html vendor/ntp/dist/html/drivers/driver20.html vendor/ntp/dist/html/drivers/driver22.html vendor/ntp/dist/html/drivers/driver27.html vendor/ntp/dist/html/drivers/driver28.html vendor/ntp/dist/html/drivers/driver29.html vendor/ntp/dist/html/drivers/driver34.html vendor/ntp/dist/html/drivers/driver36.html vendor/ntp/dist/html/drivers/driver4.html vendor/ntp/dist/html/drivers/driver6.html vendor/ntp/dist/html/drivers/driver7.html vendor/ntp/dist/html/drivers/driver8.html vendor/ntp/dist/html/drivers/driver9.html vendor/ntp/dist/html/extern.html vendor/ntp/dist/html/gadget.html vendor/ntp/dist/html/howto.html vendor/ntp/dist/html/index.html vendor/ntp/dist/html/kern.html vendor/ntp/dist/html/keygen.html vendor/ntp/dist/html/manyopt.html vendor/ntp/dist/html/miscopt.html vendor/ntp/dist/html/monopt.html vendor/ntp/dist/html/msyslog.html vendor/ntp/dist/html/ntp_conf.html vendor/ntp/dist/html/ntpd.html vendor/ntp/dist/html/ntpdate.html vendor/ntp/dist/html/ntpdc.html vendor/ntp/dist/html/ntpdsim.html vendor/ntp/dist/html/ntpdsim_new.html vendor/ntp/dist/html/ntpq.html vendor/ntp/dist/html/ntptime.html vendor/ntp/dist/html/ntptrace.html vendor/ntp/dist/html/parsenew.html vendor/ntp/dist/html/pps.html vendor/ntp/dist/html/prefer.html vendor/ntp/dist/html/rdebug.html vendor/ntp/dist/html/refclock.html vendor/ntp/dist/html/release.html vendor/ntp/dist/html/sntp.html vendor/ntp/dist/html/tickadj.html vendor/ntp/dist/include/Makefile.am vendor/ntp/dist/include/Makefile.in vendor/ntp/dist/include/audio.h vendor/ntp/dist/include/autogen-version.def vendor/ntp/dist/include/binio.h vendor/ntp/dist/include/copyright.def vendor/ntp/dist/include/debug-opt.def vendor/ntp/dist/include/icom.h vendor/ntp/dist/include/ieee754io.h vendor/ntp/dist/include/iosignal.h vendor/ntp/dist/include/isc/Makefile.am vendor/ntp/dist/include/isc/Makefile.in vendor/ntp/dist/include/isc/mem.h vendor/ntp/dist/include/l_stdlib.h vendor/ntp/dist/include/mbg_gps166.h vendor/ntp/dist/include/ntp.h vendor/ntp/dist/include/ntp_calendar.h vendor/ntp/dist/include/ntp_cmdargs.h vendor/ntp/dist/include/ntp_config.h vendor/ntp/dist/include/ntp_control.h vendor/ntp/dist/include/ntp_crypto.h vendor/ntp/dist/include/ntp_filegen.h vendor/ntp/dist/include/ntp_fp.h vendor/ntp/dist/include/ntp_io.h vendor/ntp/dist/include/ntp_machine.h vendor/ntp/dist/include/ntp_malloc.h vendor/ntp/dist/include/ntp_md5.h vendor/ntp/dist/include/ntp_random.h vendor/ntp/dist/include/ntp_refclock.h vendor/ntp/dist/include/ntp_request.h vendor/ntp/dist/include/ntp_rfc2553.h vendor/ntp/dist/include/ntp_select.h vendor/ntp/dist/include/ntp_stdlib.h vendor/ntp/dist/include/ntp_string.h vendor/ntp/dist/include/ntp_syscall.h vendor/ntp/dist/include/ntp_syslog.h vendor/ntp/dist/include/ntp_types.h vendor/ntp/dist/include/ntp_unixtime.h vendor/ntp/dist/include/ntpd.h vendor/ntp/dist/include/ntpsim.h vendor/ntp/dist/include/parse.h vendor/ntp/dist/include/recvbuff.h vendor/ntp/dist/include/timepps-Solaris.h vendor/ntp/dist/include/trimble.h vendor/ntp/dist/include/version.def vendor/ntp/dist/kernel/Makefile.am vendor/ntp/dist/kernel/Makefile.in vendor/ntp/dist/kernel/sys/Makefile.am vendor/ntp/dist/kernel/sys/Makefile.in vendor/ntp/dist/libntp/Makefile.am vendor/ntp/dist/libntp/Makefile.in vendor/ntp/dist/libntp/a_md5encrypt.c vendor/ntp/dist/libntp/atolfp.c vendor/ntp/dist/libntp/audio.c vendor/ntp/dist/libntp/authkeys.c vendor/ntp/dist/libntp/authreadkeys.c vendor/ntp/dist/libntp/authusekey.c vendor/ntp/dist/libntp/buftvtots.c vendor/ntp/dist/libntp/caljulian.c vendor/ntp/dist/libntp/caltontp.c vendor/ntp/dist/libntp/calyearstart.c vendor/ntp/dist/libntp/clocktypes.c vendor/ntp/dist/libntp/decodenetnum.c vendor/ntp/dist/libntp/emalloc.c vendor/ntp/dist/libntp/findconfig.c vendor/ntp/dist/libntp/hextoint.c vendor/ntp/dist/libntp/humandate.c vendor/ntp/dist/libntp/icom.c vendor/ntp/dist/libntp/inttoa.c vendor/ntp/dist/libntp/iosignal.c vendor/ntp/dist/libntp/lib_strbuf.c vendor/ntp/dist/libntp/machines.c vendor/ntp/dist/libntp/mktime.c vendor/ntp/dist/libntp/modetoa.c vendor/ntp/dist/libntp/msyslog.c vendor/ntp/dist/libntp/netof.c vendor/ntp/dist/libntp/ntp_random.c vendor/ntp/dist/libntp/ntp_rfc2553.c vendor/ntp/dist/libntp/numtoa.c vendor/ntp/dist/libntp/numtohost.c vendor/ntp/dist/libntp/prettydate.c vendor/ntp/dist/libntp/recvbuff.c vendor/ntp/dist/libntp/refnumtoa.c vendor/ntp/dist/libntp/socktoa.c vendor/ntp/dist/libntp/socktohost.c vendor/ntp/dist/libntp/statestr.c vendor/ntp/dist/libntp/strdup.c vendor/ntp/dist/libntp/syssignal.c vendor/ntp/dist/libntp/systime.c vendor/ntp/dist/libntp/uglydate.c vendor/ntp/dist/libntp/uinttoa.c vendor/ntp/dist/libparse/Makefile.am vendor/ntp/dist/libparse/Makefile.in vendor/ntp/dist/libparse/clk_computime.c vendor/ntp/dist/libparse/clk_dcf7000.c vendor/ntp/dist/libparse/clk_hopf6021.c vendor/ntp/dist/libparse/clk_meinberg.c vendor/ntp/dist/libparse/clk_rawdcf.c vendor/ntp/dist/libparse/clk_rcc8000.c vendor/ntp/dist/libparse/clk_schmid.c vendor/ntp/dist/libparse/clk_trimtaip.c vendor/ntp/dist/libparse/clk_trimtsip.c vendor/ntp/dist/libparse/clk_varitext.c vendor/ntp/dist/libparse/clk_wharton.c vendor/ntp/dist/libparse/data_mbg.c vendor/ntp/dist/libparse/gpstolfp.c vendor/ntp/dist/libparse/ieee754io.c vendor/ntp/dist/libparse/parse.c vendor/ntp/dist/libparse/parsesolaris.c vendor/ntp/dist/libparse/parsestreams.c vendor/ntp/dist/ltmain.sh vendor/ntp/dist/m4/define_dir.m4 vendor/ntp/dist/m4/os_cflags.m4 vendor/ntp/dist/ntpd/Makefile.am vendor/ntp/dist/ntpd/Makefile.in vendor/ntp/dist/ntpd/cmd_args.c vendor/ntp/dist/ntpd/ntp_config.c vendor/ntp/dist/ntpd/ntp_control.c vendor/ntp/dist/ntpd/ntp_crypto.c vendor/ntp/dist/ntpd/ntp_filegen.c vendor/ntp/dist/ntpd/ntp_intres.c vendor/ntp/dist/ntpd/ntp_io.c vendor/ntp/dist/ntpd/ntp_loopfilter.c vendor/ntp/dist/ntpd/ntp_monitor.c vendor/ntp/dist/ntpd/ntp_peer.c vendor/ntp/dist/ntpd/ntp_proto.c vendor/ntp/dist/ntpd/ntp_refclock.c vendor/ntp/dist/ntpd/ntp_request.c vendor/ntp/dist/ntpd/ntp_restrict.c vendor/ntp/dist/ntpd/ntp_timer.c vendor/ntp/dist/ntpd/ntp_util.c vendor/ntp/dist/ntpd/ntpd-opts.c vendor/ntp/dist/ntpd/ntpd-opts.h vendor/ntp/dist/ntpd/ntpd-opts.texi vendor/ntp/dist/ntpd/ntpd.1 vendor/ntp/dist/ntpd/ntpd.c vendor/ntp/dist/ntpd/ntpdbase-opts.def vendor/ntp/dist/ntpd/ntpsim.c vendor/ntp/dist/ntpd/refclock_acts.c vendor/ntp/dist/ntpd/refclock_arbiter.c vendor/ntp/dist/ntpd/refclock_arc.c vendor/ntp/dist/ntpd/refclock_as2201.c vendor/ntp/dist/ntpd/refclock_atom.c vendor/ntp/dist/ntpd/refclock_bancomm.c vendor/ntp/dist/ntpd/refclock_chronolog.c vendor/ntp/dist/ntpd/refclock_chu.c vendor/ntp/dist/ntpd/refclock_conf.c vendor/ntp/dist/ntpd/refclock_datum.c vendor/ntp/dist/ntpd/refclock_dumbclock.c vendor/ntp/dist/ntpd/refclock_fg.c vendor/ntp/dist/ntpd/refclock_gpsvme.c vendor/ntp/dist/ntpd/refclock_heath.c vendor/ntp/dist/ntpd/refclock_hopfpci.c vendor/ntp/dist/ntpd/refclock_hopfser.c vendor/ntp/dist/ntpd/refclock_hpgps.c vendor/ntp/dist/ntpd/refclock_irig.c vendor/ntp/dist/ntpd/refclock_jjy.c vendor/ntp/dist/ntpd/refclock_jupiter.c vendor/ntp/dist/ntpd/refclock_leitch.c vendor/ntp/dist/ntpd/refclock_local.c vendor/ntp/dist/ntpd/refclock_msfees.c vendor/ntp/dist/ntpd/refclock_mx4200.c vendor/ntp/dist/ntpd/refclock_neoclock4x.c vendor/ntp/dist/ntpd/refclock_nmea.c vendor/ntp/dist/ntpd/refclock_oncore.c vendor/ntp/dist/ntpd/refclock_palisade.c vendor/ntp/dist/ntpd/refclock_palisade.h vendor/ntp/dist/ntpd/refclock_parse.c vendor/ntp/dist/ntpd/refclock_pcf.c vendor/ntp/dist/ntpd/refclock_pst.c vendor/ntp/dist/ntpd/refclock_ripencc.c vendor/ntp/dist/ntpd/refclock_shm.c vendor/ntp/dist/ntpd/refclock_tpro.c vendor/ntp/dist/ntpd/refclock_trak.c vendor/ntp/dist/ntpd/refclock_true.c vendor/ntp/dist/ntpd/refclock_tt560.c vendor/ntp/dist/ntpd/refclock_ulink.c vendor/ntp/dist/ntpd/refclock_wwv.c vendor/ntp/dist/ntpd/refclock_wwvb.c vendor/ntp/dist/ntpd/refclock_zyfer.c vendor/ntp/dist/ntpdate/Makefile.am vendor/ntp/dist/ntpdate/Makefile.in vendor/ntp/dist/ntpdate/ntpdate.c vendor/ntp/dist/ntpdate/ntpdate.h vendor/ntp/dist/ntpdc/Makefile.am vendor/ntp/dist/ntpdc/Makefile.in vendor/ntp/dist/ntpdc/layout.std vendor/ntp/dist/ntpdc/nl.pl vendor/ntp/dist/ntpdc/ntpdc-opts.c vendor/ntp/dist/ntpdc/ntpdc-opts.def vendor/ntp/dist/ntpdc/ntpdc-opts.h vendor/ntp/dist/ntpdc/ntpdc-opts.texi vendor/ntp/dist/ntpdc/ntpdc.1 vendor/ntp/dist/ntpdc/ntpdc.c vendor/ntp/dist/ntpdc/ntpdc.h vendor/ntp/dist/ntpdc/ntpdc_ops.c vendor/ntp/dist/ntpq/Makefile.am vendor/ntp/dist/ntpq/Makefile.in vendor/ntp/dist/ntpq/ntpq-opts.c vendor/ntp/dist/ntpq/ntpq-opts.def vendor/ntp/dist/ntpq/ntpq-opts.h vendor/ntp/dist/ntpq/ntpq-opts.texi vendor/ntp/dist/ntpq/ntpq-subs.c vendor/ntp/dist/ntpq/ntpq.1 vendor/ntp/dist/ntpq/ntpq.c vendor/ntp/dist/ntpq/ntpq.h vendor/ntp/dist/packageinfo.sh vendor/ntp/dist/parseutil/Makefile.am vendor/ntp/dist/parseutil/Makefile.in vendor/ntp/dist/parseutil/dcfd.c vendor/ntp/dist/scripts/Makefile.am vendor/ntp/dist/scripts/Makefile.in vendor/ntp/dist/scripts/VersionName vendor/ntp/dist/scripts/genCommitLog vendor/ntp/dist/scripts/genver vendor/ntp/dist/scripts/html2man.in vendor/ntp/dist/scripts/mkver.in vendor/ntp/dist/scripts/ntp-wait.in vendor/ntp/dist/scripts/ntptrace.in vendor/ntp/dist/sntp/COPYRIGHT vendor/ntp/dist/sntp/Makefile.am vendor/ntp/dist/sntp/Makefile.in vendor/ntp/dist/sntp/aclocal.m4 vendor/ntp/dist/sntp/autogen-version.def vendor/ntp/dist/sntp/bincheck.mf vendor/ntp/dist/sntp/config.guess vendor/ntp/dist/sntp/config.h.in vendor/ntp/dist/sntp/config.sub vendor/ntp/dist/sntp/configure vendor/ntp/dist/sntp/configure.ac vendor/ntp/dist/sntp/header.h vendor/ntp/dist/sntp/libopts/Makefile.am vendor/ntp/dist/sntp/libopts/Makefile.in vendor/ntp/dist/sntp/libopts/README vendor/ntp/dist/sntp/libopts/autoopts.c vendor/ntp/dist/sntp/libopts/autoopts.h vendor/ntp/dist/sntp/libopts/autoopts/options.h vendor/ntp/dist/sntp/libopts/autoopts/usage-txt.h vendor/ntp/dist/sntp/libopts/boolean.c vendor/ntp/dist/sntp/libopts/compat/compat.h vendor/ntp/dist/sntp/libopts/compat/pathfind.c vendor/ntp/dist/sntp/libopts/compat/windows-config.h vendor/ntp/dist/sntp/libopts/configfile.c vendor/ntp/dist/sntp/libopts/cook.c vendor/ntp/dist/sntp/libopts/enumeration.c vendor/ntp/dist/sntp/libopts/environment.c vendor/ntp/dist/sntp/libopts/genshell.c vendor/ntp/dist/sntp/libopts/genshell.h vendor/ntp/dist/sntp/libopts/libopts.c vendor/ntp/dist/sntp/libopts/load.c vendor/ntp/dist/sntp/libopts/m4/libopts.m4 vendor/ntp/dist/sntp/libopts/m4/liboptschk.m4 vendor/ntp/dist/sntp/libopts/makeshell.c vendor/ntp/dist/sntp/libopts/nested.c vendor/ntp/dist/sntp/libopts/numeric.c vendor/ntp/dist/sntp/libopts/pgusage.c vendor/ntp/dist/sntp/libopts/proto.h vendor/ntp/dist/sntp/libopts/putshell.c vendor/ntp/dist/sntp/libopts/restore.c vendor/ntp/dist/sntp/libopts/save.c vendor/ntp/dist/sntp/libopts/sort.c vendor/ntp/dist/sntp/libopts/stack.c vendor/ntp/dist/sntp/libopts/streqvcmp.c vendor/ntp/dist/sntp/libopts/text_mmap.c vendor/ntp/dist/sntp/libopts/tokenize.c vendor/ntp/dist/sntp/libopts/usage.c vendor/ntp/dist/sntp/libopts/version.c vendor/ntp/dist/sntp/ltmain.sh vendor/ntp/dist/sntp/main.c vendor/ntp/dist/sntp/sntp-opts.c vendor/ntp/dist/sntp/sntp-opts.def vendor/ntp/dist/sntp/sntp-opts.h vendor/ntp/dist/sntp/sntp-opts.texi vendor/ntp/dist/sntp/sntp.1 vendor/ntp/dist/sntp/version.def vendor/ntp/dist/util/Makefile.am vendor/ntp/dist/util/Makefile.in vendor/ntp/dist/util/hist.c vendor/ntp/dist/util/jitter.c vendor/ntp/dist/util/jitter.h vendor/ntp/dist/util/ntp-keygen-opts.c vendor/ntp/dist/util/ntp-keygen-opts.def vendor/ntp/dist/util/ntp-keygen-opts.h vendor/ntp/dist/util/ntp-keygen-opts.texi vendor/ntp/dist/util/ntp-keygen.1 vendor/ntp/dist/util/ntp-keygen.c vendor/ntp/dist/util/ntptime.c vendor/ntp/dist/util/tickadj.c vendor/ntp/dist/version vendor/ntp/dist/version.m4 Modified: vendor/ntp/dist/COPYRIGHT ============================================================================== --- vendor/ntp/dist/COPYRIGHT Wed Dec 4 21:32:15 2013 (r258944) +++ vendor/ntp/dist/COPYRIGHT Wed Dec 4 21:33:17 2013 (r258945) @@ -2,9 +2,9 @@ This file is automatically generated fro Copyright Notice - jpg "Clone me," says Dolly sheepishly + jpg "Clone me," says Dolly sheepishly. - Last update: 20:31 UTC Saturday, January 06, 2007 + Last update: 1-Jan-2011 08:34 UTC _________________________________________________________________ The following copyright notice applies to all files collectively @@ -13,7 +13,7 @@ This file is automatically generated fro applies as if the text was explicitly included in the file. *********************************************************************** * * -* Copyright (c) David L. Mills 1992-2009 * +* Copyright (c) University of Delaware 1992-2011 * * * * Permission to use, copy, modify, and distribute this software and * * its documentation for any purpose with or without fee is hereby * @@ -32,145 +32,158 @@ This file is automatically generated fro The following individuals contributed in part to the Network Time Protocol Distribution Version 4 and are acknowledged as authors of this work. - 1. [1]Mark Andrews Leitch atomic clock + 1. [1]Takao Abe Clock driver for JJY receivers + 2. [2]Mark Andrews Leitch atomic clock controller - 2. [2]Bernd Altmeier hopf Elektronik serial + 3. [3]Bernd Altmeier hopf Elektronik serial line and PCI-bus devices - 3. [3]Viraj Bais and [4]Clayton Kirkwood + 4. [4]Viraj Bais and [5]Clayton Kirkwood port to WindowsNT 3.5 - 4. [5]Michael Barone GPSVME fixes - 5. [6]Jean-Francois Boudreault - IPv6 support + 5. [6]Michael Barone GPSVME fixes 6. [7]Karl Berry syslog to file option 7. [8]Greg Brackley Major rework of WINNT port. Clean up recvbuf and iosignal code into separate modules. 8. [9]Marc Brett Magnavox GPS clock driver 9. [10]Piete Brooks MSF clock driver, Trimble PARSE support - 10. [11]Reg Clemens Oncore driver (Current maintainer) - 11. [12]Steve Clift OMEGA clock driver - 12. [13]Casey Crellin vxWorks (Tornado) port and + 10. [11]Nelson B Bolyard update and complete + broadcast and crypto features in sntp + 11. [12]Jean-Francois Boudreault + IPv6 support + 12. [13]Reg Clemens Oncore driver (Current maintainer) + 13. [14]Steve Clift OMEGA clock driver + 14. [15]Casey Crellin vxWorks (Tornado) port and help with target configuration - 13. [14]Sven Dietrich Palisade reference + 15. [16]Sven Dietrich Palisade reference clock driver, NT adj. residuals, integrated Greg's Winnt port. - 14. [15]John A. Dundas III Apple A/UX port - 15. [16]Torsten Duwe Linux + 16. [17]John A. Dundas III Apple A/UX port + 17. [18]Torsten Duwe Linux port - 16. [17]Dennis Ferguson foundation code for + 18. [19]Dennis Ferguson foundation code for NTP Version 2 as specified in RFC-1119 - 17. [18]John Hay IPv6 support and testing - 18. [19]Glenn Hollinger GOES clock driver - 19. [20]Mike Iglesias DEC Alpha port - 20. [21]Jim Jagielski A/UX port - 21. [22]Jeff Johnson massive prototyping + 19. [20]John Hay IPv6 support and testing + 20. [21]Dave Hart General maintenance, Windows + port interpolation rewrite + 21. [22]Claas Hilbrecht NeoClock4X clock driver + 22. [23]Glenn Hollinger GOES clock driver + 23. [24]Mike Iglesias DEC Alpha port + 24. [25]Jim Jagielski A/UX port + 25. [26]Jeff Johnson massive prototyping overhaul - 22. [23]Hans Lambermont or - [24] ntpsweep - 23. [25]Poul-Henning Kamp Oncore driver (Original + 26. [27]Hans Lambermont or + [28] ntpsweep + 27. [29]Poul-Henning Kamp Oncore driver (Original author) - 24. [26]Frank Kardel [27] PARSE + 28. [30]Frank Kardel [31] PARSE driver (>14 reference clocks), STREAMS modules for PARSE, support scripts, syslog cleanup, dynamic interface handling - 25. [28]William L. Jones RS/6000 AIX + 29. [32]William L. Jones RS/6000 AIX modifications, HPUX modifications - 26. [29]Dave Katz RS/6000 AIX port - 27. [30]Craig Leres 4.4BSD port, ppsclock, Magnavox + 30. [33]Dave Katz RS/6000 AIX port + 31. [34]Craig Leres 4.4BSD port, ppsclock, Magnavox GPS clock driver - 28. [31]George Lindholm SunOS 5.1 port - 29. [32]Louis A. Mamakos MD5-based authentication - 30. [33]Lars H. Mathiesen adaptation of foundation + 32. [35]George Lindholm SunOS 5.1 port + 33. [36]Louis A. Mamakos MD5-based authentication + 34. [37]Lars H. Mathiesen adaptation of foundation code for Version 3 as specified in RFC-1305 - 31. [34]Danny Mayer Network I/O, Windows Port, Code + 35. [38]Danny Mayer Network I/O, Windows Port, Code Maintenance - 32. [35]David L. Mills Version 4 foundation: clock + 36. [39]David L. Mills Version 4 foundation: clock discipline, authentication, precision kernel; clock drivers: Spectracom, Austron, Arbiter, Heath, ATOM, ACTS, KSI/Odetics; audio clock drivers: CHU, WWV/H, IRIG - 33. [36]Wolfgang Moeller VMS port - 34. [37]Jeffrey Mogul ntptrace utility - 35. [38]Tom Moore i386 svr4 port - 36. [39]Kamal A Mostafa SCO OpenServer port - 37. [40]Derek Mulcahy and [41]Damon + 37. [40]Wolfgang Moeller VMS port + 38. [41]Jeffrey Mogul ntptrace utility + 39. [42]Tom Moore i386 svr4 port + 40. [43]Kamal A Mostafa SCO OpenServer port + 41. [44]Derek Mulcahy and [45]Damon Hart-Davis ARCRON MSF clock driver - 38. [42]Rainer Pruy + 42. [46]Rob Neal Bancomm refclock and config/parse code + maintenance + 43. [47]Rainer Pruy monitoring/trap scripts, statistics file handling - 39. [43]Dirce Richards Digital UNIX V4.0 port - 40. [44]Wilfredo Sánchez added support for + 44. [48]Dirce Richards Digital UNIX V4.0 port + 45. [49]Wilfredo Sánchez added support for NetInfo - 41. [45]Nick Sayer SunOS streams modules - 42. [46]Jack Sasportas Saved a Lot of + 46. [50]Nick Sayer SunOS streams modules + 47. [51]Jack Sasportas Saved a Lot of space on the stuff in the html/pic/ subdirectory - 43. [47]Ray Schnitzler Unixware1 port - 44. [48]Michael Shields USNO clock driver - 45. [49]Jeff Steinman Datum PTS clock + 48. [52]Ray Schnitzler Unixware1 port + 49. [53]Michael Shields USNO clock driver + 50. [54]Jeff Steinman Datum PTS clock driver - 46. [50]Harlan Stenn GNU automake/autoconfigure + 51. [55]Harlan Stenn GNU automake/autoconfigure makeover, various other bits (see the ChangeLog) - 47. [51]Kenneth Stone HP-UX port - 48. [52]Ajit Thyagarajan IP multicast/anycast + 52. [56]Kenneth Stone HP-UX port + 53. [57]Ajit Thyagarajan IP multicast/anycast support - 49. [53]Tomoaki TSURUOKA TRAK clock + 54. [58]Tomoaki TSURUOKA TRAK clock driver - 50. [54]Paul A Vixie TrueTime GPS driver, generic + 55. [59]Paul A Vixie TrueTime GPS driver, generic TrueTime clock driver - 51. [55]Ulrich Windl corrected and + 56. [60]Ulrich Windl corrected and validated HTML documents according to the HTML DTD _________________________________________________________________ References - 1. mailto:%20mark_andrews@isc.org - 2. mailto:%20altmeier@atlsoft.de - 3. mailto:%20vbais@mailman1.intel.co - 4. mailto:%20kirkwood@striderfm.intel.com - 5. mailto:%20michael.barone@lmco.com - 6. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca + 1. mailto:%20takao_abe@xurb.jp + 2. mailto:%20mark_andrews@isc.org + 3. mailto:%20altmeier@atlsoft.de + 4. mailto:%20vbais@mailman1.intel.co + 5. mailto:%20kirkwood@striderfm.intel.com + 6. mailto:%20michael.barone@lmco.com 7. mailto:%20karl@owl.HQ.ileaf.com 8. mailto:%20greg.brackley@bigfoot.com 9. mailto:%20Marc.Brett@westgeo.com 10. mailto:%20Piete.Brooks@cl.cam.ac.uk - 11. mailto:%20reg@dwf.com - 12. mailto:%20clift@ml.csiro.au - 13. mailto:casey@csc.co.za - 14. mailto:%20Sven_Dietrich@trimble.COM - 15. mailto:%20dundas@salt.jpl.nasa.gov - 16. mailto:%20duwe@immd4.informatik.uni-erlangen.de - 17. mailto:%20dennis@mrbill.canet.ca - 18. mailto:%20jhay@icomtek.csir.co.za - 19. mailto:%20glenn@herald.usask.ca - 20. mailto:%20iglesias@uci.edu - 21. mailto:%20jagubox.gsfc.nasa.gov - 22. mailto:%20jbj@chatham.usdesign.com - 23. mailto:Hans.Lambermont@nl.origin-it.com - 24. mailto:H.Lambermont@chello.nl - 25. mailto:%20phk@FreeBSD.ORG - 26. http://www4.informatik.uni-erlangen.de/%7ekardel - 27. mailto:%20kardel(at)ntp(dot)org - 28. mailto:%20jones@hermes.chpc.utexas.edu - 29. mailto:%20dkatz@cisco.com - 30. mailto:%20leres@ee.lbl.gov - 31. mailto:%20lindholm@ucs.ubc.ca - 32. mailto:%20louie@ni.umd.edu - 33. mailto:%20thorinn@diku.dk - 34. mailto:%20mayer@ntp.org - 35. mailto:%20mills@udel.edu - 36. mailto:%20moeller@gwdgv1.dnet.gwdg.de - 37. mailto:%20mogul@pa.dec.com - 38. mailto:%20tmoore@fievel.daytonoh.ncr.com - 39. mailto:%20kamal@whence.com - 40. mailto:%20derek@toybox.demon.co.uk - 41. mailto:%20d@hd.org - 42. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de - 43. mailto:%20dirce@zk3.dec.com - 44. mailto:%20wsanchez@apple.com - 45. mailto:%20mrapple@quack.kfu.com - 46. mailto:%20jack@innovativeinternet.com - 47. mailto:%20schnitz@unipress.com - 48. mailto:%20shields@tembel.org - 49. mailto:%20pebbles.jpl.nasa.gov - 50. mailto:%20harlan@pfcs.com - 51. mailto:%20ken@sdd.hp.com - 52. mailto:%20ajit@ee.udel.edu - 53. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp - 54. mailto:%20vixie@vix.com - 55. mailto:%20Ulrich.Windl@rz.uni-regensburg.de + 11. mailto:%20nelson@bolyard.me + 12. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca + 13. mailto:%20reg@dwf.com + 14. mailto:%20clift@ml.csiro.au + 15. mailto:casey@csc.co.za + 16. mailto:%20Sven_Dietrich@trimble.COM + 17. mailto:%20dundas@salt.jpl.nasa.gov + 18. mailto:%20duwe@immd4.informatik.uni-erlangen.de + 19. mailto:%20dennis@mrbill.canet.ca + 20. mailto:%20jhay@icomtek.csir.co.za + 21. mailto:%20davehart@davehart.com + 22. mailto:%20neoclock4x@linum.com + 23. mailto:%20glenn@herald.usask.ca + 24. mailto:%20iglesias@uci.edu + 25. mailto:%20jagubox.gsfc.nasa.gov + 26. mailto:%20jbj@chatham.usdesign.com + 27. mailto:Hans.Lambermont@nl.origin-it.com + 28. mailto:H.Lambermont@chello.nl + 29. mailto:%20phk@FreeBSD.ORG + 30. http://www4.informatik.uni-erlangen.de/%7ekardel + 31. mailto:%20kardel(at)ntp(dot)org + 32. mailto:%20jones@hermes.chpc.utexas.edu + 33. mailto:%20dkatz@cisco.com + 34. mailto:%20leres@ee.lbl.gov + 35. mailto:%20lindholm@ucs.ubc.ca + 36. mailto:%20louie@ni.umd.edu + 37. mailto:%20thorinn@diku.dk + 38. mailto:%20mayer@ntp.org + 39. mailto:%20mills@udel.edu + 40. mailto:%20moeller@gwdgv1.dnet.gwdg.de + 41. mailto:%20mogul@pa.dec.com + 42. mailto:%20tmoore@fievel.daytonoh.ncr.com + 43. mailto:%20kamal@whence.com + 44. mailto:%20derek@toybox.demon.co.uk + 45. mailto:%20d@hd.org + 46. mailto:%20neal@ntp.org + 47. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de + 48. mailto:%20dirce@zk3.dec.com + 49. mailto:%20wsanchez@apple.com + 50. mailto:%20mrapple@quack.kfu.com + 51. mailto:%20jack@innovativeinternet.com + 52. mailto:%20schnitz@unipress.com + 53. mailto:%20shields@tembel.org + 54. mailto:%20pebbles.jpl.nasa.gov + 55. mailto:%20harlan@pfcs.com + 56. mailto:%20ken@sdd.hp.com + 57. mailto:%20ajit@ee.udel.edu + 58. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp + 59. mailto:%20vixie@vix.com + 60. mailto:%20Ulrich.Windl@rz.uni-regensburg.de Modified: vendor/ntp/dist/ChangeLog ============================================================================== --- vendor/ntp/dist/ChangeLog Wed Dec 4 21:32:15 2013 (r258944) +++ vendor/ntp/dist/ChangeLog Wed Dec 4 21:33:17 2013 (r258945) @@ -1,4 +1,1112 @@ --- +(4.2.6p5) 2011/12/24 Released by Harlan Stenn +(4.2.6p5) 2011/12/24 Released by Harlan Stenn + +--- +(4.2.6p5-RC3) 2011/12/08 Released by Harlan Stenn + +* [Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot. +* [Bug 2085] clock_update() sys_rootdisp calculation omits root delay. +* [Bug 2086] get_systime() should not offset by sys_residual. +* [Bug 2087] sys_jitter calculation overweights sys.peer jitter. +* Ensure NULL peer->dstadr is not accessed in orphan parent selection. + +--- +(4.2.6p5-RC2) 2011/11/30 Released by Harlan Stenn + +* [Bug 2050] Orphan mode stratum counting to infinity. +* [Bug 2059] optional billboard column "server" does not honor -n. +* [Bug 2066] ntpq lopeers ipv6 "local" column overrun. +* [Bug 2068] ntpd sends nonprintable stratum 16 refid to ntpq. +* [Bug 2069] broadcastclient, multicastclient spin up duplicate + ephemeral associations without broadcastdelay. +* [Bug 2072] Orphan parent selection metric needs ntohl(). +* Exclude not-yet-determined sys_refid from use in loopback TEST12 + (from David Mills). +* Never send KoD rate limiting response to MODE_SERVER response. + +--- +(4.2.6p5-RC1) 2011/10/18 Released by Harlan Stenn + +* [Bug 2034] Listening address configuration with prefix misapplied. + +--- +(4.2.6p4) 2011/09/22 Released by Harlan Stenn + +* [Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion). +* [Bug 1985] "logconfig =allall" rejected. +* [Bug 2001] ntpdc timerstats reports overruns as handled. +* [Bug 2003] libntpq ntpq_read_assoc_peervars() broken. +* [Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be + consistent with ntpd. +* libopts/file.c fix from Bruce Korb (arg-type=file). + +--- +(4.2.6p4-RC2) 2011/08/04 Released by Harlan Stenn + +* [Bug 1608] Parse Refclock driver should honor trusttime. +* [Bug 1961] html2man update: distribute ntp-wait.html. +* [Bug 1970] UNLINK_EXPR_SLIST() causes crash if list is empty. +* [Bug 1972] checking for struct rtattr fails. +* [Bug 1975] libntp/mktime.c won't work with 64-bit time_t +* [Bug 1978] [Bug 1134] fix in 4.2.6p4-RC1 doesn't build on older Linux. +* Backport several fixes for Coverity warnings from ntp-dev. +* Backport if_nametoindex() check for hpux. + +--- +(4.2.6p4-RC1) 2011/07/10 Released by Harlan Stenn + +* [Bug 1134] ntpd fails binding to tentative IPv6 addresses. +* [Bug 1790] Update config.guess and config.sub to detect AIX6. +* [Bug 1961] html2man needs an update. +* Update the NEWS file. + +--- +(4.2.6p4-beta2) 2011/05/25 Released by Harlan Stenn + +* [Bug 1695] ntpdate takes longer than necessary. +* [Bug 1832] ntpdate doesn't allow timeout > 2s. +* [Bug 1933] WWVB/Spectracom driver timestamps LFs, not CRs. +* Backport utility routines from ntp-dev: mprintf(), emalloc_zero(). + +--- +(4.2.6p4-beta1) 2011/05/16 Released by Harlan Stenn + +* [Bug 1554] peer may stay selected as system peer after becoming + unreachable. +* [Bug 1921] LOCAL, ACTS drivers with "prefer" excluded from initial + candidate list. +* [Bug 1923] orphan parent favored over LOCAL, ACTS drivers. +* [Bug 1924] Billboard tally codes sometimes do not match operation, + variables. +* Enable tickadj-like taming of wildly off-spec Windows clock using + NTPD_TICKADJ_PPM env. var. specifying baseline slew. +* Upgrade to AutoGen 5.11.9 (and require it). +* Upgrade to libopts 35.0.10 from AutoGen 5.11.9pre8. + +--- +(4.2.6p3) 2011/01/03 Released by Harlan Stenn + +* [Bug 1764] Palisade driver doesn't build on Linux +* Create and use scripts/check--help when generating .texi files. +* Update bk triggers for the bk-5 release. +* Update genCommitLog for the bk-5 release. +* Update the copyright year. + +--- +(4.2.6p3-RC12) 2010/12/25 Released by Harlan Stenn + +* [Bug 1458] Can not compile NTP on FreeBSD 4.7. +* [Bug 1510] Add modes 20/21 for driver 8 to support RAWDCF @ 75 baud. +* [Bug 1618] Unreachable code in jjy_start(). (backport from ntp-dev) +* [Bug 1719] ntp-keygen -V crash. (backport) +* [Bug 1740] ntpdc treats many counters as signed. (backport) +* [Bug 1741] Enable multicast reception on each address (Windows). +* [Bug 1742] Fix a typo in an error message in the "build" script. +* [Bug 1743] Display timezone offset when showing time for sntp in the + local timezone. +* [Bug 1751] Support for Atari FreeMiNT OS. +* [Bug 1754] --version output should be more verbose. +* [Bug 1757] oncore snprintf("%m") doesn't expand %m. +* [Bug 1758] setsockopt IPV6_MULTICAST_IF with wrong ifindex. +* [Bug 1760] ntpd Windows interpolation cannot be disabled. +* [Bug 1762] manycastclient solicitation responses interfere. +* Upgrade to libopts 34.0.9 from AutoGen 5.11.6pre7. +* Relax minimum Automake version to 1.10 with updated libopts.m4. +* Suppress ntp-keygen OpenSSL version display for --help, --version, + display both build and runtime OpenSSL versions when they differ. +* Clean up m4 quoting in configure.ac, *.m4 files, resolving + intermittent AC_LANG_PROGRAM possibly undefined errors. +* Clean up the SNTP documentation. +* Other manycastclient repairs: + Separate handling of scope ID embedded in many in6_addr from ifindex + used for IPv6 multicasting ioctls. + Add INT_PRIVACY endpt bit flag for IPv6 RFC 4941 privacy addresses. + Enable outbound multicast from only one address per interface in the + same subnet, and in that case prefer embedded MAC address modified + EUI-64 IPv6 addresses first, then static, and last RFC 4941 privacy + addresses. + Use setsockopt(IP[V6]_MULTICAST_IF) before each send to multicast to + select the local source address, using the correct socket is not + enough. + +--- +(4.2.6p3-RC11) 2010/11/28 Released by Harlan Stenn + +* [Bug 1725] ntpd sends multicast from only one address. +* [Bug 1728] In ntp_openssl.m4, don't add -I/usr/include or -L/usr/lib + to CPPFLAGS or LDFLAGS. +* [Bug 1733] IRIX doesn't have 'head' (affects scripts/checkChangeLog). +* Remove log_msg() and debug_msg() from sntp in favor of msyslog(). +* Use a single copy of libopts/, in sntp/. +* Upgrade libopts to 33.3.8. +* Bump minimum Automake version to 1.11, required for AM_COND_IF + use in LIBOPTS_CHECK. +* Improvements to the 'build' script. + +--- +(4.2.6p3-RC10) 2010/11/14 Released by Harlan Stenn + +* [Bug 1681] More sntp logging cleanup. +* [Bug 1683] Non-localhost on loopback exempted from nic rules. + +--- +(4.2.6p3-RC9) 2010/11/10 Released by Harlan Stenn + +* [Bug 1574] sntp:set_time doesn't set tv_usec correctly. +* [Bug 1681] sntp logging cleanup. +* [Bug 1683] Interface binding does not seem to work as intended. +* [Bug 1691] Use first NMEA sentence each second. +* [Bug 1692] packageinfo.sh needs to be "sourced" using ./ . +* [Bug 1709] ntpdate ignores replies with equal receive and transmit + timestamps. +* Backport sntp from -dev + +--- +(4.2.6p3-RC8) 2010/10/29 Released by Harlan Stenn + +* [Bug 1685] NMEA driver mode byte confusion. +* First cut at using scripts/checkChangeLog. + +--- +(4.2.6p3-RC7) 2010/10/25 Released by Harlan Stenn + +* [Bug 1676] NMEA: $GPGLL did not work after fix for Bug 1571. +* Added scripts/checkChangeLog. + +--- +(4.2.6p3-RC6) 2010/10/24 Released by Harlan Stenn + +* [Bug 1571] NMEA does not relate data to PPS edge. +* [Bug 1572] NMEA time adjustment for GPZDG buggy. +* [Bug 1675] Prohibit includefile remote config. + +--- +(4.2.6p3-RC5) 2010/10/22 Released by Harlan Stenn + +* [Bug 1649] Require NMEA checksum if $GPRMC or previously seen. +* [Bug 1669] NTP 4.2.6p2 fails to compile on IBM AIX 5.3. + +--- +(4.2.6p3-RC4) 2010/10/16 Released by Harlan Stenn + +* [Bug 1584] wrong SNMP type for precision, resolution. +* [Bug 1659] Need CLOCK_TRUETIME not CLOCK_TRUE. +* [Bug 1665] is_anycast() u_int32_t should be u_int32. +* ntpsnmpd, libntpq warning cleanup. + +--- +(4.2.6p3-RC3) 2010/10/14 Released by Harlan Stenn + +* [Bug 750] Non-existing device causes coredump with RIPE-NCC driver. +* [Bug 1080] ntpd on ipv6 routers very chatty. +* [Bug 1567] Support Arbiter 1093C Satellite Clock on Windows. +* [Bug 1581] printf format string mismatch leftover. +* [Bug 1584] ntpsnmpd OID must be mib-2.197. +* [Bug 1643] Range-check the decoding of the RIPE-NCC status codes. +* [Bug 1644] cvo.sh should use lsb_release to identify linux distros. +* [Bug 1659] Support Truetime Satellite Clocks on Windows. +* [Bug 1660] On some systems, test is in /usr/bin, not /bin. +* [Bug 1661] Re-indent refclock_ripencc.c. + +--- +(4.2.6p3-RC2) 2010/09/25 Released by Harlan Stenn + +* [Bug 1635] "filegen ... enable" is not default. +* [Bug 1636] yyparse() segfault after denied filegen remote config. + +--- +(4.2.6p3-RC1) 2010/09/18 Released by Harlan Stenn + +* [Bug 1344] ntpd on Windows exits without logging cause. + +--- +(4.2.6p3-beta1) 2010/09/11 Released by Harlan Stenn + +* [Bug 1573] Miscalculation of offset in sntp. +* [Bug 1595] empty last line in key file causes duplicate key to be added +* [Bug 1597] packet processing ignores RATE KoD packets, because of + a bug in string comparison. +* [Bug 1581] ntp_intres.c size_t printf format string mismatch. + +--- +(4.2.6p2) 2010/07/09 Released by Harlan Stenn + +* [Bug 1581] size_t printf format string mismatches, IRIG string buffers + undersized. Mostly backported from earlier ntp-dev fixes by Juergen + Perlinger. + +--- +(4.2.6p2-RC7) 2010/06/19 Released by Harlan Stenn + +* [Bug 1570] serial clock drivers get outdated input from kernel tty + line buffer after startup +* [Bug 1575] use 'snprintf' with LIB_BUFLENGTH in inttoa.c, tvtoa.c and + utvtoa.c +* [Bug 1576] sys/sysctl.h depends on sys/param.h on OpenBSD. + +--- +(4.2.6p2-RC6) 2010/06/12 Released by Harlan Stenn + +* [Bug 715] libisc Linux IPv6 interface iteration drops multicast flags. + +--- +(4.2.6p2-RC5) 2010/06/03 Released by Harlan Stenn + +* [Bug 1561] ntpq, ntpdc "passwd" prompts for MD5 password w/SHA1. +* [Bug 1565] sntp/crypto.c compile fails on MacOS over vsnprintf(). +* Windows port: do not exit in ntp_timestamp_from_counter() without + first logging the reason. +* Support "passwd blah" syntax in ntpq. + +--- +(4.2.6p2-RC4) 2010/05/19 Released by Harlan Stenn + +* [Bug 1555] 4.2.6p2-RC3 sntp illegal C (mixed code and declarations). + +--- +(4.2.6p2-RC3) 2010/05/11 Released by Harlan Stenn + +* [Bug 1325] unreachable code in sntp recv_bcst_data(). +* [Bug 1459] sntp MD5 authentication does not work with ntpd. +* [Bug 1512] ntpsnmpd should connect to net-snmpd via a unix-domain + socket by default. Provide a command-line 'socket name' option. +* [Bug 1538] update refclock_nmea.c's call to getprotobyname(). +* [Bug 1541] Fix wrong keyword for "maxclock". +* [Bug 1552] update and complete broadcast and crypto features in sntp. +* [Bug 1553] sntp/configure.ac OpenSSL support. +* Escape unprintable characters in a refid in ntpq -p billboard. +* Simplify hash client code by providing OpenSSL EVP_*() API when built + without OpenSSL. (from ntp-dev) +* Do not depend on ASCII values for ('A' - '0'), ('a' - '0') in sntp. +* Windows compiling hints/winnt.html update from G. Sunil Tej. + +--- +(4.2.6p2-RC2) 2010/04/27 Released by Harlan Stenn + +* [Bug 1465] Make sure time from TS2100 is not invalid (backport from + ntp-dev). +* [Bug 1528] Fix EDITLINE_LIBS link order for ntpq and ntpdc. +* [Bug 1534] win32/include/isc/net.h conflicts with VC++ 2010 errno.h. +* [Bug 1535] "restrict -4 default" and "restrict -6 default" ignored. +* Remove --with-arlib from br-flock. + +--- +(4.2.6p2-RC1) 2010/04/18 Released by Harlan Stenn + +* [Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong. +* [Bug 1504] ntpdate tickles ntpd "discard minimum 1" rate limit if + "restrict ... limited" is used. +* [Bug 1518] Windows ntpd should lock to one processor more + conservatively. +* [Bug 1522] Enable range syntax "trustedkey (301 ... 399)". +* Update html/authopt.html controlkey, requestkey, and trustedkey docs. + +--- +(4.2.6p1) 2010/04/09 Released by Harlan Stenn +(4.2.6p1-RC6) 2010/03/31 Released by Harlan Stenn + +* [Bug 1514] Typo in ntp_proto.c: fabs(foo < .4) should be fabs(foo) < .4. +* [Bug 1464] synchronization source wrong for refclocks ARCRON_MSF (27) + and SHM (28). +* Correct Windows port's refclock_open() to return 0 on failure not -1. +* Correct CHU, dumbclock, and WWVB drivers to check for 0 returned from + refclock_open() on failure. +* Correct "SIMUL=4 ./flock-build -1" to prioritize -1/--one. + +--- +(4.2.6p1-RC5) 2010/02/09 Released by Harlan Stenn + +* [Bug 1140] Clean up debug.html, decode.html, and ntpq.html. +* [Bug 1438] Remove dead code from sntp/networking.c. +* [Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT. +* [Bug 1478] linking fails with undefined reference EVP_MD_pkey_type. +* [Bug 1479] Compilation fails because of not finding readline headers. +* [Bug 1480] snprintf() cleanup caused unterminated refclock IDs. +* [Bug 1484] ushort is not defined in QNX6. + +--- +(4.2.6p1-RC4) 2010/02/04 Released by Harlan Stenn + +* [Bug 1455] ntpd does not try /etc/ntp.audio as documented. +* [Bug 1467] Fix bogus rebuild of sntp/sntp.html +* [Bug 1470] "make distdir" in $srcdir builds keyword-gen, libntp.a. +* [Bug 1473] "make distcheck" before build can't make sntp/version.m4. +* [Bug 1474] ntp_keygen needs LCRYPTO after libntp.a. +* Convert many sprintf() calls to snprintf(), also strcpy(), strcat(). +* Fix widely cut-n-pasted bug in refclock shutdown after failed start. +* Remove some dead code checking for emalloc() returning NULL. +* Remove arlib. + +--- +(4.2.6p1-RC3) 2010/01/24 Released by Harlan Stenn + +* Use TZ=UTC instead of TZ= when calling date in scripts/mkver.in . +* [Bug 1448] Some macros not correctly conditionally or absolutely defined + on Windows. +* [Bug 1449] ntpsim.h in ntp_config.c should be used conditionally. +* [Bug 1450] Option to exclude warnings not unconditionally defined on Windows. +* [Bug 1127] Properly check the return of X590_verify() - missed one. +* [Bug 1439] .texi generation must wait until after binary is linked. +* [Bug 1440] Update configure.ac to support kfreebsd. +* [Bug 1445] IRIX does not have -lcap or support linux capabilities. +* [Bug 1451] CID 115: sntp leaks KoD entry when updating existing. +* [Bug 1453] Use $CC in config.cache filename in ./build script. + +--- +(4.2.6p1-RC2) 2009/12/25 Released by Harlan Stenn + +* [Bug 1411] Fix status messages in refclock_oncore.c. +* [Bug 1416] MAXDNAME undefined on Solaris 2.6. +* [Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir. +* [Bug 1424] Fix check for rtattr (rtnetlink.h). +* [Bug 1425] unpeer by association ID sets up for duplicate free(). +* [Bug 1426] scripts/VersionName needs . on the search path. +* [Bug 1427] quote missing in ./build - shows up on NetBSD. +* [Bug 1428] Use AC_HEADER_RESOLV to fix breaks from resolv.h +* [Bug 1429] ntpd -4 option does not reliably force IPv4 resolution. +* [Bug 1431] System headers must come before ntp headers in ntp_intres.c . +* [Bug 1434] HP-UX 11 ip_mreq undeclared, _HPUX_SOURCE helps some. +* [Bug 1435] sntp: Test for -lresolv using the same tests as in ntp. + +--- +(4.2.6p1-RC1) 2009/12/20 Released by Harlan Stenn + +* [Bug 1409] Put refclock_neoclock4x.c under the NTP COPYRIGHT notice. + This should allow debian and other distros to add this refclock driver + in further distro releases. + Detect R2 hardware releases. +* [Bug 1412] m4/os_cflags.m4 caches results that depend on $CC. +* [Bug 1413] test OpenSSL headers regarding -Wno-strict-prototypes. +* [Bug 1414] Enable "make distcheck" success with BSD make. +* [Bug 1415] Fix Mac OS X link problem. +* [Bug 1418] building ntpd/ntpdc/ntpq statically with ssl fails. +* Build infrastructure updates to enable beta releases of ntp-stable. + +--- +(4.2.6) 2009/12/09 Released by Harlan Stenn +* Include (4.2.4p8) - [Sec 1331] DoS with mode 7 packets - CVE-2009-3563. +* [Bug 508] Fixed leap second handling for Windows. +(4.2.5p250-RC) 2009/11/30 Released by Harlan Stenn +* sntp documentation updates. +* [Bug 761] internal resolver does not seem to honor -4/-6 qualifiers +* [Bug 1386] Deferred DNS doesn't work on NetBSD +* [Bug 1391] avoid invoking autogen twice for .c and .h files. +* [Bug 1397] shmget() refclock_shm failing because of file mode. +* Pass no_needed to ntp_intres as first part of fixing [Bug 975]. +* Add ./configure --enable-force-defer-DNS to help debugging. +(4.2.5p249-RC) 2009/11/28 Released by Harlan Stenn +* [Bug 1400] An empty KOD DB file causes sntp to coredump. +* sntp: documentation cleanup. +* sntp: clean up some error messages. +* sntp: Use the precision to control how many offset digits are shown. +* sntp: Show root dispersion. +* Cleanup from the automake/autoconf upgrades. +(4.2.5p248-RC) 2009/11/26 Released by Harlan Stenn +* Prepare for the generation of sntp.html. +* Documentation changes from Dave Mills. +* [Bug 1387] Storage leak in ntp_intres (minor). +* [Bug 1389] buffer overflow in refclock_oncore.c +* [Bug 1391] .texi usage text from installed, not built binaries. +* [Bug 1392] intres retries duplicate assocations endlessly. +* Correct *-opts.h dependency so default 'get' action isn't used. +(4.2.5p247-RC) 2009/11/20 Released by Harlan Stenn +* [Bug 1142] nodebug builds shed no light on -d, -D option failure. +* [Bug 1179] point out the problem with -i/--jaildir and -u/--user when + they are disabled by configure. +* [Bug 1308] support systems that lack fork(). +* [Bug 1343] sntp doesn't link on Solaris 7, needs -lresolv. +(4.2.5p246-RC) 2009/11/17 Released by Harlan Stenn +* Upgrade to autogen-5.10 +* [Bug 1378] Unnecessary resetting of peers during interface update. +* [Bug 1382] p245 configure --disable-dependency-tracking won't build. +* [Bug 1384] ntpq :config core dumped with a blank password. +(4.2.5p245-RC) 2009/11/14 Released by Harlan Stenn +* Cleanup from Dave Mills. +* [Bug 1343] sntp illegal C does not compile on Solaris 7. +* [Bug 1381] Version .deps generated include file dependencies to allow + known dependency-breaking changes to force .deps to be cleaned, + triggered by changing the contents of deps-ver and/or sntp/deps-ver. +(4.2.5p244-RC) 2009/11/12 Released by Harlan Stenn +* keygen.html updates from Dave Mills. +* [Bug 1003] ntpdc unconfig command doesn't prompt for keyid. +* [Bug 1376] Enable authenticated ntpq and ntpdc using newly-available + digest types. +* ntp-keygen, Autokey OpenSSL build vs. run version mismatch is now a + non-fatal warning. +(4.2.5p243-RC) 2009/11/11 Released by Harlan Stenn +* [Bug 1226] Fix deferred DNS lookups. +* new crypto signature cleanup. +(4.2.5p242-RC) 2009/11/10 Released by Harlan Stenn +* [Bug 1363] CID 92 clarify fallthrough case in clk_trimtsip.c +* [Bug 1366] ioctl(TIOCSCTTY, 0) fails on NetBSD *[0-2].* > 3.99.7. +* [Bug 1368] typos in libntp --without-crypto case +* [Bug 1371] deferred DNS lookup failing with INFO_ERR_AUTH. +* CID 87 dead code in ntpq.c atoascii(). +* Fix authenticated ntpdc, broken in p240. +* Stub out isc/mem.h, shaving 47k from a MIPS ntpd binary. +* Shrink keyword scanner FSM entries from 64 to 32 bits apiece. +* Documention updates from Dave Mills. +* authkeys.c cleanup from Dave Mills. +(4.2.5p241-RC) 2009/11/07 Released by Harlan Stenn +* html/authopt.html update from Dave Mills. +* Remove unused file from sntp/Makefile.am's distribution list. +* new crypto signature cleanup. +(4.2.5p240-RC) 2009/11/05 Released by Harlan Stenn +* [Bug 1364] clock_gettime() not detected, need -lrt on Debian 5.0.3. +* Provide all of OpenSSL's signature methods for ntp.keys (FIPS 140-2). +(4.2.5p239-RC) 2009/10/30 Released by Harlan Stenn +* [Bug 1357] bogus assert from refclock_shm. +* [Bug 1359] Debug message cleanup. +* CID 101: more pointer/array cleanup. +* [Bug 1356] core dump from refclock_nmea when can't open /dev/gpsU. +* [Bug 1358] AIX 4.3 sntp/networking.c IPV6_JOIN_GROUP undeclared. +* CID 101: pointer/array cleanup. +(4.2.5p238-RC) 2009/10/27 Released by Harlan Stenn +* Changes from Dave Mills. +* driver4.html updates from Dave Mills. +* [Bug 1252] PPSAPI cleanup on ntpd/refclock_wwvb.c. +* [Bug 1354] libtool error building after bootstrap with Autoconf 2.64. +* Allow NTP_VPATH_HACK configure test to handle newer gmake versions. +* CIDs 94-99 make it more clearly impossible for sock_hash() to return + a negative number. +* CID 105, 106 ensure ntpdc arrays are not overrun even if callers + misbehave. +* CID 113 use va_end() in refclock_true.c true_debug(). +* Get rid of configure tests for __ss_family and __ss_len when the more + common ss_family and ss_len are present. +(4.2.5p237-RC) 2009/10/26 Released by Harlan Stenn +* [Bug 610] NMEA support for using PPSAPI on a different device. +* [Bug 1238] use only fudge time2 to offset NMEA serial timestamp. +* [Bug 1355] ntp-dev won't compile on OpenBSD 4.6. +(4.2.5p236-RC) 2009/10/22 Released by Harlan Stenn +* Cleanup from Dave Mills. +* [Bug 1343] ntpd/ntp_io.c close_fd() does not compile on Solaris 7. +* [Bug 1353] ntpq "rv 0 settimeofday" always shows UNKNOWN on unix. +* Do not attempt to execute built binaries from ntpd/Makefile when + cross-compiling (keyword-gen and ntpd --saveconfigquit). +* sntp/main.c: Remove duplicate global adr_buf[] (also defined in + networking.c) which Piotr Grudzinski identified breaking his build. +* Correct in6addr_any test in configure.ac to attempt link too. +(4.2.5p235-RC) 2009/10/18 Released by Harlan Stenn +* [Bug 1343] lib/isc build breaks on systems without IPv6 headers. +(4.2.5p234-RC) 2009/10/16 Released by Harlan Stenn +* [Bug 1339] redux, use unmodified lib/isc/win32/strerror.c and + move #define strerror... to a header not used by lib/isc code. +* [Bug 1345] illegal 'grep' option prevents compilation. +* [Bug 1346] keyword scanner broken where char defaults to unsigned. +* [Bug 1347] ntpd/complete.conf missing multicastclient test case. +(4.2.5p233-RC) 2009/10/15 Released by Harlan Stenn +* [Bug 1337] cast setsockopt() v4 address pointer to void *. +* [Bug 1342] ignore|drop one IPv6 address on an interface blocks all + addresses on that interface. +* Documentation cleanup and updates. +(4.2.5p232-RC) 2009/10/14 Released by Harlan Stenn +* [Bug 1302] OpenSSL under Windows needs applink support. +* [Bug 1337] fix incorrect args to setsockopt(fd, IP_MULTICAST_IF,...). +* [Bug 1339] Fix Windows-only ntp_strerror() infinite recursion. +* [Bug 1341] NMEA driver requires working PPSAPI #ifdef HAVE_PPSAPI. +* Construct ntpd keyword scanner finite state machine at compile time + rather than at runtime, shrink entries from 40+ to 8 bytes. +* Update documentation for ntpq --old-rv, saveconfig, saveconfigdir, + ntpd -I -L and -M, and interface/nic rules. (From Dave Hart) +* [Bug 1337] fix incorrect args to setsockopt(fd, IP_MULTICAST_IF,...) +(4.2.5p231-RC) 2009/10/10 Released by Harlan Stenn +* [Bug 1335] Broadcast client degraded by wildcard default change. +(4.2.5p230-RC) 2009/10/09 Released by Harlan Stenn +* Start the 4.2.6 Release Candidate cycle. +* Broadcast and transit phase cleanup from Dave Mills. +(4.2.5p229) 2009/10/07 Released by Harlan Stenn +* [Bug 1334] ntpsnmpd undefined reference to `ntpqOptions'. +* Change ntpsnmpd/Makefile.am include file order to fix FreeBSD build. +(4.2.5p228) 2009/10/06 Released by Harlan Stenn +* Reclaim syntax tree memory after application in ntpd built with + configure --disable-saveconfig. +* [Bug 1135] ntpq uses sizeof(u_long) where sizeof(u_int32) is meant. +* [Bug 1333] ntpd --interface precedence over --novirtualips lost. +(4.2.5p227) 2009/10/05 Released by Harlan Stenn +* [Bug 1135] :config fails with "Server disallowed request" +* [Bug 1330] disallow interface/nic rules when --novirtualips or + --interface are used. +* [Bug 1332] ntpq -c 'rv 0 variablename' returns extra stuff. +* Add test of ntpd --saveconfigquit fidelity using new complete.conf. +* Documentation updates from Dave Hart/Dave Mills. +(4.2.5p226) 2009/10/04 Released by Harlan Stenn +* [Bug 1318] Allow multiple -g options on ntpd command line. +* [Bug 1327] ntpq, ntpdc, ntp-keygen -d & -D should work with configure + --disable-debugging. +* Add ntpd --saveconfigquit option for future build-time + testing of saveconfig fidelity. +* Clockhop and autokey cleanup from Dave Mills. +* Documentation updates from Dave Mills. +(4.2.5p225) 2009/09/30 Released by Harlan Stenn +* authopt documentation changes from Dave Mills/Dave Hart. +* [Bug 1324] support bracketed IPv6 numeric addresses for restrict. +(4.2.5p224) 2009/09/29 Released by Harlan Stenn +* Clockhop and documentation fixes from Dave Mills. +* Remove "tos maxhop" ntp.conf knob. +(4.2.5p223) 2009/09/28 Released by Harlan Stenn +* [Bug 1321] build doesn't work if . isn't on $PATH. +* [Bug 1323] Implement "revoke #" to match documentation, deprecate + "crypto revoke #". +(4.2.5p222) 2009/09/27 Released by Harlan Stenn +* Update libisc code using bind-9.6.1-P1.tar.gz, rearrange our copy to + mirror the upstream layout (lib/isc/...), and merge in NTP-local + modifications to libisc. There is a new procedure to ease future + libisc merges using a separate "upstream" bk repo. That will enable + normal bk pull automerge to handle carrying forward any local changes + and should enable us to take updated libisc snapshots more often. +* Updated build and flock-build scripts. flock-build --one is a way + to perform a flock-build compatible solitary build, handy for a repo + clone's first build on a machine with autoconf, automake, etc. +* Compiling ntp_parser.y using BSD make correctly places ntp_parser.h + in the top-level ntpd directory instead of A.*/ntpd. +* bootstrap script updated to remove potentially stale .deps dirs. +* Remove unneeded Makefile.am files from the lib/isc/include tree. +(4.2.5p221) 2009/09/26 Released by Harlan Stenn +* [Bug 1316] segfault if refclock_nmea can't open file. +* [Bug 1317] Distribute cvo.sh. +(4.2.5p220) 2009/09/25 Released by Harlan Stenn +* Rearrange libisc code to match the upstream layout in BIND. This is + step one of two, changing the layout but keeping our existing libisc. +(4.2.5p219) 2009/09/24 Released by Harlan Stenn +* [Bug 1315] "interface ignore 0.0.0.0" is ignored. +* add implicit "nic ignore all" rule before any rules from ntp.conf, so + "nic listen eth0" alone means the same as "-I eth0". +* add wildcard match class for interface/nic rules. +* fix mistaken carryover of prefixlen from one rule to the next. +* Ensure IPv6 localhost address ::1 is included in libisc's Windows IPv6 + address enumeration, allowing ntpq and ntpdc's hardcoding to 127.0.0.1 + on Windows to end. +(4.2.5p218) 2009/09/21 Released by Harlan Stenn +* [Bug 1314] saveconfig emits -4 and -6 on when not given. +* correct parsing and processing of setvar directive. +* highlight location of ntpq :config syntax errors with ^. +* clarify (former) NO_ARG, SINGLE_ARG, MULTIPLE_ARG renaming to + FOLLBY_TOKEN, FOLLBY_STRING, FOLLBY_STRINGS_TO_EOC. +* parser, saveconfig cleanup to store T_ identifiers in syntax tree. +(4.2.5p217) 2009/09/20 Released by Harlan Stenn +* [Bug 1300] reject remote configuration of dangerous items. +(4.2.5p216) 2009/09/19 Released by Harlan Stenn +* [Bug 1312] ntpq/ntpdc MD5 passwords truncated to 8 chars on Suns. +* CID 10 missing free(up); in refclock_palisade.c error return, again. +* CID 83 added assertion to demonstrate config_nic_rules() does not + call strchr(NULL, '/'). +(4.2.5p215) 2009/09/18 Released by Harlan Stenn +* [Bug 1292] Workaround last VC6 unsigned __int64 kink. +(4.2.5p214) 2009/09/17 Released by Harlan Stenn +* [Bug 1303] remove top-level "autokey" directive. +* use "nic listen 192.168.0.0/16" instead of + "nic listen 192.168.0.0 prefixlen 16". +(4.2.5p213) 2009/09/16 Released by Harlan Stenn +* [Bug 1310] fix Thunderbolt mode in refclock_palisade.c +(4.2.5p212) 2009/09/15 Released by Harlan Stenn +* [Bug 983] add interface [listen | ignore | drop] ... directive. +* [Bug 1243] MD5auth_setkey zero-fills key from first zero octet. +* [Bug 1295] leftover fix, do not crash on exit in free_config_trap() + when "trap 1.2.3.4" is used without any further options. +* [Bug 1311] 4.2.5p211 doesn't build in no-debug mode. +* document interface (alias nic) and unpeer. +* Correct syntax error line & column numbers. +* CID 79: kod_init_kod_db() fails to fclose(db_s) in two error paths. +* CID 80: attempt to quiet Coverity false positive re: leaking "reason" + in main(). +* Documentation updates from Dave Mills. +* CID 81: savedconfig leaked in save_config(). +* Make the code agree with the spec and the book (Dave Mills). +(4.2.5p211) 2009/09/14 Released by Harlan Stenn +* [Bug 663] respect ntpq -c and -p order on command line. +* [Bug 1292] more VC6 unsigned __int64 workarounds. +* [Bug 1296] Added Support for Trimble Acutime Gold. +(4.2.5p210) 2009/09/06 Released by Harlan Stenn +* [Bug 1294] Use OPENSSL_INC and OPENSSL_LIB macros for Windows + and remove unnecessary reference to applink.c for Windows +* [Bug 1295] trap directive options are not optional. +* [Bug 1297] yylex() must always set yylval before returning. +(4.2.5p209) 2009/09/01 Released by Harlan Stenn +* [Bug 1290] Fix to use GETTIMEOFDAY macro +* [Bug 1289] Update project files for VC6, VS2003, VS2005, VS 2008 +(4.2.5p208) 2009/08/30 Released by Harlan Stenn +* [Bug 1293] make configuration dumper ready for release, specifically: +* rename ntpq dumpcfg command to "saveconfig". +* require authentication for saveconfig. +* "restrict ... nomodify" prevents saveconfig and :config. +* "saveconfig ." shorthand to save to startup configuration file. +* support strftime() substitution in saveconfig arg to timestamp + the output filename, for example "saveconfig %Y%m%d-%H%M%S.conf". +* display saveconfig response message from ntpd in ntpq. +* save output filename in "savedconfig" variable, fetched with ntpq -c + "rv 0 savedconfig". +* document saveconfig in html/ntpq.html. +* add ./configure --disable-saveconfig to build a smaller ntpd. +* log saveconfig failures and successes to syslog. +(4.2.5p207) 2009/08/29 Released by Harlan Stenn +* [Bug 1292] Minor Windows source tweaks for VC6-era SDK headers. +(4.2.5p206) 2009/08/26 Released by Harlan Stenn +* accopt.html typo fixes from Dave Mills. +* [Bug 1283] default to remembering KoD in sntp. +* clean up numerous sntp/kod_management.c bugs. +* use all addresses resolved from each DNS name in sntp. +(4.2.5p205) 2009/08/18 Released by Harlan Stenn +* accopt.html typo fixes from Dave Mills. +* [Bug 1285] Log ntpq :config/config-from-file events. +* [Bug 1286] dumpcfg omits statsdir, mangles filegen. +(4.2.5p204) 2009/08/17 Released by Harlan Stenn +* [Bug 1284] infinite loop in ntpd dumping more than one trustedkey +(4.2.5p203) 2009/08/16 Released by Harlan Stenn +* Add ntpq -c dumpcfg, Google Summer of Code project of Max Kuehn +(4.2.5p202) 2009/08/14 Released by Harlan Stenn +* install the binary and man page for sntp. +(4.2.5p201) 2009/08/13 Released by Harlan Stenn +* sntp: out with the old, in with the new. +(4.2.5p200) 2009/08/12 Released by Harlan Stenn +* [Bug 1281] Build ntpd on Windows without big SDK download, burn, + and install by checking in essentially unchanging messages.mc build + products to avoid requiring mc.exe, which is not included with VC++ + 2008 EE. +(4.2.5p199) 2009/08/09 Released by Harlan Stenn +* [Bug 1279] Cleanup for warnings from Veracode static analysis. +(4.2.5p198) 2009/08/03 Released by Harlan Stenn +* Upgrade to autogen-5.9.9-pre5. +(4.2.5p197) 2009/07/30 Released by Harlan Stenn +* The build script now has . at the end of PATH for config.guess. +(4.2.5p196) 2009/07/29 Released by Harlan Stenn +* [Bug 1272] gsoc_sntp IPv6 build problems under HP-UX 10. +* [Bug 1273] CID 10: Palisade leaks unit struct in error path. +* [Bug 1274] CID 67: ensure resolve_hosts() output count and pointers + are consistent. +* [Bug 1275] CID 45: CID 46: old sntp uses uninitialized guesses[0], + precs[0]. +* [Bug 1276] CID 52: crypto_xmit() may call crypto_alice[23]() + with NULL peer. +(4.2.5p195) 2009/07/27 Released by Harlan Stenn +* cvo.sh: Add support for CentOS, Fedora, Slackware, SuSE, and QNX. +(4.2.5p194) 2009/07/26 Released by Harlan Stenn +* Documentation updates from Dave Mills. +* Use scripts/cvo.sh in the build script to get better subdir names. +(4.2.5p193) 2009/07/25 Released by Harlan Stenn +* [Bug 1261] CID 34: simulate_server() rbuf.msg_flags uninitialized. +* [Bug 1262] CID 35: xpkt.mac uninitialized in simulate_server(). +* [Bug 1263] CID 37: CID 38: CID 40: CID 43: multiple refclocks + uninitialized tm_zone (arc, chronolog, dumbclock, pcf). +* [Bug 1264] CID 64: gsoc_sntp on_wire() frees wrong ptr receiving KoD. +* [Bug 1265] CID 65: CID 66: gsoc_sntp on_wire() leaks x_pkt, r_pkt. +* [Bug 1266] CID 39: datum_pts_start() uninitialized arg.c_ospeed. +* [Bug 1267] CID 44: old sntp handle_saving() writes stack garbage to + file when clearing. +* [Bug 1268] CID 63: resolve_hosts() leaks error message buffer. +* [Bug 1269] CID 74: use assertion to ensure move_fd() does not return + negative descriptors. +* [Bug 1270] CID 70: gsoc_sntp recv_bcst_data mdevadr.ipv6mr_interface + uninitialized. +(4.2.5p192) 2009/07/24 Released by Harlan Stenn +* [Bug 965] CID 42: ss_family uninitialized. +* [Bug 1250] CID 53: kod_init_kod_db() overruns kod_db malloc'd buffer. +* [Bug 1251] CID 68: search_entry() mishandles dst argument. +* [Bug 1252] CID 32: Quiet Coverity warning with assertion. +* [Bug 1253] CID 50: gsoc_sntp/crypto.c auth_init() always returns a + list with one entry. +* [Bug 1254] CID 56: tv_to_str() leaks a struct tm each call. +* [Bug 1255] CID 55: pkt_output() leaks a copy of each packet. +* [Bug 1256] CID 51: Coverity doesn't recognize our assertion macros as + terminal. +* [Bug 1257] CID 57: gsoc_sntp auth_init() fails to fclose(keyfile). +* [Bug 1258] CID 54: gsoc_sntp resolve_hosts() needs simplification. +* [Bug 1259] CID 59: gsoc_sntp recv_bcast_data() fails to free(rdata) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 4 21:36:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD4A497F; Wed, 4 Dec 2013 21:36:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A034C12F4; Wed, 4 Dec 2013 21:36:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4LaHLg096012; Wed, 4 Dec 2013 21:36:17 GMT (envelope-from roberto@svn.freebsd.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4LaHPQ096011; Wed, 4 Dec 2013 21:36:17 GMT (envelope-from roberto@svn.freebsd.org) Message-Id: <201312042136.rB4LaHPQ096011@svn.freebsd.org> From: Ollivier Robert Date: Wed, 4 Dec 2013 21:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r258946 - vendor/ntp/4.2.6p5 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 21:36:17 -0000 Author: roberto Date: Wed Dec 4 21:36:17 2013 New Revision: 258946 URL: http://svnweb.freebsd.org/changeset/base/258946 Log: Tag the 4.2.6p5 release. Added: vendor/ntp/4.2.6p5/ - copied from r258945, vendor/ntp/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 00:54:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E93BDB8; Thu, 5 Dec 2013 00:54:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D5B581F7F; Thu, 5 Dec 2013 00:54:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB50sd0J070372; Thu, 5 Dec 2013 00:54:39 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB50sdin070369; Thu, 5 Dec 2013 00:54:39 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312050054.rB50sdin070369@svn.freebsd.org> From: Xin LI Date: Thu, 5 Dec 2013 00:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258948 - in head/sys: conf i386/conf modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 00:54:40 -0000 Author: delphij Date: Thu Dec 5 00:54:38 2013 New Revision: 258948 URL: http://svnweb.freebsd.org/changeset/base/258948 Log: Support Hyper-V on i386: - Add 'hyperv' module into build; - Allow building Hyper-V support as part of the kernel; - Hook Hyper-V build into NOTES. This is intended for MFC if re@ permits. MFC after: 3 days Modified: head/sys/conf/files.i386 head/sys/i386/conf/NOTES head/sys/modules/Makefile Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Dec 5 00:12:52 2013 (r258947) +++ head/sys/conf/files.i386 Thu Dec 5 00:54:38 2013 (r258948) @@ -221,6 +221,18 @@ dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc +dev/hyperv/netvsc/hv_net_vsc.c optional hyperv +dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c optional hyperv +dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv +dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv +dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv +dev/hyperv/utilities/hv_util.c optional hyperv +dev/hyperv/vmbus/hv_channel.c optional hyperv +dev/hyperv/vmbus/hv_channel_mgmt.c optional hyperv +dev/hyperv/vmbus/hv_connection.c optional hyperv +dev/hyperv/vmbus/hv_hv.c optional hyperv +dev/hyperv/vmbus/hv_ring_buffer.c optional hyperv +dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c optional hyperv dev/ichwd/ichwd.c optional ichwd dev/if_ndis/if_ndis.c optional ndis dev/if_ndis/if_ndis_pccard.c optional ndis pccard Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Thu Dec 5 00:12:52 2013 (r258947) +++ head/sys/i386/conf/NOTES Thu Dec 5 00:54:38 2013 (r258948) @@ -801,6 +801,8 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device +device hyperv # HyperV drivers + ##################################################################### # Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Dec 5 00:12:52 2013 (r258947) +++ head/sys/modules/Makefile Thu Dec 5 00:54:38 2013 (r258948) @@ -585,6 +585,7 @@ _hptmv= hptmv _hptnr= hptnr _hptrr= hptrr .endif +_hyperv= hyperv _ichwd= ichwd _ida= ida _iir= iir From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 00:56:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E763DF12; Thu, 5 Dec 2013 00:56:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D4CC61F91; Thu, 5 Dec 2013 00:56: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 rB50u3kS070651; Thu, 5 Dec 2013 00:56:03 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB50u3Yb070650; Thu, 5 Dec 2013 00:56:03 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312050056.rB50u3Yb070650@svn.freebsd.org> From: Glen Barber Date: Thu, 5 Dec 2013 00:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258949 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 00:56:04 -0000 Author: gjb Date: Thu Dec 5 00:56:03 2013 New Revision: 258949 URL: http://svnweb.freebsd.org/changeset/base/258949 Log: Ensure WITH_DVD is not empty to prevent 'WITH_DVD= ' from evaluating to true. Submitted by: hrs MFC after: 3 days X-MFC-to-10: immediate Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Dec 5 00:54:38 2013 (r258948) +++ head/release/Makefile Thu Dec 5 00:56:03 2013 (r258949) @@ -79,7 +79,7 @@ IMAGES= .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) RELEASE_TARGETS+= cdrom IMAGES+= disc1.iso bootonly.iso -. if defined(WITH_DVD) +. if defined(WITH_DVD) && !empty(WITH_DVD) RELEASE_TARGETS+= dvdrom IMAGES+= dvd1.iso . endif From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 00:56:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DBB3EF; Thu, 5 Dec 2013 00:56:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3ABD61F99; Thu, 5 Dec 2013 00:56:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB50upNr070777; Thu, 5 Dec 2013 00:56:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB50upcx070776; Thu, 5 Dec 2013 00:56:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312050056.rB50upcx070776@svn.freebsd.org> From: Xin LI Date: Thu, 5 Dec 2013 00:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258950 - head/sys/i386/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 00:56:51 -0000 Author: delphij Date: Thu Dec 5 00:56:50 2013 New Revision: 258950 URL: http://svnweb.freebsd.org/changeset/base/258950 Log: Enable Hyper-V support in i386 GENERIC. MFC after: 2 weeks Modified: head/sys/i386/conf/GENERIC Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu Dec 5 00:56:03 2013 (r258949) +++ head/sys/i386/conf/GENERIC Thu Dec 5 00:56:50 2013 (r258950) @@ -354,6 +354,9 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device +# HyperV drivers +device hyperv # HyperV drivers + # Xen HVM Guest Optimizations # NOTE: XENHVM depends on xenpci. They must be added or removed together. options XENHVM # Xen HVM kernel infrastructure From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 00:59:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E111A3C6; Thu, 5 Dec 2013 00:59:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C13641FC0; Thu, 5 Dec 2013 00:59: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 rB50xU1Z071699; Thu, 5 Dec 2013 00:59:30 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB50xTF8071694; Thu, 5 Dec 2013 00:59:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312050059.rB50xTF8071694@svn.freebsd.org> From: Glen Barber Date: Thu, 5 Dec 2013 00:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258952 - in stable/10: release release/scripts share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 00:59:31 -0000 Author: gjb Date: Thu Dec 5 00:59:29 2013 New Revision: 258952 URL: http://svnweb.freebsd.org/changeset/base/258952 Log: MFC r258786, r258796, r258797, r258847, r258853, r258949: r258786: Move OPTIONS_UNSET outside of the PBUILD_FLAGS variable, otherwise the textproc/docproj port build fails. r258796 (hrs): - Prevent TARGET and TARGET_ARCH from being defined as empty when TARGET="" and/or TARGET_ARCH="" is specified. - Remove extra (). r258797 (hrs): Use standard CLEANFILES/CLEANDIRS and clean target in bsd.obj.mk. r258847: Provide reproducibility between builds by building pkg(8) from ports, instead of using pkg-bootstrap. This should resolve a problem that was discovered during 10.0-BETA4 freebsd-update(8) builds, r258853: Turn off the dvdrom target by default. dvd1.iso is now built by specifying 'WITH_DVD=1' during 'make release'. This caused some problems during the freebsd-update builds for 10.0-BETA4. r258949: Ensure WITH_DVD is not empty to prevent 'WITH_DVD= ' from evaluating to true. Approved by: re (hrs) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile stable/10/release/release.sh stable/10/release/scripts/pkg-stage.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/release/ (props changed) stable/10/share/man/man7/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Thu Dec 5 00:57:53 2013 (r258951) +++ stable/10/release/Makefile Thu Dec 5 00:59:29 2013 (r258952) @@ -18,7 +18,7 @@ # NOPORTS: if set, do not distribute ports tree # NOSRC: if set, do not distribute source tree # NODOC: if set, do not generate release documentation -# NODVD: if set, do not generate dvd1.iso +# WITH_DVD: if set, generate dvd1.iso # TARGET/TARGET_ARCH: architecture of built release # @@ -27,11 +27,15 @@ PORTSDIR?= /usr/ports DOCDIR?= /usr/doc RELNOTES_LANG?= en_US.ISO8859-1 -TARGET?= ${MACHINE} +.if !defined(TARGET) || empty(TARGET) +TARGET= ${MACHINE} +.endif +.if !defined(TARGET_ARCH) || empty(TARGET_ARCH) .if ${TARGET} == ${MACHINE} -TARGET_ARCH?= ${MACHINE_ARCH} +TARGET_ARCH= ${MACHINE_ARCH} .else -TARGET_ARCH?= ${TARGET} +TARGET_ARCH= ${TARGET} +.endif .endif IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} DISTDIR= dist @@ -73,7 +77,7 @@ IMAGES= .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) RELEASE_TARGETS+= cdrom IMAGES+= disc1.iso bootonly.iso -. if(!defined(NODVD)) +. if defined(WITH_DVD) && !empty(WITH_DVD) RELEASE_TARGETS+= dvdrom IMAGES+= dvd1.iso . endif @@ -83,7 +87,12 @@ RELEASE_TARGETS+= memstick.img IMAGES+= memstick.img .endif +CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} +CLEANDIRS= dist ftp release bootonly dvd +beforeclean: + chflags -R noschg . .include +clean: beforeclean base.txz: mkdir -p ${DISTDIR} @@ -220,15 +229,6 @@ release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -clean: - chflags -R noschg . - rm -rf dist ftp - rm -f packagesystem - rm -f *.txz MANIFEST - rm -f system - rm -rf release bootonly dvd - rm -f ${IMAGES} - install: .if defined(DESTDIR) && !empty(DESTDIR) mkdir -p ${DESTDIR} Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Thu Dec 5 00:57:53 2013 (r258951) +++ stable/10/release/release.sh Thu Dec 5 00:59:29 2013 (r258952) @@ -176,9 +176,9 @@ build_doc_ports() { _OSVERSION=$(sysctl -n kern.osreldate) if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" - PBUILD_FLAGS="${PBUILD_FLAGS} OPTIONS_UNSET='FOP IGOR'" + PBUILD_FLAGS="${PBUILD_FLAGS}" chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ - ${PBUILD_FLAGS} install clean distclean + ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean fi } Modified: stable/10/release/scripts/pkg-stage.sh ============================================================================== --- stable/10/release/scripts/pkg-stage.sh Thu Dec 5 00:57:53 2013 (r258951) +++ stable/10/release/scripts/pkg-stage.sh Thu Dec 5 00:59:29 2013 (r258952) @@ -25,7 +25,7 @@ REVISION="${2}" . "${1}" || exit 1 if [ ! -x /usr/local/sbin/pkg ]; then - /usr/sbin/pkg bootstrap + /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi /bin/mkdir -p ${PKG_CACHEDIR} Modified: stable/10/share/man/man7/release.7 ============================================================================== --- stable/10/share/man/man7/release.7 Thu Dec 5 00:57:53 2013 (r258951) +++ stable/10/share/man/man7/release.7 Thu Dec 5 00:59:29 2013 (r258952) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2013 +.Dd December 2, 2013 .Dt RELEASE 7 .Os .Sh NAME @@ -230,10 +230,6 @@ When set, will prevent the .Fa doc.txz distribution package from being created. -.It Va NODVD -Set to a non-empty value to skip the -.Cm dvdrom -target. .It Va NOPORTS Set to a non-empty value to skip the .Li ports/ @@ -245,6 +241,10 @@ will prevent the distribution package from being created. Setting this also sets .Va NODOC . +.It Va WITH_DVD +Set to a non-empty value to include the +.Cm dvdrom +target. .El .Sh MAKEFILE TARGETS The release makefile From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 01:06:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CACC4744; Thu, 5 Dec 2013 01:06:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B6D561030; Thu, 5 Dec 2013 01:06: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 rB5165cr074953; Thu, 5 Dec 2013 01:06:05 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5165jl074952; Thu, 5 Dec 2013 01:06:05 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312050106.rB5165jl074952@svn.freebsd.org> From: Glen Barber Date: Thu, 5 Dec 2013 01:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258953 - stable/10/usr.sbin/bsdconfig/share X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 01:06:05 -0000 Author: gjb Date: Thu Dec 5 01:06:05 2013 New Revision: 258953 URL: http://svnweb.freebsd.org/changeset/base/258953 Log: MFC r258854: Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since the format of 'pkg -vv' output has changed. Approved by: re (hrs) Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/bsdconfig/share/common.subr Directory Properties: stable/10/usr.sbin/bsdconfig/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/common.subr Thu Dec 5 00:59:29 2013 (r258952) +++ stable/10/usr.sbin/bsdconfig/share/common.subr Thu Dec 5 01:06:05 2013 (r258953) @@ -65,7 +65,7 @@ export UNAME_R="$(uname -r)" # Release L if [ ! "${PKG_ABI+set}" ]; then export PKG_ABI="$( ASSUME_ALWAYS_YES=1 pkg -vv | - awk '$1=="ABI:"{print $2;exit}' 2> /dev/null + awk '$1=="ABI"{print $3;exit}' 2> /dev/null )" fi From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 01:21:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28577D12; Thu, 5 Dec 2013 01:21:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 085F31117; Thu, 5 Dec 2013 01:21: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 rB51Lj6D081385; Thu, 5 Dec 2013 01:21:45 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB51Ljb9081384; Thu, 5 Dec 2013 01:21:45 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312050121.rB51Ljb9081384@svn.freebsd.org> From: Craig Rodrigues Date: Thu, 5 Dec 2013 01:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258954 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 01:21:46 -0000 Author: rodrigc Date: Thu Dec 5 01:21:45 2013 New Revision: 258954 URL: http://svnweb.freebsd.org/changeset/base/258954 Log: MFC r258914 Update release notes. Submitted by: skreuzer Approved by: re (delphij) Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Directory Properties: stable/10/release/ (props changed) stable/10/release/doc/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Dec 5 01:06:05 2013 (r258953) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Dec 5 01:21:45 2013 (r258954) @@ -120,6 +120,9 @@ Kernel Changes + The maximum amount of memory the &os; kernel + can address has been increased from 1TB to 4TB. + A new &man.cpuset.2; API has been added for thread to CPU binding and CPU resource grouping and assignment. The &man.cpuset.1; userland utility has been added @@ -201,7 +204,9 @@ Multimedia Support - + Support for version 2.0 of the USB Audio reference design + has been added. New devices should support higher bandwidth, + increased sampling frequency and wider dynamic range. @@ -249,26 +254,23 @@ Network Protocols - The &man.bpf.4; packet filter and capture facility now - supports a zero-copy mode of operation, in which buffers are - loaned from a user process to the kernel. This feature can - be enabled by setting - the net.bpf.zerocopy_enable sysctl - variable to 1. - - ISDN4BSD(I4B), netatm, and all - related subsystems have been removed due to lack of - multi-processor support. - - A bug in TCP options padding, where the wrong padding - bytes were used, has been fixed. - - The IEEE 802.11s element identifiers have - been updated to reflect the final version of the amendment. This - update breaks compatibility with older mesh setups but is necessary - as the previous IDs are used by another amendment leading to - unexpected results when trying to associate with an accesspoint - using the affected IDs. + &man.carp.4; has been rewritten to make addresses + more sane from the viewpoint of routing daemons such as + quagga/zebra. It also brings support for a single redundant + address on the subnet (carpdev), switching state with + ifconfig, better locking and using modern kernel + interfaces to allocate multicast memberships. + + The &man.pf.4; firewall now supports fine-grain locking + and better utilization on multi-cpu machines resulting in + significant improvements in performance. + + Support for up to 65536 routing tables has been + introduced. + + Support for setting/matching differentiated services + codepoints (DSCP) in IP header has been added to + &man.ipfw.8;. @@ -293,19 +295,34 @@ File Systems - A problem with using &man.mmap.2; on ZFS filesystems has - been fixed. + A new kernel-based iSCSI target and initiator has been + added - A new kernel-mode NFS lock manager has been added, - improving performance and behavior of NFS locking. A new - &man.clear.locks.8; command has been added to clear locks held - on behalf of an NFS client. - - The ZFS file system - has been upgraded to version 28. Changes include Data - Deduplication, Triple parity RAIDZ, and zfs diff. + UFS filesystems can now be enlarged with &man.growfs.8; while + mounted read-write. This is especially useful for virtual + machines, allowing the addition of more harddrive space without + interruption of service. + + A state of the art FUSE implementation is now part of the + base system. It allows the use of nearly all fusefs file + systems + + Support for the high performance LZ4 compression algorithm + has been added to ZFS. LZ4 is usually faster and can achieve a + higher compression ratio than LZJB, the default compression + algorithm + + Support for L2ARC compression has been added to ZFS. + + ZFS will now compare the checksums of incoming writes to + the checksum of the existing on-disk data and avoid issuing any + write I/O for data that has not changed. This will reduce I/O + as well as space usage because if the old block is referenced + by a snapshot, both copies of the block are kept even though + both contain the same data. + @@ -443,8 +460,8 @@ bzip2 has been updated from 1.0.4 to 1.0.5. - CVS has been updated from 1.11.17 - to a post-1.11.22 snapshot from 10 March 2008. + CVS has been removed from the + base system, but is still available from ports FILE has been updated from 4.23 to 5.03. From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 01:44:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C3F7340; Thu, 5 Dec 2013 01:44:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2E625124A; Thu, 5 Dec 2013 01:44:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB51iPLG088215; Thu, 5 Dec 2013 01:44:25 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB51iOXZ088213; Thu, 5 Dec 2013 01:44:24 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <201312050144.rB51iOXZ088213@svn.freebsd.org> From: Tom Rhodes Date: Thu, 5 Dec 2013 01:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258955 - head/usr.bin/script X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 01:44:25 -0000 Author: trhodes Date: Thu Dec 5 01:44:24 2013 New Revision: 258955 URL: http://svnweb.freebsd.org/changeset/base/258955 Log: Add -F to flush output after each write. With this, I can set up a pipe and allow a jr user to watch what I'm doing by running 'script -F pipefile' on it. While here, spell out the month in the .Dd tag like other manual pages. Modified: head/usr.bin/script/script.1 head/usr.bin/script/script.c Modified: head/usr.bin/script/script.1 ============================================================================== --- head/usr.bin/script/script.1 Thu Dec 5 01:21:45 2013 (r258954) +++ head/usr.bin/script/script.1 Thu Dec 5 01:44:24 2013 (r258955) @@ -28,7 +28,7 @@ .\" @(#)script.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd Oct 27, 2012 +.Dd December 4, 2013 .Dt SCRIPT 1 .Os .Sh NAME @@ -37,6 +37,7 @@ .Sh SYNOPSIS .Nm .Op Fl adfkpqr +.Op Fl F Ar pipe .Op Fl t Ar time .Op Ar file Op Ar command ... .Sh DESCRIPTION @@ -76,6 +77,12 @@ retaining the prior contents. When playing back a session with the .Fl p flag, do not sleep between records when playing back a timestamped session. +.It Fl F Ar pipe +Immediately flush output after each write. +This will allow a user to create a named pipe using +.Xr mkfifo 1 +and another user may watch the live session using a utility like +.Xr cat 1 . .It Fl f Create .Ar file.filemon Modified: head/usr.bin/script/script.c ============================================================================== --- head/usr.bin/script/script.c Thu Dec 5 01:21:45 2013 (r258954) +++ head/usr.bin/script/script.c Thu Dec 5 01:44:24 2013 (r258955) @@ -98,18 +98,18 @@ main(int argc, char *argv[]) char obuf[BUFSIZ]; char ibuf[BUFSIZ]; fd_set rfd; - int aflg, kflg, pflg, ch, k, n; + int aflg, Fflg, kflg, pflg, ch, k, n; int flushtime, readstdin; int fm_fd, fm_log; - aflg = kflg = pflg = 0; + aflg = Fflg = kflg = pflg = 0; usesleep = 1; rawout = 0; flushtime = 30; fm_fd = -1; /* Shut up stupid "may be used uninitialized" GCC warning. (not needed w/clang) */ - while ((ch = getopt(argc, argv, "adfkpqrt:")) != -1) + while ((ch = getopt(argc, argv, "adFfkpqrt:")) != -1) switch(ch) { case 'a': aflg = 1; @@ -117,6 +117,9 @@ main(int argc, char *argv[]) case 'd': usesleep = 0; break; + case 'F': + Fflg = 1; + break; case 'f': fflg = 1; break; @@ -283,6 +286,8 @@ main(int argc, char *argv[]) fflush(fscript); start = tvec; } + if (Fflg) + fflush(fscript); } finish(); done(0); From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 03:01:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D69F214; Thu, 5 Dec 2013 03:01:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EEDB31684; Thu, 5 Dec 2013 03:01:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB531fvO016442; Thu, 5 Dec 2013 03:01:41 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB531fVI016441; Thu, 5 Dec 2013 03:01:41 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201312050301.rB531fVI016441@svn.freebsd.org> From: Colin Percival Date: Thu, 5 Dec 2013 03:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258956 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 03:01:42 -0000 Author: cperciva Date: Thu Dec 5 03:01:41 2013 New Revision: 258956 URL: http://svnweb.freebsd.org/changeset/base/258956 Log: Make panic_reboot_wait_time static. Submitted by: jhb Modified: head/sys/kern/kern_shutdown.c Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Thu Dec 5 01:44:24 2013 (r258955) +++ head/sys/kern/kern_shutdown.c Thu Dec 5 03:01:41 2013 (r258956) @@ -89,7 +89,7 @@ __FBSDID("$FreeBSD$"); #ifndef PANIC_REBOOT_WAIT_TIME #define PANIC_REBOOT_WAIT_TIME 15 /* default to 15 seconds */ #endif -int panic_reboot_wait_time = PANIC_REBOOT_WAIT_TIME; +static int panic_reboot_wait_time = PANIC_REBOOT_WAIT_TIME; SYSCTL_INT(_kern, OID_AUTO, panic_reboot_wait_time, CTLFLAG_RW | CTLFLAG_TUN, &panic_reboot_wait_time, 0, "Seconds to wait before rebooting after a panic"); From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 03:06:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67FFE476 for ; Thu, 5 Dec 2013 03:06:18 +0000 (UTC) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id EEBA616D9 for ; Thu, 5 Dec 2013 03:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=14NLSboxt/dAP6g41gAanHpjGwA=; b=nGAnsBVbm/+vWd6hjL 4Pr9ObYecreXrpex7XuC6pZO5LOcVxR7+UIO5QoOzyZFWZKx9R7gRpw/CYvhWE4L RhVfvrqIaK8SLm1klLpVEC55w97h2FQOollb9sReNYR1LiqJzCXsjdSqj16t5F/X rhxipGC3zJyOv7x9EqVrBsgbE= Received: by mf135.sendgrid.net with SMTP id mf135.1485.529FEDA94 Thu, 05 Dec 2013 03:06:17 +0000 (GMT) Received: from mail.tarsnap.com (unknown [10.60.208.15]) by mi72 (SG) with ESMTP id 142c0b85bbc.5644.5375a for ; Wed, 04 Dec 2013 21:06:16 -0600 (CST) Received: (qmail 39416 invoked from network); 5 Dec 2013 03:06:13 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 5 Dec 2013 03:06:13 -0000 Received: (qmail 11988 invoked from network); 5 Dec 2013 03:03:39 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 5 Dec 2013 03:03:39 -0000 Message-ID: <529FED0B.9030702@freebsd.org> Date: Wed, 04 Dec 2013 19:03:39 -0800 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r258894 - head/etc References: <201312032155.rB3LtwfQ008301@svn.freebsd.org> <201312040903.19767.jhb@freebsd.org> In-Reply-To: <201312040903.19767.jhb@freebsd.org> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SG-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PFLz4xlls7NNpJLjvH+FTVz2lyMNtudE/WkUh+oxgkdjdCKv0/Ed59TgCBbxRqNHlhz6P7TAzN7uFD/CATtsIMWNEDZYjBZBx7b9i/07pH+VTNJVLwsF7ru7OYOsWjSX/A= Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 03:06:18 -0000 On 12/04/13 06:03, John Baldwin wrote: > On Tuesday, December 03, 2013 4:55:58 pm Colin Percival wrote: >> The rc system aggressively caches the contents of /etc/rc.conf in order to >> improve boot performance; this produces arguably astonishing (non-)results >> if /etc/rc.conf is modified during the boot process. >> >> Since performance considerations make it infeasible to automatically detect >> if the cached /etc/rc.conf parameters should be invalidated, provide a >> mechanism for explicitly requesting that /etc/rc.conf be reloaded: Catch >> SIGALRM and reload /etc/rc.conf if it is received. > > Might have been worth mentioning explicitly why you didn't use SIGHUP in the > log message (found it in the thread on rc@). Yeah, I meant to include that but forgot when I actually sat down to write the commit message. > ALRM does seem like an odd choice compared to, say, USR1. SIGUSR1 / SIGUSR2 have always seemed more like "internal API" signals to me rather than something processes should send to each other. I have no idea why I feel this way, but that's why I avoided them. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 03:51:46 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 504BCDDB; Thu, 5 Dec 2013 03:51:46 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B56D11925; Thu, 5 Dec 2013 03:51:45 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rB53piCc057689 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 Dec 2013 19:51:44 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rB53piT6057687; Wed, 4 Dec 2013 19:51:44 -0800 (PST) (envelope-from jmg) Date: Wed, 4 Dec 2013 19:51:44 -0800 From: John-Mark Gurney To: Edward Tomasz Napiera?a Subject: Re: svn commit: r258909 - in head: sbin/mdconfig sys/dev/md sys/sys Message-ID: <20131205035144.GV55638@funkthat.com> References: <201312040738.rB47cOsV009261@svn.freebsd.org> <20131204075436.GA15763@dft-labs.eu> <61CD2D35-BEAD-4826-AA10-78F3EACEB2CC@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <61CD2D35-BEAD-4826-AA10-78F3EACEB2CC@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 04 Dec 2013 19:51:44 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Mateusz Guzik , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 03:51:46 -0000 Edward Tomasz Napiera?a wrote this message on Wed, Dec 04, 2013 at 10:43 +0100: > Wiadomo?? napisana przez Mateusz Guzik w dniu 4 gru 2013, o godz. 08:54: > > On Wed, Dec 04, 2013 at 07:38:24AM +0000, Edward Tomasz Napierala wrote: > >> Author: trasz > >> Date: Wed Dec 4 07:38:23 2013 > >> New Revision: 258909 > >> URL: http://svnweb.freebsd.org/changeset/base/258909 > >> > >> Log: > >> Add "null" backend to mdconfig(8). This does exactly what the name > >> suggests, and is somewhat useful for benchmarking. > >> > > > > There is already a 'geom zero' module which I believe provides > > equivalent functionality. > > Oh, the joys of software without manual pages. Still, I'm leaning toward There isn't even a gzero command either... One of the problems of something so simple.. > leaving this in, in case someone needs more than one instance, or a particular > size. gzero+gnop would get you the specific size you want... Though gnop doesn't provide a way to name the output different, so you'd be limited to only one instance... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 03:52:15 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA4E7F1B; Thu, 5 Dec 2013 03:52:15 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 76902192C; Thu, 5 Dec 2013 03:52:15 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rB53qESF057717 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 Dec 2013 19:52:14 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rB53qE9A057716; Wed, 4 Dec 2013 19:52:14 -0800 (PST) (envelope-from jmg) Date: Wed, 4 Dec 2013 19:52:14 -0800 From: John-Mark Gurney To: Edward Tomasz Napiera?a Subject: Re: svn commit: r258909 - in head: sbin/mdconfig sys/dev/md sys/sys Message-ID: <20131205035214.GW55638@funkthat.com> References: <201312040738.rB47cOsV009261@svn.freebsd.org> <20131204075436.GA15763@dft-labs.eu> <61CD2D35-BEAD-4826-AA10-78F3EACEB2CC@FreeBSD.org> <20131205035144.GV55638@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131205035144.GV55638@funkthat.com> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 04 Dec 2013 19:52:14 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Mateusz Guzik , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 03:52:15 -0000 John-Mark Gurney wrote this message on Wed, Dec 04, 2013 at 19:51 -0800: > Edward Tomasz Napiera?a wrote this message on Wed, Dec 04, 2013 at 10:43 +0100: > > Wiadomo?? napisana przez Mateusz Guzik w dniu 4 gru 2013, o godz. 08:54: > > > On Wed, Dec 04, 2013 at 07:38:24AM +0000, Edward Tomasz Napierala wrote: > > >> Author: trasz > > >> Date: Wed Dec 4 07:38:23 2013 > > >> New Revision: 258909 > > >> URL: http://svnweb.freebsd.org/changeset/base/258909 > > >> > > >> Log: > > >> Add "null" backend to mdconfig(8). This does exactly what the name > > >> suggests, and is somewhat useful for benchmarking. > > >> > > > > > > There is already a 'geom zero' module which I believe provides > > > equivalent functionality. > > > > Oh, the joys of software without manual pages. Still, I'm leaning toward > > There isn't even a gzero command either... One of the problems of > something so simple.. > > > leaving this in, in case someone needs more than one instance, or a particular > > size. > > gzero+gnop would get you the specific size you want... Though gnop doesn't > provide a way to name the output different, so you'd be limited to only > one instance... P.S. If someone writes one, I'll make sure it gets committed... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 05:15:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38AC674E; Thu, 5 Dec 2013 05:15:40 +0000 (UTC) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F021A1D91; Thu, 5 Dec 2013 05:15:39 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.17]) by ltcfislmsgpa02.fnfis.com (8.14.5/8.14.5) with ESMTP id rB55Fd4S007855 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 4 Dec 2013 23:15:39 -0600 Received: from LTCFISWMSGMB21.FNFIS.com ([169.254.1.7]) by LTCFISWMSGHT06.FNFIS.com ([10.132.206.17]) with mapi id 14.03.0158.001; Wed, 4 Dec 2013 23:15:37 -0600 From: "Teske, Devin" To: Baptiste Daroussin Subject: Re: svn commit: r258854 - head/usr.sbin/bsdconfig/share Thread-Topic: svn commit: r258854 - head/usr.sbin/bsdconfig/share Thread-Index: AQHO8XkI9VtZKccGz0+IdtjvOVlorw== Date: Thu, 5 Dec 2013 05:15:36 +0000 Message-ID: References: <201312021902.rB2J2x0o032333@svn.freebsd.org> <20131204091248.GQ27759@ithaqua.etoilebsd.net> In-Reply-To: <20131204091248.GQ27759@ithaqua.etoilebsd.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.132.253.120] Content-Type: text/plain; charset="us-ascii" Content-ID: <3659770730A13C4DBB305148CED56426@fisglobal.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.72, 1.0.14, 0.0.0000 definitions=2013-12-05_01:2013-12-05,2013-12-05,1970-01-01 signatures=0 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "Teske, Devin" , Glen Barber , "svn-src-head@freebsd.org" , Devin Teske X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Devin Teske List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 05:15:40 -0000 On Dec 4, 2013, at 1:12 AM, Baptiste Daroussin wrote: > On Mon, Dec 02, 2013 at 07:02:59PM +0000, Glen Barber wrote: >> Author: gjb >> Date: Mon Dec 2 19:02:58 2013 >> New Revision: 258854 >> URL: http://svnweb.freebsd.org/changeset/base/258854 >>=20 >> Log: >> Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since >> the format of 'pkg -vv' output has changed. >>=20 >> MFC after: 3 days >> Sponsored by: The FreeBSD Foundation >>=20 >> Modified: >> head/usr.sbin/bsdconfig/share/common.subr >>=20 >> Modified: head/usr.sbin/bsdconfig/share/common.subr >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/usr.sbin/bsdconfig/share/common.subr Mon Dec 2 18:47:57 2013 (= r258853) >> +++ head/usr.sbin/bsdconfig/share/common.subr Mon Dec 2 19:02:58 2013 (= r258854) >> @@ -65,7 +65,7 @@ export UNAME_R=3D"$(uname -r)" # Release L >> if [ ! "${PKG_ABI+set}" ]; then >> export PKG_ABI=3D"$( >> ASSUME_ALWAYS_YES=3D1 pkg -vv | >> - awk '$1=3D=3D"ABI:"{print $2;exit}' 2> /dev/null >> + awk '$1=3D=3D"ABI"{print $3;exit}' 2> /dev/null >> )" >> fi >=20 > You have: > "pkg config abi" now :) that should allow you do avoid the awk :) >=20 Excellent. When can (or should) I start coding for these enhancements? Is it OK to code for them in HEAD? Is there a limit to MFC for these features? --=20 Devin _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you. From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 06:14:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71264FC9; Thu, 5 Dec 2013 06:14:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 518421FF4; Thu, 5 Dec 2013 06:14:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB56E04w080976; Thu, 5 Dec 2013 06:14:00 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB56Dxve080968; Thu, 5 Dec 2013 06:13:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050613.rB56Dxve080968@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 06:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258959 - stable/10/sys/dev/bge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 06:14:00 -0000 Author: yongari Date: Thu Dec 5 06:13:59 2013 New Revision: 258959 URL: http://svnweb.freebsd.org/changeset/base/258959 Log: MFC r258830: Add support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787. PR: 184304 Approved by: re (rodrigc) Modified: stable/10/sys/dev/bge/if_bge.c stable/10/sys/dev/bge/if_bgereg.h Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/bge/if_bge.c ============================================================================== --- stable/10/sys/dev/bge/if_bge.c Thu Dec 5 05:59:09 2013 (r258958) +++ stable/10/sys/dev/bge/if_bge.c Thu Dec 5 06:13:59 2013 (r258959) @@ -220,11 +220,16 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM57760 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57761 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57762 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57764 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57765 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57766 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57767 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57780 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57781 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57782 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57785 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57786 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57787 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57788 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57790 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57791 }, @@ -2693,6 +2698,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM5725: case BCOM_DEVICEID_BCM5727: case BCOM_DEVICEID_BCM5762: + case BCOM_DEVICEID_BCM57764: + case BCOM_DEVICEID_BCM57767: + case BCOM_DEVICEID_BCM57787: id = pci_read_config(dev, BGE_PCI_GEN2_PRODID_ASICREV, 4); break; @@ -2701,7 +2709,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM57765: case BCOM_DEVICEID_BCM57766: case BCOM_DEVICEID_BCM57781: + case BCOM_DEVICEID_BCM57782: case BCOM_DEVICEID_BCM57785: + case BCOM_DEVICEID_BCM57786: case BCOM_DEVICEID_BCM57791: case BCOM_DEVICEID_BCM57795: id = pci_read_config(dev, Modified: stable/10/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/10/sys/dev/bge/if_bgereg.h Thu Dec 5 05:59:09 2013 (r258958) +++ stable/10/sys/dev/bge/if_bgereg.h Thu Dec 5 06:13:59 2013 (r258959) @@ -2503,11 +2503,16 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM57760 0x1690 #define BCOM_DEVICEID_BCM57761 0x16B0 #define BCOM_DEVICEID_BCM57762 0x1682 +#define BCOM_DEVICEID_BCM57764 0x1642 #define BCOM_DEVICEID_BCM57765 0x16B4 #define BCOM_DEVICEID_BCM57766 0x1686 +#define BCOM_DEVICEID_BCM57767 0x1683 #define BCOM_DEVICEID_BCM57780 0x1692 #define BCOM_DEVICEID_BCM57781 0x16B1 +#define BCOM_DEVICEID_BCM57782 0x16B7 #define BCOM_DEVICEID_BCM57785 0x16B5 +#define BCOM_DEVICEID_BCM57786 0x16B3 +#define BCOM_DEVICEID_BCM57787 0x1641 #define BCOM_DEVICEID_BCM57788 0x1691 #define BCOM_DEVICEID_BCM57790 0x1694 #define BCOM_DEVICEID_BCM57791 0x16B2 From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 07:16:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAAE0B24; Thu, 5 Dec 2013 07:16:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC5A612B5; Thu, 5 Dec 2013 07:16:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57GPCe001509; Thu, 5 Dec 2013 07:16:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57GPZ9001507; Thu, 5 Dec 2013 07:16:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050716.rB57GPZ9001507@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258960 - stable/9/sys/dev/ae X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:16:25 -0000 Author: yongari Date: Thu Dec 5 07:16:24 2013 New Revision: 258960 URL: http://svnweb.freebsd.org/changeset/base/258960 Log: MFC r253406: Avoid magic constant. No functional change. Modified: stable/9/sys/dev/ae/if_ae.c stable/9/sys/dev/ae/if_aereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ae/if_ae.c ============================================================================== --- stable/9/sys/dev/ae/if_ae.c Thu Dec 5 06:13:59 2013 (r258959) +++ stable/9/sys/dev/ae/if_ae.c Thu Dec 5 07:16:24 2013 (r258960) @@ -585,7 +585,7 @@ ae_init_locked(ae_softc_t *sc) val = eaddr[0] << 8 | eaddr[1]; AE_WRITE_4(sc, AE_EADDR1_REG, val); - bzero(sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + 120); + bzero(sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING); bzero(sc->txd_base, AE_TXD_BUFSIZE_DEFAULT); bzero(sc->txs_base, AE_TXS_COUNT_DEFAULT * 4); /* @@ -1145,8 +1145,8 @@ ae_alloc_rings(ae_softc_t *sc) */ error = bus_dma_tag_create(sc->dma_parent_tag, 128, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, - NULL, NULL, AE_RXD_COUNT_DEFAULT * 1536 + 120, 1, - AE_RXD_COUNT_DEFAULT * 1536 + 120, 0, NULL, NULL, + NULL, NULL, AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING, 1, + AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING, 0, NULL, NULL, &sc->dma_rxd_tag); if (error != 0) { device_printf(sc->dev, "could not creare TxS DMA tag.\n"); @@ -1205,15 +1205,15 @@ ae_alloc_rings(ae_softc_t *sc) return (error); } error = bus_dmamap_load(sc->dma_rxd_tag, sc->dma_rxd_map, - sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + 120, ae_dmamap_cb, - &busaddr, BUS_DMA_NOWAIT); + sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING, + ae_dmamap_cb, &busaddr, BUS_DMA_NOWAIT); if (error != 0 || busaddr == 0) { device_printf(sc->dev, "could not load DMA map for RxD ring.\n"); return (error); } - sc->dma_rxd_busaddr = busaddr + 120; - sc->rxd_base = (ae_rxd_t *)(sc->rxd_base_dma + 120); + sc->dma_rxd_busaddr = busaddr + AE_RXD_PADDING; + sc->rxd_base = (ae_rxd_t *)(sc->rxd_base_dma + AE_RXD_PADDING); return (0); } Modified: stable/9/sys/dev/ae/if_aereg.h ============================================================================== --- stable/9/sys/dev/ae/if_aereg.h Thu Dec 5 06:13:59 2013 (r258959) +++ stable/9/sys/dev/ae/if_aereg.h Thu Dec 5 07:16:24 2013 (r258960) @@ -104,6 +104,8 @@ #define AE_RXD_COUNT_MIN 16 #define AE_RXD_COUNT_MAX 512 #define AE_RXD_COUNT_DEFAULT 64 +/* Padding to align frames on a 128-byte boundary. */ +#define AE_RXD_PADDING 120 #define AE_TXD_BUFSIZE_MIN 4096 #define AE_TXD_BUFSIZE_MAX 65536 From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 07:18:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24D70C69; Thu, 5 Dec 2013 07:18:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 10A0E12C2; Thu, 5 Dec 2013 07:18:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57I6E3001811; Thu, 5 Dec 2013 07:18:06 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57I61H001810; Thu, 5 Dec 2013 07:18:06 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201312050718.rB57I61H001810@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 5 Dec 2013 07:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258961 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:18:07 -0000 Author: hselasky Date: Thu Dec 5 07:18:06 2013 New Revision: 258961 URL: http://svnweb.freebsd.org/changeset/base/258961 Log: Fix external compiler warning about write-only assigned variable. Modified: head/sys/dev/usb/usb_busdma.c Modified: head/sys/dev/usb/usb_busdma.c ============================================================================== --- head/sys/dev/usb/usb_busdma.c Thu Dec 5 07:16:24 2013 (r258960) +++ head/sys/dev/usb/usb_busdma.c Thu Dec 5 07:18:06 2013 (r258961) @@ -215,9 +215,7 @@ usbd_m_copy_in(struct usb_page_cache *ca struct mbuf *m, usb_size_t src_offset, usb_frlength_t src_len) { struct usb_m_copy_in_arg arg = {cache, dst_offset}; - int error; - - error = m_apply(m, src_offset, src_len, &usbd_m_copy_in_cb, &arg); + (void) m_apply(m, src_offset, src_len, &usbd_m_copy_in_cb, &arg); } #endif From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 07:18:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8579BDA3; Thu, 5 Dec 2013 07:18:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 660C912C6; Thu, 5 Dec 2013 07:18:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57IXpD001893; Thu, 5 Dec 2013 07:18:33 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57IXCm001891; Thu, 5 Dec 2013 07:18:33 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050718.rB57IXCm001891@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258962 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:18:33 -0000 Author: yongari Date: Thu Dec 5 07:18:32 2013 New Revision: 258962 URL: http://svnweb.freebsd.org/changeset/base/258962 Log: MFC r253408: Implement workaround for BCM5719/BCM5720 TX hang. The read DMA request logic operation is based on having sufficient available space in the transmit data buffer (TXMBUF) before a read DMA can be requested. There are four read DMA channels that use the TXMBUF, and the logic checks if the available free space in the TXMBUF is large enough for all the data in the four Send Buffers for which buffer descriptors have been fetched. The Enable_Request signal is asserted only if the free TXMBUF space is larger than the sum of the four DMA length registers. The power-up default value of BGE_RDMA_LSO_CRPTEN_CTRL register bit 25 (bit 21 on BCM5720) is zero, which selects the DMA length registers to connect to the input of the adder block. The DMA length registers are asynchronously reset following BCM5719/BCM5720 power-up, and due to the lack of synchronous deassertion of the length registers reset signal these resisters may contain uninitialized values following the reset deassertion. In the case of the failure the uninitialized DMA length register values added up to more than the TXMBUF size, which prevented the assertion of the Enable_Request signal and any subsequent read DMA to start. This lockup condition is the root cause of failing to generate any transmit traffic. To workaround the issue, select alternate output of multiplexers and transmit the first four Ethernet frames. This overwrites the DMA length registers with valid values. Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/bge/if_bgereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:18:06 2013 (r258961) +++ stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:18:32 2013 (r258962) @@ -2508,6 +2508,24 @@ bge_blockinit(struct bge_softc *sc) CSR_WRITE_4(sc, BGE_RDMA_MODE, val); DELAY(40); + if (sc->bge_flags & BGE_FLAG_RDMA_BUG) { + for (i = 0; i < BGE_NUM_RDMA_CHANNELS / 2; i++) { + val = CSR_READ_4(sc, BGE_RDMA_LENGTH + i * 4); + if ((val & 0xFFFF) > BGE_FRAMELEN) + break; + if (((val >> 16) & 0xFFFF) > BGE_FRAMELEN) + break; + } + if (i != BGE_NUM_RDMA_CHANNELS / 2) { + val = CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL); + if (sc->bge_asicrev == BGE_ASICREV_BCM5719) + val |= BGE_RDMA_TX_LENGTH_WA_5719; + else + val |= BGE_RDMA_TX_LENGTH_WA_5720; + CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL, val); + } + } + /* Turn on RX data completion state machine */ CSR_WRITE_4(sc, BGE_RDC_MODE, BGE_RDCMODE_ENABLE); @@ -3344,10 +3362,18 @@ bge_attach(device_t dev) sc->bge_flags |= BGE_FLAG_5717_PLUS | BGE_FLAG_5755_PLUS | BGE_FLAG_575X_PLUS | BGE_FLAG_5705_PLUS | BGE_FLAG_JUMBO | BGE_FLAG_JUMBO_FRAME; - if (sc->bge_asicrev == BGE_ASICREV_BCM5719 && - sc->bge_chipid == BGE_CHIPID_BCM5719_A0) { - /* Jumbo frame on BCM5719 A0 does not work. */ - sc->bge_flags &= ~BGE_FLAG_JUMBO; + if (sc->bge_asicrev == BGE_ASICREV_BCM5719 || + sc->bge_asicrev == BGE_ASICREV_BCM5720) { + /* + * Enable work around for DMA engine miscalculation + * of TXMBUF available space. + */ + sc->bge_flags |= BGE_FLAG_RDMA_BUG; + if (sc->bge_asicrev == BGE_ASICREV_BCM5719 && + sc->bge_chipid == BGE_CHIPID_BCM5719_A0) { + /* Jumbo frame on BCM5719 A0 does not work. */ + sc->bge_flags &= ~BGE_FLAG_JUMBO; + } } break; case BGE_ASICREV_BCM5755: @@ -4765,6 +4791,7 @@ bge_stats_update_regs(struct bge_softc * { struct ifnet *ifp; struct bge_mac_stats *stats; + uint32_t val; ifp = sc->bge_ifp; stats = &sc->bge_mac_stats; @@ -4865,6 +4892,24 @@ bge_stats_update_regs(struct bge_softc * ifp->if_collisions = (u_long)stats->etherStatsCollisions; ifp->if_ierrors = (u_long)(stats->NoMoreRxBDs + stats->InputDiscards + stats->InputErrors); + + if (sc->bge_flags & BGE_FLAG_RDMA_BUG) { + /* + * If controller transmitted more than BGE_NUM_RDMA_CHANNELS + * frames, it's safe to disable workaround for DMA engine's + * miscalculation of TXMBUF space. + */ + if (stats->ifHCOutUcastPkts + stats->ifHCOutMulticastPkts + + stats->ifHCOutBroadcastPkts > BGE_NUM_RDMA_CHANNELS) { + val = CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL); + if (sc->bge_asicrev == BGE_ASICREV_BCM5719) + val &= ~BGE_RDMA_TX_LENGTH_WA_5719; + else + val &= ~BGE_RDMA_TX_LENGTH_WA_5720; + CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL, val); + sc->bge_flags &= ~BGE_FLAG_RDMA_BUG; + } + } } static void Modified: stable/9/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:18:06 2013 (r258961) +++ stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:18:32 2013 (r258962) @@ -1586,6 +1586,8 @@ #define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_512 0x00020000 #define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_4K 0x00030000 #define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K 0x000C0000 +#define BGE_RDMA_TX_LENGTH_WA_5719 0x02000000 +#define BGE_RDMA_TX_LENGTH_WA_5720 0x00200000 /* BD Read DMA Mode register */ #define BGE_RDMA_BD_MODE 0x4A00 @@ -1603,6 +1605,9 @@ #define BGE_RDMA_NON_LSO_MODE_RESET 0x00000001 #define BGE_RDMA_NON_LSO_MODE_ENABLE 0x00000002 +#define BGE_RDMA_LENGTH 0x4BE0 +#define BGE_NUM_RDMA_CHANNELS 4 + /* * Write DMA control registers */ @@ -2982,6 +2987,7 @@ struct bge_softc { #define BGE_FLAG_SHORT_DMA_BUG 0x08000000 #define BGE_FLAG_4K_RDMA_BUG 0x10000000 #define BGE_FLAG_MBOX_REORDER 0x20000000 +#define BGE_FLAG_RDMA_BUG 0x40000000 uint32_t bge_mfw_flags; /* Management F/W flags */ #define BGE_MFW_ON_RXCPU 0x00000001 #define BGE_MFW_ON_APE 0x00000002 From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 07:20:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47397F08; Thu, 5 Dec 2013 07:20:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1994912FF; Thu, 5 Dec 2013 07: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 rB57K3Gp002207; Thu, 5 Dec 2013 07:20:03 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57K3mV002203; Thu, 5 Dec 2013 07:20:03 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050720.rB57K3mV002203@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258963 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:20:04 -0000 Author: yongari Date: Thu Dec 5 07:20:03 2013 New Revision: 258963 URL: http://svnweb.freebsd.org/changeset/base/258963 Log: MFC r253480: Setup the PCIE Fast Training Sequence (FTS) value to prevent transmit hangs for 57766 and non Ax versions of 57765. While here, correct definition of BGE_CHIPREV_57765_AX. Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/bge/if_bgereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:18:32 2013 (r258962) +++ stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:20:03 2013 (r258963) @@ -1796,6 +1796,20 @@ bge_chipinit(struct bge_softc *sc) pci_write_config(sc->bge_dev, BGE_PCI_MSI_DATA + 2, val, 2); } + if (sc->bge_asicrev == BGE_ASICREV_BCM57765 || + sc->bge_asicrev == BGE_ASICREV_BCM57766) { + /* + * For the 57766 and non Ax versions of 57765, bootcode + * needs to setup the PCIE Fast Training Sequence (FTS) + * value to prevent transmit hangs. + */ + if (sc->bge_chiprev != BGE_CHIPREV_57765_AX) { + CSR_WRITE_4(sc, BGE_CPMU_PADRNG_CTL, + CSR_READ_4(sc, BGE_CPMU_PADRNG_CTL) | + BGE_CPMU_PADRNG_CTL_RDIV2); + } + } + /* * Set up the PCI DMA control register. */ Modified: stable/9/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:18:32 2013 (r258962) +++ stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:20:03 2013 (r258963) @@ -378,6 +378,7 @@ #define BGE_CHIPREV_5717_AX 0x57170 #define BGE_CHIPREV_5717_BX 0x57171 #define BGE_CHIPREV_5761_AX 0x57611 +#define BGE_CHIPREV_57765_AX 0x577850 #define BGE_CHIPREV_5784_AX 0x57841 /* PCI DMA Read/Write Control register */ @@ -1289,6 +1290,7 @@ #define BGE_CPMU_MUTEX_REQ 0x365C #define BGE_CPMU_MUTEX_GNT 0x3660 #define BGE_CPMU_PHY_STRAP 0x3664 +#define BGE_CPMU_PADRNG_CTL 0x3668 /* Central Power Management Unit (CPMU) register */ #define BGE_CPMU_CTRL_LINK_IDLE_MODE 0x00000200 @@ -1328,6 +1330,9 @@ /* CPMU GPHY Strap register */ #define BGE_CPMU_PHY_STRAP_IS_SERDES 0x00000020 +/* CPMU Padring Control register */ +#define BGE_CPMU_PADRNG_CTL_RDIV2 0x00040000 + /* * Mbuf Cluster Free registers (has nothing to do with BSD mbufs) */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 07:27:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 328C32E8; Thu, 5 Dec 2013 07:27:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0421B138B; Thu, 5 Dec 2013 07:27:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57RmPq005185; Thu, 5 Dec 2013 07:27:48 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57Rmew005183; Thu, 5 Dec 2013 07:27:48 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050727.rB57Rmew005183@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258964 - stable/9/sys/dev/mii X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:27:49 -0000 Author: yongari Date: Thu Dec 5 07:27:48 2013 New Revision: 258964 URL: http://svnweb.freebsd.org/changeset/base/258964 Log: MFC r253481: Recognize BCM5725C PHY. Modified: stable/9/sys/dev/mii/brgphy.c stable/9/sys/dev/mii/miidevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mii/brgphy.c ============================================================================== --- stable/9/sys/dev/mii/brgphy.c Thu Dec 5 07:20:03 2013 (r258963) +++ stable/9/sys/dev/mii/brgphy.c Thu Dec 5 07:27:48 2013 (r258964) @@ -147,6 +147,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(BROADCOM3, BCM5720C), MII_PHY_DESC(BROADCOM3, BCM57765), MII_PHY_DESC(BROADCOM3, BCM57780), + MII_PHY_DESC(BROADCOM4, BCM5725C), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5906), MII_PHY_END }; @@ -932,6 +933,8 @@ brgphy_reset(struct mii_softc *sc) return; } break; + case MII_OUI_BROADCOM4: + return; } ifp = sc->mii_pdata->mii_ifp; Modified: stable/9/sys/dev/mii/miidevs ============================================================================== --- stable/9/sys/dev/mii/miidevs Thu Dec 5 07:20:03 2013 (r258963) +++ stable/9/sys/dev/mii/miidevs Thu Dec 5 07:27:48 2013 (r258964) @@ -52,6 +52,7 @@ oui AMD 0x00001a Advanced Micro Devic oui BROADCOM 0x001018 Broadcom Corporation oui BROADCOM2 0x000af7 Broadcom Corporation oui BROADCOM3 0x001be9 Broadcom Corporation +oui BROADCOM4 0x18c086 Broadcom Corporation oui CICADA 0x0003F1 Cicada Semiconductor oui DAVICOM 0x00606e Davicom Semiconductor oui ENABLESEMI 0x0010dd Enable Semiconductor @@ -184,6 +185,7 @@ model BROADCOM3 BCM5717C 0x0020 BCM5717C model BROADCOM3 BCM5719C 0x0022 BCM5719C 1000BASE-T media interface model BROADCOM3 BCM57765 0x0024 BCM57765 1000BASE-T media interface model BROADCOM3 BCM5720C 0x0036 BCM5720C 1000BASE-T media interface +model BROADCOM4 BCM5725C 0x0038 BCM5725C 1000BASE-T media interface model xxBROADCOM_ALT1 BCM5906 0x0004 BCM5906 10/100baseTX media interface /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 07:29:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED5D8438; Thu, 5 Dec 2013 07:29:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D85B31398; Thu, 5 Dec 2013 07:29:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57TPcU005421; Thu, 5 Dec 2013 07:29:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57TP48005419; Thu, 5 Dec 2013 07:29:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050729.rB57TP48005419@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258965 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:29:26 -0000 Author: yongari Date: Thu Dec 5 07:29:25 2013 New Revision: 258965 URL: http://svnweb.freebsd.org/changeset/base/258965 Log: MFC r253483: Add support for upcoming BCM5725 (ASIC 5762) controller. This is a new 1Gb server controller chip that will be going into production soon. BCM5725 combines MAC with triple-speed PHY, a Network Controller Sideband Interface (NC-SI) and on-chip memory buffer in a single device. BCM5725 has an Application Processing Engine (APE) that is capable of on-chip management and offloading features. BCM5725 supports high-precision clock, time stamp registers for receive/transmit packets and programmable trigger inputs and watchdog timeouts. These new features are not yet supported by bge(4). Many thanks to Broadcom for continuing to support FreeBSD! Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/bge/if_bgereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:27:48 2013 (r258964) +++ stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:29:25 2013 (r258965) @@ -176,6 +176,8 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM5721 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5722 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5723 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5725 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5727 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5750 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5750M }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5751 }, @@ -195,6 +197,7 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM5761E }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761S }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761SE }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5762 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5764 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5780 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5780S }, @@ -310,6 +313,7 @@ static const struct bge_revision { { BGE_CHIPID_BCM5722_A0, "BCM5722 A0" }, { BGE_CHIPID_BCM5761_A0, "BCM5761 A0" }, { BGE_CHIPID_BCM5761_A1, "BCM5761 A1" }, + { BGE_CHIPID_BCM5762_A0, "BCM5762 A0" }, { BGE_CHIPID_BCM5784_A0, "BCM5784 A0" }, { BGE_CHIPID_BCM5784_A1, "BCM5784 A1" }, /* 5754 and 5787 share the same ASIC ID */ @@ -354,6 +358,7 @@ static const struct bge_revision bge_maj { BGE_ASICREV_BCM5717, "unknown BCM5717" }, { BGE_ASICREV_BCM5719, "unknown BCM5719" }, { BGE_ASICREV_BCM5720, "unknown BCM5720" }, + { BGE_ASICREV_BCM5762, "unknown BCM5762" }, { 0, NULL } }; @@ -1885,8 +1890,9 @@ bge_chipinit(struct bge_softc *sc) * a status tag update and leave interrupts permanently * disabled. */ - if (sc->bge_asicrev != BGE_ASICREV_BCM5717 && - sc->bge_asicrev != BGE_ASICREV_BCM57765) + if (!BGE_IS_57765_PLUS(sc) && + sc->bge_asicrev != BGE_ASICREV_BCM5717 && + sc->bge_asicrev != BGE_ASICREV_BCM5762) dma_rw_ctl |= BGE_PCIDMARWCTL_TAGGED_STATUS_WA; } pci_write_config(sc->bge_dev, BGE_PCI_DMA_RW_CTL, dma_rw_ctl, 4); @@ -1895,7 +1901,8 @@ bge_chipinit(struct bge_softc *sc) * Set up general mode register. */ mode_ctl = bge_dma_swap_options(sc); - if (sc->bge_asicrev == BGE_ASICREV_BCM5720) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5720 || + sc->bge_asicrev == BGE_ASICREV_BCM5762) { /* Retain Host-2-BMC settings written by APE firmware. */ mode_ctl |= CSR_READ_4(sc, BGE_MODE_CTL) & (BGE_MODECTL_BYTESWAP_B2HRX_DATA | @@ -1953,7 +1960,7 @@ bge_blockinit(struct bge_softc *sc) struct bge_rcb *rcb; bus_size_t vrcb; bge_hostaddr taddr; - uint32_t dmactl, val; + uint32_t dmactl, rdmareg, val; int i, limit; /* @@ -2224,6 +2231,11 @@ bge_blockinit(struct bge_softc *sc) if (!BGE_IS_5705_PLUS(sc)) /* 5700 to 5704 had 16 send rings. */ limit = BGE_TX_RINGS_EXTSSRAM_MAX; + else if (BGE_IS_57765_PLUS(sc) || + sc->bge_asicrev == BGE_ASICREV_BCM5762) + limit = 2; + else if (BGE_IS_5717_PLUS(sc)) + limit = 4; else limit = 1; vrcb = BGE_MEMWIN_START + BGE_SEND_RING_RCB; @@ -2262,6 +2274,7 @@ bge_blockinit(struct bge_softc *sc) } else if (!BGE_IS_5705_PLUS(sc)) limit = BGE_RX_RINGS_MAX; else if (sc->bge_asicrev == BGE_ASICREV_BCM5755 || + sc->bge_asicrev == BGE_ASICREV_BCM5762 || BGE_IS_57765_PLUS(sc)) limit = 4; else @@ -2301,7 +2314,8 @@ bge_blockinit(struct bge_softc *sc) /* Set inter-packet gap */ val = 0x2620; - if (sc->bge_asicrev == BGE_ASICREV_BCM5720) + if (sc->bge_asicrev == BGE_ASICREV_BCM5720 || + sc->bge_asicrev == BGE_ASICREV_BCM5762) val |= CSR_READ_4(sc, BGE_TX_LENGTHS) & (BGE_TXLEN_JMB_FRM_LEN_MSK | BGE_TXLEN_CNT_DN_VAL_MSK); CSR_WRITE_4(sc, BGE_TX_LENGTHS, val); @@ -2465,7 +2479,8 @@ bge_blockinit(struct bge_softc *sc) val |= BGE_RDMAMODE_TSO6_ENABLE; } - if (sc->bge_asicrev == BGE_ASICREV_BCM5720) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5720 || + sc->bge_asicrev == BGE_ASICREV_BCM5762) { val |= CSR_READ_4(sc, BGE_RDMA_MODE) & BGE_RDMAMODE_H2BNC_VLAN_DET; /* @@ -2479,14 +2494,18 @@ bge_blockinit(struct bge_softc *sc) sc->bge_asicrev == BGE_ASICREV_BCM5784 || sc->bge_asicrev == BGE_ASICREV_BCM5785 || sc->bge_asicrev == BGE_ASICREV_BCM57780 || - BGE_IS_5717_PLUS(sc)) { - dmactl = CSR_READ_4(sc, BGE_RDMA_RSRVCTRL); + BGE_IS_5717_PLUS(sc) || BGE_IS_57765_PLUS(sc)) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5762) + rdmareg = BGE_RDMA_RSRVCTRL_REG2; + else + rdmareg = BGE_RDMA_RSRVCTRL; + dmactl = CSR_READ_4(sc, rdmareg); /* * Adjust tx margin to prevent TX data corruption and * fix internal FIFO overflow. */ - if (sc->bge_asicrev == BGE_ASICREV_BCM5719 && - sc->bge_chipid == BGE_CHIPID_BCM5719_A0) { + if (sc->bge_chipid == BGE_CHIPID_BCM5719_A0 || + sc->bge_asicrev == BGE_ASICREV_BCM5762) { dmactl &= ~(BGE_RDMA_RSRVCTRL_FIFO_LWM_MASK | BGE_RDMA_RSRVCTRL_FIFO_HWM_MASK | BGE_RDMA_RSRVCTRL_TXMRGN_MASK); @@ -2499,7 +2518,7 @@ bge_blockinit(struct bge_softc *sc) * The fix is to limit the number of RX BDs * the hardware would fetch at a fime. */ - CSR_WRITE_4(sc, BGE_RDMA_RSRVCTRL, dmactl | + CSR_WRITE_4(sc, rdmareg, dmactl | BGE_RDMA_RSRVCTRL_FIFO_OFLW_FIX); } @@ -2517,6 +2536,11 @@ bge_blockinit(struct bge_softc *sc) CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL) | BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_512 | BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K); + } else if (sc->bge_asicrev == BGE_ASICREV_BCM5762) { + CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL_REG2, + CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL_REG2) | + BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_4K | + BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K); } CSR_WRITE_4(sc, BGE_RDMA_MODE, val); @@ -2666,6 +2690,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM5718: case BCOM_DEVICEID_BCM5719: case BCOM_DEVICEID_BCM5720: + case BCOM_DEVICEID_BCM5725: + case BCOM_DEVICEID_BCM5727: + case BCOM_DEVICEID_BCM5762: id = pci_read_config(dev, BGE_PCI_GEN2_PRODID_ASICREV, 4); break; @@ -3366,6 +3393,7 @@ bge_attach(device_t dev) /* Save chipset family. */ switch (sc->bge_asicrev) { + case BGE_ASICREV_BCM5762: case BGE_ASICREV_BCM57765: case BGE_ASICREV_BCM57766: sc->bge_flags |= BGE_FLAG_57765_PLUS; @@ -3426,6 +3454,7 @@ bge_attach(device_t dev) case BGE_ASICREV_BCM5719: case BGE_ASICREV_BCM5720: case BGE_ASICREV_BCM5761: + case BGE_ASICREV_BCM5762: sc->bge_flags |= BGE_FLAG_APE; break; } @@ -5490,7 +5519,8 @@ bge_init_locked(struct bge_softc *sc) mode = CSR_READ_4(sc, BGE_TX_MODE); if (BGE_IS_5755_PLUS(sc) || sc->bge_asicrev == BGE_ASICREV_BCM5906) mode |= BGE_TXMODE_MBUF_LOCKUP_FIX; - if (sc->bge_asicrev == BGE_ASICREV_BCM5720) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5720 || + sc->bge_asicrev == BGE_ASICREV_BCM5762) { mode &= ~(BGE_TXMODE_JMB_FRM_LEN | BGE_TXMODE_CNT_DN_MODE); mode |= CSR_READ_4(sc, BGE_TX_MODE) & (BGE_TXMODE_JMB_FRM_LEN | BGE_TXMODE_CNT_DN_MODE); Modified: stable/9/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:27:48 2013 (r258964) +++ stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:29:25 2013 (r258965) @@ -331,6 +331,7 @@ #define BGE_CHIPID_BCM5717_B0 0x05717100 #define BGE_CHIPID_BCM5719_A0 0x05719000 #define BGE_CHIPID_BCM5720_A0 0x05720000 +#define BGE_CHIPID_BCM5762_A0 0x05762000 #define BGE_CHIPID_BCM57765_A0 0x57785000 #define BGE_CHIPID_BCM57765_B0 0x57785100 @@ -357,6 +358,7 @@ #define BGE_ASICREV_BCM5719 0x5719 #define BGE_ASICREV_BCM5720 0x5720 #define BGE_ASICREV_BCM5761 0x5761 +#define BGE_ASICREV_BCM5762 0x5762 #define BGE_ASICREV_BCM5784 0x5784 #define BGE_ASICREV_BCM5785 0x5785 #define BGE_ASICREV_BCM57765 0x57785 @@ -1544,6 +1546,8 @@ */ #define BGE_RDMA_MODE 0x4800 #define BGE_RDMA_STATUS 0x4804 +#define BGE_RDMA_RSRVCTRL_REG2 0x4890 +#define BGE_RDMA_LSO_CRPTEN_CTRL_REG2 0x48A0 #define BGE_RDMA_RSRVCTRL 0x4900 #define BGE_RDMA_LSO_CRPTEN_CTRL 0x4910 @@ -2454,6 +2458,8 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM5721 0x1659 #define BCOM_DEVICEID_BCM5722 0x165A #define BCOM_DEVICEID_BCM5723 0x165B +#define BCOM_DEVICEID_BCM5725 0x1643 +#define BCOM_DEVICEID_BCM5727 0x16F3 #define BCOM_DEVICEID_BCM5750 0x1676 #define BCOM_DEVICEID_BCM5750M 0x167C #define BCOM_DEVICEID_BCM5751 0x1677 @@ -2473,6 +2479,7 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM5761E 0x1680 #define BCOM_DEVICEID_BCM5761S 0x1688 #define BCOM_DEVICEID_BCM5761SE 0x1689 +#define BCOM_DEVICEID_BCM5762 0x1687 #define BCOM_DEVICEID_BCM5764 0x1684 #define BCOM_DEVICEID_BCM5780 0x166A #define BCOM_DEVICEID_BCM5780S 0x166B From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 07:31:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AF2B581; Thu, 5 Dec 2013 07:31:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D28E13D0; Thu, 5 Dec 2013 07:31:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57V2d7007809; Thu, 5 Dec 2013 07:31:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57V2i6007808; Thu, 5 Dec 2013 07:31:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050731.rB57V2i6007808@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258966 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:31:02 -0000 Author: yongari Date: Thu Dec 5 07:31:01 2013 New Revision: 258966 URL: http://svnweb.freebsd.org/changeset/base/258966 Log: MFC r253540: 5725 family of devices corrupts TSO packets when TSO DMA buffers cross into regions which are within MSS bytes of a 4GB boundary. If we encounter the condition, drop the packet. Modified: stable/9/sys/dev/bge/if_bge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:29:25 2013 (r258965) +++ stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:31:01 2013 (r258966) @@ -5282,17 +5282,51 @@ bge_encap(struct bge_softc *sc, struct m csum_flags |= BGE_TXBDFLAG_VLAN_TAG; vlan_tag = m->m_pkthdr.ether_vtag; } - for (i = 0; ; i++) { - d = &sc->bge_ldata.bge_tx_ring[idx]; - d->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[i].ds_addr); - d->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[i].ds_addr); - d->bge_len = segs[i].ds_len; - d->bge_flags = csum_flags; - d->bge_vlan_tag = vlan_tag; - d->bge_mss = mss; - if (i == nsegs - 1) - break; - BGE_INC(idx, BGE_TX_RING_CNT); + + if (sc->bge_asicrev == BGE_ASICREV_BCM5762 && + (m->m_pkthdr.csum_flags & CSUM_TSO) != 0) { + /* + * 5725 family of devices corrupts TSO packets when TSO DMA + * buffers cross into regions which are within MSS bytes of + * a 4GB boundary. If we encounter the condition, drop the + * packet. + */ + for (i = 0; ; i++) { + d = &sc->bge_ldata.bge_tx_ring[idx]; + d->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[i].ds_addr); + d->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[i].ds_addr); + d->bge_len = segs[i].ds_len; + if (d->bge_addr.bge_addr_lo + segs[i].ds_len + mss < + d->bge_addr.bge_addr_lo) + break; + d->bge_flags = csum_flags; + d->bge_vlan_tag = vlan_tag; + d->bge_mss = mss; + if (i == nsegs - 1) + break; + BGE_INC(idx, BGE_TX_RING_CNT); + } + if (i != nsegs - 1) { + bus_dmamap_sync(sc->bge_cdata.bge_tx_mtag, map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->bge_cdata.bge_tx_mtag, map); + m_freem(*m_head); + *m_head = NULL; + return (EIO); + } + } else { + for (i = 0; ; i++) { + d = &sc->bge_ldata.bge_tx_ring[idx]; + d->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[i].ds_addr); + d->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[i].ds_addr); + d->bge_len = segs[i].ds_len; + d->bge_flags = csum_flags; + d->bge_vlan_tag = vlan_tag; + d->bge_mss = mss; + if (i == nsegs - 1) + break; + BGE_INC(idx, BGE_TX_RING_CNT); + } } /* Mark the last segment as end of packet... */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 07:32:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4DB56FF; Thu, 5 Dec 2013 07:32:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C4C6613E6; Thu, 5 Dec 2013 07:32:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57WsZY008067; Thu, 5 Dec 2013 07:32:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57WsFF008065; Thu, 5 Dec 2013 07:32:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050732.rB57WsFF008065@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258967 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:32:55 -0000 Author: yongari Date: Thu Dec 5 07:32:54 2013 New Revision: 258967 URL: http://svnweb.freebsd.org/changeset/base/258967 Log: MFC r258830: Add support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787. PR: 184304 Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/bge/if_bgereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:31:01 2013 (r258966) +++ stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:32:54 2013 (r258967) @@ -220,11 +220,16 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM57760 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57761 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57762 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57764 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57765 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57766 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57767 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57780 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57781 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57782 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57785 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57786 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57787 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57788 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57790 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57791 }, @@ -2693,6 +2698,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM5725: case BCOM_DEVICEID_BCM5727: case BCOM_DEVICEID_BCM5762: + case BCOM_DEVICEID_BCM57764: + case BCOM_DEVICEID_BCM57767: + case BCOM_DEVICEID_BCM57787: id = pci_read_config(dev, BGE_PCI_GEN2_PRODID_ASICREV, 4); break; @@ -2701,7 +2709,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM57765: case BCOM_DEVICEID_BCM57766: case BCOM_DEVICEID_BCM57781: + case BCOM_DEVICEID_BCM57782: case BCOM_DEVICEID_BCM57785: + case BCOM_DEVICEID_BCM57786: case BCOM_DEVICEID_BCM57791: case BCOM_DEVICEID_BCM57795: id = pci_read_config(dev, Modified: stable/9/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:31:01 2013 (r258966) +++ stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:32:54 2013 (r258967) @@ -2502,11 +2502,16 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM57760 0x1690 #define BCOM_DEVICEID_BCM57761 0x16B0 #define BCOM_DEVICEID_BCM57762 0x1682 +#define BCOM_DEVICEID_BCM57764 0x1642 #define BCOM_DEVICEID_BCM57765 0x16B4 #define BCOM_DEVICEID_BCM57766 0x1686 +#define BCOM_DEVICEID_BCM57767 0x1683 #define BCOM_DEVICEID_BCM57780 0x1692 #define BCOM_DEVICEID_BCM57781 0x16B1 +#define BCOM_DEVICEID_BCM57782 0x16B7 #define BCOM_DEVICEID_BCM57785 0x16B5 +#define BCOM_DEVICEID_BCM57786 0x16B3 +#define BCOM_DEVICEID_BCM57787 0x1641 #define BCOM_DEVICEID_BCM57788 0x1691 #define BCOM_DEVICEID_BCM57790 0x1694 #define BCOM_DEVICEID_BCM57791 0x16B2 From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 09:53:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B7B7E59; Thu, 5 Dec 2013 09:53:56 +0000 (UTC) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5D51E58; Thu, 5 Dec 2013 09:53:56 +0000 (UTC) Received: from [2001:1b48:10b:cafe:225:64ff:febe:589f] (helo=viking.yzserv.com) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VoVd4-000AoX-QK; Thu, 05 Dec 2013 10:53:54 +0100 Message-ID: <52A04D2E.2040705@FreeBSD.org> Date: Thu, 05 Dec 2013 10:53:50 +0100 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r258930 - head/sys/dev/drm2 References: <201312041904.rB4J4vbM043709@svn.freebsd.org> <201312041518.33731.jhb@freebsd.org> In-Reply-To: <201312041518.33731.jhb@freebsd.org> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kk4HD96FtNUxwIvPoDbSUiuUBNa6rwJXr" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 09:53:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kk4HD96FtNUxwIvPoDbSUiuUBNa6rwJXr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04.12.2013 21:18, John Baldwin wrote: > On Wednesday, December 04, 2013 2:04:57 pm Jean-Sebastien Pedron wrote:= >> Author: dumbbell >> Date: Wed Dec 4 19:04:56 2013 >> New Revision: 258930 >> URL: http://svnweb.freebsd.org/changeset/base/258930 >> >> Log: >> drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge >> =20 >> Before this fix, capabilities were read from vgapci and were incorre= ct. >=20 > Eh, vgapci is the right place to read this. The LINK_CAP here is telli= ng > you the width of the slot you are plugged into, not the width of the ca= rd > that is plugged into the slot. I'm sorry, my knowledge of PCI is very limited (still learning) and I don't understand your comment. Could you please expand on it? I believe this code has the correct result (eg, same result as Linux 3.8 on the same computer), but maybe I'm doing it wrong and I was just lucky.= --=20 Jean-S=C3=A9bastien P=C3=A9dron --kk4HD96FtNUxwIvPoDbSUiuUBNa6rwJXr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKgTTIACgkQa+xGJsFYOlN9PACfdls9nEejg1vd9fEJ1Oy1r3cd mSEAoMCCXW4WL7c6LYQ8R//jCgUO+nIt =aSwE -----END PGP SIGNATURE----- --kk4HD96FtNUxwIvPoDbSUiuUBNa6rwJXr-- From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 11:29:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B40B1835; Thu, 5 Dec 2013 11:29:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93EF91434; Thu, 5 Dec 2013 11:29:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5BT7wf087481; Thu, 5 Dec 2013 11:29:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5BT7kK087480; Thu, 5 Dec 2013 11:29:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201312051129.rB5BT7kK087480@svn.freebsd.org> From: Andriy Gapon Date: Thu, 5 Dec 2013 11:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r258972 - vendor/illumos/dist/cmd/zstreamdump X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 11:29:07 -0000 Author: avg Date: Thu Dec 5 11:29:07 2013 New Revision: 258972 URL: http://svnweb.freebsd.org/changeset/base/258972 Log: 4373 add block contents print to zstreamdump illumos/illumos-gate@994fb6b8a9d07a8021d77d79f46e30637bca3ad3 Modified: vendor/illumos/dist/cmd/zstreamdump/zstreamdump.c Modified: vendor/illumos/dist/cmd/zstreamdump/zstreamdump.c ============================================================================== --- vendor/illumos/dist/cmd/zstreamdump/zstreamdump.c Thu Dec 5 10:36:00 2013 (r258971) +++ vendor/illumos/dist/cmd/zstreamdump/zstreamdump.c Thu Dec 5 11:29:07 2013 (r258972) @@ -24,6 +24,11 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2013 by Delphix. All rights reserved. + */ + +#include #include #include #include @@ -34,6 +39,16 @@ #include #include +/* + * If dump mode is enabled, the number of bytes to print per line + */ +#define BYTES_PER_LINE 16 +/* + * If dump mode is enabled, the number of bytes to group together, separated + * by newlines or spaces + */ +#define DUMP_GROUPING 4 + uint64_t drr_record_count[DRR_NUMTYPES]; uint64_t total_write_size = 0; uint64_t total_stream_len = 0; @@ -45,9 +60,11 @@ boolean_t do_cksum = B_TRUE; static void usage(void) { - (void) fprintf(stderr, "usage: zstreamdump [-v] [-C] < file\n"); + (void) fprintf(stderr, "usage: zstreamdump [-v] [-C] [-d] < file\n"); (void) fprintf(stderr, "\t -v -- verbose\n"); (void) fprintf(stderr, "\t -C -- suppress checksum verification\n"); + (void) fprintf(stderr, "\t -d -- dump contents of blocks modified, " + "implies verbose\n"); exit(1); } @@ -75,6 +92,70 @@ ssread(void *buf, size_t len, zio_cksum_ return (outlen); } +/* + * Print part of a block in ASCII characters + */ +static void +print_ascii_block(char *subbuf, int length) +{ + int i; + + for (i = 0; i < length; i++) { + char char_print = isprint(subbuf[i]) ? subbuf[i] : '.'; + if (i != 0 && i % DUMP_GROUPING == 0) { + (void) printf(" "); + } + (void) printf("%c", char_print); + } + (void) printf("\n"); +} + +/* + * print_block - Dump the contents of a modified block to STDOUT + * + * Assume that buf has capacity evenly divisible by BYTES_PER_LINE + */ +static void +print_block(char *buf, int length) +{ + int i; + /* + * Start printing ASCII characters at a constant offset, after + * the hex prints. Leave 3 characters per byte on a line (2 digit + * hex number plus 1 space) plus spaces between characters and + * groupings + */ + int ascii_start = BYTES_PER_LINE * 3 + + BYTES_PER_LINE / DUMP_GROUPING + 2; + + for (i = 0; i < length; i += BYTES_PER_LINE) { + int j; + int this_line_length = MIN(BYTES_PER_LINE, length - i); + int print_offset = 0; + + for (j = 0; j < this_line_length; j++) { + int buf_offset = i + j; + + /* + * Separate every DUMP_GROUPING bytes by a space. + */ + if (buf_offset % DUMP_GROUPING == 0) { + print_offset += printf(" "); + } + + /* + * Print the two-digit hex value for this byte. + */ + unsigned char hex_print = buf[buf_offset]; + print_offset += printf("%02x ", hex_print); + } + + (void) printf("%*s", ascii_start - print_offset, " "); + + print_ascii_block(buf + i, this_line_length); + } +} + int main(int argc, char *argv[]) { @@ -92,11 +173,17 @@ main(int argc, char *argv[]) char c; boolean_t verbose = B_FALSE; boolean_t first = B_TRUE; + /* + * dump flag controls whether the contents of any modified data blocks + * are printed to the console during processing of the stream. Warning: + * for large streams, this can obviously lead to massive prints. + */ + boolean_t dump = B_FALSE; int err; zio_cksum_t zc = { 0 }; zio_cksum_t pcksum = { 0 }; - while ((c = getopt(argc, argv, ":vC")) != -1) { + while ((c = getopt(argc, argv, ":vCd")) != -1) { switch (c) { case 'C': do_cksum = B_FALSE; @@ -104,6 +191,10 @@ main(int argc, char *argv[]) case 'v': verbose = B_TRUE; break; + case 'd': + dump = B_TRUE; + verbose = B_TRUE; + break; case ':': (void) fprintf(stderr, "missing argument for '%c' option\n", optopt); @@ -128,6 +219,10 @@ main(int argc, char *argv[]) pcksum = zc; while (ssread(drr, sizeof (dmu_replay_record_t), &zc)) { + /* + * If this is the first DMU record being processed, check for + * the magic bytes and figure out the endian-ness based on them. + */ if (first) { if (drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) { do_byteswap = B_TRUE; @@ -209,7 +304,7 @@ main(int argc, char *argv[]) nvlist_t *nv; int sz = drr->drr_payloadlen; - if (sz > 1<<20) { + if (sz > INITIAL_BUFLEN) { free(buf); buf = malloc(sz); } @@ -283,6 +378,10 @@ main(int argc, char *argv[]) if (drro->drr_bonuslen > 0) { (void) ssread(buf, P2ROUNDUP(drro->drr_bonuslen, 8), &zc); + if (dump) { + print_block(buf, + P2ROUNDUP(drro->drr_bonuslen, 8)); + } } break; @@ -312,6 +411,10 @@ main(int argc, char *argv[]) drrw->drr_key.ddk_prop = BSWAP_64(drrw->drr_key.ddk_prop); } + /* + * If this is verbose and/or dump output, + * print info on the modified block + */ if (verbose) { (void) printf("WRITE object = %llu type = %u " "checksum type = %u\n" @@ -324,7 +427,16 @@ main(int argc, char *argv[]) (u_longlong_t)drrw->drr_length, (u_longlong_t)drrw->drr_key.ddk_prop); } + /* + * Read the contents of the block in from STDIN to buf + */ (void) ssread(buf, drrw->drr_length, &zc); + /* + * If in dump mode + */ + if (dump) { + print_block(buf, drrw->drr_length); + } total_write_size += drrw->drr_length; break; @@ -390,6 +502,9 @@ main(int argc, char *argv[]) drrs->drr_length); } (void) ssread(buf, drrs->drr_length, &zc); + if (dump) { + print_block(buf, drrs->drr_length); + } break; } pcksum = zc; From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 15:15:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3B288AB; Thu, 5 Dec 2013 15:15:01 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A13A1355; Thu, 5 Dec 2013 15:15:01 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 03D10B999; Thu, 5 Dec 2013 10:14:58 -0500 (EST) From: John Baldwin To: "=?iso-8859-15?q?Jean-S=E9bastien?= =?iso-8859-15?q?_P=E9dron?=" Subject: Re: svn commit: r258930 - head/sys/dev/drm2 Date: Thu, 5 Dec 2013 10:05:22 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201312041904.rB4J4vbM043709@svn.freebsd.org> <201312041518.33731.jhb@freebsd.org> <52A04D2E.2040705@FreeBSD.org> In-Reply-To: <52A04D2E.2040705@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201312051005.23197.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 05 Dec 2013 10:14:58 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 15:15:01 -0000 On Thursday, December 05, 2013 4:53:50 am Jean-S=E9bastien P=E9dron wrote: > On 04.12.2013 21:18, John Baldwin wrote: > > On Wednesday, December 04, 2013 2:04:57 pm Jean-Sebastien Pedron wrote: > >> Author: dumbbell > >> Date: Wed Dec 4 19:04:56 2013 > >> New Revision: 258930 > >> URL: http://svnweb.freebsd.org/changeset/base/258930 > >> > >> Log: > >> drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge > >> =20 > >> Before this fix, capabilities were read from vgapci and were incorre= ct. > >=20 > > Eh, vgapci is the right place to read this. The LINK_CAP here is telli= ng > > you the width of the slot you are plugged into, not the width of the ca= rd > > that is plugged into the slot. >=20 > I'm sorry, my knowledge of PCI is very limited (still learning) and I > don't understand your comment. Could you please expand on it? >=20 > I believe this code has the correct result (eg, same result as Linux 3.8 > on the same computer), but maybe I'm doing it wrong and I was just lucky. (First off, I thought you were reading link width, but you're not, you are reading the speed of an individual lane.) Each end of a PCI express link has these config registers. The link capability register contains the maximum supported link speed of that "side" of the link. So the 'pcib' device is the "top" of the link (i.e. the physical slot you plug a card into). When you ask it for its capable link speed, you are getting the maximum speed the slot supports. When you ask vgapci0 for its maximum capable link width, you are getting the maximum speed the card itself supports. So, for example, if you plug a 2.5 GT/s PCI-e card into a 5.0 GT/s slot, the card ('vgapci0') would report= a maximum speed of 2.5, while the slot ('pcibX') would report a maximum speed of 5.0. In addition, each PCI-e device includes a link status register that contains the current active link speed. You can see these register values using 'pciconf -lc'. For example, on my desktop at home, the parent device of vgapci0 (an nvidia card), is pcib1: pcib0 pci0 hostb0 pcib1 pci1 vgapci0 vgapm0 nvidia0 In pciconf I see this output for these devices: pcib1@pci0:0:1:0: class=3D0x060400 card=3D0x77511462 chip=3D0x0101808= 6 rev=3D0x09 hdr=3D0x01 cap 0d[88] =3D PCI Bridge card=3D0x77511462 cap 01[80] =3D powerspec 3 supports D0 D3 current D0 cap 05[90] =3D MSI supports 1 message=20 cap 10[a0] =3D PCI-Express 2 root port slot max data 128(128) link x16(= x16) speed 2.5(5.0) ASPM disabled(L0s/L1) ecap 0002[100] =3D VC 1 max VC0 ecap 0005[140] =3D Root Complex Link Declaration 1 =2E.. vgapci0@pci0:1:0:0: class=3D0x030000 card=3D0x15263842 chip=3D0x104010d= e rev=3D0xa1 hdr=3D0x00 cap 01[60] =3D powerspec 3 supports D0 D3 current D0 cap 05[68] =3D MSI supports 1 message, 64 bit=20 cap 10[78] =3D PCI-Express 2 endpoint max data 128(128) link x16(x16) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 09[b4] =3D vendor (length 20) ecap 0002[100] =3D VC 1 max VC0 ecap 0004[128] =3D Power Budgeting 1 ecap 000b[600] =3D Vendor 1 ID 1 So in this case the "slot" supports a maximum link speed of 5.0 GT/s (it is= a gen3 slot on a SandyBridge motherboard), but the nvidia card is only a gen2 device that supports 2.5GT/s, so the entire link is running at 2.5 GT/s (in the 'speed A(B)' text above, 'B' is the maximum link speed from LINK_CAP and 'A' is the actual link speed from LINK_STA). Can you provide pciconf -lc output from your machine and tell me what you t= hink the function should be returning (i.e. are you trying to determine the speed of the slot, or the speed of the card?) =2D-=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 16:14:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D219E42; Thu, 5 Dec 2013 16:14:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 28E3417DF; Thu, 5 Dec 2013 16:14: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 rB5GEvsB086408; Thu, 5 Dec 2013 16:14:57 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5GEvQv086406; Thu, 5 Dec 2013 16:14:57 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312051614.rB5GEvQv086406@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 5 Dec 2013 16:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258989 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 16:14:57 -0000 Author: trasz Date: Thu Dec 5 16:14:56 2013 New Revision: 258989 URL: http://svnweb.freebsd.org/changeset/base/258989 Log: MFC r258841: Fix typos. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/usr.sbin/ctld/ (props changed) Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Thu Dec 5 15:28:27 2013 (r258988) +++ stable/10/usr.sbin/ctld/parse.y Thu Dec 5 16:14:56 2013 (r258989) @@ -300,7 +300,7 @@ auth_group_statement: AUTH_GROUP STR log_warnx("auth-group for target \"%s\" " "specified more than once", target->t_iqn); else - log_warnx("cannot mix auth-grup with explicit " + log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", target->t_iqn); return (1); @@ -321,7 +321,7 @@ chap_statement: CHAP STR STR if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-grup with explicit " + log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", target->t_iqn); free($2); @@ -351,7 +351,7 @@ chap_mutual_statement: CHAP_MUTUAL STR S if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-grup with explicit " + log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", target->t_iqn); free($2); From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 16:29:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89D6F247; Thu, 5 Dec 2013 16:29:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7578018C7; Thu, 5 Dec 2013 16:29:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5GTNIx019726; Thu, 5 Dec 2013 16:29:23 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5GTNlg019723; Thu, 5 Dec 2013 16:29:23 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312051629.rB5GTNlg019723@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 5 Dec 2013 16:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258990 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 16:29:23 -0000 Author: trasz Date: Thu Dec 5 16:29:22 2013 New Revision: 258990 URL: http://svnweb.freebsd.org/changeset/base/258990 Log: MFC r258842: Grammar fix. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctl.conf.5 Directory Properties: stable/10/usr.sbin/ctld/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Thu Dec 5 16:14:56 2013 (r258989) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Thu Dec 5 16:29:22 2013 (r258990) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 2013 +.Dd December 2, 2013 .Dt CTL.CONF 5 .Os .Sh NAME @@ -141,7 +141,7 @@ Note that targets must use either auth-g or chap-mutual clauses; it's a configuration error to mix them in one target. .It Ic chap-mutual Ao Ar user Ac Ao Ar secret Ac Ao Ar mutualuser Ac Aq Ar mutualsecret Specifies mutual CHAP authentication credentials. -Note that targets must use either auth-group, chap, +Note that targets must use either auth-group, chap, or chap-mutual clauses; it's a configuration error to mix them in one target. .It Ic portal-group Aq Ar name Assigns previously defined portal group to that target. From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 17:57:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EA3FA70; Thu, 5 Dec 2013 17:57:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A2B91FC6; Thu, 5 Dec 2013 17:57:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5HvqF2018544; Thu, 5 Dec 2013 17:57:52 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5Hvqu2018543; Thu, 5 Dec 2013 17:57:52 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201312051757.rB5Hvqu2018543@svn.freebsd.org> From: Sean Bruno Date: Thu, 5 Dec 2013 17:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258994 - stable/10/sys/x86/cpufreq X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 17:57:52 -0000 Author: sbruno Date: Thu Dec 5 17:57:51 2013 New Revision: 258994 URL: http://svnweb.freebsd.org/changeset/base/258994 Log: MFC r257769 to stable/10 Fix powerd/states on AMD cpus. Resolves issues with system reporting: hwpstate0: set freq failed, err 6 Tested on FX-8150 and others. PR: kern/167018 Submitted by: avg@ Approved by: re (gjb) Modified: stable/10/sys/x86/cpufreq/hwpstate.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/x86/cpufreq/hwpstate.c ============================================================================== --- stable/10/sys/x86/cpufreq/hwpstate.c Thu Dec 5 17:50:18 2013 (r258993) +++ stable/10/sys/x86/cpufreq/hwpstate.c Thu Dec 5 17:57:51 2013 (r258994) @@ -184,16 +184,21 @@ hwpstate_goto_pstate(device_t dev, int p id, PCPU_GET(cpuid)); /* Go To Px-state */ wrmsr(MSR_AMD_10H_11H_CONTROL, id); + } + CPU_FOREACH(i) { + /* Bind to each cpu. */ + thread_lock(curthread); + sched_bind(curthread, i); + thread_unlock(curthread); /* wait loop (100*100 usec is enough ?) */ for(j = 0; j < 100; j++){ + /* get the result. not assure msr=id */ msr = rdmsr(MSR_AMD_10H_11H_STATUS); if(msr == id){ break; } DELAY(100); } - /* get the result. not assure msr=id */ - msr = rdmsr(MSR_AMD_10H_11H_STATUS); HWPSTATE_DEBUG(dev, "result P%d-state on cpu%d\n", (int)msr, PCPU_GET(cpuid)); if (msr != id) { From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 18:06:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BD9CE06; Thu, 5 Dec 2013 18:06:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E14B1064; Thu, 5 Dec 2013 18:06:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5I6Cqd039087; Thu, 5 Dec 2013 18:06:12 GMT (envelope-from royger@svn.freebsd.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5I6C8E039086; Thu, 5 Dec 2013 18:06:12 GMT (envelope-from royger@svn.freebsd.org) Message-Id: <201312051806.rB5I6C8E039086@svn.freebsd.org> From: Roger Pau Monné Date: Thu, 5 Dec 2013 18:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258995 - stable/10/sys/dev/xen/control X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 18:06:13 -0000 Author: royger Date: Thu Dec 5 18:06:12 2013 New Revision: 258995 URL: http://svnweb.freebsd.org/changeset/base/258995 Log: MFC 257876: On XenServer the "halt" message is used instead of "poweroff", which makes FreeBSD halt but not poweroff (as expected when issuing a shutdown from the VM manager). Fix this by using the same handler for both "halt" and "poweroff". NB: The "halt" signal seems to be used on XenServer only. The OSS Xen toolstack (xl) uses "poweroff" instead. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: gibbs (mentor) Approved by: re (gjb) Modified: stable/10/sys/dev/xen/control/control.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/xen/control/control.c ============================================================================== --- stable/10/sys/dev/xen/control/control.c Thu Dec 5 17:57:51 2013 (r258994) +++ stable/10/sys/dev/xen/control/control.c Thu Dec 5 18:06:12 2013 (r258995) @@ -158,7 +158,6 @@ static xctrl_shutdown_handler_t xctrl_po static xctrl_shutdown_handler_t xctrl_reboot; static xctrl_shutdown_handler_t xctrl_suspend; static xctrl_shutdown_handler_t xctrl_crash; -static xctrl_shutdown_handler_t xctrl_halt; /*-------------------------- Private Data Structures -------------------------*/ /** Element type for lookup table of event name to handler. */ @@ -173,7 +172,7 @@ static const struct xctrl_shutdown_reaso { "reboot", xctrl_reboot }, { "suspend", xctrl_suspend }, { "crash", xctrl_crash }, - { "halt", xctrl_halt }, + { "halt", xctrl_poweroff }, }; struct xctrl_softc { @@ -441,12 +440,6 @@ xctrl_crash() panic("Xen directed crash"); } -static void -xctrl_halt() -{ - shutdown_nice(RB_HALT); -} - /*------------------------------ Event Reception -----------------------------*/ static void xctrl_on_watch_event(struct xs_watch *watch, const char **vec, unsigned int len) From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 18:08:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69963FD6; Thu, 5 Dec 2013 18:08:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6901079; Thu, 5 Dec 2013 18:08:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5I86fE043442; Thu, 5 Dec 2013 18:08:06 GMT (envelope-from royger@svn.freebsd.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5I85vv043432; Thu, 5 Dec 2013 18:08:05 GMT (envelope-from royger@svn.freebsd.org) Message-Id: <201312051808.rB5I85vv043432@svn.freebsd.org> From: Roger Pau Monné Date: Thu, 5 Dec 2013 18:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258996 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 18:08:06 -0000 Author: royger Date: Thu Dec 5 18:08:05 2013 New Revision: 258996 URL: http://svnweb.freebsd.org/changeset/base/258996 Log: MFC 258176: Fix accounting for hw.realmem on the i386 and amd64 platforms. sys/i386/i386/machdep.c: sys/amd64/amd64/machdep.c: The value reported by FreeBSD as "real memory" when booting doesn't match what is later reported by sysctl as hw.realmem. This is due to the fact that the value printed during the boot process is fetched from smbios data (when possible), and accounts for holes in physical memory. On the other hand, the value of hw.realmem is unconditionally set to be one larger than the highest page of the physical address space. Fix this by setting hw.realmem to the same value printed during boot, this makes hw.realmem honour it's name and account properly for physical memory present in the system. Submitted by: Roger Pau Monné Reviewed by: gibbs Approved by: gibbs (mentor) Approved by: re (gjb) Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/i386/i386/machdep.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Thu Dec 5 18:06:12 2013 (r258995) +++ stable/10/sys/amd64/amd64/machdep.c Thu Dec 5 18:08:05 2013 (r258996) @@ -256,7 +256,6 @@ cpu_startup(dummy) #ifdef PERFMON perfmon_init(); #endif - realmem = Maxmem; /* * Display physical memory if SMBIOS reports reasonable amount. @@ -270,6 +269,7 @@ cpu_startup(dummy) if (memsize < ptoa((uintmax_t)cnt.v_free_count)) memsize = ptoa((uintmax_t)Maxmem); printf("real memory = %ju (%ju MB)\n", memsize, memsize >> 20); + realmem = atop(memsize); /* * Display any holes after the first chunk of extended memory. Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Thu Dec 5 18:06:12 2013 (r258995) +++ stable/10/sys/i386/i386/machdep.c Thu Dec 5 18:08:05 2013 (r258996) @@ -294,7 +294,6 @@ cpu_startup(dummy) #ifdef PERFMON perfmon_init(); #endif - realmem = Maxmem; /* * Display physical memory if SMBIOS reports reasonable amount. @@ -308,6 +307,7 @@ cpu_startup(dummy) if (memsize < ptoa((uintmax_t)cnt.v_free_count)) memsize = ptoa((uintmax_t)Maxmem); printf("real memory = %ju (%ju MB)\n", memsize, memsize >> 20); + realmem = atop(memsize); /* * Display any holes after the first chunk of extended memory. From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 18:09:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D00121BA; Thu, 5 Dec 2013 18:09:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB41E1086; Thu, 5 Dec 2013 18:09:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5I9mMN047316; Thu, 5 Dec 2013 18:09:48 GMT (envelope-from royger@svn.freebsd.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5I9mNU047314; Thu, 5 Dec 2013 18:09:48 GMT (envelope-from royger@svn.freebsd.org) Message-Id: <201312051809.rB5I9mNU047314@svn.freebsd.org> From: Roger Pau Monné Date: Thu, 5 Dec 2013 18:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258997 - stable/10/sys/dev/xen/balloon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 18:09:49 -0000 Author: royger Date: Thu Dec 5 18:09:48 2013 New Revision: 258997 URL: http://svnweb.freebsd.org/changeset/base/258997 Log: MFC 258178: Improve robustness of the Xen balloon driver. sys/dev/xen/balloon/balloon.c: Remove unused and commented out code. Fix deadlock caused by performing a sleepable malloc while holding the balloon mutex. Perform proper accounting of the memory used by the domain. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: gibbs (mentor) Approved by: re (gjb) Modified: stable/10/sys/dev/xen/balloon/balloon.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/xen/balloon/balloon.c ============================================================================== --- stable/10/sys/dev/xen/balloon/balloon.c Thu Dec 5 18:08:05 2013 (r258996) +++ stable/10/sys/dev/xen/balloon/balloon.c Thu Dec 5 18:09:48 2013 (r258997) @@ -52,18 +52,13 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_BALLOON, "Balloon", "Xen Balloon Driver"); -struct mtx balloon_mutex; +/* Convert from KB (as fetched from xenstore) to number of PAGES */ +#define KB_TO_PAGE_SHIFT (PAGE_SHIFT - 10) -/* - * Protects atomic reservation decrease/increase against concurrent increases. - * Also protects non-atomic updates of current_pages and driver_pages, and - * balloon lists. - */ -struct mtx balloon_lock; +struct mtx balloon_mutex; /* We increase/decrease in batches which fit in a page */ static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)]; -#define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0])) struct balloon_stats { /* We aim for 'current allocation' == 'target allocation'. */ @@ -116,15 +111,21 @@ static void balloon_process(void *unused printk(KERN_WARNING "xen_mem: " fmt, ##args) /* balloon_append: add the given page to the balloon. */ -static void +static int balloon_append(vm_page_t page) { struct balloon_entry *entry; - entry = malloc(sizeof(struct balloon_entry), M_BALLOON, M_WAITOK); + mtx_assert(&balloon_mutex, MA_OWNED); + + entry = malloc(sizeof(struct balloon_entry), M_BALLOON, M_NOWAIT); + if (!entry) + return (ENOMEM); entry->page = page; STAILQ_INSERT_HEAD(&ballooned_pages, entry, list); bs.balloon_low++; + + return (0); } /* balloon_retrieve: rescue a page from the balloon, if it is not empty. */ @@ -134,8 +135,10 @@ balloon_retrieve(void) vm_page_t page; struct balloon_entry *entry; + mtx_assert(&balloon_mutex, MA_OWNED); + if (STAILQ_EMPTY(&ballooned_pages)) - return NULL; + return (NULL); entry = STAILQ_FIRST(&ballooned_pages); STAILQ_REMOVE_HEAD(&ballooned_pages, list); @@ -145,7 +148,7 @@ balloon_retrieve(void) bs.balloon_low--; - return page; + return (page); } static unsigned long @@ -154,21 +157,22 @@ current_target(void) unsigned long target = min(bs.target_pages, bs.hard_limit); if (target > (bs.current_pages + bs.balloon_low + bs.balloon_high)) target = bs.current_pages + bs.balloon_low + bs.balloon_high; - return target; + return (target); } static unsigned long minimum_target(void) { #ifdef XENHVM -#define max_pfn physmem +#define max_pfn realmem #else #define max_pfn HYPERVISOR_shared_info->arch.max_pfn #endif unsigned long min_pages, curr_pages = current_target(); #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) - /* Simple continuous piecewiese linear function: + /* + * Simple continuous piecewiese linear function: * max MiB -> min MiB gradient * 0 0 * 16 16 @@ -189,12 +193,10 @@ minimum_target(void) else min_pages = MB2PAGES(296) + (max_pfn >> 5); #undef MB2PAGES +#undef max_pfn /* Don't enforce growth */ - return min(min_pages, curr_pages); -#ifndef CONFIG_XEN -#undef max_pfn -#endif + return (min(min_pages, curr_pages)); } static int @@ -210,10 +212,10 @@ increase_reservation(unsigned long nr_pa .domid = DOMID_SELF }; - if (nr_pages > ARRAY_SIZE(frame_list)) - nr_pages = ARRAY_SIZE(frame_list); + mtx_assert(&balloon_mutex, MA_OWNED); - mtx_lock(&balloon_lock); + if (nr_pages > nitems(frame_list)) + nr_pages = nitems(frame_list); for (entry = STAILQ_FIRST(&ballooned_pages), i = 0; i < nr_pages; i++, entry = STAILQ_NEXT(entry, list)) { @@ -253,33 +255,14 @@ increase_reservation(unsigned long nr_pa set_phys_to_machine(pfn, frame_list[i]); -#if 0 -#ifndef XENHVM - /* Link back into the page tables if not highmem. */ - if (pfn < max_low_pfn) { - int ret; - ret = HYPERVISOR_update_va_mapping( - (unsigned long)__va(pfn << PAGE_SHIFT), - pfn_pte_ma(frame_list[i], PAGE_KERNEL), - 0); - PASSING(ret == 0, - ("HYPERVISOR_update_va_mapping failed")); - } -#endif -#endif - - /* Relinquish the page back to the allocator. */ vm_page_unwire(page, 0); vm_page_free(page); } bs.current_pages += nr_pages; - //totalram_pages = bs.current_pages; out: - mtx_unlock(&balloon_lock); - - return 0; + return (0); } static int @@ -295,8 +278,10 @@ decrease_reservation(unsigned long nr_pa .domid = DOMID_SELF }; - if (nr_pages > ARRAY_SIZE(frame_list)) - nr_pages = ARRAY_SIZE(frame_list); + mtx_assert(&balloon_mutex, MA_OWNED); + + if (nr_pages > nitems(frame_list)) + nr_pages = nitems(frame_list); for (i = 0; i < nr_pages; i++) { if ((page = vm_page_alloc(NULL, 0, @@ -310,39 +295,15 @@ decrease_reservation(unsigned long nr_pa pfn = (VM_PAGE_TO_PHYS(page) >> PAGE_SHIFT); frame_list[i] = PFNTOMFN(pfn); -#if 0 - if (!PageHighMem(page)) { - v = phys_to_virt(pfn << PAGE_SHIFT); - scrub_pages(v, 1); -#ifdef CONFIG_XEN - ret = HYPERVISOR_update_va_mapping( - (unsigned long)v, __pte_ma(0), 0); - BUG_ON(ret); -#endif - } -#endif -#ifdef CONFIG_XEN_SCRUB_PAGES - else { - v = kmap(page); - scrub_pages(v, 1); - kunmap(page); - } -#endif - } - -#ifdef CONFIG_XEN - /* Ensure that ballooned highmem pages don't have kmaps. */ - kmap_flush_unused(); - flush_tlb_all(); -#endif - - mtx_lock(&balloon_lock); - - /* No more mappings: invalidate P2M and add to balloon. */ - for (i = 0; i < nr_pages; i++) { - pfn = MFNTOPFN(frame_list[i]); set_phys_to_machine(pfn, INVALID_P2M_ENTRY); - balloon_append(PHYS_TO_VM_PAGE(pfn << PAGE_SHIFT)); + if (balloon_append(page) != 0) { + vm_page_unwire(page, 0); + vm_page_free(page); + + nr_pages = i; + need_sleep = 1; + break; + } } set_xen_guest_handle(reservation.extent_start, frame_list); @@ -351,9 +312,6 @@ decrease_reservation(unsigned long nr_pa KASSERT(ret == nr_pages, ("HYPERVISOR_memory_op failed")); bs.current_pages -= nr_pages; - //totalram_pages = bs.current_pages; - - mtx_unlock(&balloon_lock); return (need_sleep); } @@ -425,11 +383,11 @@ watch_target(struct xs_watch *watch, return; } - /* The given memory/target value is in KiB, so it needs converting to - pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. - */ - set_new_target(new_target >> (PAGE_SHIFT - 10)); - + /* + * The given memory/target value is in KiB, so it needs converting to + * pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. + */ + set_new_target(new_target >> KB_TO_PAGE_SHIFT); } static void @@ -461,13 +419,12 @@ balloon_init(void *arg) if (!is_running_on_xen()) return; - mtx_init(&balloon_lock, "balloon_lock", NULL, MTX_DEF); mtx_init(&balloon_mutex, "balloon_mutex", NULL, MTX_DEF); #ifndef XENHVM bs.current_pages = min(xen_start_info->nr_pages, max_pfn); #else - bs.current_pages = physmem; + bs.current_pages = realmem; #endif bs.target_pages = bs.current_pages; bs.balloon_low = 0; @@ -497,76 +454,7 @@ void balloon_update_driver_allowance(lon void balloon_update_driver_allowance(long delta) { - mtx_lock(&balloon_lock); + mtx_lock(&balloon_mutex); bs.driver_pages += delta; - mtx_unlock(&balloon_lock); -} - -#if 0 -static int dealloc_pte_fn( - pte_t *pte, struct page *pte_page, unsigned long addr, void *data) -{ - unsigned long mfn = pte_mfn(*pte); - int ret; - struct xen_memory_reservation reservation = { - .extent_start = &mfn, - .nr_extents = 1, - .extent_order = 0, - .domid = DOMID_SELF - }; - set_pte_at(&init_mm, addr, pte, __pte_ma(0)); - set_phys_to_machine(__pa(addr) >> PAGE_SHIFT, INVALID_P2M_ENTRY); - ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation); - KASSERT(ret == 1, ("HYPERVISOR_memory_op failed")); - return 0; -} - -#endif - -#if 0 -vm_page_t -balloon_alloc_empty_page_range(unsigned long nr_pages) -{ - vm_page_t pages; - int i, rc; - unsigned long *mfn_list; - struct xen_memory_reservation reservation = { - .address_bits = 0, - .extent_order = 0, - .domid = DOMID_SELF - }; - - pages = vm_page_alloc_contig(nr_pages, 0, -1, 4, 4) - if (pages == NULL) - return NULL; - - mfn_list = malloc(nr_pages*sizeof(unsigned long), M_DEVBUF, M_WAITOK); - - for (i = 0; i < nr_pages; i++) { - mfn_list[i] = PFNTOMFN(VM_PAGE_TO_PHYS(pages[i]) >> PAGE_SHIFT); - PFNTOMFN(i) = INVALID_P2M_ENTRY; - reservation.extent_start = mfn_list; - reservation.nr_extents = nr_pages; - rc = HYPERVISOR_memory_op(XENMEM_decrease_reservation, - &reservation); - KASSERT(rc == nr_pages, ("HYPERVISOR_memory_op failed")); - } - - current_pages -= nr_pages; - - wakeup(balloon_process); - - return pages; -} - -void -balloon_dealloc_empty_page_range(vm_page_t page, unsigned long nr_pages) -{ - unsigned long i; - - for (i = 0; i < nr_pages; i++) - balloon_append(page + i); - - wakeup(balloon_process); + mtx_unlock(&balloon_mutex); } -#endif From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 20:12:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA30B513; Thu, 5 Dec 2013 20:12:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C67251802; Thu, 5 Dec 2013 20:12:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5KC2T1060526; Thu, 5 Dec 2013 20:12:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5KC2Qa060524; Thu, 5 Dec 2013 20:12:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312052012.rB5KC2Qa060524@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Dec 2013 20:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259002 - stable/9/sys/dev/wbwd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 20:12:02 -0000 Author: mav Date: Thu Dec 5 20:12:02 2013 New Revision: 259002 URL: http://svnweb.freebsd.org/changeset/base/259002 Log: MFC r244280 (by pjd): sbuf_trim() cannot be used on sbuf with drain function set. This fixes panic when listing sysctls on INVARIANTS-enabled kernel while having wbwd loaded. This panic was not fatal, at worst one additional space was printed. Also sbuf_trim() makes some sense even if drain function is set. The drain function is called only when buffer is to be expanded. So we could still trim existing buffer before drain is called. In this case it worked just fine - the trailing space was correctly trimmed. Modified: stable/9/sys/dev/wbwd/wbwd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/wbwd/wbwd.c ============================================================================== --- stable/9/sys/dev/wbwd/wbwd.c Thu Dec 5 18:39:03 2013 (r259001) +++ stable/9/sys/dev/wbwd/wbwd.c Thu Dec 5 20:12:02 2013 (r259002) @@ -250,9 +250,8 @@ sysctl_wb_debug(SYSCTL_HANDLER_ARGS) sbuf_printf(&sb, "LDN8 (GPIO2, Watchdog): "); sbuf_printf(&sb, "CRF5 0x%02x ", sc->reg_1); sbuf_printf(&sb, "CRF6 0x%02x ", sc->reg_timeout); - sbuf_printf(&sb, "CRF7 0x%02x ", sc->reg_2); + sbuf_printf(&sb, "CRF7 0x%02x", sc->reg_2); - sbuf_trim(&sb); error = sbuf_finish(&sb); sbuf_delete(&sb); return (error); From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 20:23:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41DBE95C; Thu, 5 Dec 2013 20:23:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D89B18CA; Thu, 5 Dec 2013 20:23:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5KNXmR090474; Thu, 5 Dec 2013 20:23:33 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5KNXOF090471; Thu, 5 Dec 2013 20:23:33 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201312052023.rB5KNXOF090471@svn.freebsd.org> From: Robert Millan Date: Thu, 5 Dec 2013 20:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259003 - head/sys/dev/drm2/radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 20:23:33 -0000 Author: rmh Date: Thu Dec 5 20:23:32 2013 New Revision: 259003 URL: http://svnweb.freebsd.org/changeset/base/259003 Log: Initialize modesetting sysctls in radeonkms. This is intended for MFC if re@ permits. Reviewed by: kib, dumbbell Tested by: Steven Chamberlain MFC after: 3 days Modified: head/sys/dev/drm2/radeon/radeon_drv.c Modified: head/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_drv.c Thu Dec 5 20:12:02 2013 (r259002) +++ head/sys/dev/drm2/radeon/radeon_drv.c Thu Dec 5 20:23:32 2013 (r259003) @@ -338,6 +338,12 @@ static const struct file_operations rade }; #endif /* DUMBBELL_WIP */ +static int radeon_sysctl_init(struct drm_device *dev, struct sysctl_ctx_list *ctx, + struct sysctl_oid *top) +{ + return drm_add_busid_modesetting(dev, ctx, top); +} + static struct drm_driver_info kms_driver = { .driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | @@ -367,6 +373,7 @@ static struct drm_driver_info kms_driver .irq_postinstall = radeon_driver_irq_postinstall_kms, .irq_uninstall = radeon_driver_irq_uninstall_kms, .irq_handler = radeon_driver_irq_handler_kms, + .sysctl_init = radeon_sysctl_init, .ioctls = radeon_ioctls_kms, .gem_init_object = radeon_gem_object_init, .gem_free_object = radeon_gem_object_free, From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 20:25:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32F89C3F; Thu, 5 Dec 2013 20:25:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1F38818DC; Thu, 5 Dec 2013 20:25:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5KPiw6095049; Thu, 5 Dec 2013 20:25:44 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5KPiL3095047; Thu, 5 Dec 2013 20:25:44 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312052025.rB5KPiL3095047@svn.freebsd.org> From: Dimitry Andric Date: Thu, 5 Dec 2013 20:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259004 - stable/9/contrib/libc++/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 20:25:45 -0000 Author: dim Date: Thu Dec 5 20:25:44 2013 New Revision: 259004 URL: http://svnweb.freebsd.org/changeset/base/259004 Log: MFC r256082 (by decke) Rename internal function test() to avoid name clashes with common macros. This fixes ports like mysql 5.6 which has an internal macro called test. Discussed with: theraven Modified: stable/9/contrib/libc++/include/memory Directory Properties: stable/9/contrib/libc++/ (props changed) Modified: stable/9/contrib/libc++/include/memory ============================================================================== --- stable/9/contrib/libc++/include/memory Thu Dec 5 20:23:32 2013 (r259003) +++ stable/9/contrib/libc++/include/memory Thu Dec 5 20:25:44 2013 (r259004) @@ -965,13 +965,13 @@ public: namespace __has_pointer_type_imp { - template static __two test(...); - template static char test(typename _Up::pointer* = 0); + template static __two __test(...); + template static char __test(typename _Up::pointer* = 0); } template struct __has_pointer_type - : public integral_constant(0)) == 1> + : public integral_constant(0)) == 1> { }; From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:22:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0AEA4AC; Thu, 5 Dec 2013 21:22:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB14D1D61; Thu, 5 Dec 2013 21:22:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5LMsPs048129; Thu, 5 Dec 2013 21:22:54 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5LMqoM047983; Thu, 5 Dec 2013 21:22:52 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312052122.rB5LMqoM047983@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 5 Dec 2013 21:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259005 - in head/contrib/gcc: . config/i386 config/rs6000 cp doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:22:55 -0000 Author: pfg Date: Thu Dec 5 21:22:51 2013 New Revision: 259005 URL: http://svnweb.freebsd.org/changeset/base/259005 Log: gcc: Add -flax-vector-conversions Obtained from: gcc 4.3 (rev. 120572, 120688; GPLv2) Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/c-common.c head/contrib/gcc/c-common.h head/contrib/gcc/c-opts.c head/contrib/gcc/c-typeck.c head/contrib/gcc/c.opt head/contrib/gcc/config/i386/i386.c head/contrib/gcc/config/rs6000/altivec.h head/contrib/gcc/config/rs6000/rs6000-c.c head/contrib/gcc/cp/ChangeLog.gcc43 head/contrib/gcc/cp/call.c head/contrib/gcc/cp/typeck.c head/contrib/gcc/doc/invoke.texi Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/ChangeLog.gcc43 Thu Dec 5 21:22:51 2013 (r259005) @@ -389,6 +389,36 @@ * config.gcc: Support core2 processor. +2007-01-11 Joseph Myers (r120688) + + * c-common.c (vector_types_convertible_p): Treat opaque types as + always convertible if they have the same size, but not otherwise. + +2007-01-08 Mark Shinwell (r120572) + + * c.opt: Add -flax-vector-conversions. + * c-typeck.c (convert_for_assignment): Pass flag to + vector_types_convertible_p to allow emission of note. + (digest_init): Likewise. + * c-opts.c: Handle -flax-vector-conversions. + * c-common.c (flag_lax_vector_conversions): New. + (vector_types_convertible_p): Unless -flax-vector conversions + has been passed, disallow conversions between vectors with + differing numbers of subparts and/or element types. If such + a conversion is disallowed, possibly emit a note on the first + occasion only to inform the user of -flax-vector-conversions. + The new last argument specifies this. + * c-common.h (flag_lax_vector_conversions): New. + (vector_types_convertible_p): Add extra argument. + * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use + char_type_node for V*QI type vectors. + * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): + Update to satisfy new typechecking rules. + * config/rs6000/altivec.h (vec_cmple): Use vec_cmpge, for both + C and C++ variants. + * doc/invoke.texi (C Dialect Options): Document + -flax-vector-conversions. + 2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 Modified: head/contrib/gcc/c-common.c ============================================================================== --- head/contrib/gcc/c-common.c Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/c-common.c Thu Dec 5 21:22:51 2013 (r259005) @@ -254,6 +254,10 @@ int flag_short_double; int flag_short_wchar; +/* Nonzero means allow implicit conversions between vectors with + differing numbers of subparts and/or differing element types. */ +int flag_lax_vector_conversions; + /* Nonzero means allow Microsoft extensions without warnings or errors. */ int flag_ms_extensions; @@ -1095,18 +1099,45 @@ constant_fits_type_p (tree c, tree type) return !TREE_OVERFLOW (c); } -/* Nonzero if vector types T1 and T2 can be converted to each other - without an explicit cast. */ -int -vector_types_convertible_p (tree t1, tree t2) + +/* True if vector types T1 and T2 can be converted to each other + without an explicit cast. If EMIT_LAX_NOTE is true, and T1 and T2 + can only be converted with -flax-vector-conversions yet that is not + in effect, emit a note telling the user about that option if such + a note has not previously been emitted. */ +bool +vector_types_convertible_p (tree t1, tree t2, bool emit_lax_note) { - return targetm.vector_opaque_p (t1) - || targetm.vector_opaque_p (t2) - || (tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)) - && (TREE_CODE (TREE_TYPE (t1)) != REAL_TYPE || - TYPE_PRECISION (t1) == TYPE_PRECISION (t2)) - && INTEGRAL_TYPE_P (TREE_TYPE (t1)) - == INTEGRAL_TYPE_P (TREE_TYPE (t2))); + static bool emitted_lax_note = false; + bool convertible_lax; + + if ((targetm.vector_opaque_p (t1) || targetm.vector_opaque_p (t2)) + && tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2))) + return true; + + convertible_lax = + (tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)) + && (TREE_CODE (TREE_TYPE (t1)) != REAL_TYPE || + TYPE_PRECISION (t1) == TYPE_PRECISION (t2)) + && (INTEGRAL_TYPE_P (TREE_TYPE (t1)) + == INTEGRAL_TYPE_P (TREE_TYPE (t2)))); + + if (!convertible_lax || flag_lax_vector_conversions) + return convertible_lax; + + if (TYPE_VECTOR_SUBPARTS (t1) == TYPE_VECTOR_SUBPARTS (t2) + && comptypes (TREE_TYPE (t1), TREE_TYPE (t2))) + return true; + + if (emit_lax_note && !emitted_lax_note) + { + emitted_lax_note = true; + inform ("use -flax-vector-conversions to permit " + "conversions between vectors with differing " + "element types or numbers of subparts"); + } + + return false; } /* Convert EXPR to TYPE, warning about conversion problems with constants. Modified: head/contrib/gcc/c-common.h ============================================================================== --- head/contrib/gcc/c-common.h Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/c-common.h Thu Dec 5 21:22:51 2013 (r259005) @@ -389,6 +389,10 @@ extern int flag_short_double; extern int flag_short_wchar; +/* Nonzero means allow implicit conversions between vectors with + differing numbers of subparts and/or differing element types. */ +extern int flag_lax_vector_conversions; + /* Nonzero means allow Microsoft extensions without warnings or errors. */ extern int flag_ms_extensions; @@ -791,7 +795,7 @@ extern tree finish_label_address_expr (t extern tree lookup_label (tree); extern tree lookup_name (tree); -extern int vector_types_convertible_p (tree t1, tree t2); +extern bool vector_types_convertible_p (tree t1, tree t2, bool emit_lax_note); extern rtx c_expand_expr (tree, rtx, enum machine_mode, int, rtx *); Modified: head/contrib/gcc/c-opts.c ============================================================================== --- head/contrib/gcc/c-opts.c Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/c-opts.c Thu Dec 5 21:22:51 2013 (r259005) @@ -710,6 +710,10 @@ c_common_handle_option (size_t scode, co flag_implicit_templates = value; break; + case OPT_flax_vector_conversions: + flag_lax_vector_conversions = value; + break; + case OPT_fms_extensions: flag_ms_extensions = value; break; Modified: head/contrib/gcc/c-typeck.c ============================================================================== --- head/contrib/gcc/c-typeck.c Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/c-typeck.c Thu Dec 5 21:22:51 2013 (r259005) @@ -3893,7 +3893,7 @@ convert_for_assignment (tree type, tree } /* Some types can interconvert without explicit casts. */ else if (codel == VECTOR_TYPE && coder == VECTOR_TYPE - && vector_types_convertible_p (type, TREE_TYPE (rhs))) + && vector_types_convertible_p (type, TREE_TYPE (rhs), true)) return convert (type, rhs); /* Arithmetic types all interconvert, and enum is treated like int. */ else if ((codel == INTEGER_TYPE || codel == REAL_TYPE @@ -4629,7 +4629,7 @@ digest_init (tree type, tree init, bool below and handle as a constructor. */ if (code == VECTOR_TYPE && TREE_CODE (TREE_TYPE (inside_init)) == VECTOR_TYPE - && vector_types_convertible_p (TREE_TYPE (inside_init), type) + && vector_types_convertible_p (TREE_TYPE (inside_init), type, true) && TREE_CONSTANT (inside_init)) { if (TREE_CODE (inside_init) == VECTOR_CST Modified: head/contrib/gcc/c.opt ============================================================================== --- head/contrib/gcc/c.opt Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/c.opt Thu Dec 5 21:22:51 2013 (r259005) @@ -584,6 +584,10 @@ Inject friend functions into enclosing n flabels-ok C++ ObjC++ +flax-vector-conversions +C ObjC C++ ObjC++ +Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types. + fms-extensions C ObjC C++ ObjC++ Don't warn about uses of Microsoft extensions Modified: head/contrib/gcc/config/i386/i386.c ============================================================================== --- head/contrib/gcc/config/i386/i386.c Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/config/i386/i386.c Thu Dec 5 21:22:51 2013 (r259005) @@ -15408,7 +15408,7 @@ ix86_init_mmx_sse_builtins (void) const struct builtin_description * d; size_t i; - tree V16QI_type_node = build_vector_type_for_mode (intQI_type_node, V16QImode); + tree V16QI_type_node = build_vector_type_for_mode (char_type_node, V16QImode); tree V2SI_type_node = build_vector_type_for_mode (intSI_type_node, V2SImode); tree V2SF_type_node = build_vector_type_for_mode (float_type_node, V2SFmode); tree V2DI_type_node @@ -15417,7 +15417,7 @@ ix86_init_mmx_sse_builtins (void) tree V4SF_type_node = build_vector_type_for_mode (float_type_node, V4SFmode); tree V4SI_type_node = build_vector_type_for_mode (intSI_type_node, V4SImode); tree V4HI_type_node = build_vector_type_for_mode (intHI_type_node, V4HImode); - tree V8QI_type_node = build_vector_type_for_mode (intQI_type_node, V8QImode); + tree V8QI_type_node = build_vector_type_for_mode (char_type_node, V8QImode); tree V8HI_type_node = build_vector_type_for_mode (intHI_type_node, V8HImode); tree pchar_type_node = build_pointer_type (char_type_node); Modified: head/contrib/gcc/config/rs6000/altivec.h ============================================================================== --- head/contrib/gcc/config/rs6000/altivec.h Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/config/rs6000/altivec.h Thu Dec 5 21:22:51 2013 (r259005) @@ -332,7 +332,7 @@ NAME (T a1, U a2) \ __altivec_binary_pred(vec_cmplt, __builtin_vec_cmpgt (a2, a1)) __altivec_binary_pred(vec_cmple, - __builtin_altivec_cmpge (a2, a1)) + __builtin_vec_cmpge (a2, a1)) __altivec_scalar_pred(vec_all_in, __builtin_altivec_vcmpbfp_p (__CR6_EQ, a1, a2)) @@ -402,7 +402,7 @@ __altivec_scalar_pred(vec_any_nle, #undef __altivec_binary_pred #else #define vec_cmplt(a1, a2) __builtin_vec_cmpgt ((a2), (a1)) -#define vec_cmple(a1, a2) __builtin_altivec_vcmpgefp ((a2), (a1)) +#define vec_cmple(a1, a2) __builtin_vec_cmpge ((a2), (a1)) #define vec_all_in(a1, a2) __builtin_altivec_vcmpbfp_p (__CR6_EQ, (a1), (a2)) #define vec_any_out(a1, a2) __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, (a1), (a2)) Modified: head/contrib/gcc/config/rs6000/rs6000-c.c ============================================================================== --- head/contrib/gcc/config/rs6000/rs6000-c.c Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/config/rs6000/rs6000-c.c Thu Dec 5 21:22:51 2013 (r259005) @@ -222,17 +222,17 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_pixel_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHSH, ALTIVEC_BUILTIN_VUPKHSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHSH, ALTIVEC_BUILTIN_VUPKHSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHPX, ALTIVEC_BUILTIN_VUPKHPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHPX, ALTIVEC_BUILTIN_VUPKHPX, @@ -240,17 +240,17 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_VUPKHSB, ALTIVEC_BUILTIN_VUPKHSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHSB, ALTIVEC_BUILTIN_VUPKHSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_pixel_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLPX, ALTIVEC_BUILTIN_VUPKLPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLPX, ALTIVEC_BUILTIN_VUPKLPX, @@ -258,11 +258,11 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_VUPKLSH, ALTIVEC_BUILTIN_VUPKLSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLSH, ALTIVEC_BUILTIN_VUPKLSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLSB, ALTIVEC_BUILTIN_VUPKLSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLSB, ALTIVEC_BUILTIN_VUPKLSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, /* Binary AltiVec builtins. */ { ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDUBM, @@ -576,31 +576,23 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQFP, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQFP, ALTIVEC_BUILTIN_VCMPEQFP, - RS6000_BTI_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, - RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, - RS6000_BTI_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, + { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, - RS6000_BTI_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, - RS6000_BTI_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, + { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, RS6000_BTI_bool_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, - RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, - RS6000_BTI_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, + { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, + { ALTIVEC_BUILTIN_VEC_CMPGE, ALTIVEC_BUILTIN_VCMPGEFP, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_CMPGT, ALTIVEC_BUILTIN_VCMPGTUB, @@ -618,29 +610,29 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_CMPGT, ALTIVEC_BUILTIN_VCMPGTFP, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTFP, ALTIVEC_BUILTIN_VCMPGTFP, - RS6000_BTI_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSW, ALTIVEC_BUILTIN_VCMPGTSW, - RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSW, ALTIVEC_BUILTIN_VCMPGTSW, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUW, ALTIVEC_BUILTIN_VCMPGTUW, - RS6000_BTI_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUW, ALTIVEC_BUILTIN_VCMPGTUW, RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSH, ALTIVEC_BUILTIN_VCMPGTSH, - RS6000_BTI_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSH, ALTIVEC_BUILTIN_VCMPGTSH, RS6000_BTI_bool_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUH, ALTIVEC_BUILTIN_VCMPGTUH, - RS6000_BTI_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUH, ALTIVEC_BUILTIN_VCMPGTUH, RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSB, ALTIVEC_BUILTIN_VCMPGTSB, - RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, + RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSB, ALTIVEC_BUILTIN_VCMPGTSB, RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUB, ALTIVEC_BUILTIN_VCMPGTUB, - RS6000_BTI_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, + RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUB, ALTIVEC_BUILTIN_VCMPGTUB, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_CMPLE, ALTIVEC_BUILTIN_VCMPGEFP, Modified: head/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/cp/ChangeLog.gcc43 Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/cp/ChangeLog.gcc43 Thu Dec 5 21:22:51 2013 (r259005) @@ -29,14 +29,23 @@ * decl.c (compute_array_index_type): New warning flag warn_vla. -2007-01-07 Manuel Lopez-Ibanez +2007-01-08 Mark Shinwell (r120572) + + * call.c (standard_conversion): Pass flag to + vector_types_convertible_p to disallow emission of note. + * typeck.c (convert_for_assignment): Pass flag to + vector_types_convertible_p to allow emission of note. + (ptr_reasonably_similar): Pass flag to vector_types_convertible_p + to disallow emission of note. + +2007-01-07 Manuel Lopez-Ibanez (r120558) PR c++/28986 * typeck.c (build_binary_op): Call overflow_warning if TREE_OVERFLOW_P is true for the result and not for any of the operands. -2007-01-05 Manuel Lopez-Ibanez +2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 * semantics.c (finish_unary_op_expr): Warn only if result Modified: head/contrib/gcc/cp/call.c ============================================================================== --- head/contrib/gcc/cp/call.c Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/cp/call.c Thu Dec 5 21:22:51 2013 (r259005) @@ -838,7 +838,7 @@ standard_conversion (tree to, tree from, conv->rank = cr_promotion; } else if (fcode == VECTOR_TYPE && tcode == VECTOR_TYPE - && vector_types_convertible_p (from, to)) + && vector_types_convertible_p (from, to, false)) return build_conv (ck_std, to, conv); else if (!(flags & LOOKUP_CONSTRUCTOR_CALLABLE) && IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from) Modified: head/contrib/gcc/cp/typeck.c ============================================================================== --- head/contrib/gcc/cp/typeck.c Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/cp/typeck.c Thu Dec 5 21:22:51 2013 (r259005) @@ -6229,7 +6229,7 @@ convert_for_assignment (tree type, tree coder = TREE_CODE (rhstype); if (TREE_CODE (type) == VECTOR_TYPE && coder == VECTOR_TYPE - && vector_types_convertible_p (type, rhstype)) + && vector_types_convertible_p (type, rhstype, true)) return convert (type, rhs); if (rhs == error_mark_node || rhstype == error_mark_node) @@ -6799,7 +6799,7 @@ ptr_reasonably_similar (tree to, tree fr continue; if (TREE_CODE (to) == VECTOR_TYPE - && vector_types_convertible_p (to, from)) + && vector_types_convertible_p (to, from, false)) return 1; if (TREE_CODE (to) == INTEGER_TYPE Modified: head/contrib/gcc/doc/invoke.texi ============================================================================== --- head/contrib/gcc/doc/invoke.texi Thu Dec 5 20:25:44 2013 (r259004) +++ head/contrib/gcc/doc/invoke.texi Thu Dec 5 21:22:51 2013 (r259005) @@ -167,7 +167,7 @@ in the following sections. -fno-asm -fno-builtin -fno-builtin-@var{function} @gol -fhosted -ffreestanding -fopenmp -fms-extensions @gol -trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol --fallow-single-precision -fcond-mismatch @gol +-fallow-single-precision -fcond-mismatch -flax-vector-conversions @gol -fsigned-bitfields -fsigned-char @gol -funsigned-bitfields -funsigned-char} @@ -1337,6 +1337,12 @@ Allow conditional expressions with misma third arguments. The value of such an expression is void. This option is not supported for C++. +@item -flax-vector-conversions +@opindex flax-vector-conversions +Allow implicit conversions between vectors with differing numbers of +elements and/or incompatible element types. This option should not be +used for new code. + @item -funsigned-char @opindex funsigned-char Let the type @code{char} be unsigned, like @code{unsigned char}. From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:25:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 619BC63C; Thu, 5 Dec 2013 21:25:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E2441D84; Thu, 5 Dec 2013 21:25: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 rB5LPvE9053867; Thu, 5 Dec 2013 21:25:57 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5LPv2M053865; Thu, 5 Dec 2013 21:25:57 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201312052125.rB5LPv2M053865@svn.freebsd.org> From: Andreas Tobler Date: Thu, 5 Dec 2013 21:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259006 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:25:57 -0000 Author: andreast Date: Thu Dec 5 21:25:56 2013 New Revision: 259006 URL: http://svnweb.freebsd.org/changeset/base/259006 Log: In case we have many continous regions without gaps we have to make soure that we collapse them into one region. The previous version missed to go back one step and do it again. Modified: head/sys/powerpc/powerpc/platform.c Modified: head/sys/powerpc/powerpc/platform.c ============================================================================== --- head/sys/powerpc/powerpc/platform.c Thu Dec 5 21:22:51 2013 (r259005) +++ head/sys/powerpc/powerpc/platform.c Thu Dec 5 21:25:56 2013 (r259006) @@ -148,6 +148,7 @@ mem_regions(struct mem_region **phys, in memcpy(&aregions[i], &aregions[i+1], (naregions - i - 1)*sizeof(*aregions)); naregions--; + i--; } } } From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:34:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3835A70; Thu, 5 Dec 2013 21:34:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F30F1E18; Thu, 5 Dec 2013 21:34:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5LYXan075420; Thu, 5 Dec 2013 21:34:33 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5LYX7g075418; Thu, 5 Dec 2013 21:34:33 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201312052134.rB5LYX7g075418@svn.freebsd.org> From: Andreas Tobler Date: Thu, 5 Dec 2013 21:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259007 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:34:33 -0000 Author: andreast Date: Thu Dec 5 21:34:33 2013 New Revision: 259007 URL: http://svnweb.freebsd.org/changeset/base/259007 Log: Increase PHYS_AVAIL_SZ because on pSeries machines we can have many logical regions which represent the total amount of memory. The size of these regions is not the physical size of the chip but it is a logical one and it is given by the OpenFirmware, it is selectable at boot time and varies between 16MB and 256MB in my case. There is an 'automatic' option which would select the size as 64MB in case you have around 16GB of RAM. To make sure we can allocate RAM with the automatic option bump this value of PHYS_AVAIL_SZ to 256. Modified: head/sys/powerpc/include/pmap.h Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Thu Dec 5 21:25:56 2013 (r259006) +++ head/sys/powerpc/include/pmap.h Thu Dec 5 21:34:33 2013 (r259007) @@ -240,7 +240,11 @@ boolean_t pmap_mmu_install(char *name, i #define vtophys(va) pmap_kextract((vm_offset_t)(va)) -#define PHYS_AVAIL_SZ 128 +#define PHYS_AVAIL_SZ 256 /* Allows up to 16GB Ram on pSeries with + * logical memory block size of 64MB. + * For more Ram increase the lmb or this value. + */ + extern vm_offset_t phys_avail[PHYS_AVAIL_SZ]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:35:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D7BFBC0; Thu, 5 Dec 2013 21:35:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29A961E22; Thu, 5 Dec 2013 21:35:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5LZrl0078741; Thu, 5 Dec 2013 21:35:53 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5LZr12078738; Thu, 5 Dec 2013 21:35:53 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201312052135.rB5LZr12078738@svn.freebsd.org> From: Andreas Tobler Date: Thu, 5 Dec 2013 21:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259008 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:35:53 -0000 Author: andreast Date: Thu Dec 5 21:35:52 2013 New Revision: 259008 URL: http://svnweb.freebsd.org/changeset/base/259008 Log: Do some cosmetic fixes. Modified: head/sys/powerpc/pseries/platform_chrp.c Modified: head/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- head/sys/powerpc/pseries/platform_chrp.c Thu Dec 5 21:34:33 2013 (r259007) +++ head/sys/powerpc/pseries/platform_chrp.c Thu Dec 5 21:35:52 2013 (r259008) @@ -158,14 +158,14 @@ chrp_attach(platform_t plat) } static int -parse_drconf_memory(int *msz, int *asz, struct mem_region *ofmem, - struct mem_region *ofavail) +parse_drconf_memory(struct mem_region *ofmem, int *msz, + struct mem_region *ofavail, int *asz) { phandle_t phandle; vm_offset_t base; int i, idx, len, lasz, lmsz, res; - uint32_t lmb_size[2]; - unsigned long *dmem, flags; + uint32_t flags, lmb_size[2]; + uint64_t *dmem; lmsz = *msz; lasz = *asz; @@ -208,8 +208,8 @@ parse_drconf_memory(int *msz, int *asz, /* Number of elements */ idx = arr[0]; - /* First address. */ - dmem = (void*)&arr[1]; + /* First address, in arr[1], arr[2]*/ + dmem = (uint64_t*)&arr[1]; for (i = 0; i < idx; i++) { base = *dmem; @@ -242,7 +242,7 @@ chrp_mem_regions(platform_t plat, struct int i; ofw_mem_regions(phys, physsz, avail, availsz); - parse_drconf_memory(physsz, availsz, phys, avail); + parse_drconf_memory(phys, physsz, avail, availsz); /* * On some firmwares (SLOF), some memory may be marked available that From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:46:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6455EC9; Thu, 5 Dec 2013 21:46:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 86A411EB5; Thu, 5 Dec 2013 21:46: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 rB5LkTvF004874; Thu, 5 Dec 2013 21:46:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5LkTNn004873; Thu, 5 Dec 2013 21:46:29 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312052146.rB5LkTNn004873@svn.freebsd.org> From: Dimitry Andric Date: Thu, 5 Dec 2013 21:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259009 - stable/9/contrib/llvm/tools/clang/lib/Headers X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:46:29 -0000 Author: dim Date: Thu Dec 5 21:46:29 2013 New Revision: 259009 URL: http://svnweb.freebsd.org/changeset/base/259009 Log: MFC r253802: Pull in r186696 from upstream clang trunk: This patch implements __get_cpuid_max() as an inline and __cpuid() and __cpuid_count() as macros to be compatible with GCC's cpuid.h. It also adds bit_ constants for the various feature bits as described in version 039 (May 2011) of Intel's SDM Volume 2 in the description of the CPUID instruction. The list of bit_ constants is a bit exhaustive (GCC doesn't do near this many). More bits could be added from a newer version of SDM if desired. Patch by John Baldwin! This should fix several ports which depend on this functionality being available. Modified: stable/9/contrib/llvm/tools/clang/lib/Headers/cpuid.h Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/Headers/cpuid.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Headers/cpuid.h Thu Dec 5 21:35:52 2013 (r259008) +++ stable/9/contrib/llvm/tools/clang/lib/Headers/cpuid.h Thu Dec 5 21:46:29 2013 (r259009) @@ -25,10 +25,132 @@ #error this header is for x86 only #endif +/* Features in %ecx for level 1 */ +#define bit_SSE3 0x00000001 +#define bit_PCLMULQDQ 0x00000002 +#define bit_DTES64 0x00000004 +#define bit_MONITOR 0x00000008 +#define bit_DSCPL 0x00000010 +#define bit_VMX 0x00000020 +#define bit_SMX 0x00000040 +#define bit_EIST 0x00000080 +#define bit_TM2 0x00000100 +#define bit_SSSE3 0x00000200 +#define bit_CNXTID 0x00000400 +#define bit_FMA 0x00001000 +#define bit_CMPXCHG16B 0x00002000 +#define bit_xTPR 0x00004000 +#define bit_PDCM 0x00008000 +#define bit_PCID 0x00020000 +#define bit_DCA 0x00040000 +#define bit_SSE41 0x00080000 +#define bit_SSE42 0x00100000 +#define bit_x2APIC 0x00200000 +#define bit_MOVBE 0x00400000 +#define bit_POPCNT 0x00800000 +#define bit_TSCDeadline 0x01000000 +#define bit_AESNI 0x02000000 +#define bit_XSAVE 0x04000000 +#define bit_OSXSAVE 0x08000000 +#define bit_AVX 0x10000000 +#define bit_RDRAND 0x40000000 + +/* Features in %edx for level 1 */ +#define bit_FPU 0x00000001 +#define bit_VME 0x00000002 +#define bit_DE 0x00000004 +#define bit_PSE 0x00000008 +#define bit_TSC 0x00000010 +#define bit_MSR 0x00000020 +#define bit_PAE 0x00000040 +#define bit_MCE 0x00000080 +#define bit_CX8 0x00000100 +#define bit_APIC 0x00000200 +#define bit_SEP 0x00000800 +#define bit_MTRR 0x00001000 +#define bit_PGE 0x00002000 +#define bit_MCA 0x00004000 +#define bit_CMOV 0x00008000 +#define bit_PAT 0x00010000 +#define bit_PSE36 0x00020000 +#define bit_PSN 0x00040000 +#define bit_CLFSH 0x00080000 +#define bit_DS 0x00200000 +#define bit_ACPI 0x00400000 +#define bit_MMX 0x00800000 +#define bit_FXSR 0x01000000 +#define bit_SSE 0x02000000 +#define bit_SSE2 0x04000000 +#define bit_SS 0x08000000 +#define bit_HTT 0x10000000 +#define bit_TM 0x20000000 +#define bit_PBE 0x80000000 + +/* Features in %ebx for level 7 sub-leaf 0 */ +#define bit_FSGSBASE 0x00000001 +#define bit_SMEP 0x00000080 +#define bit_ENH_MOVSB 0x00000200 + +/* PIC on i386 uses %ebx, so preserve it. */ +#if __i386__ +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ + __asm(" pushl %%ebx\n" \ + " cpuid\n" \ + " mov %%ebx,%1\n" \ + " popl %%ebx" \ + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level)) + +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ + __asm(" pushl %%ebx\n" \ + " cpuid\n" \ + " mov %%ebx,%1\n" \ + " popl %%ebx" \ + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level), "2"(__count)) +#else +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level)) + +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level), "2"(__count)) +#endif + static __inline int __get_cpuid (unsigned int __level, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx) { - __asm("cpuid" : "=a"(*__eax), "=b" (*__ebx), "=c"(*__ecx), "=d"(*__edx) - : "0"(__level)); + __cpuid(__level, *__eax, *__ebx, *__ecx, *__edx); return 1; } + +static __inline int __get_cpuid_max (unsigned int __level, unsigned int *__sig) +{ + unsigned int __eax, __ebx, __ecx, __edx; +#if __i386__ + int __cpuid_supported; + + __asm(" pushfl\n" + " popl %%eax\n" + " movl %%eax,%%ecx\n" + " xorl $0x00200000,%%eax\n" + " pushl %%eax\n" + " popfl\n" + " pushfl\n" + " popl %%eax\n" + " movl $0,%0\n" + " cmpl %%eax,%%ecx\n" + " je 1f\n" + " movl $1,%0\n" + "1:" + : "=r" (__cpuid_supported) : : "eax", "ecx"); + if (!__cpuid_supported) + return 0; +#endif + + __cpuid(__level, __eax, __ebx, __ecx, __edx); + if (__sig) + *__sig = __ebx; + return __eax; +} From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:49:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E30B19E; Thu, 5 Dec 2013 21:49:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EDDA51EC9; Thu, 5 Dec 2013 21:49: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 rB5LnE3K011817; Thu, 5 Dec 2013 21:49:14 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5LnEcT011811; Thu, 5 Dec 2013 21:49:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312052149.rB5LnEcT011811@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Dec 2013 21:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259010 - in head/sys: conf powerpc/fpu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:49:15 -0000 Author: jhb Date: Thu Dec 5 21:49:14 2013 New Revision: 259010 URL: http://svnweb.freebsd.org/changeset/base/259010 Log: Fix debug printfs in FPU_EMU to compile on powerpc64 and enable it for powerpc64. This fixes the LINT64 kernel config. Approved by: nwhitehorn (the idea, not the actual patch) Modified: head/sys/conf/files.powerpc head/sys/powerpc/fpu/fpu_emu.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Dec 5 21:46:29 2013 (r259009) +++ head/sys/conf/files.powerpc Thu Dec 5 21:49:14 2013 (r259010) @@ -106,15 +106,15 @@ powerpc/booke/pmap.c optional booke powerpc/booke/trap.c optional booke powerpc/cpufreq/dfs.c optional cpufreq powerpc/cpufreq/pcr.c optional cpufreq aim -powerpc/fpu/fpu_add.c optional fpu_emu powerpc -powerpc/fpu/fpu_compare.c optional fpu_emu powerpc -powerpc/fpu/fpu_div.c optional fpu_emu powerpc -powerpc/fpu/fpu_emu.c optional fpu_emu powerpc -powerpc/fpu/fpu_explode.c optional fpu_emu powerpc -powerpc/fpu/fpu_implode.c optional fpu_emu powerpc -powerpc/fpu/fpu_mul.c optional fpu_emu powerpc -powerpc/fpu/fpu_sqrt.c optional fpu_emu powerpc -powerpc/fpu/fpu_subr.c optional fpu_emu powerpc +powerpc/fpu/fpu_add.c optional fpu_emu +powerpc/fpu/fpu_compare.c optional fpu_emu +powerpc/fpu/fpu_div.c optional fpu_emu +powerpc/fpu/fpu_emu.c optional fpu_emu +powerpc/fpu/fpu_explode.c optional fpu_emu +powerpc/fpu/fpu_implode.c optional fpu_emu +powerpc/fpu/fpu_mul.c optional fpu_emu +powerpc/fpu/fpu_sqrt.c optional fpu_emu +powerpc/fpu/fpu_subr.c optional fpu_emu powerpc/mambo/mambocall.S optional mambo powerpc/mambo/mambo.c optional mambo powerpc/mambo/mambo_console.c optional mambo Modified: head/sys/powerpc/fpu/fpu_emu.c ============================================================================== --- head/sys/powerpc/fpu/fpu_emu.c Thu Dec 5 21:46:29 2013 (r259009) +++ head/sys/powerpc/fpu/fpu_emu.c Thu Dec 5 21:49:14 2013 (r259010) @@ -326,8 +326,10 @@ fpu_execute(struct trapframe *tf, struct /* Store as integer */ ra = instr.i_x.i_ra; rb = instr.i_x.i_rb; - DPRINTF(FPE_INSN, ("reg %d has %x reg %d has %x\n", - ra, tf->fixreg[ra], rb, tf->fixreg[rb])); + DPRINTF(FPE_INSN, + ("reg %d has %jx reg %d has %jx\n", + ra, (uintmax_t)tf->fixreg[ra], rb, + (uintmax_t)tf->fixreg[rb])); addr = tf->fixreg[rb]; if (ra != 0) @@ -356,8 +358,9 @@ fpu_execute(struct trapframe *tf, struct /* calculate EA of load/store */ ra = instr.i_x.i_ra; rb = instr.i_x.i_rb; - DPRINTF(FPE_INSN, ("reg %d has %x reg %d has %x\n", - ra, tf->fixreg[ra], rb, tf->fixreg[rb])); + DPRINTF(FPE_INSN, ("reg %d has %jx reg %d has %jx\n", + ra, (uintmax_t)tf->fixreg[ra], rb, + (uintmax_t)tf->fixreg[rb])); addr = tf->fixreg[rb]; if (ra != 0) addr += tf->fixreg[ra]; @@ -373,8 +376,9 @@ fpu_execute(struct trapframe *tf, struct /* calculate EA of load/store */ ra = instr.i_d.i_ra; addr = instr.i_d.i_d; - DPRINTF(FPE_INSN, ("reg %d has %x displ %x\n", - ra, tf->fixreg[ra], addr)); + DPRINTF(FPE_INSN, ("reg %d has %jx displ %jx\n", + ra, (uintmax_t)tf->fixreg[ra], + (uintmax_t)addr)); if (ra != 0) addr += tf->fixreg[ra]; rt = instr.i_d.i_rt; @@ -420,7 +424,7 @@ fpu_execute(struct trapframe *tf, struct return (0); #ifdef notyet } else if (instr.i_any.i_opcd == OPC_load_st_62) { - /* These are 64-bit extenstions */ + /* These are 64-bit extensions */ return (NOTFPU); #endif } else if (instr.i_any.i_opcd == OPC_sp_fp_59 || @@ -784,7 +788,8 @@ fpu_execute(struct trapframe *tf, struct /* Move fpu condition codes to cr[1] */ tf->cr &= ~(0xf0000000>>bf); tf->cr |= (cond>>bf); - DPRINTF(FPE_INSN, ("fpu_execute: cr[%d] (cr=%x) <= %x\n", bf/4, tf->cr, cond)); + DPRINTF(FPE_INSN, ("fpu_execute: cr[%d] (cr=%jx) <= %x\n", + bf/4, (uintmax_t)tf->cr, cond)); } ((int *)&fs->fpscr)[1] = fsr; From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:49:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27CF42D7; Thu, 5 Dec 2013 21:49:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EDD871ECE; Thu, 5 Dec 2013 21:49:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5LnfoA012516; Thu, 5 Dec 2013 21:49:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5Lnfh5012514; Thu, 5 Dec 2013 21:49:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312052149.rB5Lnfh5012514@svn.freebsd.org> From: Dimitry Andric Date: Thu, 5 Dec 2013 21:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259011 - stable/9/contrib/llvm/lib/Transforms/InstCombine X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:49:42 -0000 Author: dim Date: Thu Dec 5 21:49:41 2013 New Revision: 259011 URL: http://svnweb.freebsd.org/changeset/base/259011 Log: MFC r255076: Pull in r189672 from upstream llvm trunk: InstCombine: Check for zero shift amounts before subtracting one causing integer overflow. PR17026. Also avoid undefined shifts and shift amounts larger than 64 bits (those are always undef because we can't represent integer types that large). This should fix assertion failures when building the emulators/xmame port. Reported by: bapt Modified: stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Thu Dec 5 21:49:14 2013 (r259010) +++ stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Thu Dec 5 21:49:41 2013 (r259011) @@ -845,21 +845,26 @@ Value *InstCombiner::SimplifyDemandedUse Value *InstCombiner::SimplifyShrShlDemandedBits(Instruction *Shr, Instruction *Shl, APInt DemandedMask, APInt &KnownZero, APInt &KnownOne) { - unsigned ShlAmt = cast(Shl->getOperand(1))->getZExtValue(); - unsigned ShrAmt = cast(Shr->getOperand(1))->getZExtValue(); + const APInt &ShlOp1 = cast(Shl->getOperand(1))->getValue(); + const APInt &ShrOp1 = cast(Shr->getOperand(1))->getValue(); + if (!ShlOp1 || !ShrOp1) + return 0; // Noop. + + Value *VarX = Shr->getOperand(0); + Type *Ty = VarX->getType(); + unsigned BitWidth = Ty->getIntegerBitWidth(); + if (ShlOp1.uge(BitWidth) || ShrOp1.uge(BitWidth)) + return 0; // Undef. + + unsigned ShlAmt = ShlOp1.getZExtValue(); + unsigned ShrAmt = ShrOp1.getZExtValue(); KnownOne.clearAllBits(); KnownZero = APInt::getBitsSet(KnownZero.getBitWidth(), 0, ShlAmt-1); KnownZero &= DemandedMask; - if (ShlAmt == 0 || ShrAmt == 0) - return 0; - - Value *VarX = Shr->getOperand(0); - Type *Ty = VarX->getType(); - - APInt BitMask1(APInt::getAllOnesValue(Ty->getIntegerBitWidth())); - APInt BitMask2(APInt::getAllOnesValue(Ty->getIntegerBitWidth())); + APInt BitMask1(APInt::getAllOnesValue(BitWidth)); + APInt BitMask2(APInt::getAllOnesValue(BitWidth)); bool isLshr = (Shr->getOpcode() == Instruction::LShr); BitMask1 = isLshr ? (BitMask1.lshr(ShrAmt) << ShlAmt) : From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:51:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB6EE448; Thu, 5 Dec 2013 21:51:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C56831F07; Thu, 5 Dec 2013 21:51:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5Lprbo020109; Thu, 5 Dec 2013 21:51:53 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5LprDP020107; Thu, 5 Dec 2013 21:51:53 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312052151.rB5LprDP020107@svn.freebsd.org> From: Dimitry Andric Date: Thu, 5 Dec 2013 21:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259012 - stable/9/contrib/llvm/tools/clang/tools/driver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:51:53 -0000 Author: dim Date: Thu Dec 5 21:51:53 2013 New Revision: 259012 URL: http://svnweb.freebsd.org/changeset/base/259012 Log: MFC r257109: Add clang-CC and CC to list of hints allowing clang to identify its operating mode as c++ instead of defaulting to c for the binary names CC and clang-CC. This fixes builds that use cmake, which automatically sets CXX to /usr/bin/CC by default. PR: bin/182442 Reviewed by: dwhite, wca Modified: stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp Thu Dec 5 21:49:41 2013 (r259011) +++ stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp Thu Dec 5 21:51:53 2013 (r259012) @@ -284,11 +284,13 @@ static void ParseProgName(SmallVectorImp } suffixes [] = { { "clang", false, false }, { "clang++", true, false }, + { "clang-CC", true, false }, { "clang-c++", true, false }, { "clang-cc", false, false }, { "clang-cpp", false, true }, { "clang-g++", true, false }, { "clang-gcc", false, false }, + { "CC", true, false }, { "cc", false, false }, { "cpp", false, true }, { "++", true, false }, From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:51:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E228449; Thu, 5 Dec 2013 21:51:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 309B01F08; Thu, 5 Dec 2013 21:51: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 rB5Lpt9q020209; Thu, 5 Dec 2013 21:51:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5Lpswl020196; Thu, 5 Dec 2013 21:51:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312052151.rB5Lpswl020196@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Dec 2013 21:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259013 - in head: sys/x86/include usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:51:55 -0000 Author: jhb Date: Thu Dec 5 21:51:54 2013 New Revision: 259013 URL: http://svnweb.freebsd.org/changeset/base/259013 Log: Fix the processor table entry structure to use a fixed-width type for 32-bit fields so it is the correct size on amd64. Remove a workaround for the broken structure from bhyve(8). MFC after: 1 week Modified: head/sys/x86/include/mptable.h head/usr.sbin/bhyve/mptbl.c Modified: head/sys/x86/include/mptable.h ============================================================================== --- head/sys/x86/include/mptable.h Thu Dec 5 21:51:53 2013 (r259012) +++ head/sys/x86/include/mptable.h Thu Dec 5 21:51:54 2013 (r259013) @@ -85,10 +85,10 @@ typedef struct PROCENTRY { u_char apic_id; u_char apic_version; u_char cpu_flags; - u_long cpu_signature; - u_long feature_flags; - u_long reserved1; - u_long reserved2; + u_int32_t cpu_signature; + u_int32_t feature_flags; + u_int32_t reserved1; + u_int32_t reserved2; } *proc_entry_ptr; #define PROCENTRY_FLAG_EN 0x01 Modified: head/usr.sbin/bhyve/mptbl.c ============================================================================== --- head/usr.sbin/bhyve/mptbl.c Thu Dec 5 21:51:53 2013 (r259012) +++ head/usr.sbin/bhyve/mptbl.c Thu Dec 5 21:51:54 2013 (r259013) @@ -74,19 +74,6 @@ __FBSDID("$FreeBSD$"); /* Number of i/o intr entries */ #define MPEII_MAX_IRQ 24 -/* Define processor entry struct since gets it wrong */ -typedef struct BPROCENTRY { - u_char type; - u_char apic_id; - u_char apic_version; - u_char cpu_flags; - uint32_t cpu_signature; - uint32_t feature_flags; - uint32_t reserved1; - uint32_t reserved2; -} *bproc_entry_ptr; -CTASSERT(sizeof(struct BPROCENTRY) == 20); - /* Bus entry defines */ #define MPE_NUM_BUSES 2 #define MPE_BUSNAME_LEN 6 @@ -134,7 +121,7 @@ mpt_build_mpch(mpcth_t mpch) } static void -mpt_build_proc_entries(bproc_entry_ptr mpep, int ncpu) +mpt_build_proc_entries(proc_entry_ptr mpep, int ncpu) { int i; @@ -247,7 +234,7 @@ mptable_build(struct vmctx *ctx, int ncp mpcth_t mpch; bus_entry_ptr mpeb; io_apic_entry_ptr mpei; - bproc_entry_ptr mpep; + proc_entry_ptr mpep; mpfps_t mpfp; int_entry_ptr mpie; char *curraddr; @@ -268,7 +255,7 @@ mptable_build(struct vmctx *ctx, int ncp mpt_build_mpch(mpch); curraddr += sizeof(*mpch); - mpep = (bproc_entry_ptr)curraddr; + mpep = (proc_entry_ptr)curraddr; mpt_build_proc_entries(mpep, ncpu); curraddr += sizeof(*mpep) * ncpu; mpch->entry_count += ncpu; From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:55:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C506A886; Thu, 5 Dec 2013 21:55:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1DE71F4C; Thu, 5 Dec 2013 21:55:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5LtAlE026685; Thu, 5 Dec 2013 21:55:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5LtAnQ026684; Thu, 5 Dec 2013 21:55:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312052155.rB5LtAnQ026684@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Dec 2013 21:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259014 - head/sys/security/audit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:55:10 -0000 Author: jhb Date: Thu Dec 5 21:55:10 2013 New Revision: 259014 URL: http://svnweb.freebsd.org/changeset/base/259014 Log: There is no sysctl with the MIB { CTL_KERN, KERN_MAXID }. MFC after: 2 weeks Modified: head/sys/security/audit/audit_bsm_klib.c Modified: head/sys/security/audit/audit_bsm_klib.c ============================================================================== --- head/sys/security/audit/audit_bsm_klib.c Thu Dec 5 21:51:54 2013 (r259013) +++ head/sys/security/audit/audit_bsm_klib.c Thu Dec 5 21:55:10 2013 (r259014) @@ -273,7 +273,6 @@ audit_ctlname_to_sysctlevent(int name[], case KERN_USRSTACK: case KERN_LOGSIGEXIT: case KERN_IOV_MAX: - case KERN_MAXID: return ((valid_arg & ARG_VALUE) ? AUE_SYSCTL : AUE_SYSCTL_NONADMIN); From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 21:58:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03969B6D; Thu, 5 Dec 2013 21:58:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E1EEB1F63; Thu, 5 Dec 2013 21:58: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 rB5Lw3GO032805; Thu, 5 Dec 2013 21:58:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5Lw3rD032794; Thu, 5 Dec 2013 21:58:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312052158.rB5Lw3rD032794@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Dec 2013 21:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259015 - in head/sys: amd64/amd64 i386/i386 pc98/pc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:58:04 -0000 Author: jhb Date: Thu Dec 5 21:58:02 2013 New Revision: 259015 URL: http://svnweb.freebsd.org/changeset/base/259015 Log: Fix a typo. Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c head/sys/pc98/pc98/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Dec 5 21:55:10 2013 (r259014) +++ head/sys/amd64/amd64/machdep.c Thu Dec 5 21:58:02 2013 (r259015) @@ -833,7 +833,7 @@ cpu_idle(int busy) /* Call main idle method. */ cpu_idle_fn(sbt); - /* Switch timers mack into active mode. */ + /* Switch timers back into active mode. */ if (!busy) { cpu_activeclock(); critical_exit(); Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Dec 5 21:55:10 2013 (r259014) +++ head/sys/i386/i386/machdep.c Thu Dec 5 21:58:02 2013 (r259015) @@ -1416,7 +1416,7 @@ cpu_idle(int busy) /* Call main idle method. */ cpu_idle_fn(sbt); - /* Switch timers mack into active mode. */ + /* Switch timers back into active mode. */ if (!busy) { cpu_activeclock(); critical_exit(); Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Thu Dec 5 21:55:10 2013 (r259014) +++ head/sys/pc98/pc98/machdep.c Thu Dec 5 21:58:02 2013 (r259015) @@ -1228,7 +1228,7 @@ cpu_idle(int busy) /* Call main idle method. */ cpu_idle_fn(sbt); - /* Switch timers mack into active mode. */ + /* Switch timers back into active mode. */ if (!busy) { cpu_activeclock(); critical_exit(); From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 22:17:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F9B1F94; Thu, 5 Dec 2013 22:17:13 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 37B9B1071; Thu, 5 Dec 2013 22:17:13 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5F9CCB922; Thu, 5 Dec 2013 17:17:09 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r259010 - in head/sys: conf powerpc/fpu Date: Thu, 5 Dec 2013 16:50:26 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201312052149.rB5LnEcT011811@svn.freebsd.org> In-Reply-To: <201312052149.rB5LnEcT011811@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201312051650.26379.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 05 Dec 2013 17:17:09 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 22:17:13 -0000 On Thursday, December 05, 2013 4:49:14 pm John Baldwin wrote: > Author: jhb > Date: Thu Dec 5 21:49:14 2013 > New Revision: 259010 > URL: http://svnweb.freebsd.org/changeset/base/259010 > > Log: > Fix debug printfs in FPU_EMU to compile on powerpc64 and enable it for > powerpc64. This fixes the LINT64 kernel config. > > Approved by: nwhitehorn (the idea, not the actual patch) LINT64 is yet another kernel config covered by 'make tinderbox', but not by the periodic tinderbox. It is probably worth adding to the periodic tinderbox (someday it'd be nice if the two tinderboxes built the same set of things). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 22:38:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C3DE478; Thu, 5 Dec 2013 22:38:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3465A1192; Thu, 5 Dec 2013 22:38:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5McwhU020885; Thu, 5 Dec 2013 22:38:58 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5McsVN020719; Thu, 5 Dec 2013 22:38:54 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312052238.rB5McsVN020719@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 5 Dec 2013 22:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 22:38:58 -0000 Author: ray Date: Thu Dec 5 22:38:53 2013 New Revision: 259016 URL: http://svnweb.freebsd.org/changeset/base/259016 Log: Merge VT(9) project (a.k.a. newcons). Reviewed by: nwhitehorn MFC_to_10_after: re approval Sponsored by: The FreeBSD Foundation Added: head/sys/dev/fb/fb_if.m - copied unchanged from r259015, user/ed/newcons/sys/dev/fb/fb_if.m head/sys/dev/fb/fbd.c - copied unchanged from r259015, user/ed/newcons/sys/dev/fb/fbd.c head/sys/dev/vt/ - copied from r259015, user/ed/newcons/sys/dev/vt/ head/sys/kern/subr_terminal.c - copied unchanged from r259015, user/ed/newcons/sys/kern/subr_terminal.c head/sys/sys/terminal.h - copied unchanged from r259015, user/ed/newcons/sys/sys/terminal.h Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.arm head/sys/conf/files.i386 head/sys/conf/files.powerpc head/sys/conf/files.sparc64 head/sys/conf/kmod.mk head/sys/conf/options head/sys/dev/drm2/drm_fb_helper.c head/sys/dev/drm2/drm_os_freebsd.h head/sys/dev/drm2/i915/i915_drv.c head/sys/dev/drm2/i915/intel_fb.c head/sys/dev/drm2/radeon/radeon.h head/sys/dev/drm2/radeon/radeon_drv.c head/sys/dev/drm2/radeon/radeon_fb.c head/sys/dev/drm2/radeon/radeon_pm.c head/sys/modules/drm2/i915kms/Makefile head/sys/modules/drm2/radeonkms/Makefile head/sys/sparc64/sparc64/machdep.c head/sys/sys/consio.h head/sys/sys/eventhandler.h head/sys/sys/fbio.h head/sys/sys/tty.h head/sys/teken/teken.c head/sys/teken/teken.h head/sys/teken/teken_subr.h Directory Properties: head/sys/ (props changed) head/sys/conf/ (props changed) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/conf/files Thu Dec 5 22:38:53 2013 (r259016) @@ -82,7 +82,7 @@ pccarddevs.h standard \ compile-with "${AWK} -f $S/tools/pccarddevs2h.awk $S/dev/pccard/pccarddevs" \ no-obj no-implicit-rule before-depend \ clean "pccarddevs.h" -teken_state.h optional sc \ +teken_state.h optional sc | vt \ dependency "$S/teken/gensequences $S/teken/sequences" \ compile-with "${AWK} -f $S/teken/gensequences $S/teken/sequences > teken_state.h" \ no-obj no-implicit-rule before-depend \ @@ -1396,6 +1396,8 @@ dev/ex/if_ex_isa.c optional ex isa dev/ex/if_ex_pccard.c optional ex pccard dev/exca/exca.c optional cbb dev/fatm/if_fatm.c optional fatm pci +dev/fb/fbd.c optional fbd | vt +dev/fb/fb_if.m optional fbd | vt dev/fb/splash.c optional splash dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_ic_if.m optional fdt @@ -2461,6 +2463,17 @@ dev/vge/if_vge.c optional vge dev/vkbd/vkbd.c optional vkbd dev/vr/if_vr.c optional vr pci +dev/vt/colors/vt_termcolors.c optional vt +dev/vt/font/vt_font_default.c optional vt +dev/vt/font/vt_mouse_cursor.c optional vt +dev/vt/hw/fb/vt_fb.c optional vt +dev/vt/hw/vga/vga.c optional vt vt_vga +dev/vt/logo/logo_freebsd.c optional vt +dev/vt/vt_buf.c optional vt +dev/vt/vt_consolectl.c optional vt +dev/vt/vt_core.c optional vt +dev/vt/vt_font.c optional vt +dev/vt/vt_sysmouse.c optional vt dev/vte/if_vte.c optional vte pci dev/vx/if_vx.c optional vx dev/vx/if_vx_eisa.c optional vx eisa @@ -2897,6 +2910,7 @@ kern/subr_sleepqueue.c standard kern/subr_smp.c standard kern/subr_stack.c optional ddb | stack | ktr kern/subr_taskqueue.c standard +kern/subr_terminal.c optional vt kern/subr_trap.c standard kern/subr_turnstile.c standard kern/subr_uio.c standard @@ -3796,7 +3810,7 @@ security/mac_portacl/mac_portacl.c optio security/mac_seeotheruids/mac_seeotheruids.c optional mac_seeotheruids security/mac_stub/mac_stub.c optional mac_stub security/mac_test/mac_test.c optional mac_test -teken/teken.c optional sc +teken/teken.c optional sc | vt ufs/ffs/ffs_alloc.c optional ffs ufs/ffs/ffs_balloc.c optional ffs ufs/ffs/ffs_inode.c optional ffs Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/conf/files.amd64 Thu Dec 5 22:38:53 2013 (r259016) @@ -241,7 +241,7 @@ dev/hyperv/vmbus/hv_connection.c optio dev/hyperv/vmbus/hv_hv.c optional hyperv dev/hyperv/vmbus/hv_ring_buffer.c optional hyperv dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c optional hyperv -dev/kbd/kbd.c optional atkbd | sc | ukbd +dev/kbd/kbd.c optional atkbd | sc | ukbd | vt dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev dev/nfe/if_nfe.c optional nfe pci Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/conf/files.arm Thu Dec 5 22:38:53 2013 (r259016) @@ -62,7 +62,7 @@ crypto/blowfish/bf_enc.c optional crypto crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/fb/fb.c optional sc dev/hwpmc/hwpmc_arm.c optional hwpmc -dev/kbd/kbd.c optional sc +dev/kbd/kbd.c optional sc | vt dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/conf/files.i386 Thu Dec 5 22:38:53 2013 (r259016) @@ -249,7 +249,7 @@ dev/ipmi/ipmi_smbios.c optional ipmi dev/ipmi/ipmi_ssif.c optional ipmi smbus dev/ipmi/ipmi_pci.c optional ipmi pci dev/ipmi/ipmi_linux.c optional ipmi compat_linux -dev/kbd/kbd.c optional atkbd | sc | ukbd +dev/kbd/kbd.c optional atkbd | sc | ukbd | vt dev/le/if_le_isa.c optional le isa dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev @@ -293,6 +293,7 @@ dev/viawd/viawd.c optional viawd dev/vmware/vmxnet3/if_vmx.c optional vmx dev/acpica/acpi_if.m standard dev/acpi_support/acpi_wmi_if.m standard +dev/vt/hw/xboxfb/xboxfb.c optional vt_xboxfb dev/wbwd/wbwd.c optional wbwd dev/wpi/if_wpi.c optional wpi dev/isci/isci.c optional isci Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/conf/files.powerpc Thu Dec 5 22:38:53 2013 (r259016) @@ -35,7 +35,7 @@ dev/iicbus/ad7417.c optional ad7417 pow dev/iicbus/ds1631.c optional ds1631 powermac dev/iicbus/ds1775.c optional ds1775 powermac dev/iicbus/max6690.c optional max6690 powermac -dev/kbd/kbd.c optional sc +dev/kbd/kbd.c optional sc | vt dev/nand/nfc_fsl.c optional nand mpc85xx # ofw can be either aim or fdt: fdt case handled in files. aim only powerpc specific. dev/ofw/openfirm.c optional aim @@ -65,6 +65,7 @@ dev/tsec/if_tsec.c optional tsec dev/tsec/if_tsec_fdt.c optional tsec fdt dev/uart/uart_cpu_powerpc.c optional uart dev/usb/controller/ehci_fsl.c optional ehci mpc85xx +dev/vt/hw/ofwfb/ofwfb.c optional vt aim kern/kern_clocksource.c standard kern/subr_dummy_vdso_tc.c standard kern/syscalls.c optional ktr Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/conf/files.sparc64 Thu Dec 5 22:38:53 2013 (r259016) @@ -39,7 +39,7 @@ dev/fb/fb.c optional sc dev/fb/gallant12x22.c optional sc dev/fb/machfb.c optional machfb sc dev/hwpmc/hwpmc_sparc64.c optional hwpmc -dev/kbd/kbd.c optional atkbd | sc | ukbd +dev/kbd/kbd.c optional atkbd | sc | ukbd | vt dev/le/if_le_lebuffer.c optional le sbus dev/le/if_le_ledma.c optional le sbus dev/le/lebuffer_sbus.c optional le sbus @@ -59,7 +59,8 @@ dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc dev/uart/uart_cpu_sparc64.c optional uart -dev/uart/uart_kbd_sun.c optional uart sc +dev/uart/uart_kbd_sun.c optional uart sc | vt +dev/vt/hw/ofwfb/ofwfb.c optional vt kern/kern_clocksource.c standard kern/subr_dummy_vdso_tc.c standard kern/syscalls.c optional ktr Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/conf/kmod.mk Thu Dec 5 22:38:53 2013 (r259016) @@ -340,7 +340,7 @@ CFLAGS+= ${CONF_CFLAGS} MFILES?= dev/acpica/acpi_if.m dev/acpi_support/acpi_wmi_if.m \ dev/agp/agp_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \ - dev/gpio/gpio_if.m dev/gpio/gpiobus_if.m \ + dev/fb/fb_if.m dev/gpio/gpio_if.m dev/gpio/gpiobus_if.m \ dev/iicbus/iicbb_if.m dev/iicbus/iicbus_if.m \ dev/mmc/mmcbr_if.m dev/mmc/mmcbus_if.m \ dev/mii/miibus_if.m dev/mvs/mvs_if.m dev/ofw/ofw_bus_if.m \ Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/conf/options Thu Dec 5 22:38:53 2013 (r259016) @@ -731,8 +731,10 @@ SAFE_DEBUG opt_safe.h SAFE_NO_RNG opt_safe.h SAFE_RNDTEST opt_safe.h -# syscons options +# syscons/vt options MAXCONS opt_syscons.h +VT_FB_DEFAULT_WIDTH opt_syscons.h +VT_FB_DEFAULT_HEIGHT opt_syscons.h SC_ALT_MOUSE_IMAGE opt_syscons.h SC_CUT_SPACES2TABS opt_syscons.h SC_CUT_SEPCHARS opt_syscons.h Modified: head/sys/dev/drm2/drm_fb_helper.c ============================================================================== --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 5 22:38:53 2013 (r259016) @@ -36,6 +36,41 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__FreeBSD__) +struct vt_kms_softc { + struct drm_fb_helper *fb_helper; + struct task fb_mode_task; +}; + +static fb_enter_t vt_kms_postswitch; +static void vt_restore_fbdev_mode(void *, int); + +/* Call restore out of vt(9) locks. */ +static void +vt_restore_fbdev_mode(void *arg, int pending) +{ + struct drm_fb_helper *fb_helper; + struct vt_kms_softc *sc; + + sc = (struct vt_kms_softc *)arg; + fb_helper = sc->fb_helper; + sx_xlock(&fb_helper->dev->mode_config.mutex); + drm_fb_helper_restore_fbdev_mode(fb_helper); + sx_xunlock(&fb_helper->dev->mode_config.mutex); +} + +static int +vt_kms_postswitch(void *arg) +{ + struct vt_kms_softc *sc; + + sc = (struct vt_kms_softc *)arg; + taskqueue_enqueue_fast(taskqueue_thread, &sc->fb_mode_task); + + return (0); +} +#endif + static DRM_LIST_HEAD(kernel_fb_helper_list); /* simple single crtc case helper function */ @@ -216,6 +251,10 @@ static int fb_get_options(const char *connector_name, char **option) { + /* + * TODO: store mode options pointer in ${option} for connector with + * name ${connector_name} + */ return (1); } @@ -892,11 +931,13 @@ int drm_fb_helper_single_fb_probe(struct int new_fb = 0; int crtc_count = 0; int i; -#if 0 struct fb_info *info; -#endif struct drm_fb_helper_surface_size sizes; int gamma_size = 0; +#if defined(__FreeBSD__) + struct vt_kms_softc *sc; + device_t kdev; +#endif memset(&sizes, 0, sizeof(struct drm_fb_helper_surface_size)); sizes.surface_depth = 24; @@ -973,8 +1014,21 @@ int drm_fb_helper_single_fb_probe(struct if (new_fb < 0) return new_fb; -#if 0 +#if defined(__FreeBSD__) + sc = malloc(sizeof(struct vt_kms_softc), DRM_MEM_KMS, + M_WAITOK | M_ZERO); + sc->fb_helper = fb_helper; + TASK_INIT(&sc->fb_mode_task, 0, vt_restore_fbdev_mode, sc); + info = fb_helper->fbdev; + + info->fb_name = device_get_nameunit(fb_helper->dev->device); + info->fb_depth = fb_helper->fb->bits_per_pixel; + info->fb_height = fb_helper->fb->height; + info->fb_width = fb_helper->fb->width; + info->fb_stride = fb_helper->fb->pitches[0]; + info->fb_priv = sc; + info->enter = &vt_kms_postswitch; #endif /* set the fb pointer */ @@ -982,7 +1036,18 @@ int drm_fb_helper_single_fb_probe(struct fb_helper->crtc_info[i].mode_set.fb = fb_helper->fb; } -#if 0 +#if defined(__FreeBSD__) + if (new_fb) { + device_t fbd; + int ret; + + kdev = fb_helper->dev->device; + fbd = device_add_child(kdev, "fbd", device_get_unit(kdev)); + ret = device_probe_and_attach(fbd); + if (ret != 0) + DRM_ERROR("Failed to attach fbd device: %d\n", ret); + } +#else if (new_fb) { info->var.pixclock = 0; if (register_framebuffer(info) < 0) { @@ -1006,7 +1071,6 @@ int drm_fb_helper_single_fb_probe(struct if (new_fb) list_add(&fb_helper->kernel_fb_list, &kernel_fb_helper_list); #endif - return 0; } Modified: head/sys/dev/drm2/drm_os_freebsd.h ============================================================================== --- head/sys/dev/drm2/drm_os_freebsd.h Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/dev/drm2/drm_os_freebsd.h Thu Dec 5 22:38:53 2013 (r259016) @@ -6,6 +6,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #if _BYTE_ORDER == _BIG_ENDIAN #define __BIG_ENDIAN 4321 #else Modified: head/sys/dev/drm2/i915/i915_drv.c ============================================================================== --- head/sys/dev/drm2/i915/i915_drv.c Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/dev/drm2/i915/i915_drv.c Thu Dec 5 22:38:53 2013 (r259016) @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "fb_if.h" + /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t i915_pciidlist[] = { i915_PCI_IDS @@ -380,6 +382,25 @@ i915_attach(device_t kdev) return (drm_attach(kdev, i915_pciidlist)); } +static struct fb_info * +i915_fb_helper_getinfo(device_t kdev) +{ + struct intel_fbdev *ifbdev; + drm_i915_private_t *dev_priv; + struct drm_device *dev; + struct fb_info *info; + + dev = device_get_softc(kdev); + dev_priv = dev->dev_private; + ifbdev = dev_priv->fbdev; + if (ifbdev == NULL) + return (NULL); + + info = ifbdev->helper.fbdev; + + return (info); +} + const struct intel_device_info * i915_get_device_id(int device) { @@ -400,6 +421,10 @@ static device_method_t i915_methods[] = DEVMETHOD(device_suspend, i915_suspend), DEVMETHOD(device_resume, i915_resume), DEVMETHOD(device_detach, drm_detach), + + /* Framebuffer service methods */ + DEVMETHOD(fb_getinfo, i915_fb_helper_getinfo), + DEVMETHOD_END }; Modified: head/sys/dev/drm2/i915/intel_fb.c ============================================================================== --- head/sys/dev/drm2/i915/intel_fb.c Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/dev/drm2/i915/intel_fb.c Thu Dec 5 22:38:53 2013 (r259016) @@ -41,8 +41,8 @@ static int intelfb_create(struct intel_f struct drm_device *dev = ifbdev->helper.dev; #if 0 struct drm_i915_private *dev_priv = dev->dev_private; - struct fb_info *info; #endif + struct fb_info *info; struct drm_framebuffer *fb; struct drm_mode_fb_cmd2 mode_cmd; struct drm_i915_gem_object *obj; @@ -86,6 +86,16 @@ static int intelfb_create(struct intel_f } info->par = ifbdev; +#else + info = malloc(sizeof(struct fb_info), DRM_MEM_KMS, M_WAITOK | M_ZERO); + info->fb_size = size; + info->fb_bpp = sizes->surface_bpp; + info->fb_width = sizes->fb_width; + info->fb_height = sizes->fb_height; + info->fb_pbase = dev->agp->base + obj->gtt_offset; + info->fb_vbase = (vm_offset_t)pmap_mapdev_attr(info->fb_pbase, size, + PAT_WRITE_COMBINING); + #endif ret = intel_framebuffer_init(dev, &ifbdev->ifb, &mode_cmd, obj); @@ -95,8 +105,8 @@ static int intelfb_create(struct intel_f fb = &ifbdev->ifb.base; ifbdev->helper.fb = fb; -#if 0 ifbdev->helper.fbdev = info; +#if 0 strcpy(info->fix.id, "inteldrmfb"); @@ -135,9 +145,8 @@ static int intelfb_create(struct intel_f /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ #endif - - DRM_DEBUG_KMS("allocated %dx%d fb: 0x%08x, bo %p\n", - fb->width, fb->height, + DRM_DEBUG_KMS("allocated %dx%d (s %dbits) fb: 0x%08x, bo %p\n", + fb->width, fb->height, fb->depth, obj->gtt_offset, obj); DRM_UNLOCK(dev); Modified: head/sys/dev/drm2/radeon/radeon.h ============================================================================== --- head/sys/dev/drm2/radeon/radeon.h Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/dev/drm2/radeon/radeon.h Thu Dec 5 22:38:53 2013 (r259016) @@ -2041,6 +2041,9 @@ void radeon_pm_acpi_event_handler(struct int radeon_ttm_init(struct radeon_device *rdev); void radeon_ttm_fini(struct radeon_device *rdev); +/* radeon_fb.c */ +struct fb_info * radeon_fb_helper_getinfo(device_t kdev); + /* r600.c */ int r600_ih_ring_alloc(struct radeon_device *rdev); void r600_ih_ring_fini(struct radeon_device *rdev); Modified: head/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_drv.c Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/dev/drm2/radeon/radeon_drv.c Thu Dec 5 22:38:53 2013 (r259016) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include +#include "fb_if.h" /* * KMS wrapper. @@ -495,6 +496,8 @@ radeon_resume(device_t kdev) return (-ret); } +extern struct fb_info * radeon_fb_helper_getinfo(device_t kdev); + static device_method_t radeon_methods[] = { /* Device interface */ DEVMETHOD(device_probe, radeon_probe), @@ -502,6 +505,10 @@ static device_method_t radeon_methods[] DEVMETHOD(device_suspend, radeon_suspend), DEVMETHOD(device_resume, radeon_resume), DEVMETHOD(device_detach, drm_detach), + + /* Framebuffer service methods */ + DEVMETHOD(fb_getinfo, radeon_fb_helper_getinfo), + DEVMETHOD_END }; Modified: head/sys/dev/drm2/radeon/radeon_fb.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_fb.c Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/dev/drm2/radeon/radeon_fb.c Thu Dec 5 22:38:53 2013 (r259016) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include #include @@ -46,7 +48,7 @@ struct radeon_fbdev { struct radeon_device *rdev; }; -#ifdef DUMBBELL_WIP +#if defined(__linux__) static struct fb_ops radeonfb_ops = { .owner = THIS_MODULE, .fb_check_var = drm_fb_helper_check_var, @@ -60,7 +62,7 @@ static struct fb_ops radeonfb_ops = { .fb_debug_enter = drm_fb_helper_debug_enter, .fb_debug_leave = drm_fb_helper_debug_leave, }; -#endif /* DUMBBELL_WIP */ +#endif int radeon_align_pitch(struct radeon_device *rdev, int width, int bpp, bool tiled) @@ -191,20 +193,13 @@ static int radeonfb_create(struct radeon struct drm_fb_helper_surface_size *sizes) { struct radeon_device *rdev = rfbdev->rdev; -#ifdef DUMBBELL_WIP struct fb_info *info; -#endif /* DUMBBELL_WIP */ struct drm_framebuffer *fb = NULL; struct drm_mode_fb_cmd2 mode_cmd; struct drm_gem_object *gobj = NULL; struct radeon_bo *rbo = NULL; -#ifdef DUMBBELL_WIP - device_t device = rdev->dev; -#endif /* DUMBBELL_WIP */ int ret; -#ifdef DUMBBELL_WIP unsigned long tmp; -#endif /* DUMBBELL_WIP */ mode_cmd.width = sizes->surface_width; mode_cmd.height = sizes->surface_height; @@ -224,16 +219,7 @@ static int radeonfb_create(struct radeon rbo = gem_to_radeon_bo(gobj); -#ifdef DUMBBELL_WIP - /* okay we have an object now allocate the framebuffer */ - info = framebuffer_alloc(0, device); - if (info == NULL) { - ret = -ENOMEM; - goto out_unref; - } - - info->par = rfbdev; -#endif /* DUMBBELL_WIP */ + info = malloc(sizeof(*info), DRM_MEM_KMS, M_WAITOK | M_ZERO); ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->rfb, &mode_cmd, gobj); if (ret) { @@ -245,61 +231,29 @@ static int radeonfb_create(struct radeon /* setup helper */ rfbdev->helper.fb = fb; -#ifdef DUMBBELL_WIP rfbdev->helper.fbdev = info; - memset_io(rbo->kptr, 0x0, radeon_bo_size(rbo)); - - strcpy(info->fix.id, "radeondrmfb"); - - drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); - - info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT; - info->fbops = &radeonfb_ops; + memset(rbo->kptr, 0x0, radeon_bo_size(rbo)); tmp = radeon_bo_gpu_offset(rbo) - rdev->mc.vram_start; - info->fix.smem_start = rdev->mc.aper_base + tmp; - info->fix.smem_len = radeon_bo_size(rbo); - info->screen_base = rbo->kptr; - info->screen_size = radeon_bo_size(rbo); - - drm_fb_helper_fill_var(info, &rfbdev->helper, sizes->fb_width, sizes->fb_height); - - /* setup aperture base/size for vesafb takeover */ - info->apertures = alloc_apertures(1); - if (!info->apertures) { - ret = -ENOMEM; - goto out_unref; - } - info->apertures->ranges[0].base = rdev->ddev->mode_config.fb_base; - info->apertures->ranges[0].size = rdev->mc.aper_size; + info->fb_size = radeon_bo_size(rbo); + info->fb_bpp = sizes->surface_bpp; + info->fb_width = sizes->surface_width; + info->fb_height = sizes->surface_height; + info->fb_pbase = rdev->mc.aper_base + tmp; + info->fb_vbase = (vm_offset_t)rbo->kptr; - /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ - - if (info->screen_base == NULL) { - ret = -ENOSPC; - goto out_unref; - } - - ret = fb_alloc_cmap(&info->cmap, 256, 0); - if (ret) { - ret = -ENOMEM; - goto out_unref; - } - - DRM_INFO("fb mappable at 0x%lX\n", info->fix.smem_start); + DRM_INFO("fb mappable at 0x%" PRIXPTR "\n", info->fb_pbase); DRM_INFO("vram apper at 0x%lX\n", (unsigned long)rdev->mc.aper_base); DRM_INFO("size %lu\n", (unsigned long)radeon_bo_size(rbo)); DRM_INFO("fb depth is %d\n", fb->depth); DRM_INFO(" pitch is %d\n", fb->pitches[0]); - vga_switcheroo_client_fb_set(rdev->ddev->pdev, info); -#endif /* DUMBBELL_WIP */ return 0; out_unref: if (rbo) { - + /* TODO? dumbbell@ */ } if (fb && ret) { drm_gem_object_unreference(gobj); @@ -332,21 +286,13 @@ void radeon_fb_output_poll_changed(struc static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfbdev) { -#ifdef DUMBBELL_WIP struct fb_info *info; -#endif /* DUMBBELL_WIP */ struct radeon_framebuffer *rfb = &rfbdev->rfb; -#ifdef DUMBBELL_WIP if (rfbdev->helper.fbdev) { info = rfbdev->helper.fbdev; - - unregister_framebuffer(info); - if (info->cmap.len) - fb_dealloc_cmap(&info->cmap); - framebuffer_release(info); + free(info, DRM_MEM_KMS); } -#endif /* DUMBBELL_WIP */ if (rfb->obj) { DRM_UNLOCK(dev); /* Work around lock recursion. dumbbell@ */ @@ -431,3 +377,22 @@ bool radeon_fbdev_robj_is_fb(struct rade return true; return false; } + +struct fb_info * +radeon_fb_helper_getinfo(device_t kdev) +{ + struct drm_device *dev; + struct radeon_device *rdev; + struct radeon_fbdev *rfbdev; + struct fb_info *info; + + dev = device_get_softc(kdev); + rdev = dev->dev_private; + rfbdev = rdev->mode_info.rfbdev; + if (rfbdev == NULL) + return (NULL); + + info = rfbdev->helper.fbdev; + + return (info); +} Modified: head/sys/dev/drm2/radeon/radeon_pm.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_pm.c Thu Dec 5 21:58:02 2013 (r259015) +++ head/sys/dev/drm2/radeon/radeon_pm.c Thu Dec 5 22:38:53 2013 (r259016) @@ -248,7 +248,7 @@ static void radeon_pm_set_clocks(struct (rdev->pm.requested_power_state_index == rdev->pm.current_power_state_index)) return; - DRM_LOCK(rdev->ddev); + //DRM_LOCK(rdev->ddev); XXX Recursion, already locked in drm_attach/drm_load -- dumbbell@ sx_xlock(&rdev->pm.mclk_lock); sx_xlock(&rdev->ring_lock); @@ -263,7 +263,7 @@ static void radeon_pm_set_clocks(struct /* needs a GPU reset dont reset here */ sx_xunlock(&rdev->ring_lock); sx_xunlock(&rdev->pm.mclk_lock); - DRM_UNLOCK(rdev->ddev); + //DRM_UNLOCK(rdev->ddev); XXX Recursion, already locked in drm_attach/drm_load -- dumbbell@ return; } } @@ -299,7 +299,7 @@ static void radeon_pm_set_clocks(struct sx_xunlock(&rdev->ring_lock); sx_xunlock(&rdev->pm.mclk_lock); - DRM_UNLOCK(rdev->ddev); + //DRM_UNLOCK(rdev->ddev); XXX Recursion, already locked in drm_attach/drm_load -- dumbbell@ } static void radeon_pm_print_states(struct radeon_device *rdev) Copied: head/sys/dev/fb/fb_if.m (from r259015, user/ed/newcons/sys/dev/fb/fb_if.m) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fb/fb_if.m Thu Dec 5 22:38:53 2013 (r259016, copy of r259015, user/ed/newcons/sys/dev/fb/fb_if.m) @@ -0,0 +1,13 @@ +#include +#include + +INTERFACE fb; + +METHOD int pin_max { + device_t dev; + int *npins; +}; + +METHOD struct fb_info * getinfo { + device_t dev; +}; Copied: head/sys/dev/fb/fbd.c (from r259015, user/ed/newcons/sys/dev/fb/fbd.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fb/fbd.c Thu Dec 5 22:38:53 2013 (r259016, copy of r259015, user/ed/newcons/sys/dev/fb/fbd.c) @@ -0,0 +1,467 @@ +/*- + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Aleksandr Rybalko under sponsorship from the + * FreeBSD Foundation. + * + * 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$ + */ + +/* Generic framebuffer */ +/* TODO unlink from VT(9) */ +/* TODO done normal /dev/fb methods */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "fb_if.h" + +LIST_HEAD(fb_list_head_t, fb_list_entry) fb_list_head = + LIST_HEAD_INITIALIZER(fb_list_head); +struct fb_list_entry { + struct fb_info *fb_info; + struct cdev *fb_si; + LIST_ENTRY(fb_list_entry) fb_list; +}; + +struct fbd_softc { + device_t sc_dev; + struct fb_info *sc_info; +}; + +static void fbd_evh_init(void *); +/* SI_ORDER_SECOND, just after EVENTHANDLERs initialized. */ +SYSINIT(fbd_evh_init, SI_SUB_CONFIGURE, SI_ORDER_SECOND, fbd_evh_init, NULL); + +static d_open_t fb_open; +static d_close_t fb_close; +static d_read_t fb_read; +static d_write_t fb_write; +static d_ioctl_t fb_ioctl; +static d_mmap_t fb_mmap; + +static struct cdevsw fb_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, + .d_open = fb_open, + .d_close = fb_close, + .d_read = fb_read, + .d_write = fb_write, + .d_ioctl = fb_ioctl, + .d_mmap = fb_mmap, + .d_name = "fb", +}; + +static int framebuffer_dev_unit = 0; + +static int +fb_open(struct cdev *dev, int oflags, int devtype, struct thread *td) +{ + + return (0); +} + +static int +fb_close(struct cdev *dev, int fflag, int devtype, struct thread *td) +{ + + return (0); +} + +static int +fb_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, + struct thread *td) +{ + struct fb_info *info; + int error; + + error = 0; + info = dev->si_drv1; + + switch (cmd) { + case FBIOGTYPE: + bcopy(info, (struct fbtype *)data, sizeof(struct fbtype)); + break; + + case FBIO_GETWINORG: /* get frame buffer window origin */ + *(u_int *)data = 0; + break; + + case FBIO_GETDISPSTART: /* get display start address */ + ((video_display_start_t *)data)->x = 0; + ((video_display_start_t *)data)->y = 0; + break; + + case FBIO_GETLINEWIDTH: /* get scan line width in bytes */ + *(u_int *)data = info->fb_stride; + break; + + case FBIO_BLANK: /* blank display */ + error = 0; /* TODO */ + break; + + default: + error = ENOIOCTL; + break; + } + return (error); +} + +static int +fb_read(struct cdev *dev, struct uio *uio, int ioflag) +{ + + return (0); /* XXX nothing to read, yet */ +} + +static int +fb_write(struct cdev *dev, struct uio *uio, int ioflag) +{ + + return (0); /* XXX nothing written */ +} + +static int +fb_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int nprot, + vm_memattr_t *memattr) +{ + struct fb_info *info; + + info = dev->si_drv1; + if (offset < info->fb_size) { + *paddr = info->fb_pbase + offset; + return (0); + } + return (EINVAL); +} + + +static void +vt_fb_mem_wr1(struct fb_info *sc, uint32_t o, uint8_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + *(uint8_t *)(sc->fb_vbase + o) = v; +} + +static void +vt_fb_mem_wr2(struct fb_info *sc, uint32_t o, uint16_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + *(uint16_t *)(sc->fb_vbase + o) = v; +} + +static void +vt_fb_mem_wr4(struct fb_info *sc, uint32_t o, uint32_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + *(uint32_t *)(sc->fb_vbase + o) = v; +} + +static void +vt_fb_mem_copy(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from, + uint32_t size) +{ + + memmove((void *)(sc->fb_vbase + offset_to), (void *)(sc->fb_vbase + + offset_from), size); +} + +static void +vt_fb_indir_wr1(struct fb_info *sc, uint32_t o, uint8_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + sc->fb_write(sc->fb_priv, o, &v, 1); +} + +static void +vt_fb_indir_wr2(struct fb_info *sc, uint32_t o, uint16_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + sc->fb_write(sc->fb_priv, o, &v, 2); +} + +static void +vt_fb_indir_wr4(struct fb_info *sc, uint32_t o, uint32_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + sc->fb_write(sc->fb_priv, o, &v, 4); +} + +static void +vt_fb_indir_copy(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from, + uint32_t size) +{ + + sc->copy(sc->fb_priv, offset_to, offset_from, size); +} + +int +fb_probe(struct fb_info *info) +{ + + if (info->fb_size == 0) + return (ENXIO); + + if (info->fb_write != NULL) { + if (info->fb_write == NULL) { + return (EINVAL); + } + info->fb_flags |= FB_FLAG_NOMMAP; + info->wr1 = &vt_fb_indir_wr1; + info->wr2 = &vt_fb_indir_wr2; + info->wr4 = &vt_fb_indir_wr4; + info->copy = &vt_fb_indir_copy; + } else if (info->fb_vbase != 0) { + if (info->fb_pbase == 0) + info->fb_flags |= FB_FLAG_NOMMAP; + info->wr1 = &vt_fb_mem_wr1; + info->wr2 = &vt_fb_mem_wr2; + info->wr4 = &vt_fb_mem_wr4; + info->copy = &vt_fb_mem_copy; + } else + return (ENXIO); + + return (0); +} + + +static int +fb_init(struct fb_list_entry *entry, int unit) +{ + struct fb_info *info; + + info = entry->fb_info; + entry->fb_si = make_dev(&fb_cdevsw, unit, UID_ROOT, GID_WHEEL, + 0600, "fb%d", unit); + entry->fb_si->si_drv1 = info; + + return (0); +} + +int +fbd_list() +{ + struct fb_list_entry *entry; + + if (LIST_EMPTY(&fb_list_head)) + return (ENOENT); + + LIST_FOREACH(entry, &fb_list_head, fb_list) { + printf("FB %s @%p\n", entry->fb_info->fb_name, + (void *)entry->fb_info->fb_pbase); + } + + return (0); +} + +static struct fb_list_entry * +fbd_find(struct fb_info* info) +{ + struct fb_list_entry *entry, *tmp; + + LIST_FOREACH_SAFE(entry, &fb_list_head, fb_list, tmp) { + if (entry->fb_info == info) { + return (entry); + } + } + + return (NULL); +} + +int +fbd_register(struct fb_info* info) +{ + struct fb_list_entry *entry; + int err, first; + + first = 0; + if (LIST_EMPTY(&fb_list_head)) + first++; + + entry = fbd_find(info); + if (entry != NULL) { + /* XXX Update framebuffer params */ + return (0); + } + + err = fb_probe(info); + if (err) + return (err); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 22:53:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0198D850; Thu, 5 Dec 2013 22:53:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E22FD127C; Thu, 5 Dec 2013 22:53:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5MrWqY057862; Thu, 5 Dec 2013 22:53:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5MrWpe057860; Thu, 5 Dec 2013 22:53:32 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201312052253.rB5MrWpe057860@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 5 Dec 2013 22:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259017 - head/bin/test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 22:53:33 -0000 Author: jilles Date: Thu Dec 5 22:53:32 2013 New Revision: 259017 URL: http://svnweb.freebsd.org/changeset/base/259017 Log: test: Avoid looking up again the type of a known binary operator. Modified: head/bin/test/test.c Modified: head/bin/test/test.c ============================================================================== --- head/bin/test/test.c Thu Dec 5 22:38:53 2013 (r259016) +++ head/bin/test/test.c Thu Dec 5 22:53:32 2013 (r259017) @@ -172,7 +172,7 @@ static char **t_wp; static int parenlevel; static int aexpr(enum token); -static int binop(void); +static int binop(enum token); static int equalf(const char *, const char *); static int filstat(char *, enum token); static int getn(const char *); @@ -312,21 +312,20 @@ primary(enum token n) } } - if (TOKEN_TYPE(t_lex(nargc > 0 ? t_wp[1] : NULL)) == BINOP) - return binop(); + nn = t_lex(nargc > 0 ? t_wp[1] : NULL); + if (TOKEN_TYPE(nn) == BINOP) + return binop(nn); return strlen(*t_wp) > 0; } static int -binop(void) +binop(enum token n) { const char *opnd1, *op, *opnd2; - enum token n; opnd1 = *t_wp; - op = nargc > 0 ? t_wp[1] : NULL; - n = t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL); + op = nargc > 0 ? (--nargc, *++t_wp) : NULL; if ((opnd2 = nargc > 0 ? (--nargc, *++t_wp) : NULL) == NULL) syntax(op, "argument expected"); From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 22:56:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 379619C1; Thu, 5 Dec 2013 22:56:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 23FE31295; Thu, 5 Dec 2013 22:56:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5Mucvm063903; Thu, 5 Dec 2013 22:56:38 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5MubFq063891; Thu, 5 Dec 2013 22:56:37 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312052256.rB5MubFq063891@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 5 Dec 2013 22:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259018 - in head: etc/mtree include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 22:56:38 -0000 Author: ray Date: Thu Dec 5 22:56:37 2013 New Revision: 259018 URL: http://svnweb.freebsd.org/changeset/base/259018 Log: Install teken.h for userland. Part of VT(9) project merge. Reviewed by: nwhitehorn MFC_to_10_after: re approval Sponsored by: The FreeBSD Foundation Modified: head/etc/mtree/BSD.include.dist head/include/Makefile Directory Properties: head/etc/ (props changed) head/include/ (props changed) Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Thu Dec 5 22:53:32 2013 (r259017) +++ head/etc/mtree/BSD.include.dist Thu Dec 5 22:56:37 2013 (r259018) @@ -329,6 +329,8 @@ .. sys .. + teken + .. ufs ffs .. Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Thu Dec 5 22:53:32 2013 (r259017) +++ head/include/Makefile Thu Dec 5 22:56:37 2013 (r259018) @@ -225,6 +225,9 @@ copies: cd ${.CURDIR}/../sys/rpc; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 types.h \ ${DESTDIR}${INCLUDEDIR}/rpc + cd ${.CURDIR}/../sys/teken; \ + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \ + ${DESTDIR}${INCLUDEDIR}/teken symlinks: @${ECHO} "Setting up symlinks to kernel source tree..." From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 22:58:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6BF0B29; Thu, 5 Dec 2013 22:58:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AA8FA12AB; Thu, 5 Dec 2013 22:58: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 rB5Mw5AL067658; Thu, 5 Dec 2013 22:58:05 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5Mw5sH067657; Thu, 5 Dec 2013 22:58:05 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312052258.rB5Mw5sH067657@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 5 Dec 2013 22:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259019 - head/tools/tools/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 22:58:05 -0000 Author: ray Date: Thu Dec 5 22:58:05 2013 New Revision: 259019 URL: http://svnweb.freebsd.org/changeset/base/259019 Log: Add VT(9) font tools. Reviewed by: nwhitehorn MFC_to_10_after: re approval Sponsored by: The FreeBSD Foundation Added: head/tools/tools/vt/ - copied from r259016, user/ed/newcons/tools/tools/vt/ From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 01:46:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFEEBAA; Fri, 6 Dec 2013 01:46:37 +0000 (UTC) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 777A51DA6; Fri, 6 Dec 2013 01:46:37 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 2D4EF4000B; Fri, 6 Dec 2013 02:46:35 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 1CB334000C; Fri, 6 Dec 2013 02:46:35 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (mx.daemonic.se [IPv6:2001:470:dca9:0:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id B7C324000B; Fri, 6 Dec 2013 02:46:33 +0100 (CET) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3dbGqY2CGgz8jLC; Fri, 6 Dec 2013 02:46:33 +0100 (CET) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([IPv6:2001:470:dca9:0:1::3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) (amavisd-new, port 10025) with ESMTPS id 1s7RHjc-jsJc; Fri, 6 Dec 2013 02:46:31 +0100 (CET) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2001:470:dca9:0:1::4]) by mx.daemonic.se (Postfix) with ESMTPS id 3dbGqV6wlWz8jLB; Fri, 6 Dec 2013 02:46:30 +0100 (CET) Received: from [IPv6:::1] (celes.daemonic.se [IPv6:2001:470:dca9:1::3]) by mail.daemonic.se (Postfix) with ESMTPSA id 3dbGqV4cvlz9D6J; Fri, 6 Dec 2013 02:46:30 +0100 (CET) Message-ID: <52A12C7B.5010102@daemonic.se> Date: Fri, 06 Dec 2013 02:46:35 +0100 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken References: <201312052238.rB5McsVN020719@svn.freebsd.org> In-Reply-To: <201312052238.rB5McsVN020719@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 131205-0, 2013-12-05), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 01:46:37 -0000 On 2013-12-05 23:38, Aleksandr Rybalko wrote: > Author: ray > Date: Thu Dec 5 22:38:53 2013 > New Revision: 259016 > URL: http://svnweb.freebsd.org/changeset/base/259016 > > Log: > Merge VT(9) project (a.k.a. newcons). WOHO! Congratulations! Don't forget to update kernel configurations, and if/when you enable it by default (or now, maybe) please bump osversion. Regards! -- Niclas From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 02:20:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5B14E7C; Fri, 6 Dec 2013 02:20:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 866F71FEF; Fri, 6 Dec 2013 02:20:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB62K0X4033153; Fri, 6 Dec 2013 02:20:00 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB62JxrU033055; Fri, 6 Dec 2013 02:19:59 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312060219.rB62JxrU033055@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 6 Dec 2013 02:19:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259022 - in head/contrib/gcc: . cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 02:20:00 -0000 Author: pfg Date: Fri Dec 6 02:19:58 2013 New Revision: 259022 URL: http://svnweb.freebsd.org/changeset/base/259022 Log: gcc: Include types in error message for build_binary_op. Mostly cosmetic change, again to reduce differences with Apple's gcc. Obtained from: gcc 4.3 (rev. 125239; GPLv2) MFC after: 3 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/c-common.c head/contrib/gcc/c-common.h head/contrib/gcc/c-typeck.c head/contrib/gcc/cp/ChangeLog.gcc43 head/contrib/gcc/cp/typeck.c Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/ChangeLog.gcc43 Fri Dec 6 02:19:58 2013 (r259022) @@ -57,6 +57,14 @@ operand. (store_expr): Handle BLKmode moves by calling emit_block_move. +2007-05-31 Daniel Berlin (r125239) + + * c-typeck.c (build_indirect_ref): Include type in error message. + (build_binary_op): Pass types to binary_op_error. + * c-common.c (binary_op_error): Take two type arguments, print out + types with error. + * c-common.h (binary_op_error): Update prototype. + 2007-05-27 Eric Christopher (r125116) * config/rs6000/rs6000.c (rs6000_emit_prologue): Update Modified: head/contrib/gcc/c-common.c ============================================================================== --- head/contrib/gcc/c-common.c Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/c-common.c Fri Dec 6 02:19:58 2013 (r259022) @@ -2019,10 +2019,10 @@ min_precision (tree value, int unsignedp } /* Print an error message for invalid operands to arith operation - CODE. */ + CODE with TYPE0 for operand 0, and TYPE1 for operand 1. */ void -binary_op_error (enum tree_code code) +binary_op_error (enum tree_code code, tree type0, tree type1) { const char *opname; @@ -2073,7 +2073,8 @@ binary_op_error (enum tree_code code) default: gcc_unreachable (); } - error ("invalid operands to binary %s", opname); + error ("invalid operands to binary %s (have %qT and %qT)", opname, + type0, type1); } /* Subroutine of build_binary_op, used for comparison operations. Modified: head/contrib/gcc/c-common.h ============================================================================== --- head/contrib/gcc/c-common.h Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/c-common.h Fri Dec 6 02:19:58 2013 (r259022) @@ -654,7 +654,7 @@ extern tree c_sizeof_or_alignof_type (tr extern tree c_alignof_expr (tree); /* Print an error message for invalid operands to arith operation CODE. NOP_EXPR is used as a special case (see truthvalue_conversion). */ -extern void binary_op_error (enum tree_code); +extern void binary_op_error (enum tree_code, tree, tree); extern tree fix_string_type (tree); struct varray_head_tag; extern void constant_expression_warning (tree); Modified: head/contrib/gcc/c-typeck.c ============================================================================== --- head/contrib/gcc/c-typeck.c Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/c-typeck.c Fri Dec 6 02:19:58 2013 (r259022) @@ -1923,7 +1923,7 @@ build_indirect_ref (tree ptr, const char } } else if (TREE_CODE (pointer) != ERROR_MARK) - error ("invalid type argument of %qs", errorstring); + error ("invalid type argument of %qs (have %qT)", errorstring, type); return error_mark_node; } @@ -8135,7 +8135,7 @@ build_binary_op (enum tree_code code, tr || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0), TREE_TYPE (type1)))) { - binary_op_error (code); + binary_op_error (code, type0, type1); return error_mark_node; } @@ -8431,7 +8431,7 @@ build_binary_op (enum tree_code code, tr if (!result_type) { - binary_op_error (code); + binary_op_error (code, TREE_TYPE (op0), TREE_TYPE (op1)); return error_mark_node; } Modified: head/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/cp/ChangeLog.gcc43 Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/cp/ChangeLog.gcc43 Fri Dec 6 02:19:58 2013 (r259022) @@ -18,6 +18,10 @@ * decl2.c (determine_visibility): Remove duplicate code for handling type info. +2007-05-31 Daniel Berlin (r125239) + + * typeck.c (build_binary_op): Include types in error. + 2007-05-05 Geoffrey Keating (r124467) PR 31775 Modified: head/contrib/gcc/cp/typeck.c ============================================================================== --- head/contrib/gcc/cp/typeck.c Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/cp/typeck.c Fri Dec 6 02:19:58 2013 (r259022) @@ -3476,7 +3476,7 @@ build_binary_op (enum tree_code code, tr || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0), TREE_TYPE (type1))) { - binary_op_error (code); + binary_op_error (code, type0, type1); return error_mark_node; } arithmetic_types_p = 1; From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 08:42:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E81755DB; Fri, 6 Dec 2013 08:42:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C86001893; Fri, 6 Dec 2013 08:42:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB68gg8I055868; Fri, 6 Dec 2013 08:42:42 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB68ggWj055854; Fri, 6 Dec 2013 08:42:42 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201312060842.rB68ggWj055854@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 6 Dec 2013 08:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259023 - in head/sys/dev/usb: . controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 08:42:43 -0000 Author: hselasky Date: Fri Dec 6 08:42:41 2013 New Revision: 259023 URL: http://svnweb.freebsd.org/changeset/base/259023 Log: Improve the XHCI command timeout recovery handling code. MFC after: 1 week Modified: head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/usb_bus.h head/sys/dev/usb/usb_controller.h Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Fri Dec 6 02:19:58 2013 (r259022) +++ head/sys/dev/usb/controller/usb_controller.c Fri Dec 6 08:42:41 2013 (r259023) @@ -296,6 +296,28 @@ usb_resume(device_t dev) } /*------------------------------------------------------------------------* + * usb_bus_reset_async_locked + *------------------------------------------------------------------------*/ +void +usb_bus_reset_async_locked(struct usb_bus *bus) +{ + USB_BUS_LOCK_ASSERT(bus, MA_OWNED); + + DPRINTF("\n"); + + if (bus->reset_msg[0].hdr.pm_qentry.tqe_prev != NULL || + bus->reset_msg[1].hdr.pm_qentry.tqe_prev != NULL) { + DPRINTF("Reset already pending\n"); + return; + } + + device_printf(bus->parent, "Resetting controller\n"); + + usb_proc_msignal(USB_BUS_EXPLORE_PROC(bus), + &bus->reset_msg[0], &bus->reset_msg[1]); +} + +/*------------------------------------------------------------------------* * usb_shutdown *------------------------------------------------------------------------*/ static int @@ -429,6 +451,8 @@ usb_bus_suspend(struct usb_proc_msg *pm) usb_error_t err; uint8_t do_unlock; + DPRINTF("\n"); + bus = ((struct usb_bus_msg *)pm)->bus; udev = bus->devices[USB_ROOT_HUB_ADDR]; @@ -484,6 +508,8 @@ usb_bus_resume(struct usb_proc_msg *pm) usb_error_t err; uint8_t do_unlock; + DPRINTF("\n"); + bus = ((struct usb_bus_msg *)pm)->bus; udev = bus->devices[USB_ROOT_HUB_ADDR]; @@ -533,6 +559,28 @@ usb_bus_resume(struct usb_proc_msg *pm) } /*------------------------------------------------------------------------* + * usb_bus_reset + * + * This function is used to reset the USB contoller. + *------------------------------------------------------------------------*/ +static void +usb_bus_reset(struct usb_proc_msg *pm) +{ + struct usb_bus *bus; + + DPRINTF("\n"); + + bus = ((struct usb_bus_msg *)pm)->bus; + + if (bus->bdev == NULL || bus->no_explore != 0) + return; + + /* a suspend and resume will reset the USB controller */ + usb_bus_suspend(pm); + usb_bus_resume(pm); +} + +/*------------------------------------------------------------------------* * usb_bus_shutdown * * This function is used to shutdown the USB contoller. @@ -750,6 +798,11 @@ usb_attach_sub(device_t dev, struct usb_ bus->resume_msg[1].hdr.pm_callback = &usb_bus_resume; bus->resume_msg[1].bus = bus; + bus->reset_msg[0].hdr.pm_callback = &usb_bus_reset; + bus->reset_msg[0].bus = bus; + bus->reset_msg[1].hdr.pm_callback = &usb_bus_reset; + bus->reset_msg[1].bus = bus; + bus->shutdown_msg[0].hdr.pm_callback = &usb_bus_shutdown; bus->shutdown_msg[0].bus = bus; bus->shutdown_msg[1].hdr.pm_callback = &usb_bus_shutdown; Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Fri Dec 6 02:19:58 2013 (r259022) +++ head/sys/dev/usb/controller/xhci.c Fri Dec 6 08:42:41 2013 (r259023) @@ -278,6 +278,69 @@ xhci_ctx_get_le64(struct xhci_softc *sc, } #endif +static int +xhci_reset_command_queue_locked(struct xhci_softc *sc) +{ + struct usb_page_search buf_res; + struct xhci_hw_root *phwr; + uint64_t addr; + uint32_t temp; + + DPRINTF("\n"); + + temp = XREAD4(sc, oper, XHCI_CRCR_LO); + if (temp & XHCI_CRCR_LO_CRR) { + DPRINTF("Command ring running\n"); + temp &= ~(XHCI_CRCR_LO_CS | XHCI_CRCR_LO_CA); + + /* + * Try to abort the last command as per section + * 4.6.1.2 "Aborting a Command" of the XHCI + * specification: + */ + + /* stop and cancel */ + XWRITE4(sc, oper, XHCI_CRCR_LO, temp | XHCI_CRCR_LO_CS); + XWRITE4(sc, oper, XHCI_CRCR_HI, 0); + + XWRITE4(sc, oper, XHCI_CRCR_LO, temp | XHCI_CRCR_LO_CA); + XWRITE4(sc, oper, XHCI_CRCR_HI, 0); + + /* wait 250ms */ + usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 4); + + /* check if command ring is still running */ + temp = XREAD4(sc, oper, XHCI_CRCR_LO); + if (temp & XHCI_CRCR_LO_CRR) { + DPRINTF("Comand ring still running\n"); + return (USB_ERR_IOERROR); + } + } + + /* reset command ring */ + sc->sc_command_ccs = 1; + sc->sc_command_idx = 0; + + usbd_get_page(&sc->sc_hw.root_pc, 0, &buf_res); + + /* setup command ring control base address */ + addr = buf_res.physaddr; + phwr = buf_res.buffer; + addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_commands[0]; + + DPRINTF("CRCR=0x%016llx\n", (unsigned long long)addr); + + memset(phwr->hwr_commands, 0, sizeof(phwr->hwr_commands)); + phwr->hwr_commands[XHCI_MAX_COMMANDS - 1].qwTrb0 = htole64(addr); + + usb_pc_cpu_flush(&sc->sc_hw.root_pc); + + XWRITE4(sc, oper, XHCI_CRCR_LO, ((uint32_t)addr) | XHCI_CRCR_LO_RCS); + XWRITE4(sc, oper, XHCI_CRCR_HI, (uint32_t)(addr >> 32)); + + return (0); +} + usb_error_t xhci_start_controller(struct xhci_softc *sc) { @@ -1059,6 +1122,7 @@ xhci_do_command(struct xhci_softc *sc, s uint32_t temp; uint8_t i; uint8_t j; + uint8_t timeout = 0; int err; XHCI_CMD_ASSERT_LOCKED(sc); @@ -1072,7 +1136,7 @@ xhci_do_command(struct xhci_softc *sc, s /* Queue command */ USB_BUS_LOCK(&sc->sc_bus); - +retry: i = sc->sc_command_idx; j = sc->sc_command_ccs; @@ -1143,25 +1207,22 @@ xhci_do_command(struct xhci_softc *sc, s err = 0; } if (err != 0) { - DPRINTFN(0, "Command timeout!\n"); - + DPRINTF("Command timeout!\n"); /* - * Try to abort the last command as per section - * 4.6.1.2 "Aborting a Command" of the XHCI - * specification: + * After some weeks of continuous operation, it has + * been observed that the ASMedia Technology, ASM1042 + * SuperSpeed USB Host Controller can suddenly stop + * accepting commands via the command queue. Try to + * first reset the command queue. If that fails do a + * host controller reset. */ - temp = XREAD4(sc, oper, XHCI_CRCR_LO); - XWRITE4(sc, oper, XHCI_CRCR_LO, temp | XHCI_CRCR_LO_CA); - - /* wait for abort event, if any */ - err = cv_timedwait(&sc->sc_cmd_cv, &sc->sc_bus.bus_mtx, hz / 16); - - if (err != 0 && xhci_interrupt_poll(sc) != 0) { - DPRINTF("Command was completed when polling\n"); - err = 0; - } - if (err != 0) { - DPRINTF("Command abort timeout!\n"); + if (timeout == 0 && + xhci_reset_command_queue_locked(sc) == 0) { + timeout = 1; + goto retry; + } else { + DPRINTF("Controller reset!\n"); + usb_bus_reset_async_locked(&sc->sc_bus); } err = USB_ERR_TIMEOUT; trb->dwTrb2 = 0; Modified: head/sys/dev/usb/usb_bus.h ============================================================================== --- head/sys/dev/usb/usb_bus.h Fri Dec 6 02:19:58 2013 (r259022) +++ head/sys/dev/usb/usb_bus.h Fri Dec 6 08:42:41 2013 (r259023) @@ -81,6 +81,7 @@ struct usb_bus { struct usb_bus_msg attach_msg[2]; struct usb_bus_msg suspend_msg[2]; struct usb_bus_msg resume_msg[2]; + struct usb_bus_msg reset_msg[2]; struct usb_bus_msg shutdown_msg[2]; /* * This mutex protects the USB hardware: Modified: head/sys/dev/usb/usb_controller.h ============================================================================== --- head/sys/dev/usb/usb_controller.h Fri Dec 6 02:19:58 2013 (r259022) +++ head/sys/dev/usb/usb_controller.h Fri Dec 6 08:42:41 2013 (r259023) @@ -191,6 +191,7 @@ void usb_bus_mem_flush_all(struct usb_bu uint8_t usb_bus_mem_alloc_all(struct usb_bus *bus, bus_dma_tag_t dmat, usb_bus_mem_cb_t *cb); void usb_bus_mem_free_all(struct usb_bus *bus, usb_bus_mem_cb_t *cb); uint16_t usb_isoc_time_expand(struct usb_bus *bus, uint16_t isoc_time_curr); +void usb_bus_reset_async_locked(struct usb_bus *bus); #if USB_HAVE_TT_SUPPORT uint8_t usbd_fs_isoc_schedule_alloc_slot(struct usb_xfer *isoc_xfer, uint16_t isoc_time); #endif From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 15:14:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4889505; Fri, 6 Dec 2013 15:14:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A10E715BC; Fri, 6 Dec 2013 15:14: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 rB6FEI26007019; Fri, 6 Dec 2013 15:14:18 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6FEIKJ007018; Fri, 6 Dec 2013 15:14:18 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201312061514.rB6FEIKJ007018@svn.freebsd.org> From: Kevin Lo Date: Fri, 6 Dec 2013 15:14:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259029 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 15:14:18 -0000 Author: kevlo Date: Fri Dec 6 15:14:18 2013 New Revision: 259029 URL: http://svnweb.freebsd.org/changeset/base/259029 Log: Remove daft KASSERT. Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Dec 6 13:58:23 2013 (r259028) +++ head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:14:18 2013 (r259029) @@ -3712,9 +3712,6 @@ run_rt3070_set_chan(struct run_softc *sc uint8_t rf; int i; - /* RT3070 is 2GHz only */ - KASSERT(chan >= 1 && chan <= 14, ("wrong channel selected\n")); - /* find the settings for this channel (we know it exists) */ for (i = 0; rt2860_rf2850[i].chan != chan; i++); From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 15:15:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9EBC65B; Fri, 6 Dec 2013 15:15:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D644B15CA; Fri, 6 Dec 2013 15:15:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6FFwFc007311; Fri, 6 Dec 2013 15:15:58 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6FFwFL007310; Fri, 6 Dec 2013 15:15:58 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201312061515.rB6FFwFL007310@svn.freebsd.org> From: Kevin Lo Date: Fri, 6 Dec 2013 15:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259030 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 15:15:59 -0000 Author: kevlo Date: Fri Dec 6 15:15:58 2013 New Revision: 259030 URL: http://svnweb.freebsd.org/changeset/base/259030 Log: Cosmetic changes. Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:14:18 2013 (r259029) +++ head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:15:58 2013 (r259030) @@ -3976,46 +3976,46 @@ run_rt5390_set_chan(struct run_softc *sc if (sc->mac_ver == 0x5392) { /* Fix for RT5392C. */ if (sc->mac_rev >= 0x0223) { - if ((chan >= 1) && (chan <= 4)) + if (chan <= 4) rf = 0x0f; - else if ((chan >= 5) && (chan <= 7)) + else if (chan >= 5 && chan <= 7) rf = 0x0e; - else if ((chan >= 8) && (chan <= 14)) + else rf = 0x0d; run_rt3070_rf_write(sc, 23, rf); - if ((chan >= 1) && (chan <= 4)) + if (chan <= 4) rf = 0x0c; else if (chan == 5) rf = 0x0b; - else if ((chan >= 6) && (chan <= 7)) + else if (chan >= 6 && chan <= 7) rf = 0x0a; - else if ((chan >= 8) && (chan <= 10)) + else if (chan >= 8 && chan <= 10) rf = 0x09; - else if ((chan >= 11) && (chan <= 14)) + else rf = 0x08; run_rt3070_rf_write(sc, 59, rf); } else { - if ((chan >= 1) && (chan <= 11)) + if (chan <= 11) rf = 0x0f; - else if ((chan >= 12) && (chan <= 14)) + else rf = 0x0b; run_rt3070_rf_write(sc, 59, rf); } } else { /* Fix for RT5390F. */ if (sc->mac_rev >= 0x0502) { - if ((chan >= 1) && (chan <= 11)) + if (chan <= 11) rf = 0x43; - else if ((chan >= 12) && (chan <= 14)) + else rf = 0x23; run_rt3070_rf_write(sc, 55, rf); - if ((chan >= 1) && (chan <= 11)) + if (chan <= 11) rf = 0x0f; else if (chan == 12) rf = 0x0d; - else if ((chan >= 13) && (chan <= 14)) + else rf = 0x0b; run_rt3070_rf_write(sc, 59, rf); } else { @@ -4040,8 +4040,7 @@ run_set_rx_antenna(struct run_softc *sc, if (sc->rf_rev == RT5390_RF_5370) { run_bbp_read(sc, 152, &bbp152); run_bbp_write(sc, 152, bbp152 & ~0x80); - } - if (sc->rf_rev == RT3070_RF_3020) { + } else { run_mcu_cmd(sc, RT2860_MCU_CMD_ANTSEL, 0); run_read(sc, RT2860_GPIO_CTRL, &tmp); run_write(sc, RT2860_GPIO_CTRL, (tmp & ~0x0808) | 0x08); @@ -4050,8 +4049,7 @@ run_set_rx_antenna(struct run_softc *sc, if (sc->rf_rev == RT5390_RF_5370) { run_bbp_read(sc, 152, &bbp152); run_bbp_write(sc, 152, bbp152 | 0x80); - } - if (sc->rf_rev == RT3070_RF_3020) { + } else { run_mcu_cmd(sc, RT2860_MCU_CMD_ANTSEL, 1); run_read(sc, RT2860_GPIO_CTRL, &tmp); run_write(sc, RT2860_GPIO_CTRL, tmp & ~0x0808); @@ -4745,14 +4743,15 @@ run_rt5390_rf_init(struct run_softc *sc) uint8_t rf; int i; - if (sc->mac_ver == 0x5392) - run_rt3070_rf_write(sc, 2, 0x80); - else { + /* Toggle RF R2 to initiate calibration. */ + if (sc->mac_ver == 0x5390) { run_rt3070_rf_read(sc, 2, &rf); - /* Toggle RF R2 to initiate calibration. */ run_rt3070_rf_write(sc, 2, rf | 0x80); run_delay(sc, 10); run_rt3070_rf_write(sc, 2, rf & ~0x80); + } else { + run_rt3070_rf_write(sc, 2, 0x80); + run_delay(sc, 10); } /* Initialize RF registers to default value. */ @@ -5023,7 +5022,7 @@ run_txrx_enable(struct run_softc *sc) } static void -run_adjust_freq_offset(struct run_softc * sc) +run_adjust_freq_offset(struct run_softc *sc) { uint8_t rf, tmp; @@ -5115,13 +5114,14 @@ run_init_locked(struct run_softc *sc) run_write(sc, RT2860_WMM_CWMIN_CFG, 0x00002344); run_write(sc, RT2860_WMM_CWMAX_CFG, 0x000034aa); - if (sc->mac_ver == 0x5392) { - run_write(sc, RT2860_TX_SW_CFG0, 0x00000404); - run_write(sc, RT2860_MAX_LEN_CFG, 0x00002fff); - run_write(sc, RT2860_HT_FBK_CFG1, 0xedcb4980); - run_write(sc, RT2860_LG_FBK_CFG0, 0xedcba322); - } else if (sc->mac_ver == 0x5390) { - run_write(sc, RT2860_TX_SW_CFG0, 0x00000404); + if (sc->mac_ver >= 0x5390) { + run_write(sc, RT2860_TX_SW_CFG0, + 4 << RT2860_DLY_PAPE_EN_SHIFT | 4); + if (sc->mac_ver >= 0x5392) { + run_write(sc, RT2860_MAX_LEN_CFG, 0x00002fff); + run_write(sc, RT2860_HT_FBK_CFG1, 0xedcb4980); + run_write(sc, RT2860_LG_FBK_CFG0, 0xedcba322); + } } else if (sc->mac_ver >= 0x3070) { /* set delay of PA_PE assertion to 1us (unit of 0.25us) */ run_write(sc, RT2860_TX_SW_CFG0, From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 15:17:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F36E7B0; Fri, 6 Dec 2013 15:17:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 71AAD15D9; Fri, 6 Dec 2013 15:17: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 rB6FHTxZ007537; Fri, 6 Dec 2013 15:17:29 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6FHTOa007535; Fri, 6 Dec 2013 15:17:29 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201312061517.rB6FHTOa007535@svn.freebsd.org> From: Kevin Lo Date: Fri, 6 Dec 2013 15:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259031 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 15:17:29 -0000 Author: kevlo Date: Fri Dec 6 15:17:28 2013 New Revision: 259031 URL: http://svnweb.freebsd.org/changeset/base/259031 Log: Replace the magic numbers with something more readable. Modified: head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runreg.h Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:15:58 2013 (r259030) +++ head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:17:28 2013 (r259031) @@ -4530,7 +4530,7 @@ run_rt5390_bbp_init(struct run_softc *sc /* Avoid data lost and CRC error. */ run_bbp_read(sc, 4, &bbp4); - run_bbp_write(sc, 4, bbp4 | 0x40); + run_bbp_write(sc, 4, bbp | RT5390_MAC_IF_CTRL); for (i = 0; i < nitems(rt5390_def_bbp); i++) { run_bbp_write(sc, rt5390_def_bbp[i].reg, @@ -4746,11 +4746,11 @@ run_rt5390_rf_init(struct run_softc *sc) /* Toggle RF R2 to initiate calibration. */ if (sc->mac_ver == 0x5390) { run_rt3070_rf_read(sc, 2, &rf); - run_rt3070_rf_write(sc, 2, rf | 0x80); + run_rt3070_rf_write(sc, 2, rf | RT5390_RESCAL); run_delay(sc, 10); - run_rt3070_rf_write(sc, 2, rf & ~0x80); + run_rt3070_rf_write(sc, 2, rf & ~RT5390_RESCAL); } else { - run_rt3070_rf_write(sc, 2, 0x80); + run_rt3070_rf_write(sc, 2, RT5390_RESCAL); run_delay(sc, 10); } @@ -4889,7 +4889,7 @@ run_rt3070_rf_setup(struct run_softc *sc /* Avoid data lost and CRC error. */ run_bbp_read(sc, 4, &bbp); - run_bbp_write(sc, 4, bbp | 0x40); + run_bbp_write(sc, 4, bbp | RT5390_MAC_IF_CTRL); run_rt3070_rf_read(sc, 30, &rf); rf = (rf & ~0x18) | 0x10; Modified: head/sys/dev/usb/wlan/if_runreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_runreg.h Fri Dec 6 15:15:58 2013 (r259030) +++ head/sys/dev/usb/wlan/if_runreg.h Fri Dec 6 15:17:28 2013 (r259031) @@ -707,6 +707,9 @@ /* possible flags for RT3020 RF register 21 */ #define RT3070_RX_LO2 (1 << 3) +/* Possible flags for RT5390 RF register 2. */ +#define RT5390_RESCAL (1 << 7) + /* Possible flags for RT5390 RF register 3. */ #define RT5390_VCOCAL (1 << 7) @@ -716,6 +719,13 @@ /* Possible flags for RT5390 RF register 39. */ #define RT5390_RX_LO2 (1 << 7) +/* Possible flags for RT5390 BBP register 4. */ +#define RT5390_MAC_IF_CTRL (1 << 6) + +/* Possible flags for RT5390 BBP register 105. */ +#define RT5390_MLD (1 << 2) +#define RT5390_EN_SIG_MODULATION (1 << 3) + /* RT2860 TX descriptor */ struct rt2860_txd { uint32_t sdp0; /* Segment Data Pointer 0 */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 15:26:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 853683E8; Fri, 6 Dec 2013 15:26:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 65A0A16B6; Fri, 6 Dec 2013 15:26:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6FQe0J011505; Fri, 6 Dec 2013 15:26:40 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6FQdxZ011500; Fri, 6 Dec 2013 15:26:39 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201312061526.rB6FQdxZ011500@svn.freebsd.org> From: Kevin Lo Date: Fri, 6 Dec 2013 15:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259032 - in head: share/man/man4 sys/dev/usb sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 15:26:40 -0000 Author: kevlo Date: Fri Dec 6 15:26:39 2013 New Revision: 259032 URL: http://svnweb.freebsd.org/changeset/base/259032 Log: Add support for the MediaTek/Ralink RT5572 chipset. Committed over the TP-LINK TL-WDN3200 (RT5572) on amd64 with WPA. While here, add my copyright. Modified: head/share/man/man4/run.4 head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runreg.h head/sys/dev/usb/wlan/if_runvar.h Modified: head/share/man/man4/run.4 ============================================================================== --- head/share/man/man4/run.4 Fri Dec 6 15:17:28 2013 (r259031) +++ head/share/man/man4/run.4 Fri Dec 6 15:26:39 2013 (r259032) @@ -133,6 +133,7 @@ driver supports the following wireless a .It Corega CG-WLUSB300GNM .It D-Link DWA-130 rev B1 .It D-Link DWA-140 rev B1, B2, B3 +.It D-Link DWA-160 rev B2 .It DrayTek Vigor N61 .It Edimax EW-7711UAn .It Edimax EW-7711UTn @@ -159,6 +160,7 @@ driver supports the following wireless a .It SMC SMCWUSBS-N2 .It Sweex LW303 .It Sweex LW313 +.It TP-LINK TL-WDN3200 .It TP-LINK TL-WN727N v3 .It Unex DNUR-81 .It Unex DNUR-82 Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Dec 6 15:17:28 2013 (r259031) +++ head/sys/dev/usb/usbdevs Fri Dec 6 15:26:39 2013 (r259032) @@ -1556,6 +1556,7 @@ product DLINK DUBE100B1 0x3c05 DUB-E100 product DLINK RT2870 0x3c09 RT2870 product DLINK RT3072 0x3c0a RT3072 product DLINK DWA140B3 0x3c15 DWA-140 rev B3 +product DLINK DWA160B2 0x3c1a DWA-160 rev B2 product DLINK DWA127 0x3c1b DWA-127 Wireless Adapter product DLINK DSB650C 0x4000 10Mbps Ethernet product DLINK DSB650TX1 0x4001 10/100 Ethernet @@ -3606,6 +3607,7 @@ product RALINK RT3072 0x3072 RT3072 product RALINK RT3370 0x3370 RT3370 product RALINK RT3572 0x3572 RT3572 product RALINK RT5370 0x5370 RT5370 +product RALINK RT5572 0x5572 RT5572 product RALINK RT8070 0x8070 RT8070 product RALINK RT2570_3 0x9020 RT2500USB Wireless Adapter product RALINK RT2573_2 0x9021 RT2501USB Wireless Adapter Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:17:28 2013 (r259031) +++ head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:26:39 2013 (r259032) @@ -2,6 +2,7 @@ * Copyright (c) 2008,2010 Damien Bergamini * ported to FreeBSD by Akinori Furukoshi * USB Consulting, Hans Petter Selasky + * Copyright (c) 2013 Kevin Lo * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -173,6 +174,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(DLINK, RT3072), RUN_DEV(DLINK, DWA127), RUN_DEV(DLINK, DWA140B3), + RUN_DEV(DLINK, DWA160B2), RUN_DEV(DLINK2, DWA130), RUN_DEV(DLINK2, RT2870_1), RUN_DEV(DLINK2, RT2870_2), @@ -257,6 +259,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(RALINK, RT3370), RUN_DEV(RALINK, RT3572), RUN_DEV(RALINK, RT5370), + RUN_DEV(RALINK, RT5572), RUN_DEV(RALINK, RT8070), RUN_DEV(SAMSUNG, WIS09ABGN), RUN_DEV(SAMSUNG2, RT2870_1), @@ -395,6 +398,7 @@ static void run_rt2870_set_chan(struct r static void run_rt3070_set_chan(struct run_softc *, u_int); static void run_rt3572_set_chan(struct run_softc *, u_int); static void run_rt5390_set_chan(struct run_softc *, u_int); +static void run_rt5592_set_chan(struct run_softc *, u_int); static int run_set_chan(struct run_softc *, struct ieee80211_channel *); static void run_set_channel(struct ieee80211com *); static void run_scan_start(struct ieee80211com *); @@ -446,6 +450,23 @@ static const struct { RT2860_DEF_BBP },rt5390_def_bbp[] = { RT5390_DEF_BBP +},rt5592_def_bbp[] = { + RT5592_DEF_BBP +}; + +/* + * Default values for BBP register R196 for RT5592. + */ +static const uint8_t rt5592_bbp_r196[] = { + 0xe0, 0x1f, 0x38, 0x32, 0x08, 0x28, 0x19, 0x0a, 0xff, 0x00, + 0x16, 0x10, 0x10, 0x0b, 0x36, 0x2c, 0x26, 0x24, 0x42, 0x36, + 0x30, 0x2d, 0x4c, 0x46, 0x3d, 0x40, 0x3e, 0x42, 0x3d, 0x40, + 0x3c, 0x34, 0x2c, 0x2f, 0x3c, 0x35, 0x2e, 0x2a, 0x49, 0x41, + 0x36, 0x31, 0x30, 0x30, 0x0e, 0x0d, 0x28, 0x21, 0x1c, 0x16, + 0x50, 0x4a, 0x43, 0x40, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7d, 0x14, 0x32, 0x2c, 0x36, 0x4c, 0x43, 0x2c, + 0x2e, 0x36, 0x30, 0x6e }; static const struct rfprog { @@ -461,6 +482,15 @@ struct { RT3070_RF3052 }; +static const struct rt5592_freqs { + uint16_t n; + uint8_t k, m, r; +} rt5592_freqs_20mhz[] = { + RT5592_RF5592_20MHZ +},rt5592_freqs_40mhz[] = { + RT5592_RF5592_40MHZ +}; + static const struct { uint8_t reg; uint8_t val; @@ -472,6 +502,21 @@ static const struct { RT5390_DEF_RF },rt5392_def_rf[] = { RT5392_DEF_RF +},rt5592_def_rf[] = { + RT5592_DEF_RF +},rt5592_2ghz_def_rf[] = { + RT5592_2GHZ_DEF_RF +},rt5592_5ghz_def_rf[] = { + RT5592_5GHZ_DEF_RF +}; + +static const struct { + u_int firstchan; + u_int lastchan; + uint8_t reg; + uint8_t val; +} rt5592_chan_5ghz[] = { + RT5592_CHAN_5GHZ }; static const struct usb_config run_config[RUN_N_XFER] = { @@ -666,7 +711,7 @@ run_attach(device_t self) setbit(&bands, IEEE80211_MODE_11B); setbit(&bands, IEEE80211_MODE_11G); if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850 || - sc->rf_rev == RT3070_RF_3052) + sc->rf_rev == RT3070_RF_3052 || sc->rf_rev == RT5592_RF_5592) setbit(&bands, IEEE80211_MODE_11A); ieee80211_init_channels(ic, NULL, &bands); @@ -1456,6 +1501,7 @@ run_get_rf(uint16_t rev) case RT3070_RF_3021: return "RT3021"; case RT3070_RF_3022: return "RT3022"; case RT3070_RF_3052: return "RT3052"; + case RT5592_RF_5592: return "RT5592"; case RT5390_RF_5370: return "RT5370"; case RT5390_RF_5372: return "RT5372"; } @@ -1538,7 +1584,7 @@ run_read_eeprom(struct run_softc *sc) sc->leds, sc->led[0], sc->led[1], sc->led[2]); /* read RF information */ - if (sc->mac_ver >= 0x5390) + if (sc->mac_ver == 0x5390 || sc->mac_ver ==0x5392) run_srom_read(sc, 0x00, &val); else run_srom_read(sc, RT2860_EEPROM_ANTENNA, &val); @@ -1562,7 +1608,7 @@ run_read_eeprom(struct run_softc *sc) sc->nrxchains = 2; } } else { - if (sc->mac_ver >= 0x5390) { + if (sc->mac_ver == 0x5390 || sc->mac_ver ==0x5392) { sc->rf_rev = val; run_srom_read(sc, RT2860_EEPROM_ANTENNA, &val); } else @@ -1631,11 +1677,13 @@ run_read_eeprom(struct run_softc *sc) sc->txpow2[i + 15] = (int8_t)(val >> 8); } /* fix broken Tx power entries */ - for (i = 0; i < 40; i++) { - if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + i] > 15) - sc->txpow1[14 + i] = 5; - if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + i] > 15) - sc->txpow2[14 + i] = 5; + for (i = 0; i < 40; i++ ) { + if (sc->mac_ver != 0x5592) { + if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + i] > 15) + sc->txpow1[14 + i] = 5; + if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + i] > 15) + sc->txpow2[14 + i] = 5; + } DPRINTF("chan %d: power1=%d, power2=%d\n", rt2860_rf2850[14 + i].chan, sc->txpow1[14 + i], sc->txpow2[14 + i]); @@ -2517,12 +2565,15 @@ run_rx_frame(struct run_softc *sc, struc struct rt2870_rxd *rxd; struct rt2860_rxwi *rxwi; uint32_t flags; - uint16_t len; + uint16_t len, rxwisize; uint8_t ant, rssi; int8_t nf; rxwi = mtod(m, struct rt2860_rxwi *); len = le16toh(rxwi->len) & 0xfff; + rxwisize = (sc->mac_ver == 0x5592) ? + sizeof(struct rt2860_rxwi) + sizeof(uint64_t) : + sizeof(struct rt2860_rxwi); if (__predict_false(len > dmalen)) { m_freem(m); ifp->if_ierrors++; @@ -2540,8 +2591,8 @@ run_rx_frame(struct run_softc *sc, struc return; } - m->m_data += sizeof(struct rt2860_rxwi); - m->m_pkthdr.len = m->m_len -= sizeof(struct rt2860_rxwi); + m->m_data += rxwisize; + m->m_pkthdr.len = m->m_len -= rxwisize; wh = mtod(m, struct ieee80211_frame *); @@ -2561,7 +2612,8 @@ run_rx_frame(struct run_softc *sc, struc if (__predict_false(flags & RT2860_RX_MICERR)) { /* report MIC failures to net80211 for TKIP */ if (ni != NULL) - ieee80211_notify_michael_failure(ni->ni_vap, wh, rxwi->keyidx); + ieee80211_notify_michael_failure(ni->ni_vap, wh, + rxwi->keyidx); m_freem(m); ifp->if_ierrors++; DPRINTF("MIC error. Someone is lying.\n"); @@ -2629,8 +2681,13 @@ run_bulk_rx_callback(struct usb_xfer *xf struct mbuf *m = NULL; struct mbuf *m0; uint32_t dmalen; + uint16_t rxwisize; int xferlen; + rxwisize = (sc->mac_ver == 0x5592) ? + sizeof(struct rt2860_rxwi) + sizeof(uint64_t) : + sizeof(struct rt2860_rxwi); + usbd_xfer_status(xfer, &xferlen, NULL, NULL, NULL); switch (USB_GET_STATE(xfer)) { @@ -2638,8 +2695,8 @@ run_bulk_rx_callback(struct usb_xfer *xf DPRINTFN(15, "rx done, actlen=%d\n", xferlen); - if (xferlen < (int)(sizeof(uint32_t) + - sizeof(struct rt2860_rxwi) + sizeof(struct rt2870_rxd))) { + if (xferlen < (int)(sizeof(uint32_t) + rxwisize + + sizeof(struct rt2870_rxd))) { DPRINTF("xfer too short %d\n", xferlen); goto tr_setup; } @@ -2813,8 +2870,10 @@ tr_setup: STAILQ_REMOVE_HEAD(&pq->tx_qh, next); m = data->m; + size = (sc->mac_ver == 0x5592) ? + RUN_MAX_TXSZ + sizeof(uint32_t) : RUN_MAX_TXSZ; if ((m->m_pkthdr.len + - sizeof(data->desc) + 3 + 8) > RUN_MAX_TXSZ) { + sizeof(data->desc) + 3 + 8) > size) { DPRINTF("data overflow, %u bytes\n", m->m_pkthdr.len); @@ -2826,7 +2885,8 @@ tr_setup: } pc = usbd_xfer_get_frame(xfer, 0); - size = sizeof(data->desc); + size = (sc->mac_ver == 0x5592) ? + sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc); usbd_copy_in(pc, 0, &data->desc, size); usbd_m_copy_in(pc, size, m, 0, m->m_pkthdr.len); size += m->m_pkthdr.len; @@ -2841,9 +2901,8 @@ tr_setup: vap = data->ni->ni_vap; if (ieee80211_radiotap_active_vap(vap)) { struct run_tx_radiotap_header *tap = &sc->sc_txtap; - struct rt2860_txwi *txwi = + struct rt2860_txwi *txwi = (struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd)); - tap->wt_flags = 0; tap->wt_rate = rt2860_rates[data->ridx].rate; tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); @@ -2953,7 +3012,7 @@ run_set_tx_desc(struct run_softc *sc, st struct ieee80211_frame *wh; struct rt2870_txd *txd; struct rt2860_txwi *txwi; - uint16_t xferlen; + uint16_t xferlen, txwisize; uint16_t mcs; uint8_t ridx = data->ridx; uint8_t pad; @@ -2961,7 +3020,9 @@ run_set_tx_desc(struct run_softc *sc, st /* get MCS code from rate index */ mcs = rt2860_rates[ridx].mcs; - xferlen = sizeof(*txwi) + m->m_pkthdr.len; + txwisize = (sc->mac_ver == 0x5592) ? + sizeof(*txwi) + sizeof(uint32_t) : sizeof(*txwi); + xferlen = txwisize + m->m_pkthdr.len; /* roundup to 32-bit alignment */ xferlen = (xferlen + 3) & ~3; @@ -3104,12 +3165,12 @@ run_tx(struct run_softc *sc, struct mbuf txd->flags = qflags; txwi = (struct rt2860_txwi *)(txd + 1); txwi->xflags = xflags; - if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) txwi->wcid = 0; - } else { + else txwi->wcid = (vap->iv_opmode == IEEE80211_M_STA) ? 1 : RUN_AID2WCID(ni->ni_associd); - } + /* clear leftover garbage bits */ txwi->flags = 0; txwi->txop = 0; @@ -3168,9 +3229,8 @@ run_tx(struct run_softc *sc, struct mbuf usbd_transfer_start(sc->sc_xfer[qid]); DPRINTFN(8, "sending data frame len=%d rate=%d qid=%d\n", - m->m_pkthdr.len + - (int)(sizeof(struct rt2870_txd) + sizeof(struct rt2860_txwi)), - rt2860_rates[ridx].rate, qid); + m->m_pkthdr.len + (int)(sizeof(struct rt2870_txd) + + sizeof(struct rt2870_txwi)), rt2860_rates[ridx].rate, qid); return (0); } @@ -3576,7 +3636,25 @@ run_select_chan_group(struct run_softc * run_bbp_write(sc, 75, 0x46); } } else { - if (sc->mac_ver >= 0x5390) + if (sc->mac_ver == 0x5592) { + run_bbp_write(sc, 79, 0x1c); + run_bbp_write(sc, 80, 0x0e); + run_bbp_write(sc, 81, 0x3a); + run_bbp_write(sc, 82, 0x62); + + run_bbp_write(sc, 195, 0x80); + run_bbp_write(sc, 196, 0xe0); + run_bbp_write(sc, 195, 0x81); + run_bbp_write(sc, 196, 0x1f); + run_bbp_write(sc, 195, 0x82); + run_bbp_write(sc, 196, 0x38); + run_bbp_write(sc, 195, 0x83); + run_bbp_write(sc, 196, 0x32); + run_bbp_write(sc, 195, 0x85); + run_bbp_write(sc, 196, 0x28); + run_bbp_write(sc, 195, 0x86); + run_bbp_write(sc, 196, 0x19); + } else if (sc->mac_ver >= 0x5390) run_bbp_write(sc, 75, 0x50); else { run_bbp_write(sc, 82, 0x84); @@ -3584,7 +3662,25 @@ run_select_chan_group(struct run_softc * } } } else { - if (sc->mac_ver == 0x3572) + if (sc->mac_ver == 0x5592) { + run_bbp_write(sc, 79, 0x18); + run_bbp_write(sc, 80, 0x08); + run_bbp_write(sc, 81, 0x38); + run_bbp_write(sc, 82, 0x92); + + run_bbp_write(sc, 195, 0x80); + run_bbp_write(sc, 196, 0xf0); + run_bbp_write(sc, 195, 0x81); + run_bbp_write(sc, 196, 0x1e); + run_bbp_write(sc, 195, 0x82); + run_bbp_write(sc, 196, 0x28); + run_bbp_write(sc, 195, 0x83); + run_bbp_write(sc, 196, 0x20); + run_bbp_write(sc, 195, 0x85); + run_bbp_write(sc, 196, 0x7f); + run_bbp_write(sc, 195, 0x86); + run_bbp_write(sc, 196, 0x7f); + } else if (sc->mac_ver == 0x3572) run_bbp_write(sc, 82, 0x94); else run_bbp_write(sc, 82, 0xf2); @@ -3619,6 +3715,11 @@ run_select_chan_group(struct run_softc * } else run_write(sc, RT2860_TX_PIN_CFG, tmp); + if (sc->mac_ver == 0x5592) { + run_bbp_write(sc, 195, 0x8d); + run_bbp_write(sc, 196, 0x1a); + } + /* set initial AGC value */ if (group == 0) { /* 2GHz band */ if (sc->mac_ver >= 0x3070) @@ -3626,7 +3727,9 @@ run_select_chan_group(struct run_softc * else agc = 0x2e + sc->lna[0]; } else { /* 5GHz band */ - if (sc->mac_ver == 0x3572) + if (sc->mac_ver == 0x5592) + agc = 0x24 + sc->lna[group] * 2; + else if (sc->mac_ver == 0x3572) agc = 0x22 + (sc->lna[group] * 5) / 3; else agc = 0x32 + (sc->lna[group] * 5) / 3; @@ -4031,6 +4134,143 @@ run_rt5390_set_chan(struct run_softc *sc } static void +run_rt5592_set_chan(struct run_softc *sc, u_int chan) +{ + const struct rt5592_freqs *freqs; + uint32_t tmp; + uint8_t reg, rf, txpow_bound; + int8_t txpow1, txpow2; + int i; + + run_read(sc, RT5592_DEBUG_INDEX, &tmp); + freqs = (tmp & RT5592_SEL_XTAL) ? + rt5592_freqs_40mhz : rt5592_freqs_20mhz; + + /* find the settings for this channel (we know it exists) */ + for (i = 0; rt2860_rf2850[i].chan != chan; i++, freqs++); + + /* use Tx power values from EEPROM */ + txpow1 = sc->txpow1[i]; + txpow2 = sc->txpow2[i]; + + run_read(sc, RT3070_LDO_CFG0, &tmp); + tmp &= ~0x1c000000; + if (chan > 14) + tmp |= 0x14000000; + run_write(sc, RT3070_LDO_CFG0, tmp); + + /* N setting. */ + run_rt3070_rf_write(sc, 8, freqs->n & 0xff); + run_rt3070_rf_read(sc, 9, &rf); + rf &= ~(1 << 4); + rf |= ((freqs->n & 0x0100) >> 8) << 4; + run_rt3070_rf_write(sc, 9, rf); + + /* K setting. */ + run_rt3070_rf_read(sc, 9, &rf); + rf &= ~0x0f; + rf |= (freqs->k & 0x0f); + run_rt3070_rf_write(sc, 9, rf); + + /* Mode setting. */ + run_rt3070_rf_read(sc, 11, &rf); + rf &= ~0x0c; + rf |= ((freqs->m - 0x8) & 0x3) << 2; + run_rt3070_rf_write(sc, 11, rf); + run_rt3070_rf_read(sc, 9, &rf); + rf &= ~(1 << 7); + rf |= (((freqs->m - 0x8) & 0x4) >> 2) << 7; + run_rt3070_rf_write(sc, 9, rf); + + /* R setting. */ + run_rt3070_rf_read(sc, 11, &rf); + rf &= ~0x03; + rf |= (freqs->r - 0x1); + run_rt3070_rf_write(sc, 11, rf); + + if (chan <= 14) { + /* Initialize RF registers for 2GHZ. */ + for (i = 0; i < nitems(rt5592_2ghz_def_rf); i++) { + run_rt3070_rf_write(sc, rt5592_2ghz_def_rf[i].reg, + rt5592_2ghz_def_rf[i].val); + } + + rf = (chan <= 10) ? 0x07 : 0x06; + run_rt3070_rf_write(sc, 23, rf); + run_rt3070_rf_write(sc, 59, rf); + + run_rt3070_rf_write(sc, 55, 0x43); + + /* + * RF R49/R50 Tx power ALC code. + * G-band bit<7:6>=1:0, bit<5:0> range from 0x0 ~ 0x27. + */ + reg = 2; + txpow_bound = 0x27; + } else { + /* Initialize RF registers for 5GHZ. */ + for (i = 0; i < nitems(rt5592_5ghz_def_rf); i++) { + run_rt3070_rf_write(sc, rt5592_5ghz_def_rf[i].reg, + rt5592_5ghz_def_rf[i].val); + } + for (i = 0; i < nitems(rt5592_chan_5ghz); i++) { + if (chan >= rt5592_chan_5ghz[i].firstchan && + chan <= rt5592_chan_5ghz[i].lastchan) { + run_rt3070_rf_write(sc, rt5592_chan_5ghz[i].reg, + rt5592_chan_5ghz[i].val); + } + } + + /* + * RF R49/R50 Tx power ALC code. + * A-band bit<7:6>=1:1, bit<5:0> range from 0x0 ~ 0x2b. + */ + reg = 3; + txpow_bound = 0x2b; + } + + /* RF R49 ch0 Tx power ALC code. */ + run_rt3070_rf_read(sc, 49, &rf); + rf &= ~0xc0; + rf |= (reg << 6); + rf = (rf & ~0x3f) | (txpow1 & 0x3f); + if ((rf & 0x3f) > txpow_bound) + rf = (rf & ~0x3f) | txpow_bound; + run_rt3070_rf_write(sc, 49, rf); + + /* RF R50 ch1 Tx power ALC code. */ + run_rt3070_rf_read(sc, 50, &rf); + rf &= ~(1 << 7 | 1 << 6); + rf |= (reg << 6); + rf = (rf & ~0x3f) | (txpow2 & 0x3f); + if ((rf & 0x3f) > txpow_bound) + rf = (rf & ~0x3f) | txpow_bound; + run_rt3070_rf_write(sc, 50, rf); + + /* Enable RF_BLOCK, PLL_PD, RX0_PD, and TX0_PD. */ + run_rt3070_rf_read(sc, 1, &rf); + rf |= (RT3070_RF_BLOCK | RT3070_PLL_PD | RT3070_RX0_PD | RT3070_TX0_PD); + if (sc->ntxchains > 1) + rf |= RT3070_TX1_PD; + if (sc->nrxchains > 1) + rf |= RT3070_RX1_PD; + run_rt3070_rf_write(sc, 1, rf); + + run_rt3070_rf_write(sc, 6, 0xe4); + + run_rt3070_rf_write(sc, 30, 0x10); + run_rt3070_rf_write(sc, 31, 0x80); + run_rt3070_rf_write(sc, 32, 0x80); + + run_adjust_freq_offset(sc); + + /* Enable VCO calibration. */ + run_rt3070_rf_read(sc, 3, &rf); + rf |= RT5390_VCOCAL; + run_rt3070_rf_write(sc, 3, rf); +} + +static void run_set_rx_antenna(struct run_softc *sc, int aux) { uint32_t tmp; @@ -4067,7 +4307,9 @@ run_set_chan(struct run_softc *sc, struc if (chan == 0 || chan == IEEE80211_CHAN_ANY) return (EINVAL); - if (sc->mac_ver >= 0x5390) + if (sc->mac_ver == 0x5592) + run_rt5592_set_chan(sc, chan); + else if (sc->mac_ver >= 0x5390) run_rt5390_set_chan(sc, chan); else if (sc->mac_ver == 0x3572) run_rt3572_set_chan(sc, chan); @@ -4192,6 +4434,7 @@ run_update_beacon_cb(void *arg) struct run_softc *sc = ic->ic_ifp->if_softc; struct rt2860_txwi txwi; struct mbuf *m; + uint16_t txwisize; uint8_t ridx; if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) @@ -4211,25 +4454,26 @@ run_update_beacon_cb(void *arg) } m = rvp->beacon_mbuf; - memset(&txwi, 0, sizeof txwi); + memset(&txwi, 0, sizeof(txwi)); txwi.wcid = 0xff; txwi.len = htole16(m->m_pkthdr.len); + /* send beacons at the lowest available rate */ ridx = (ic->ic_curmode == IEEE80211_MODE_11A) ? RT2860_RIDX_OFDM6 : RT2860_RIDX_CCK1; txwi.phy = htole16(rt2860_rates[ridx].mcs); if (rt2860_rates[ridx].phy == IEEE80211_T_OFDM) - txwi.phy |= htole16(RT2860_PHY_OFDM); + txwi.phy |= htole16(RT2860_PHY_OFDM); txwi.txop = RT2860_TX_TXOP_HT; txwi.flags = RT2860_TX_TS; txwi.xflags = RT2860_TX_NSEQ; - run_write_region_1(sc, RT2860_BCN_BASE(rvp->rvp_id), - (uint8_t *)&txwi, sizeof txwi); - run_write_region_1(sc, RT2860_BCN_BASE(rvp->rvp_id) + sizeof txwi, - mtod(m, uint8_t *), (m->m_pkthdr.len + 1) & ~1); /* roundup len */ - - return; + txwisize = (sc->mac_ver == 0x5592) ? + sizeof(txwi) + sizeof(uint32_t) : sizeof(txwi); + run_write_region_1(sc, RT2860_BCN_BASE(rvp->rvp_id), (uint8_t *)&txwi, + txwisize); + run_write_region_1(sc, RT2860_BCN_BASE(rvp->rvp_id) + txwisize, + mtod(m, uint8_t *), (m->m_pkthdr.len + 1) & ~1); } static void @@ -4526,15 +4770,31 @@ static void run_rt5390_bbp_init(struct run_softc *sc) { int i; - uint8_t bbp4; + uint8_t bbp; + + /* Apply maximum likelihood detection for 2 stream case. */ + run_bbp_read(sc, 105, &bbp); + if (sc->nrxchains > 1) + run_bbp_write(sc, 105, bbp | RT5390_MLD); /* Avoid data lost and CRC error. */ - run_bbp_read(sc, 4, &bbp4); + run_bbp_read(sc, 4, &bbp); run_bbp_write(sc, 4, bbp | RT5390_MAC_IF_CTRL); - for (i = 0; i < nitems(rt5390_def_bbp); i++) { - run_bbp_write(sc, rt5390_def_bbp[i].reg, - rt5390_def_bbp[i].val); + if (sc->mac_ver == 0x5592) { + for (i = 0; i < nitems(rt5592_def_bbp); i++) { + run_bbp_write(sc, rt5592_def_bbp[i].reg, + rt5592_def_bbp[i].val); + } + for (i = 0; i < nitems(rt5592_bbp_r196); i++) { + run_bbp_write(sc, 195, i + 0x80); + run_bbp_write(sc, 196, rt5592_bbp_r196[i]); + } + } else { + for (i = 0; i < nitems(rt5390_def_bbp); i++) { + run_bbp_write(sc, rt5390_def_bbp[i].reg, + rt5390_def_bbp[i].val); + } } if (sc->mac_ver == 0x5392) { run_bbp_write(sc, 88, 0x90); @@ -4546,9 +4806,22 @@ run_rt5390_bbp_init(struct run_softc *sc run_bbp_write(sc, 148, 0x84); } + run_bbp_read(sc, 152, &bbp); + run_bbp_write(sc, 152, bbp | 0x80); + + /* Fix BBP254 for RT5592C. */ + if (sc->mac_ver == 0x5592 && sc->mac_rev >= 0x0221) { + run_bbp_read(sc, 254, &bbp); + run_bbp_write(sc, 254, bbp | 0x80); + } + /* Disable hardware antenna diversity. */ if (sc->mac_ver == 0x5390) run_bbp_write(sc, 154, 0); + + /* Initialize Rx CCK/OFDM frequency offset report. */ + run_bbp_write(sc, 142, 1); + run_bbp_write(sc, 143, 57); } static int @@ -4581,7 +4854,7 @@ run_bbp_init(struct run_softc *sc) if (sc->mac_ver == 0x2860 && sc->mac_rev != 0x0101) run_bbp_write(sc, 84, 0x19); - if (sc->mac_ver >= 0x3070) { + if (sc->mac_ver >= 0x3070 && sc->mac_ver != 0x5592) { run_bbp_write(sc, 79, 0x13); run_bbp_write(sc, 80, 0x05); run_bbp_write(sc, 81, 0x33); @@ -4755,7 +5028,14 @@ run_rt5390_rf_init(struct run_softc *sc) } /* Initialize RF registers to default value. */ - if (sc->mac_ver == 0x5392) { + if (sc->mac_ver == 0x5592) { + for (i = 0; i < nitems(rt5592_def_rf); i++) { + run_rt3070_rf_write(sc, rt5592_def_rf[i].reg, + rt5592_def_rf[i].val); + } + /* Initialize RF frequency offset. */ + run_adjust_freq_offset(sc); + } else if (sc->mac_ver == 0x5392) { for (i = 0; i < nitems(rt5392_def_rf); i++) { run_rt3070_rf_write(sc, rt5392_def_rf[i].reg, rt5392_def_rf[i].val); @@ -4784,7 +5064,7 @@ run_rt5390_rf_init(struct run_softc *sc) } sc->rf24_20mhz = 0x1f; /* default value */ - sc->rf24_40mhz = 0x2f; /* default value */ + sc->rf24_40mhz = (sc->mac_ver == 0x5592) ? 0 : 0x2f; if (sc->mac_rev < 0x0211) run_rt3070_rf_write(sc, 27, 0x3); @@ -4869,9 +5149,11 @@ run_rt3070_rf_setup(struct run_softc *sc /* Enable DC filter. */ run_bbp_write(sc, 103, 0xc0); - /* Improve power consumption. */ - run_bbp_read(sc, 31, &bbp); - run_bbp_write(sc, 31, bbp & ~0x03); + if (sc->mac_ver != 0x5592) { + /* Improve power consumption. */ + run_bbp_read(sc, 31, &bbp); + run_bbp_write(sc, 31, bbp & ~0x03); + } } run_bbp_read(sc, 138, &bbp); @@ -4895,12 +5177,14 @@ run_rt3070_rf_setup(struct run_softc *sc rf = (rf & ~0x18) | 0x10; run_rt3070_rf_write(sc, 30, rf); - run_write(sc, RT2860_TX_SW_CFG1, 0); - if (sc->mac_rev < 0x0211) { - run_write(sc, RT2860_TX_SW_CFG2, - sc->patch_dac ? 0x2c : 0x0f); - } else - run_write(sc, RT2860_TX_SW_CFG2, 0); + if (sc->mac_ver != 0x5592) { + run_write(sc, RT2860_TX_SW_CFG1, 0); + if (sc->mac_rev < 0x0211) { + run_write(sc, RT2860_TX_SW_CFG2, + sc->patch_dac ? 0x2c : 0x0f); + } else + run_write(sc, RT2860_TX_SW_CFG2, 0); + } } else if (sc->mac_ver == 0x3572) { /* enable DC filter */ @@ -5119,8 +5403,13 @@ run_init_locked(struct run_softc *sc) 4 << RT2860_DLY_PAPE_EN_SHIFT | 4); if (sc->mac_ver >= 0x5392) { run_write(sc, RT2860_MAX_LEN_CFG, 0x00002fff); - run_write(sc, RT2860_HT_FBK_CFG1, 0xedcb4980); - run_write(sc, RT2860_LG_FBK_CFG0, 0xedcba322); + if (sc->mac_ver == 0x5592) { + run_write(sc, RT2860_HT_FBK_CFG1, 0xedcba980); + run_write(sc, RT2860_TXOP_HLDR_ET, 0x00000082); + } else { + run_write(sc, RT2860_HT_FBK_CFG1, 0xedcb4980); + run_write(sc, RT2860_LG_FBK_CFG0, 0xedcba322); + } } } else if (sc->mac_ver >= 0x3070) { /* set delay of PA_PE assertion to 1us (unit of 0.25us) */ Modified: head/sys/dev/usb/wlan/if_runreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_runreg.h Fri Dec 6 15:17:28 2013 (r259031) +++ head/sys/dev/usb/wlan/if_runreg.h Fri Dec 6 15:26:39 2013 (r259032) @@ -22,13 +22,6 @@ #ifndef _IF_RUNREG_H_ #define _IF_RUNREG_H_ -/* PCI registers */ -#define RT2860_PCI_CFG 0x0000 -#define RT2860_PCI_EECTRL 0x0004 -#define RT2860_PCI_MCUCTRL 0x0008 -#define RT2860_PCI_SYSCTRL 0x000c -#define RT2860_PCIE_JTAG 0x0010 - #define RT2860_CONFIG_NO 1 #define RT2860_IFACE_INDEX 0 @@ -85,6 +78,9 @@ #define RT3070_LDO_CFG0 0x05d4 #define RT3070_GPIO_SWITCH 0x05dc +/* RT5592 registers */ +#define RT5592_DEBUG_INDEX 0x05e8 + /* MAC registers */ #define RT2860_ASIC_VER_ID 0x1000 #define RT2860_MAC_SYS_CTRL 0x1004 @@ -387,6 +383,9 @@ #define RT3070_EFSROM_MODE_MASK 0x000000c0 #define RT3070_EFUSE_AOUT_MASK 0x0000003f +/* possible flag for register DEBUG_INDEX */ +#define RT5592_SEL_XTAL (1U << 31) + /* possible flags for register MAC_SYS_CTRL */ #define RT2860_RX_TS_EN (1 << 7) #define RT2860_WLAN_HALT_EN (1 << 6) @@ -847,13 +846,6 @@ struct rt2860_rxwi { uint16_t reserved2; } __packed; - -/* first DMA segment contains TXWI + 802.11 header + 32-bit padding */ -#define RT2860_TXWI_DMASZ \ - (sizeof (struct rt2860_txwi) + \ - sizeof (struct ieee80211_htframe) + \ - sizeof (uint16_t)) - #define RT2860_RF_2820 0x0001 /* 2T3R */ #define RT2860_RF_2850 0x0002 /* dual-band 2T3R */ #define RT2860_RF_2720 0x0003 /* 1T2R */ @@ -863,6 +855,7 @@ struct rt2860_rxwi { #define RT3070_RF_3021 0x0007 /* 1T2R */ #define RT3070_RF_3022 0x0008 /* 2T2R */ #define RT3070_RF_3052 0x0009 /* dual-band 2T2R */ +#define RT5592_RF_5592 0x000f /* dual-band 2T2R */ #define RT5390_RF_5370 0x5370 /* 1T1R */ #define RT5390_RF_5372 0x5372 /* 2T2R */ @@ -1029,6 +1022,38 @@ static const struct rt2860_rate { { 106, 0x03 }, \ { 128, 0x12 } +#define RT5592_DEF_BBP \ + { 20, 0x06 }, \ + { 31, 0x08 }, \ + { 65, 0x2c }, \ + { 66, 0x38 }, \ + { 68, 0xdd }, \ + { 69, 0x1a }, \ + { 70, 0x05 }, \ + { 73, 0x13 }, \ + { 74, 0x0f }, \ + { 75, 0x4f }, \ + { 76, 0x28 }, \ + { 77, 0x59 }, \ + { 81, 0x37 }, \ + { 82, 0x62 }, \ + { 83, 0x6a }, \ + { 84, 0x9a }, \ + { 86, 0x38 }, \ + { 88, 0x90 }, \ + { 91, 0x04 }, \ + { 92, 0x02 }, \ + { 95, 0x9a }, \ + { 98, 0x12 }, \ + { 103, 0xc0 }, \ + { 104, 0x92 }, \ + { 105, 0x3c }, \ + { 106, 0x35 }, \ + { 128, 0x12 }, \ + { 134, 0xd0 }, \ + { 135, 0xf6 }, \ + { 137, 0x0f } + /* * Default settings for RF registers; values derived from the reference driver. */ @@ -1149,6 +1174,116 @@ static const struct rt2860_rate { { 0x61, 0, 7 }, \ { 0x61, 0, 9 } +#define RT5592_RF5592_20MHZ \ + { 0x1e2, 4, 10, 3 }, \ + { 0x1e3, 4, 10, 3 }, \ + { 0x1e4, 4, 10, 3 }, \ + { 0x1e5, 4, 10, 3 }, \ + { 0x1e6, 4, 10, 3 }, \ + { 0x1e7, 4, 10, 3 }, \ + { 0x1e8, 4, 10, 3 }, \ + { 0x1e9, 4, 10, 3 }, \ + { 0x1ea, 4, 10, 3 }, \ + { 0x1eb, 4, 10, 3 }, \ + { 0x1ec, 4, 10, 3 }, \ + { 0x1ed, 4, 10, 3 }, \ + { 0x1ee, 4, 10, 3 }, \ + { 0x1f0, 8, 10, 3 }, \ + { 0xac, 8, 12, 1 }, \ + { 0xad, 0, 12, 1 }, \ + { 0xad, 4, 12, 1 }, \ + { 0xae, 0, 12, 1 }, \ + { 0xae, 4, 12, 1 }, \ + { 0xae, 8, 12, 1 }, \ + { 0xaf, 4, 12, 1 }, \ + { 0xaf, 8, 12, 1 }, \ + { 0xb0, 0, 12, 1 }, \ + { 0xb0, 8, 12, 1 }, \ + { 0xb1, 0, 12, 1 }, \ + { 0xb1, 4, 12, 1 }, \ + { 0xb7, 4, 12, 1 }, \ + { 0xb7, 8, 12, 1 }, \ + { 0xb8, 0, 12, 1 }, \ + { 0xb8, 8, 12, 1 }, \ + { 0xb9, 0, 12, 1 }, \ + { 0xb9, 4, 12, 1 }, \ + { 0xba, 0, 12, 1 }, \ + { 0xba, 4, 12, 1 }, \ + { 0xba, 8, 12, 1 }, \ + { 0xbb, 4, 12, 1 }, \ + { 0xbb, 8, 12, 1 }, \ + { 0xbc, 0, 12, 1 }, \ + { 0xbc, 8, 12, 1 }, \ + { 0xbd, 0, 12, 1 }, \ + { 0xbd, 4, 12, 1 }, \ + { 0xbe, 0, 12, 1 }, \ + { 0xbf, 6, 12, 1 }, \ + { 0xbf, 10, 12, 1 }, \ + { 0xc0, 2, 12, 1 }, \ + { 0xc0, 10, 12, 1 }, \ + { 0xc1, 2, 12, 1 }, \ + { 0xc1, 6, 12, 1 }, \ + { 0xc2, 2, 12, 1 }, \ + { 0xa4, 0, 12, 1 }, \ + { 0xa4, 4, 12, 1 }, \ + { 0xa5, 8, 12, 1 }, \ + { 0xa6, 0, 12, 1 } + +#define RT5592_RF5592_40MHZ \ + { 0xf1, 2, 10, 3 }, \ + { 0xf1, 7, 10, 3 }, \ + { 0xf2, 2, 10, 3 }, \ + { 0xf2, 7, 10, 3 }, \ + { 0xf3, 2, 10, 3 }, \ + { 0xf3, 7, 10, 3 }, \ + { 0xf4, 2, 10, 3 }, \ + { 0xf4, 7, 10, 3 }, \ + { 0xf5, 2, 10, 3 }, \ + { 0xf5, 7, 10, 3 }, \ + { 0xf6, 2, 10, 3 }, \ + { 0xf6, 7, 10, 3 }, \ + { 0xf7, 2, 10, 3 }, \ + { 0xf8, 4, 10, 3 }, \ + { 0x56, 4, 12, 1 }, \ + { 0x56, 6, 12, 1 }, \ + { 0x56, 8, 12, 1 }, \ + { 0x57, 0, 12, 1 }, \ + { 0x57, 2, 12, 1 }, \ + { 0x57, 4, 12, 1 }, \ + { 0x57, 8, 12, 1 }, \ + { 0x57, 10, 12, 1 }, \ + { 0x58, 0, 12, 1 }, \ + { 0x58, 4, 12, 1 }, \ + { 0x58, 6, 12, 1 }, \ + { 0x58, 8, 12, 1 }, \ + { 0x5b, 8, 12, 1 }, \ + { 0x5b, 10, 12, 1 }, \ + { 0x5c, 0, 12, 1 }, \ + { 0x5c, 4, 12, 1 }, \ + { 0x5c, 6, 12, 1 }, \ + { 0x5c, 8, 12, 1 }, \ + { 0x5d, 0, 12, 1 }, \ + { 0x5d, 2, 12, 1 }, \ + { 0x5d, 4, 12, 1 }, \ + { 0x5d, 8, 12, 1 }, \ + { 0x5d, 10, 12, 1 }, \ + { 0x5e, 0, 12, 1 }, \ + { 0x5e, 4, 12, 1 }, \ + { 0x5e, 6, 12, 1 }, \ + { 0x5e, 8, 12, 1 }, \ + { 0x5f, 0, 12, 1 }, \ + { 0x5f, 9, 12, 1 }, \ + { 0x5f, 11, 12, 1 }, \ + { 0x60, 1, 12, 1 }, \ + { 0x60, 5, 12, 1 }, \ + { 0x60, 7, 12, 1 }, \ + { 0x60, 9, 12, 1 }, \ + { 0x61, 1, 12, 1 }, \ + { 0x52, 0, 12, 1 }, \ + { 0x52, 4, 12, 1 }, \ + { 0x52, 8, 12, 1 }, \ + { 0x53, 0, 12, 1 } + #define RT3070_DEF_RF \ { 4, 0x40 }, \ { 5, 0x03 }, \ @@ -1322,6 +1457,128 @@ static const struct rt2860_rate { { 62, 0x39 }, \ { 63, 0x07 } +#define RT5592_DEF_RF \ + { 1, 0x3f }, \ + { 3, 0x08 }, \ + { 5, 0x10 }, \ + { 6, 0xe4 }, \ + { 7, 0x00 }, \ + { 14, 0x00 }, \ + { 15, 0x00 }, \ + { 16, 0x00 }, \ + { 18, 0x03 }, \ + { 19, 0x4d }, \ + { 20, 0x10 }, \ + { 21, 0x8d }, \ + { 26, 0x82 }, \ + { 28, 0x00 }, \ + { 29, 0x10 }, \ + { 33, 0xc0 }, \ + { 34, 0x07 }, \ + { 35, 0x12 }, \ + { 47, 0x0c }, \ + { 53, 0x22 }, \ + { 63, 0x07 } + +#define RT5592_2GHZ_DEF_RF \ + { 10, 0x90 }, \ + { 11, 0x4a }, \ + { 12, 0x52 }, \ + { 13, 0x42 }, \ + { 22, 0x40 }, \ + { 24, 0x4a }, \ + { 25, 0x80 }, \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 15:27:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA1C1627; Fri, 6 Dec 2013 15:27:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C77DA16C8; Fri, 6 Dec 2013 15:27:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6FRgpL011673; Fri, 6 Dec 2013 15:27:42 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6FRgdv011672; Fri, 6 Dec 2013 15:27:42 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201312061527.rB6FRgdv011672@svn.freebsd.org> From: Kevin Lo Date: Fri, 6 Dec 2013 15:27:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259033 - head/etc/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 15:27:42 -0000 Author: kevlo Date: Fri Dec 6 15:27:42 2013 New Revision: 259033 URL: http://svnweb.freebsd.org/changeset/base/259033 Log: Regen. Modified: head/etc/devd/usb.conf Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Fri Dec 6 15:26:39 2013 (r259032) +++ head/etc/devd/usb.conf Fri Dec 6 15:27:42 2013 (r259033) @@ -3825,7 +3825,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x148f"; - match "product" "(0x2770|0x2870|0x3070|0x3071|0x3072|0x3370|0x3572|0x5370|0x8070)"; + match "product" "(0x2770|0x2870|0x3070|0x3071|0x3072|0x3370|0x3572|0x5370|0x5572|0x8070)"; action "kldload -n if_run"; }; @@ -4625,7 +4625,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1b)"; + match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b)"; action "kldload -n if_run"; }; @@ -5341,5 +5341,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2574 USB entries processed +# 2576 USB entries processed From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 15:28:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F02F2767; Fri, 6 Dec 2013 15:28:04 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C76F016CD; Fri, 6 Dec 2013 15:28:04 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B62E1B93B; Fri, 6 Dec 2013 10:28:03 -0500 (EST) From: John Baldwin To: Kevin Lo Subject: Re: svn commit: r259031 - head/sys/dev/usb/wlan Date: Fri, 6 Dec 2013 10:27:09 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201312061517.rB6FHTOa007535@svn.freebsd.org> In-Reply-To: <201312061517.rB6FHTOa007535@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201312061027.09144.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 06 Dec 2013 10:28:03 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 15:28:05 -0000 On Friday, December 06, 2013 10:17:29 am Kevin Lo wrote: > Author: kevlo > Date: Fri Dec 6 15:17:28 2013 > New Revision: 259031 > URL: http://svnweb.freebsd.org/changeset/base/259031 > > Log: > Replace the magic numbers with something more readable. > > Modified: > head/sys/dev/usb/wlan/if_run.c > head/sys/dev/usb/wlan/if_runreg.h > > Modified: head/sys/dev/usb/wlan/if_run.c > ============================================================================== > --- head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:15:58 2013 (r259030) > +++ head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:17:28 2013 (r259031) > @@ -4530,7 +4530,7 @@ run_rt5390_bbp_init(struct run_softc *sc > > /* Avoid data lost and CRC error. */ > run_bbp_read(sc, 4, &bbp4); > - run_bbp_write(sc, 4, bbp4 | 0x40); > + run_bbp_write(sc, 4, bbp | RT5390_MAC_IF_CTRL); The s/bbp4/bbp/ here looks like a bug? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 16:22:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A4C1598; Fri, 6 Dec 2013 16:22:53 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D87011B27; Fri, 6 Dec 2013 16:22:52 +0000 (UTC) Received: from [127.0.0.1] (mail.kevlo.org [220.135.115.6]) by ns.kevlo.org (8.14.6/8.14.6) with ESMTP id rB6GLYdp099776; Sat, 7 Dec 2013 00:21:35 +0800 (CST) (envelope-from kevlo@FreeBSD.org) Message-ID: <52A1F9DA.8000500@FreeBSD.org> Date: Sat, 07 Dec 2013 00:22:50 +0800 From: Kevin Lo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r259031 - head/sys/dev/usb/wlan References: <201312061517.rB6FHTOa007535@svn.freebsd.org> <201312061027.09144.jhb@freebsd.org> In-Reply-To: <201312061027.09144.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 16:22:53 -0000 John Baldwin wrote: > On Friday, December 06, 2013 10:17:29 am Kevin Lo wrote: >> Author: kevlo >> Date: Fri Dec 6 15:17:28 2013 >> New Revision: 259031 >> URL: http://svnweb.freebsd.org/changeset/base/259031 >> >> Log: >> Replace the magic numbers with something more readable. >> >> Modified: >> head/sys/dev/usb/wlan/if_run.c >> head/sys/dev/usb/wlan/if_runreg.h >> >> Modified: head/sys/dev/usb/wlan/if_run.c >> > ============================================================================== >> --- head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:15:58 2013 (r259030) >> +++ head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:17:28 2013 (r259031) >> @@ -4530,7 +4530,7 @@ run_rt5390_bbp_init(struct run_softc *sc >> >> /* Avoid data lost and CRC error. */ >> run_bbp_read(sc, 4, &bbp4); >> - run_bbp_write(sc, 4, bbp4 | 0x40); >> + run_bbp_write(sc, 4, bbp | RT5390_MAC_IF_CTRL); > The s/bbp4/bbp/ here looks like a bug? Something went wrong with the merge. Fixed as r259032. Kevin From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 16:31:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DB16A1C; Fri, 6 Dec 2013 16:31:57 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 558A21CE1; Fri, 6 Dec 2013 16:31:57 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 71AC0B93B; Fri, 6 Dec 2013 11:31:55 -0500 (EST) From: John Baldwin To: Kevin Lo Subject: Re: svn commit: r259031 - head/sys/dev/usb/wlan Date: Fri, 6 Dec 2013 10:36:07 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201312061517.rB6FHTOa007535@svn.freebsd.org> <201312061027.09144.jhb@freebsd.org> In-Reply-To: <201312061027.09144.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201312061036.07397.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 06 Dec 2013 11:31:55 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 16:31:57 -0000 On Friday, December 06, 2013 10:27:09 am John Baldwin wrote: > On Friday, December 06, 2013 10:17:29 am Kevin Lo wrote: > > Author: kevlo > > Date: Fri Dec 6 15:17:28 2013 > > New Revision: 259031 > > URL: http://svnweb.freebsd.org/changeset/base/259031 > > > > Log: > > Replace the magic numbers with something more readable. > > > > Modified: > > head/sys/dev/usb/wlan/if_run.c > > head/sys/dev/usb/wlan/if_runreg.h > > > > Modified: head/sys/dev/usb/wlan/if_run.c > > > ============================================================================== > > --- head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:15:58 2013 (r259030) > > +++ head/sys/dev/usb/wlan/if_run.c Fri Dec 6 15:17:28 2013 (r259031) > > @@ -4530,7 +4530,7 @@ run_rt5390_bbp_init(struct run_softc *sc > > > > /* Avoid data lost and CRC error. */ > > run_bbp_read(sc, 4, &bbp4); > > - run_bbp_write(sc, 4, bbp4 | 0x40); > > + run_bbp_write(sc, 4, bbp | RT5390_MAC_IF_CTRL); > > The s/bbp4/bbp/ here looks like a bug? Ah, your larger patch after this changed the read to use bbp instead of bbp4. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 17:45:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33D03644; Fri, 6 Dec 2013 17:45:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2057011F4; Fri, 6 Dec 2013 17:45:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6HjElV060022; Fri, 6 Dec 2013 17:45:14 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6HjE9h060021; Fri, 6 Dec 2013 17:45:14 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201312061745.rB6HjE9h060021@svn.freebsd.org> From: Luiz Otavio O Souza Date: Fri, 6 Dec 2013 17:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259034 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 17:45:15 -0000 Author: loos Date: Fri Dec 6 17:45:14 2013 New Revision: 259034 URL: http://svnweb.freebsd.org/changeset/base/259034 Log: Make the sysctl node read-only. Approved by: adrian (mentor) Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Fri Dec 6 15:27:42 2013 (r259033) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Fri Dec 6 17:45:14 2013 (r259034) @@ -589,7 +589,7 @@ bcm_gpio_sysctl_init(struct bcm_gpio_sof tree_node = device_get_sysctl_tree(sc->sc_dev); tree = SYSCTL_CHILDREN(tree_node); pin_node = SYSCTL_ADD_NODE(ctx, tree, OID_AUTO, "pin", - CTLFLAG_RW, NULL, "GPIO Pins"); + CTLFLAG_RD, NULL, "GPIO Pins"); pin_tree = SYSCTL_CHILDREN(pin_node); for (i = 0; i < sc->sc_gpio_npins; i++) { From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 17:49:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB999891; Fri, 6 Dec 2013 17:49:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 97E221232; Fri, 6 Dec 2013 17:49:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6HnYjd060518; Fri, 6 Dec 2013 17:49:34 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6HnYAr060517; Fri, 6 Dec 2013 17:49:34 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201312061749.rB6HnYAr060517@svn.freebsd.org> From: Luiz Otavio O Souza Date: Fri, 6 Dec 2013 17:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259035 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 17:49:34 -0000 Author: loos Date: Fri Dec 6 17:49:34 2013 New Revision: 259035 URL: http://svnweb.freebsd.org/changeset/base/259035 Log: Remove unnecessary includes and an unused softc variable. While here apply two minor style(9) fixes. Approved by: adrian (mentor) Modified: head/sys/dev/gpio/gpioiic.c Modified: head/sys/dev/gpio/gpioiic.c ============================================================================== --- head/sys/dev/gpio/gpioiic.c Fri Dec 6 17:45:14 2013 (r259034) +++ head/sys/dev/gpio/gpioiic.c Fri Dec 6 17:49:34 2013 (r259035) @@ -30,15 +30,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include -#include -#include -#include #include -#include #include #include "gpiobus_if.h" @@ -55,7 +50,6 @@ struct gpioiic_softc { device_t sc_dev; device_t sc_busdev; - struct cdev *sc_leddev; int scl_pin; int sda_pin; }; @@ -78,6 +72,7 @@ gpioiic_probe(device_t dev) { device_set_desc(dev, "GPIO I2C bit-banging driver"); + return (0); } @@ -139,7 +134,7 @@ gpioiic_callback(device_t dev, int index error = EINVAL; } - return(error); + return (error); } static void From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 17:56:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1238A88; Fri, 6 Dec 2013 17:56:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD50A12B1; Fri, 6 Dec 2013 17:56:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6HuKmV063457; Fri, 6 Dec 2013 17:56:20 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6HuK78063456; Fri, 6 Dec 2013 17:56:20 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201312061756.rB6HuK78063456@svn.freebsd.org> From: Luiz Otavio O Souza Date: Fri, 6 Dec 2013 17:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259036 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 17:56:20 -0000 Author: loos Date: Fri Dec 6 17:56:20 2013 New Revision: 259036 URL: http://svnweb.freebsd.org/changeset/base/259036 Log: Move the GPIOBUS_SET_PINFLAGS(..., ..., pin, GPIO_PIN_OUTPUT) to led(4) control callback function. This makes gpioled(4) works even if the pin is accidentally set to an input. Approved by: adrian (mentor) Modified: head/sys/dev/gpio/gpioled.c Modified: head/sys/dev/gpio/gpioled.c ============================================================================== --- head/sys/dev/gpio/gpioled.c Fri Dec 6 17:49:34 2013 (r259035) +++ head/sys/dev/gpio/gpioled.c Fri Dec 6 17:56:20 2013 (r259036) @@ -75,6 +75,8 @@ gpioled_control(void *priv, int onoff) GPIOLED_LOCK(sc); GPIOBUS_LOCK_BUS(sc->sc_busdev); GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev); + GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, + GPIO_PIN_OUTPUT); GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, onoff ? GPIO_PIN_HIGH : GPIO_PIN_LOW); GPIOBUS_RELEASE_BUS(sc->sc_busdev, sc->sc_dev); @@ -103,9 +105,6 @@ gpioled_attach(device_t dev) device_get_unit(dev), "name", &name)) name = NULL; - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, - GPIO_PIN_OUTPUT); - sc->sc_leddev = led_create(gpioled_control, sc, name ? name : device_get_nameunit(dev)); From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 18:09:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60D38E91; Fri, 6 Dec 2013 18:09:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D89F137C; Fri, 6 Dec 2013 18:09:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6I9BYS067567; Fri, 6 Dec 2013 18:09:11 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6I9BwM067566; Fri, 6 Dec 2013 18:09:11 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201312061809.rB6I9BwM067566@svn.freebsd.org> From: Luiz Otavio O Souza Date: Fri, 6 Dec 2013 18:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259037 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 18:09:11 -0000 Author: loos Date: Fri Dec 6 18:09:10 2013 New Revision: 259037 URL: http://svnweb.freebsd.org/changeset/base/259037 Log: Fix the pin value reading on AM335x. Because of the inverted logic it was always returning '0' for all the reads, even for the outputs. It is now known to work with gpioiic(4) and gpioled(4). Approved by: adrian (mentor) Tested on: BBB Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Fri Dec 6 17:56:20 2013 (r259036) +++ head/sys/arm/ti/ti_gpio.c Fri Dec 6 18:09:10 2013 (r259037) @@ -543,9 +543,9 @@ ti_gpio_pin_get(device_t dev, uint32_t p /* Read the value on the pin */ if (val & mask) - *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT) & mask) ? 1 : 0; - else *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAIN) & mask) ? 1 : 0; + else + *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT) & mask) ? 1 : 0; TI_GPIO_UNLOCK(sc); From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 18:32:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F2655D1; Fri, 6 Dec 2013 18:32:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B358157B; Fri, 6 Dec 2013 18:32: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 rB6IW4JV076779; Fri, 6 Dec 2013 18:32:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6IW4lo076778; Fri, 6 Dec 2013 18:32:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312061832.rB6IW4lo076778@svn.freebsd.org> From: Warner Losh Date: Fri, 6 Dec 2013 18:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259038 - stable/9/sys/arm/at91 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 18:32:04 -0000 Author: imp Date: Fri Dec 6 18:32:03 2013 New Revision: 259038 URL: http://svnweb.freebsd.org/changeset/base/259038 Log: Bump the maximum VM space from 3 * memory size to a fixed 256MB. That's all we have room for since we map the hardware registers starting at 0xd0000000. This allows my 64MB AT91SAM9G20 to boot again after the unmmaped I/O changes were MFC'd at r251897. Other subplatforms may need similar treatment. Modified: stable/9/sys/arm/at91/at91_machdep.c Modified: stable/9/sys/arm/at91/at91_machdep.c ============================================================================== --- stable/9/sys/arm/at91/at91_machdep.c Fri Dec 6 18:09:10 2013 (r259037) +++ stable/9/sys/arm/at91/at91_machdep.c Fri Dec 6 18:32:03 2013 (r259038) @@ -426,9 +426,8 @@ initarm(void *arg, void *arg2) dump_avail[2] = 0; dump_avail[3] = 0; - pmap_bootstrap(freemempos, - KERNVIRTADDR + 3 * memsize, - &kernel_l1pt); + /* Use the full 256MB of KVA we have available, regardless of memory size */ + pmap_bootstrap(freemempos, KERNVIRTADDR + (256 << 20), &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); mutex_init(); From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 18:41:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37EE1991; Fri, 6 Dec 2013 18:41:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 24D1E1617; Fri, 6 Dec 2013 18:41:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6IfHQa080005; Fri, 6 Dec 2013 18:41:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6IfHGf080004; Fri, 6 Dec 2013 18:41:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312061841.rB6IfHGf080004@svn.freebsd.org> From: Warner Losh Date: Fri, 6 Dec 2013 18:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259039 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 18:41:17 -0000 Author: imp Date: Fri Dec 6 18:41:16 2013 New Revision: 259039 URL: http://svnweb.freebsd.org/changeset/base/259039 Log: Although not strictly required to boot a 64MB board, bump vm_max_virtual_address to be KERNVIRTADDR + 256MB. This allows some future shock protection since the KVA requirements have gone up since the unmapped changes have gone in, as well as preventing us from overlapping with the hardware devices, which we map at 0xd0000000, which we'd hit with anything more than 85MB... MFC after: 3 days Modified: head/sys/arm/at91/at91_machdep.c Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Fri Dec 6 18:32:03 2013 (r259038) +++ head/sys/arm/at91/at91_machdep.c Fri Dec 6 18:41:16 2013 (r259039) @@ -633,7 +633,8 @@ initarm(struct arm_boot_params *abp) pmap_curmaxkvaddr = afterkern + L1_S_SIZE * (KERNEL_PT_KERN_NUM - 1); arm_dump_avail_init(memsize, sizeof(dump_avail)/sizeof(dump_avail[0])); - vm_max_kernel_address = KERNVIRTADDR + 3 * memsize; + /* Always use the 256MB of KVA we have available between the kernel and devices */ + vm_max_kernel_address = KERNVIRTADDR + (256 << 20); pmap_bootstrap(freemempos, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 18:48:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9B35D55; Fri, 6 Dec 2013 18:48:41 +0000 (UTC) Received: from smtpauth4.wiscmail.wisc.edu (wmauth4.doit.wisc.edu [144.92.197.145]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 850D21669; Fri, 6 Dec 2013 18:48:40 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth4.wiscmail.wisc.edu by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) id <0MXE00100ET79000@smtpauth4.wiscmail.wisc.edu>; Fri, 06 Dec 2013 12:48:34 -0600 (CST) X-Spam-PmxInfo: Server=avs-4, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.12.6.183621, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from comporellon.tachypleus.net (adsl-76-208-69-44.dsl.mdsnwi.sbcglobal.net [76.208.69.44]) by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0MXE00ERREWWFM00@smtpauth4.wiscmail.wisc.edu>; Fri, 06 Dec 2013 12:48:34 -0600 (CST) Message-id: <52A21C00.6070701@freebsd.org> Date: Fri, 06 Dec 2013 12:48:32 -0600 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 To: Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken References: <201312052238.rB5McsVN020719@svn.freebsd.org> In-reply-to: <201312052238.rB5McsVN020719@svn.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 18:48:41 -0000 On 12/05/13 16:38, Aleksandr Rybalko wrote: > Author: ray > Date: Thu Dec 5 22:38:53 2013 > New Revision: 259016 > URL: http://svnweb.freebsd.org/changeset/base/259016 > > Log: > Merge VT(9) project (a.k.a. newcons). > > Reviewed by: nwhitehorn > MFC_to_10_after: re approval > > Sponsored by: The FreeBSD Foundation > > Good to see this! Some significant things still seem to be broken, though. For example, X doesn't work with non-KMS drivers due to missing mmap(). Scrolling in the terminal is also really really really slow on my hardware. -Nathan From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 20:33:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2275FA6; Fri, 6 Dec 2013 20:33:42 +0000 (UTC) Received: from olymp.kibab.com (olymp6.kibab.com [IPv6:2a01:4f8:160:84c1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 63E131E82; Fri, 6 Dec 2013 20:33:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 olymp.kibab.com 6186D3F717 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bakulin.de; s=default; t=1386362020; bh=ie2Sh55GXIhHj4LbhEWjNfRQ7CNP3CkKNs33mJD/bVM=; h=Date:From:To:Subject:References:In-Reply-To; b=C9wuyStOL5V7cmNJE51B3NlDGi5VLCEr0maDWUHIhfWQqPtuIDBsAa/ebgvjWfoAY ogi6Wm4l+/bKJkoUKGlwZcn/NqAWEA2D48MFyv9EsNlDZzegfkX6UDCyiGPaXb4n9f dUVJ2MWI/pC8nQocCy6xwXY84/MQzR9yNuVEzaYg= Message-ID: <52A234A3.1040106@bakulin.de> Date: Fri, 06 Dec 2013 21:33:39 +0100 From: Ilya Bakulin MIME-Version: 1.0 To: Kevin Lo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r259032 - in head: share/man/man4 sys/dev/usb sys/dev/usb/wlan References: <201312061526.rB6FQdxZ011500@svn.freebsd.org> In-Reply-To: <201312061526.rB6FQdxZ011500@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 20:33:42 -0000 On 06.12.13, 16:26, Kevin Lo wrote: > Author: kevlo > Date: Fri Dec 6 15:26:39 2013 > New Revision: 259032 > URL: http://svnweb.freebsd.org/changeset/base/259032 > > Log: > Add support for the MediaTek/Ralink RT5572 chipset. > Committed over the TP-LINK TL-WDN3200 (RT5572) on amd64 with WPA. > > While here, add my copyright. > > Modified: > head/share/man/man4/run.4 > head/sys/dev/usb/usbdevs > head/sys/dev/usb/wlan/if_run.c > head/sys/dev/usb/wlan/if_runreg.h > head/sys/dev/usb/wlan/if_runvar.h This seems to break the build due to undeclared structure: ===> usb/run (all) --- if_run.o --- cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /stor0/jails/buildhost.kibab.com/usr/home/kibab/repos/freebsd-git/gs0/obj/i386.i386/stor0/jails/buildhost.kibab.com/usr/home/kibab/repos/freebsd-git/freebsd/sys/GS0/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -I/stor0/jails/buildhost.kibab.com/usr/home/kibab/repos/freebsd-git/gs0/obj/i386.i386/stor0/jails/buildhost.kibab.com/usr/home/kibab/repos/freebsd-git/freebsd/sys/GS0 -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -c /stor0/jails/buildhost.kibab.com/usr/home/kibab/repos/freebsd-git/freebsd/sys/modules/usb/run/../../../dev/usb/wlan/if_run.c /stor0/jails/buildhost.kibab.com/usr/home/kibab/repos/freebsd-git/freebsd/sys/modules/usb/run/../../../dev/usb/wlan/if_run.c:3233:6: error: invalid application of 'sizeof' to an incomplete type 'struct rt2870_txwi' sizeof(struct rt2870_txwi)), rt2860_rates[ridx].rate, qid); ^ ~~~~~~~~~~~~~~~~~~~~ @/dev/usb/usb_debug.h:41:21: note: expanded from macro 'DPRINTFN' __FUNCTION__ ,##__VA_ARGS__); \ ^ /stor0/jails/buildhost.kibab.com/usr/home/kibab/repos/freebsd-git/freebsd/sys/modules/usb/run/../../../dev/usb/wlan/if_run.c:3233:20: note: forward declaration of 'struct rt2870_txwi' sizeof(struct rt2870_txwi)), rt2860_rates[ridx].rate, qid); ^ @/dev/usb/usb_debug.h:41:21: note: expanded from macro 'DPRINTFN' __FUNCTION__ ,##__VA_ARGS__); \ ^ 1 error generated. *** [if_run.o] Error code 1 -- Regards, Ilya Bakulin From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 20:48:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1898F920; Fri, 6 Dec 2013 20:48:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 055121F8D; Fri, 6 Dec 2013 20:48:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6KmrNS021603; Fri, 6 Dec 2013 20:48:53 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6Kmrdo021602; Fri, 6 Dec 2013 20:48:53 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201312062048.rB6Kmrdo021602@svn.freebsd.org> From: Colin Percival Date: Fri, 6 Dec 2013 20:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259040 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 20:48:54 -0000 Author: cperciva Date: Fri Dec 6 20:48:53 2013 New Revision: 259040 URL: http://svnweb.freebsd.org/changeset/base/259040 Log: MFC r258894: Make rc(8) re-source rc.conf upon receipt of SIGALRM. The rc system aggressively caches the contents of /etc/rc.conf in order to improve boot performance; this produces arguably astonishing (non-)results if /etc/rc.conf is modified during the boot process. This commit provides a mechanism for explicitly requesting that rc.conf be reloaded. Approved by: re (rodrigc) Modified: stable/10/etc/rc Directory Properties: stable/10/etc/ (props changed) Modified: stable/10/etc/rc ============================================================================== --- stable/10/etc/rc Fri Dec 6 18:41:16 2013 (r259039) +++ stable/10/etc/rc Fri Dec 6 20:48:53 2013 (r259040) @@ -71,6 +71,11 @@ fi . /etc/rc.subr load_rc_config 'XXX' +# If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d +# scripts to perform "boot-time configuration" including enabling and +# disabling rc.d scripts which appear later in the boot order. +trap "_rc_conf_loaded=false; load_rc_config 'XXX'" ALRM + skip="-s nostart" if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then skip="$skip -s nojail" From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 21:22:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71E065AD; Fri, 6 Dec 2013 21:22:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E7A511B9; Fri, 6 Dec 2013 21:22:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6LMYpk034747; Fri, 6 Dec 2013 21:22:34 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6LMYg2034745; Fri, 6 Dec 2013 21:22:34 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201312062122.rB6LMYg2034745@svn.freebsd.org> From: Joel Dahl Date: Fri, 6 Dec 2013 21:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259041 - in head: cddl/contrib/opensolaris/cmd/zpool lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 21:22:34 -0000 Author: joel (doc committer) Date: Fri Dec 6 21:22:33 2013 New Revision: 259041 URL: http://svnweb.freebsd.org/changeset/base/259041 Log: mdoc: remove EOL whitespace. Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 head/lib/libc/sys/wait.2 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Fri Dec 6 20:48:53 2013 (r259040) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Fri Dec 6 21:22:33 2013 (r259041) @@ -259,7 +259,7 @@ configuration. .El .Pp This features allows ZFS to maintain more information about how free space -is organized within the pool. If this feature is +is organized within the pool. If this feature is .Sy enabled , ZFS will set this feature to Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Fri Dec 6 20:48:53 2013 (r259040) +++ head/lib/libc/sys/wait.2 Fri Dec 6 21:22:33 2013 (r259041) @@ -103,7 +103,7 @@ and .Fn wait4 functions all implicitly wait for exited and trapped processes, but the -.Fn waitid +.Fn waitid and .Fn wait6 functions require the corresponding @@ -203,7 +203,7 @@ and wait for any child process in the same process group as the caller. .El .Pp -Non-standard identifier types supported by this +Non-standard identifier types supported by this implementation of .Fn waitid and From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 21:26:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B12D85A; Fri, 6 Dec 2013 21:26:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F67D11F0; Fri, 6 Dec 2013 21:26:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6LQw3O035251; Fri, 6 Dec 2013 21:26:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6LQw7v035250; Fri, 6 Dec 2013 21:26:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312062126.rB6LQw7v035250@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Dec 2013 21:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259042 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 21:26:58 -0000 Author: kib Date: Fri Dec 6 21:26:57 2013 New Revision: 259042 URL: http://svnweb.freebsd.org/changeset/base/259042 Log: Do not force to run atexit handlers, which text comes from a dso owning the handle passed to __cxa_finalize() but which are registered by other dso, when the process is inside exit(3). Running them makes the destruction order wrong, and there is hope that such destructors would not call dlclose(3), since it is pointless at this stage of the process existence. The change effectively disables the r211706 after the exit(3) is called. Reported and tested by: Michael Gmelin Analyzed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/stdlib/atexit.c Modified: head/lib/libc/stdlib/atexit.c ============================================================================== --- head/lib/libc/stdlib/atexit.c Fri Dec 6 21:22:33 2013 (r259041) +++ head/lib/libc/stdlib/atexit.c Fri Dec 6 21:26:57 2013 (r259042) @@ -151,6 +151,8 @@ __cxa_atexit(void (*func)(void *), void #pragma weak __pthread_cxa_finalize void __pthread_cxa_finalize(const struct dl_phdr_info *); +static int global_exit; + /* * Call all handlers registered with __cxa_atexit for the shared * object owning 'dso'. Note: if 'dso' is NULL, then all remaining @@ -164,10 +166,12 @@ __cxa_finalize(void *dso) struct atexit_fn fn; int n, has_phdr; - if (dso != NULL) + if (dso != NULL) { has_phdr = _rtld_addr_phdr(dso, &phdr_info); - else + } else { has_phdr = 0; + global_exit = 1; + } _MUTEX_LOCK(&atexit_mutex); for (p = __atexit; p; p = p->next) { @@ -177,8 +181,9 @@ __cxa_finalize(void *dso) fn = p->fns[n]; if (dso != NULL && dso != fn.fn_dso) { /* wrong DSO ? */ - if (!has_phdr || !__elf_phdr_match_addr( - &phdr_info, fn.fn_ptr.cxa_func)) + if (!has_phdr || global_exit || + !__elf_phdr_match_addr(&phdr_info, + fn.fn_ptr.cxa_func)) continue; } /* @@ -200,6 +205,6 @@ __cxa_finalize(void *dso) if (dso == NULL) _MUTEX_DESTROY(&atexit_mutex); - if (has_phdr && &__pthread_cxa_finalize != NULL) + if (has_phdr && !global_exit && &__pthread_cxa_finalize != NULL) __pthread_cxa_finalize(&phdr_info); } From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 21:30:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AD36ACF; Fri, 6 Dec 2013 21:30:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC5F4122C; Fri, 6 Dec 2013 21:30:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6LUVQn037676; Fri, 6 Dec 2013 21:30:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6LUVUu037674; Fri, 6 Dec 2013 21:30:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312062130.rB6LUVUu037674@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Dec 2013 21:30:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259043 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 21:30:32 -0000 Author: kib Date: Fri Dec 6 21:30:31 2013 New Revision: 259043 URL: http://svnweb.freebsd.org/changeset/base/259043 Log: Build an allocator for the aligned memory on top of the rtld-private malloc. Reviewed by: kan Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.h head/libexec/rtld-elf/xmalloc.c Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Fri Dec 6 21:26:57 2013 (r259042) +++ head/libexec/rtld-elf/rtld.h Fri Dec 6 21:30:31 2013 (r259043) @@ -352,6 +352,8 @@ Obj_Entry *map_object(int, const char *, void *xcalloc(size_t, size_t); void *xmalloc(size_t); char *xstrdup(const char *); +void *malloc_aligned(size_t size, size_t align); +void free_aligned(void *ptr); extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; extern Elf_Sym sym_zero; /* For resolving undefined weak refs. */ Modified: head/libexec/rtld-elf/xmalloc.c ============================================================================== --- head/libexec/rtld-elf/xmalloc.c Fri Dec 6 21:26:57 2013 (r259042) +++ head/libexec/rtld-elf/xmalloc.c Fri Dec 6 21:30:31 2013 (r259043) @@ -67,3 +67,33 @@ xstrdup(const char *str) memcpy(copy, str, len); return (copy); } + +void * +malloc_aligned(size_t size, size_t align) +{ + void *mem, *res; + uintptr_t x; + size_t asize, r; + + r = round(sizeof(void *), align); + asize = round(size, align) + r; + mem = xmalloc(asize); + x = (uintptr_t)mem; + res = (void *)round(x, align); + *(void **)((uintptr_t)res - sizeof(void *)) = mem; + return (res); +} + +void +free_aligned(void *ptr) +{ + void *mem; + uintptr_t x; + + if (ptr == NULL) + return; + x = (uintptr_t)ptr; + x -= sizeof(void *); + mem = *(void **)x; + free(mem); +} From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 21:39:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6971231; Fri, 6 Dec 2013 21:39:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A380E12EC; Fri, 6 Dec 2013 21:39:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6LdjVC038998; Fri, 6 Dec 2013 21:39:45 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6Ldj5K038997; Fri, 6 Dec 2013 21:39:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312062139.rB6Ldj5K038997@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Dec 2013 21:39:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259044 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 21:39:45 -0000 Author: kib Date: Fri Dec 6 21:39:45 2013 New Revision: 259044 URL: http://svnweb.freebsd.org/changeset/base/259044 Log: For variant II static TLS, properly align tls segments. Pre-calculate the max required alignment for the static tls segments, and honor it when carving the pieces for next module, from the static space. Use aligned allocator to get properly-aligned dynamic blocks. Reported by: dt71@gmx.com Reviewed by: kan Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Fri Dec 6 21:30:31 2013 (r259043) +++ head/libexec/rtld-elf/rtld.c Fri Dec 6 21:39:45 2013 (r259044) @@ -231,6 +231,7 @@ char **main_argv; size_t tls_last_offset; /* Static TLS offset of last module */ size_t tls_last_size; /* Static TLS size of last module */ size_t tls_static_space; /* Static TLS space allocated */ +size_t tls_static_max_align; int tls_dtv_generation = 1; /* Used to detect when dtv size changes */ int tls_max_index = 1; /* Largest module index allocated */ @@ -4281,19 +4282,22 @@ void * allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) { Obj_Entry *obj; - size_t size; + size_t size, ralign; char *tls; Elf_Addr *dtv, *olddtv; Elf_Addr segbase, oldsegbase, addr; int i; - size = round(tls_static_space, tcbalign); + ralign = tcbalign; + if (tls_static_max_align > ralign) + ralign = tls_static_max_align; + size = round(tls_static_space, ralign) + round(tcbsize, ralign); assert(tcbsize >= 2*sizeof(Elf_Addr)); - tls = xcalloc(1, size + tcbsize); + tls = malloc_aligned(size, ralign); dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); - segbase = (Elf_Addr)(tls + size); + segbase = (Elf_Addr)(tls + round(tls_static_space, ralign)); ((Elf_Addr*)segbase)[0] = segbase; ((Elf_Addr*)segbase)[1] = (Elf_Addr) dtv; @@ -4345,8 +4349,8 @@ allocate_tls(Obj_Entry *objs, void *oldt void free_tls(void *tls, size_t tcbsize, size_t tcbalign) { - size_t size; Elf_Addr* dtv; + size_t size, ralign; int dtvsize, i; Elf_Addr tlsstart, tlsend; @@ -4354,19 +4358,22 @@ free_tls(void *tls, size_t tcbsize, size * Figure out the size of the initial TLS block so that we can * find stuff which ___tls_get_addr() allocated dynamically. */ - size = round(tls_static_space, tcbalign); + ralign = tcbalign; + if (tls_static_max_align > ralign) + ralign = tls_static_max_align; + size = round(tls_static_space, ralign); dtv = ((Elf_Addr**)tls)[1]; dtvsize = dtv[1]; tlsend = (Elf_Addr) tls; tlsstart = tlsend - size; for (i = 0; i < dtvsize; i++) { - if (dtv[i+2] && (dtv[i+2] < tlsstart || dtv[i+2] > tlsend)) { - free((void*) dtv[i+2]); + if (dtv[i + 2] != 0 && (dtv[i + 2] < tlsstart || dtv[i + 2] > tlsend)) { + free_aligned(dtv[i + 2]); } } - free((void*) tlsstart); + free_aligned(tlsstart); free((void*) dtv); } @@ -4390,11 +4397,7 @@ allocate_module_tls(int index) die(); } - p = malloc(obj->tlssize); - if (p == NULL) { - _rtld_error("Cannot allocate TLS block for index %d", index); - die(); - } + p = malloc_aligned(obj->tlssize, obj->tlsalign); memcpy(p, obj->tlsinit, obj->tlsinitsize); memset(p + obj->tlsinitsize, 0, obj->tlssize - obj->tlsinitsize); @@ -4426,9 +4429,11 @@ allocate_tls_offset(Obj_Entry *obj) * leave a small amount of space spare to be used for dynamically * loading modules which use static TLS. */ - if (tls_static_space) { + if (tls_static_space != 0) { if (calculate_tls_end(off, obj->tlssize) > tls_static_space) return false; + } else if (obj->tlsalign > tls_static_max_align) { + tls_static_max_align = obj->tlsalign; } tls_last_offset = obj->tlsoffset = off; From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 21:44:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B39B4F5; Fri, 6 Dec 2013 21:44:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 588F9134C; Fri, 6 Dec 2013 21:44: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 rB6LiE4L041687; Fri, 6 Dec 2013 21:44:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6LiENS041686; Fri, 6 Dec 2013 21:44:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312062144.rB6LiENS041686@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Dec 2013 21:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259045 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 21:44:14 -0000 Author: kib Date: Fri Dec 6 21:44:13 2013 New Revision: 259045 URL: http://svnweb.freebsd.org/changeset/base/259045 Log: Disallow optimizations which potentially remove boundary checks for signed values due to a compiler authors considering integer overflow as impossible. The change follows suit of other projects taking the same measure. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Dec 6 21:39:45 2013 (r259044) +++ head/sys/conf/kern.mk Fri Dec 6 21:44:13 2013 (r259045) @@ -148,6 +148,12 @@ INLINE_LIMIT?= 8000 CFLAGS+= -ffreestanding # +# Do not allow a compiler to optimize out overflow checks for signed +# types. +# +CFLAGS+= -fno-strict-overflow + +# # GCC SSP support # .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 22:13:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B4302C5; Fri, 6 Dec 2013 22:13:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8751F15E4; Fri, 6 Dec 2013 22:13:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6MDqX5052043; Fri, 6 Dec 2013 22:13:52 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6MDqnM052042; Fri, 6 Dec 2013 22:13:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201312062213.rB6MDqnM052042@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 6 Dec 2013 22:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259046 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 22:13:52 -0000 Author: hselasky Date: Fri Dec 6 22:13:51 2013 New Revision: 259046 URL: http://svnweb.freebsd.org/changeset/base/259046 Log: Fix compilation when the "USB_DEBUG" option is set. Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Dec 6 21:44:13 2013 (r259045) +++ head/sys/dev/usb/wlan/if_run.c Fri Dec 6 22:13:51 2013 (r259046) @@ -3230,7 +3230,7 @@ run_tx(struct run_softc *sc, struct mbuf DPRINTFN(8, "sending data frame len=%d rate=%d qid=%d\n", m->m_pkthdr.len + (int)(sizeof(struct rt2870_txd) + - sizeof(struct rt2870_txwi)), rt2860_rates[ridx].rate, qid); + sizeof(struct rt2860_txwi)), rt2860_rates[ridx].rate, qid); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 22:15:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A12C56C; Fri, 6 Dec 2013 22:15:41 +0000 (UTC) Received: from mta04.bitpro.no (mta04.bitpro.no [92.42.64.203]) by mx1.freebsd.org (Postfix) with ESMTP id 009D6160A; Fri, 6 Dec 2013 22:15:40 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta04.bitpro.no (Postfix) with ESMTPS id 2FD3810058E; Fri, 6 Dec 2013 23:15:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id C5E8B8F17CD; Fri, 6 Dec 2013 23:16:10 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JFIXUvbI44Pi; Fri, 6 Dec 2013 23:16:10 +0100 (CET) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id DC7648F14C0; Fri, 6 Dec 2013 23:16:09 +0100 (CET) Message-ID: <52A24CC7.9030705@bitfrost.no> Date: Fri, 06 Dec 2013 23:16:39 +0100 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Ilya Bakulin , Kevin Lo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r259032 - in head: share/man/man4 sys/dev/usb sys/dev/usb/wlan References: <201312061526.rB6FQdxZ011500@svn.freebsd.org> <52A234A3.1040106@bakulin.de> In-Reply-To: <52A234A3.1040106@bakulin.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 22:15:41 -0000 On 12/06/13 21:33, Ilya Bakulin wrote: > On 06.12.13, 16:26, Kevin Lo wrote: >> Author: kevlo >> Date: Fri Dec 6 15:26:39 2013 >> New Revision: 259032 >> URL: http://svnweb.freebsd.org/changeset/base/259032 >> >> Log: >> Add support for the MediaTek/Ralink RT5572 chipset. >> Committed over the TP-LINK TL-WDN3200 (RT5572) on amd64 with WPA. >> >> While here, add my copyright. >> >> Modified: >> head/share/man/man4/run.4 >> head/sys/dev/usb/usbdevs >> head/sys/dev/usb/wlan/if_run.c >> head/sys/dev/usb/wlan/if_runreg.h >> head/sys/dev/usb/wlan/if_runvar.h > > This seems to break the build due to undeclared structure: Hi, I think Kevin is off for the weekend. The kernel build sets a debug option that the module build doesn't. Should be fixed by r259046. --HPS From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 22:24:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C07A9EE; Fri, 6 Dec 2013 22:24:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E84616BD; Fri, 6 Dec 2013 22:24:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6MOcY5055464; Fri, 6 Dec 2013 22:24:38 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6MOc7n055463; Fri, 6 Dec 2013 22:24:38 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201312062224.rB6MOc7n055463@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 Dec 2013 22:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259047 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 22:24:38 -0000 Author: jilles Date: Fri Dec 6 22:24:37 2013 New Revision: 259047 URL: http://svnweb.freebsd.org/changeset/base/259047 Log: sh: Split set -x output into a separate function. Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Fri Dec 6 22:13:51 2013 (r259046) +++ head/bin/sh/eval.c Fri Dec 6 22:24:37 2013 (r259047) @@ -750,6 +750,45 @@ isdeclarationcmd(struct narg *arg) (have_command || !isfunc("local")))); } +static void +xtracecommand(struct arglist *varlist, struct arglist *arglist) +{ + struct strlist *sp; + char sep = 0; + const char *p, *ps4; + + ps4 = expandstr(ps4val()); + out2str(ps4 != NULL ? ps4 : ps4val()); + for (sp = varlist->list ; sp ; sp = sp->next) { + if (sep != 0) + out2c(' '); + p = strchr(sp->text, '='); + if (p != NULL) { + p++; + outbin(sp->text, p - sp->text, out2); + out2qstr(p); + } else + out2qstr(sp->text); + sep = ' '; + } + for (sp = arglist->list ; sp ; sp = sp->next) { + if (sep != 0) + out2c(' '); + /* Disambiguate command looking like assignment. */ + if (sp == arglist->list && + strchr(sp->text, '=') != NULL && + strchr(sp->text, '\'') == NULL) { + out2c('\''); + out2str(sp->text); + out2c('\''); + } else + out2qstr(sp->text); + sep = ' '; + } + out2c('\n'); + flushout(&errout); +} + /* * Check if a builtin can safely be executed in the same process, * even though it should be in a subshell (command substitution). @@ -847,40 +886,8 @@ evalcommand(union node *cmd, int flags, argv -= argc; /* Print the command if xflag is set. */ - if (xflag) { - char sep = 0; - const char *p, *ps4; - ps4 = expandstr(ps4val()); - out2str(ps4 != NULL ? ps4 : ps4val()); - for (sp = varlist.list ; sp ; sp = sp->next) { - if (sep != 0) - out2c(' '); - p = strchr(sp->text, '='); - if (p != NULL) { - p++; - outbin(sp->text, p - sp->text, out2); - out2qstr(p); - } else - out2qstr(sp->text); - sep = ' '; - } - for (sp = arglist.list ; sp ; sp = sp->next) { - if (sep != 0) - out2c(' '); - /* Disambiguate command looking like assignment. */ - if (sp == arglist.list && - strchr(sp->text, '=') != NULL && - strchr(sp->text, '\'') == NULL) { - out2c('\''); - out2str(sp->text); - out2c('\''); - } else - out2qstr(sp->text); - sep = ' '; - } - out2c('\n'); - flushout(&errout); - } + if (xflag) + xtracecommand(&varlist, &arglist); /* Now locate the command. */ if (argc == 0) { From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 23:02:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 272DECCD; Fri, 6 Dec 2013 23:02:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 109CC19D6; Fri, 6 Dec 2013 23:02:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6N2vEr068685; Fri, 6 Dec 2013 23:02:57 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6N2vi9068684; Fri, 6 Dec 2013 23:02:57 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201312062302.rB6N2vi9068684@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 6 Dec 2013 23:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259048 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 23:02:58 -0000 Author: np Date: Fri Dec 6 23:02:57 2013 New Revision: 259048 URL: http://svnweb.freebsd.org/changeset/base/259048 Log: Two new cxgbetool subcommands to set up scheduler classes and to bind them to NIC queues. Obtained from: Chelsio Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Fri Dec 6 22:24:37 2013 (r259047) +++ head/tools/tools/cxgbetool/cxgbetool.c Fri Dec 6 23:02:57 2013 (r259048) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include "t4_ioctl.h" #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - +#define in_range(val, lo, hi) ( val < 0 || (val <= hi && val >= lo)) #define max(x, y) ((x) > (y) ? (x) : (y)) static const char *progname, *nexus; @@ -99,9 +99,11 @@ usage(FILE *fp) "\treg
[=] read/write register\n" "\treg64
[=] read/write 64 bit register\n" "\tregdump [] ... dump registers\n" + "\tsched-class params .. configure TX scheduler class\n" + "\tsched-queue bind NIC queues to TX Scheduling class\n" "\tstdio interactive mode\n" "\ttcb read TCB\n" - "\ttracer tx|rx set and enable a tracer)\n" + "\ttracer tx|rx set and enable a tracer\n" "\ttracer disable|enable disable or enable a tracer\n" "\ttracer list list all tracers\n" ); @@ -323,7 +325,7 @@ dump_regs_t4(int argc, const char *argv[ T4_MODREGS(ma), { "edc0", t4_edc_0_regs }, { "edc1", t4_edc_1_regs }, - T4_MODREGS(cim), + T4_MODREGS(cim), T4_MODREGS(tp), T4_MODREGS(ulp_rx), T4_MODREGS(ulp_tx), @@ -335,7 +337,7 @@ dump_regs_t4(int argc, const char *argv[ { "i2c", t4_i2cm_regs }, T4_MODREGS(mi), T4_MODREGS(uart), - T4_MODREGS(pmu), + T4_MODREGS(pmu), T4_MODREGS(sf), T4_MODREGS(pl), T4_MODREGS(le), @@ -1830,6 +1832,47 @@ set_tracer(uint8_t idx, int argc, const } static int +tracer_cmd(int argc, const char *argv[]) +{ + long long val; + uint8_t idx; + char *s; + + if (argc == 0) { + warnx("tracer: no arguments."); + return (EINVAL); + }; + + /* list */ + if (strcmp(argv[0], "list") == 0) { + if (argc != 1) + warnx("trailing arguments after \"list\" ignored."); + + return show_tracers(); + } + + /* ... */ + s = str_to_number(argv[0], NULL, &val); + if (*s || val > 0xff) { + warnx("\"%s\" is neither an index nor a tracer subcommand.", + argv[0]); + return (EINVAL); + } + idx = (int8_t)val; + + /* disable */ + if (argc == 2 && strcmp(argv[1], "disable") == 0) + return tracer_onoff(idx, 0); + + /* enable */ + if (argc == 2 && strcmp(argv[1], "enable") == 0) + return tracer_onoff(idx, 1); + + /* ... */ + return set_tracer(idx, argc - 1, argv + 1); +} + +static int modinfo(int argc, const char *argv[]) { long port; @@ -1958,45 +2001,289 @@ fail: } +/* XXX: pass in a low/high and do range checks as well */ static int -tracer_cmd(int argc, const char *argv[]) +get_sched_param(const char *param, const char *args[], long *val) { - long long val; - uint8_t idx; - char *s; + char *p; + + if (strcmp(param, args[0]) != 0) + return (EINVAL); + p = str_to_number(args[1], val, NULL); + if (*p) { + warnx("parameter \"%s\" has bad value \"%s\"", args[0], + args[1]); + return (EINVAL); + } + + return (0); +} + +static int +sched_class(int argc, const char *argv[]) +{ + struct t4_sched_params op; + int errs, i; + + memset(&op, 0xff, sizeof(op)); + op.subcmd = -1; + op.type = -1; if (argc == 0) { - warnx("tracer: no arguments."); + warnx("missing scheduling sub-command"); return (EINVAL); - }; + } + if (!strcmp(argv[0], "config")) { + op.subcmd = SCHED_CLASS_SUBCMD_CONFIG; + op.u.config.minmax = -1; + } else if (!strcmp(argv[0], "params")) { + op.subcmd = SCHED_CLASS_SUBCMD_PARAMS; + op.u.params.level = op.u.params.mode = op.u.params.rateunit = + op.u.params.ratemode = op.u.params.channel = + op.u.params.cl = op.u.params.minrate = op.u.params.maxrate = + op.u.params.weight = op.u.params.pktsize = -1; + } else { + warnx("invalid scheduling sub-command \"%s\"", argv[0]); + return (EINVAL); + } - /* list */ - if (strcmp(argv[0], "list") == 0) { - if (argc != 1) - warnx("trailing arguments after \"list\" ignored."); + /* Decode remaining arguments ... */ + errs = 0; + for (i = 1; i < argc; i += 2) { + const char **args = &argv[i]; + long l; - return show_tracers(); + if (i + 1 == argc) { + warnx("missing argument for \"%s\"", args[0]); + errs++; + break; + } + + if (!strcmp(args[0], "type")) { + if (!strcmp(args[1], "packet")) + op.type = SCHED_CLASS_TYPE_PACKET; + else { + warnx("invalid type parameter \"%s\"", args[1]); + errs++; + } + + continue; + } + + if (op.subcmd == SCHED_CLASS_SUBCMD_CONFIG) { + if(!get_sched_param("minmax", args, &l)) + op.u.config.minmax = (int8_t)l; + else { + warnx("unknown scheduler config parameter " + "\"%s\"", args[0]); + errs++; + } + + continue; + } + + /* Rest applies only to SUBCMD_PARAMS */ + if (op.subcmd != SCHED_CLASS_SUBCMD_PARAMS) + continue; + + if (!strcmp(args[0], "level")) { + if (!strcmp(args[1], "cl-rl")) + op.u.params.level = SCHED_CLASS_LEVEL_CL_RL; + else if (!strcmp(args[1], "cl-wrr")) + op.u.params.level = SCHED_CLASS_LEVEL_CL_WRR; + else if (!strcmp(args[1], "ch-rl")) + op.u.params.level = SCHED_CLASS_LEVEL_CH_RL; + else { + warnx("invalid level parameter \"%s\"", + args[1]); + errs++; + } + } else if (!strcmp(args[0], "mode")) { + if (!strcmp(args[1], "class")) + op.u.params.mode = SCHED_CLASS_MODE_CLASS; + else if (!strcmp(args[1], "flow")) + op.u.params.mode = SCHED_CLASS_MODE_FLOW; + else { + warnx("invalid mode parameter \"%s\"", args[1]); + errs++; + } + } else if (!strcmp(args[0], "rate-unit")) { + if (!strcmp(args[1], "bits")) + op.u.params.rateunit = SCHED_CLASS_RATEUNIT_BITS; + else if (!strcmp(args[1], "pkts")) + op.u.params.rateunit = SCHED_CLASS_RATEUNIT_PKTS; + else { + warnx("invalid rate-unit parameter \"%s\"", + args[1]); + errs++; + } + } else if (!strcmp(args[0], "rate-mode")) { + if (!strcmp(args[1], "relative")) + op.u.params.ratemode = SCHED_CLASS_RATEMODE_REL; + else if (!strcmp(args[1], "absolute")) + op.u.params.ratemode = SCHED_CLASS_RATEMODE_ABS; + else { + warnx("invalid rate-mode parameter \"%s\"", + args[1]); + errs++; + } + } else if (!get_sched_param("channel", args, &l)) + op.u.params.channel = (int8_t)l; + else if (!get_sched_param("class", args, &l)) + op.u.params.cl = (int8_t)l; + else if (!get_sched_param("min-rate", args, &l)) + op.u.params.minrate = (int32_t)l; + else if (!get_sched_param("max-rate", args, &l)) + op.u.params.maxrate = (int32_t)l; + else if (!get_sched_param("weight", args, &l)) + op.u.params.weight = (int16_t)l; + else if (!get_sched_param("pkt-size", args, &l)) + op.u.params.pktsize = (int16_t)l; + else { + warnx("unknown scheduler parameter \"%s\"", args[0]); + errs++; + } } - /* ... */ - s = str_to_number(argv[0], NULL, &val); - if (*s || val > 0xff) { - warnx("\"%s\" is neither an index nor a tracer subcommand.", - argv[0]); + /* + * Catch some logical fallacies in terms of argument combinations here + * so we can offer more than just the EINVAL return from the driver. + * The driver will be able to catch a lot more issues since it knows + * the specifics of the device hardware capabilities like how many + * channels, classes, etc. the device supports. + */ + if (op.type < 0) { + warnx("sched \"type\" parameter missing"); + errs++; + } + if (op.subcmd == SCHED_CLASS_SUBCMD_CONFIG) { + if (op.u.config.minmax < 0) { + warnx("sched config \"minmax\" parameter missing"); + errs++; + } + } + if (op.subcmd == SCHED_CLASS_SUBCMD_PARAMS) { + if (op.u.params.level < 0) { + warnx("sched params \"level\" parameter missing"); + errs++; + } + if (op.u.params.mode < 0) { + warnx("sched params \"mode\" parameter missing"); + errs++; + } + if (op.u.params.rateunit < 0) { + warnx("sched params \"rate-unit\" parameter missing"); + errs++; + } + if (op.u.params.ratemode < 0) { + warnx("sched params \"rate-mode\" parameter missing"); + errs++; + } + if (op.u.params.channel < 0) { + warnx("sched params \"channel\" missing"); + errs++; + } + if (op.u.params.cl < 0) { + warnx("sched params \"class\" missing"); + errs++; + } + if (op.u.params.maxrate < 0 && + (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || + op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { + warnx("sched params \"max-rate\" missing for " + "rate-limit level"); + errs++; + } + if (op.u.params.weight < 0 && + op.u.params.level == SCHED_CLASS_LEVEL_CL_WRR) { + warnx("sched params \"weight\" missing for " + "weighted-round-robin level"); + errs++; + } + if (op.u.params.pktsize < 0 && + (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || + op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { + warnx("sched params \"pkt-size\" missing for " + "rate-limit level"); + errs++; + } + if (op.u.params.mode == SCHED_CLASS_MODE_FLOW && + op.u.params.ratemode != SCHED_CLASS_RATEMODE_ABS) { + warnx("sched params mode flow needs rate-mode absolute"); + errs++; + } + if (op.u.params.ratemode == SCHED_CLASS_RATEMODE_REL && + !in_range(op.u.params.maxrate, 1, 100)) { + warnx("sched params \"max-rate\" takes " + "percentage value(1-100) for rate-mode relative"); + errs++; + } + if (op.u.params.ratemode == SCHED_CLASS_RATEMODE_ABS && + !in_range(op.u.params.maxrate, 1, 10000000)) { + warnx("sched params \"max-rate\" takes " + "value(1-10000000) for rate-mode absolute"); + errs++; + } + if (op.u.params.maxrate > 0 && + op.u.params.maxrate < op.u.params.minrate) { + warnx("sched params \"max-rate\" is less than " + "\"min-rate\""); + errs++; + } + } + + if (errs > 0) { + warnx("%d error%s in sched-class command", errs, + errs == 1 ? "" : "s"); return (EINVAL); } - idx = (int8_t)val; - /* disable */ - if (argc == 2 && strcmp(argv[1], "disable") == 0) - return tracer_onoff(idx, 0); + return doit(CHELSIO_T4_SCHED_CLASS, &op); +} - /* enable */ - if (argc == 2 && strcmp(argv[1], "enable") == 0) - return tracer_onoff(idx, 1); +static int +sched_queue(int argc, const char *argv[]) +{ + struct t4_sched_queue op = {0}; + char *p; + long val; - /* ... */ - return set_tracer(idx, argc - 1, argv + 1); + if (argc != 3) { + /* need " */ + warnx("incorrect number of arguments."); + return (EINVAL); + } + + p = str_to_number(argv[0], &val, NULL); + if (*p || val > UCHAR_MAX) { + warnx("invalid port id \"%s\"", argv[0]); + return (EINVAL); + } + op.port = (uint8_t)val; + + if (!strcmp(argv[1], "all") || !strcmp(argv[1], "*")) + op.queue = -1; + else { + p = str_to_number(argv[1], &val, NULL); + if (*p || val < -1) { + warnx("invalid queue \"%s\"", argv[1]); + return (EINVAL); + } + op.queue = (int8_t)val; + } + + if (!strcmp(argv[2], "unbind") || !strcmp(argv[2], "clear")) + op.cl = -1; + else { + p = str_to_number(argv[2], &val, NULL); + if (*p || val < -1) { + warnx("invalid class \"%s\"", argv[2]); + return (EINVAL); + } + op.cl = (int8_t)val; + } + + return doit(CHELSIO_T4_SCHED_QUEUE, &op); } static int @@ -2033,6 +2320,10 @@ run_cmd(int argc, const char *argv[]) rc = tracer_cmd(argc, argv); else if (!strcmp(cmd, "modinfo")) rc = modinfo(argc, argv); + else if (!strcmp(cmd, "sched-class")) + rc = sched_class(argc, argv); + else if (!strcmp(cmd, "sched-queue")) + rc = sched_queue(argc, argv); else { rc = EINVAL; warnx("invalid command \"%s\"", cmd); From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 23:12:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76B3B2E6; Fri, 6 Dec 2013 23:12:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 630EF1A95; Fri, 6 Dec 2013 23:12:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6NCMuX072268; Fri, 6 Dec 2013 23:12:22 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6NCMbg072267; Fri, 6 Dec 2013 23:12:22 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312062312.rB6NCMbg072267@svn.freebsd.org> From: Aleksandr Rybalko Date: Fri, 6 Dec 2013 23:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259049 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 23:12:22 -0000 Author: ray Date: Fri Dec 6 23:12:21 2013 New Revision: 259049 URL: http://svnweb.freebsd.org/changeset/base/259049 Log: Fix td_frame flags for i386. Submitted by: jilles Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Dec 6 23:02:57 2013 (r259048) +++ head/sys/dev/vt/vt_core.c Fri Dec 6 23:12:21 2013 (r259049) @@ -1459,12 +1459,16 @@ vtterm_ioctl(struct terminal *tm, u_long error = securelevel_gt(td->td_ucred, 0); if (error != 0) return (error); -#if defined(__i386__) || defined(__amd64__) +#if defined(__i386__) + td->td_frame->tf_eflags |= PSL_IOPL; +#elif defined(__amd64__) td->td_frame->tf_rflags |= PSL_IOPL; #endif return (0); case KDDISABIO: /* disallow io operations (default) */ -#if defined(__i386__) || defined(__amd64__) +#if defined(__i386__) + td->td_frame->tf_eflags &= ~PSL_IOPL; +#elif defined(__amd64__) td->td_frame->tf_rflags &= ~PSL_IOPL; #endif return (0); From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 23:30:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7248F78; Fri, 6 Dec 2013 23:30:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1EBE1D41; Fri, 6 Dec 2013 23:30:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6NUlPE079153; Fri, 6 Dec 2013 23:30:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6NUkKk079149; Fri, 6 Dec 2013 23:30:46 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312062330.rB6NUkKk079149@svn.freebsd.org> From: Xin LI Date: Fri, 6 Dec 2013 23:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259050 - stable/10/sys/dev/oce X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 23:30:47 -0000 Author: delphij Date: Fri Dec 6 23:30:46 2013 New Revision: 259050 URL: http://svnweb.freebsd.org/changeset/base/259050 Log: MFC r258941: Apply vendor improvements to oce(4) driver: - Add support to 40Gbps devices; - Add support to control adaptive interrupt coalescing (AIC) via sysctl; - Improve support of BE3 devices; Many thanks to Emulex for their continued support of FreeBSD. Submitted by: Venkata Duvvuru Approved by: re (rodrigc) Modified: stable/10/sys/dev/oce/oce_if.c stable/10/sys/dev/oce/oce_if.h stable/10/sys/dev/oce/oce_mbox.c stable/10/sys/dev/oce/oce_sysctl.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/oce/oce_if.c ============================================================================== --- stable/10/sys/dev/oce/oce_if.c Fri Dec 6 23:12:21 2013 (r259049) +++ stable/10/sys/dev/oce/oce_if.c Fri Dec 6 23:30:46 2013 (r259050) @@ -829,6 +829,10 @@ oce_media_status(struct ifnet *ifp, stru req->ifm_active |= IFM_10G_SR | IFM_FDX; sc->speed = 10000; break; + case 7: /* 40 Gbps */ + req->ifm_active |= IFM_40G_SR4 | IFM_FDX; + sc->speed = 40000; + break; } return; @@ -1953,7 +1957,6 @@ done: /* Is there atleast one eq that needs to be modified? */ if(num) oce_mbox_eqd_modify_periodic(sc, set_eqd, num); - } static void oce_detect_hw_error(POCE_SOFTC sc) @@ -2153,11 +2156,6 @@ process_link_state(POCE_SOFTC sc, struct sc->link_status = ASYNC_EVENT_LINK_DOWN; if_link_state_change(sc->ifp, LINK_STATE_DOWN); } - - /* Update speed */ - sc->link_speed = acqe->u0.s.speed; - sc->qos_link_speed = (uint32_t) acqe->u0.s.qos_link_speed * 10; - } @@ -2342,18 +2340,17 @@ oce_get_config(POCE_SOFTC sc) max_rss = OCE_MAX_RSS; if (!IS_BE(sc)) { - rc = oce_get_func_config(sc); + rc = oce_get_profile_config(sc, max_rss); if (rc) { sc->nwqs = OCE_MAX_WQ; sc->nrssqs = max_rss; sc->nrqs = sc->nrssqs + 1; } } - else { - rc = oce_get_profile_config(sc); + else { /* For BE3 don't rely on fw for determining the resources */ sc->nrssqs = max_rss; sc->nrqs = sc->nrssqs + 1; - if (rc) - sc->nwqs = OCE_MAX_WQ; + sc->nwqs = OCE_MAX_WQ; + sc->max_vlans = MAX_VLANFILTER_SIZE; } } Modified: stable/10/sys/dev/oce/oce_if.h ============================================================================== --- stable/10/sys/dev/oce/oce_if.h Fri Dec 6 23:12:21 2013 (r259049) +++ stable/10/sys/dev/oce/oce_if.h Fri Dec 6 23:30:46 2013 (r259050) @@ -882,8 +882,8 @@ typedef struct oce_softc { uint8_t hw_error; uint16_t qnq_debug_event; uint16_t qnqid; - uint16_t pvid; - uint16_t max_vlans; + uint32_t pvid; + uint32_t max_vlans; } OCE_SOFTC, *POCE_SOFTC; @@ -1055,7 +1055,7 @@ int oce_mbox_cq_create(struct oce_cq *cq int oce_mbox_read_transrecv_data(POCE_SOFTC sc, uint32_t page_num); void oce_mbox_eqd_modify_periodic(POCE_SOFTC sc, struct oce_set_eqd *set_eqd, int num); -int oce_get_profile_config(POCE_SOFTC sc); +int oce_get_profile_config(POCE_SOFTC sc, uint32_t max_rss); int oce_get_func_config(POCE_SOFTC sc); void mbx_common_req_hdr_init(struct mbx_hdr *hdr, uint8_t dom, @@ -1099,6 +1099,9 @@ extern uint32_t oce_max_rsp_handled; /* #define OCE_ONE_PORT_EXT_LOOPBACK 0x2 #define OCE_NO_LOOPBACK 0xff +#undef IFM_40G_SR4 +#define IFM_40G_SR4 28 + #define atomic_inc_32(x) atomic_add_32(x, 1) #define atomic_dec_32(x) atomic_subtract_32(x, 1) Modified: stable/10/sys/dev/oce/oce_mbox.c ============================================================================== --- stable/10/sys/dev/oce/oce_mbox.c Fri Dec 6 23:12:21 2013 (r259049) +++ stable/10/sys/dev/oce/oce_mbox.c Fri Dec 6 23:30:46 2013 (r259050) @@ -935,7 +935,7 @@ oce_get_link_status(POCE_SOFTC sc, struc bzero(&mbx, sizeof(struct oce_mbx)); - IS_XE201(sc) ? (version = OCE_MBX_VER_V1) : (version = OCE_MBX_VER_V0); + IS_BE2(sc) ? (version = OCE_MBX_VER_V0) : (version = OCE_MBX_VER_V1); fwcmd = (struct mbx_query_common_link_config *)&mbx.payload; mbx_common_req_hdr_init(&fwcmd->hdr, 0, 0, @@ -2025,7 +2025,7 @@ oce_mbox_eqd_modify_periodic(POCE_SOFTC } int -oce_get_profile_config(POCE_SOFTC sc) +oce_get_profile_config(POCE_SOFTC sc, uint32_t max_rss) { struct oce_mbx mbx; struct mbx_common_get_profile_config *fwcmd; @@ -2050,7 +2050,7 @@ oce_get_profile_config(POCE_SOFTC sc) fwcmd = OCE_DMAPTR(&dma, struct mbx_common_get_profile_config); bzero(fwcmd, sizeof(struct mbx_common_get_profile_config)); - if (IS_BE3(sc)) + if (!IS_XE201(sc)) version = OCE_MBX_VER_V1; else version = OCE_MBX_VER_V0; @@ -2102,13 +2102,20 @@ oce_get_profile_config(POCE_SOFTC sc) goto error; } else { - sc->max_vlans = nic_desc->vlan_count; - sc->nwqs = HOST_32(nic_desc->txq_count); + sc->max_vlans = HOST_16(nic_desc->vlan_count); + sc->nwqs = HOST_16(nic_desc->txq_count); if (sc->nwqs) sc->nwqs = MIN(sc->nwqs, OCE_MAX_WQ); else sc->nwqs = OCE_MAX_WQ; + sc->nrssqs = HOST_16(nic_desc->rssq_count); + if (sc->nrssqs) + sc->nrssqs = MIN(sc->nrssqs, max_rss); + else + sc->nrssqs = max_rss; + sc->nrqs = sc->nrssqs + 1; /* 1 for def RX */; + } error: oce_dma_free(sc, &dma); Modified: stable/10/sys/dev/oce/oce_sysctl.c ============================================================================== --- stable/10/sys/dev/oce/oce_sysctl.c Fri Dec 6 23:12:21 2013 (r259049) +++ stable/10/sys/dev/oce/oce_sysctl.c Fri Dec 6 23:30:46 2013 (r259050) @@ -44,6 +44,7 @@ static void copy_stats_to_sc_xe201(POCE_ static void copy_stats_to_sc_be3(POCE_SOFTC sc); static void copy_stats_to_sc_be2(POCE_SOFTC sc); static int oce_sysctl_loopback(SYSCTL_HANDLER_ARGS); +static int oce_sys_aic_enable(SYSCTL_HANDLER_ARGS); static int oce_be3_fwupgrade(POCE_SOFTC sc, const struct firmware *fw); static int oce_skyhawk_fwupgrade(POCE_SOFTC sc, const struct firmware *fw); static int oce_sys_fwupgrade(SYSCTL_HANDLER_ARGS); @@ -131,6 +132,10 @@ oce_add_sysctls(POCE_SOFTC sc) CTLTYPE_STRING | CTLFLAG_RW, (void *)sc, 0, oce_sys_fwupgrade, "A", "Firmware ufi file"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "aic_enable", + CTLTYPE_INT | CTLFLAG_RW, (void *)sc, 1, + oce_sys_aic_enable, "I", "aic flags"); + /* * Dumps Transceiver data * "sysctl dev.oce.0.sfp_vpd_dump=0" @@ -170,6 +175,35 @@ oce_loopback_test(struct oce_softc *sc, } static int +oce_sys_aic_enable(SYSCTL_HANDLER_ARGS) +{ + int value = 0; + uint32_t status, vector; + POCE_SOFTC sc = (struct oce_softc *)arg1; + struct oce_aic_obj *aic; + + status = sysctl_handle_int(oidp, &value, 0, req); + if (status || !req->newptr) + return status; + + for (vector = 0; vector < sc->intr_count; vector++) { + aic = &sc->aic_obj[vector]; + + if (value == 0){ + aic->max_eqd = aic->min_eqd = aic->et_eqd = 0; + aic->enable = 0; + } + else { + aic->max_eqd = OCE_MAX_EQD; + aic->min_eqd = OCE_MIN_EQD; + aic->et_eqd = OCE_MIN_EQD; + aic->enable = TRUE; + } + } + return 0; +} + +static int oce_sysctl_loopback(SYSCTL_HANDLER_ARGS) { int value = 0; From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 23:40:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A073723; Fri, 6 Dec 2013 23:40:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 58EEF1E1E; Fri, 6 Dec 2013 23:40:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6Nepwc082452; Fri, 6 Dec 2013 23:40:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6NeoYa082441; Fri, 6 Dec 2013 23:40:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312062340.rB6NeoYa082441@svn.freebsd.org> From: Xin LI Date: Fri, 6 Dec 2013 23:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259051 - in stable/10/sys: conf i386/conf modules X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 23:40:51 -0000 Author: delphij Date: Fri Dec 6 23:40:50 2013 New Revision: 259051 URL: http://svnweb.freebsd.org/changeset/base/259051 Log: MFC r258948: Support Hyper-V on i386: - Add 'hyperv' module into build; - Allow building Hyper-V support as part of the kernel; - Hook Hyper-V build into NOTES. Approved by: re (rodrigc) Modified: stable/10/sys/conf/files.i386 stable/10/sys/i386/conf/NOTES stable/10/sys/modules/Makefile Directory Properties: stable/10/sys/ (props changed) stable/10/sys/conf/ (props changed) Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Fri Dec 6 23:30:46 2013 (r259050) +++ stable/10/sys/conf/files.i386 Fri Dec 6 23:40:50 2013 (r259051) @@ -221,6 +221,18 @@ dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc +dev/hyperv/netvsc/hv_net_vsc.c optional hyperv +dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c optional hyperv +dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv +dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv +dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv +dev/hyperv/utilities/hv_util.c optional hyperv +dev/hyperv/vmbus/hv_channel.c optional hyperv +dev/hyperv/vmbus/hv_channel_mgmt.c optional hyperv +dev/hyperv/vmbus/hv_connection.c optional hyperv +dev/hyperv/vmbus/hv_hv.c optional hyperv +dev/hyperv/vmbus/hv_ring_buffer.c optional hyperv +dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c optional hyperv dev/ichwd/ichwd.c optional ichwd dev/if_ndis/if_ndis.c optional ndis dev/if_ndis/if_ndis_pccard.c optional ndis pccard Modified: stable/10/sys/i386/conf/NOTES ============================================================================== --- stable/10/sys/i386/conf/NOTES Fri Dec 6 23:30:46 2013 (r259050) +++ stable/10/sys/i386/conf/NOTES Fri Dec 6 23:40:50 2013 (r259051) @@ -800,6 +800,8 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device +device hyperv # HyperV drivers + ##################################################################### # Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Fri Dec 6 23:30:46 2013 (r259050) +++ stable/10/sys/modules/Makefile Fri Dec 6 23:40:50 2013 (r259051) @@ -583,6 +583,7 @@ _hptmv= hptmv _hptnr= hptnr _hptrr= hptrr .endif +_hyperv= hyperv _ichwd= ichwd _ida= ida _iir= iir From owner-svn-src-all@FreeBSD.ORG Fri Dec 6 23:49:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5DAAB56; Fri, 6 Dec 2013 23:49:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A16921EA4; Fri, 6 Dec 2013 23:49:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6NnGSm083641; Fri, 6 Dec 2013 23:49:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6NnGnm083640; Fri, 6 Dec 2013 23:49:16 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312062349.rB6NnGnm083640@svn.freebsd.org> From: Xin LI Date: Fri, 6 Dec 2013 23:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259052 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 23:49:16 -0000 Author: delphij Date: Fri Dec 6 23:49:16 2013 New Revision: 259052 URL: http://svnweb.freebsd.org/changeset/base/259052 Log: Expose spa_asize_inflation. X-MFC-With: r258632 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Dec 6 23:40:50 2013 (r259051) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Dec 6 23:49:16 2013 (r259052) @@ -302,6 +302,9 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, deadman_e * (VDEV_RAIDZ_MAXPARITY + 1) * SPA_DVAS_PER_BP * 2 == 24 */ int spa_asize_inflation = 24; +TUNABLE_INT("vfs.zfs.spa_asize_inflation", &spa_asize_inflation); +SYSCTL_INT(_vfs_zfs, OID_AUTO, spa_asize_inflation, CTLFLAG_RWTUN, + &spa_asize_inflation, 0, "Worst case inflation factor for single sector writes"); #ifndef illumos #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 00:05:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8B29362; Sat, 7 Dec 2013 00:05:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D495D1FCF; Sat, 7 Dec 2013 00:05:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB705j3G091138; Sat, 7 Dec 2013 00:05:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB705jHM091136; Sat, 7 Dec 2013 00:05:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312070005.rB705jHM091136@svn.freebsd.org> From: Dimitry Andric Date: Sat, 7 Dec 2013 00:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259053 - head/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 00:05:46 -0000 Author: dim Date: Sat Dec 7 00:05:45 2013 New Revision: 259053 URL: http://svnweb.freebsd.org/changeset/base/259053 Log: Pull in r196590 from upstream clang trunk (by rdivacky): Move the body of GCCInstallationDetector ctor into an init() function and call it from its only user. The linux toolchain. This saves quite a lot of directory searching on other platforms. See http://docs.freebsd.org/cgi/mid.cgi?51E6FAF5.3080802 for the original discussion. With this fix, the search for gcc installations is completely eliminated on FreeBSD. Reported by: Kurt Lidl MFC after: 3 days Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Dec 6 23:49:16 2013 (r259052) +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Sat Dec 7 00:05:45 2013 (r259053) @@ -991,7 +991,7 @@ static StringRef getGCCToolchainDir(cons return GCC_INSTALL_PREFIX; } -/// \brief Construct a GCCInstallationDetector from the driver. +/// \brief Initialize a GCCInstallationDetector from the driver. /// /// This performs all of the autodetection and sets up the various paths. /// Once constructed, a GCCInstallationDetector is essentially immutable. @@ -1000,11 +1000,9 @@ static StringRef getGCCToolchainDir(cons /// should instead pull the target out of the driver. This is currently /// necessary because the driver doesn't store the final version of the target /// triple. -Generic_GCC::GCCInstallationDetector::GCCInstallationDetector( - const Driver &D, - const llvm::Triple &TargetTriple, - const ArgList &Args) - : IsValid(false) { +void +Generic_GCC::GCCInstallationDetector::init( + const Driver &D, const llvm::Triple &TargetTriple, const ArgList &Args) { llvm::Triple MultiarchTriple = TargetTriple.isArch32Bit() ? TargetTriple.get64BitArchVariant() : TargetTriple.get32BitArchVariant(); @@ -1448,7 +1446,7 @@ void Generic_GCC::GCCInstallationDetecto Generic_GCC::Generic_GCC(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) - : ToolChain(D, Triple, Args), GCCInstallation(getDriver(), Triple, Args) { + : ToolChain(D, Triple, Args), GCCInstallation() { getProgramPaths().push_back(getDriver().getInstalledDir()); if (getDriver().getInstalledDir() != getDriver().Dir) getProgramPaths().push_back(getDriver().Dir); @@ -2243,6 +2241,7 @@ static StringRef getMultilibDir(const ll Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) : Generic_ELF(D, Triple, Args) { + GCCInstallation.init(D, Triple, Args); llvm::Triple::ArchType Arch = Triple.getArch(); std::string SysRoot = computeSysRoot(Args); Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Dec 6 23:49:16 2013 (r259052) +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Sat Dec 7 00:05:45 2013 (r259053) @@ -78,7 +78,8 @@ protected: GCCVersion Version; public: - GCCInstallationDetector(const Driver &D, const llvm::Triple &TargetTriple, + GCCInstallationDetector() : IsValid(false) {} + void init(const Driver &D, const llvm::Triple &TargetTriple, const ArgList &Args); /// \brief Check whether we detected a valid GCC install. From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 00:07:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9B02516; Sat, 7 Dec 2013 00:07:39 +0000 (UTC) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7EF931FE8; Sat, 7 Dec 2013 00:07:39 +0000 (UTC) Received: from 2a02-8428-011a-a000-fc04-3303-c0aa-4597.rev.sfr.net ([2a02:8428:11a:a000:fc04:3303:c0aa:4597]) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1Vp5Qn-000B7B-Fj; Sat, 07 Dec 2013 01:07:37 +0100 Message-ID: <52A266CF.90007@FreeBSD.org> Date: Sat, 07 Dec 2013 01:07:43 +0100 From: =?ISO-8859-15?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r258930 - head/sys/dev/drm2 References: <201312041904.rB4J4vbM043709@svn.freebsd.org> <201312041518.33731.jhb@freebsd.org> <52A04D2E.2040705@FreeBSD.org> <201312051005.23197.jhb@freebsd.org> In-Reply-To: <201312051005.23197.jhb@freebsd.org> Content-Type: multipart/mixed; boundary="------------070004070605080102080405" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 00:07:40 -0000 This is a multi-part message in MIME format. --------------070004070605080102080405 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Le 05/12/2013 16:05, John Baldwin a écrit : >>> Eh, vgapci is the right place to read this. The LINK_CAP here is telling >>> you the width of the slot you are plugged into, not the width of the card >>> that is plugged into the slot. >> >> I'm sorry, my knowledge of PCI is very limited (still learning) and I >> don't understand your comment. Could you please expand on it? > > [explanation] Thank you very much for the explanation! > Can you provide pciconf -lc output from your machine You'll find it attached. > and tell me what you think the function should be returning (i.e. > are you trying to determine the speed of the slot, or the speed of > the card?) The result of this function is used to initialize the card (ie. it does more steps if speed is 5.0). The debug message is "enabling PCIE gen 2 link speeds" in this case. I admit I don't know what the code is doing exactly, so I haven't any expectation :) What I see is that now, this part of the initialization is similar to Linux 3.8 on the same computer: in both OSes, the PCI ID of the bridge and the linkcap/linkcap2 values are logged, and the PCI ID/values are matching. -- Jean-Sébastien Pédron --------------070004070605080102080405 Content-Type: text/plain; charset=windows-1252; name="magellan-pciconf-lc.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="magellan-pciconf-lc.txt" hostb0@pci0:0:0:0: class=0x060000 card=0x86871558 chip=0xd1328086 rev=0x11 hdr=0x00 cap 00[40] = unknown pcib1@pci0:0:3:0: class=0x060400 card=0x00008086 chip=0xd1388086 rev=0x11 hdr=0x01 cap 0d[40] = PCI Bridge card=0x00008086 cap 05[60] = MSI supports 2 messages, vector masks cap 10[90] = PCI-Express 2 root port slot max data 256(256) link x16(x16) speed 2.5(5.0) cap 01[e0] = powerspec 3 supports D0 D3 current D0 ecap 0001[100] = AER 1 0 fatal 0 non-fatal 0 corrected ecap 000d[150] = ACS 1 ecap 000b[160] = Vendor 0 none0@pci0:0:8:0: class=0x088000 card=0x00870058 chip=0xd1558086 rev=0x11 hdr=0x00 cap 10[40] = PCI-Express 2 root endpoint max data 128(128) link x0(x0) ASPM disabled(L0s) ecap 000b[100] = Vendor 0 none1@pci0:0:8:1: class=0x088000 card=0x00870058 chip=0xd1568086 rev=0x11 hdr=0x00 cap 10[40] = PCI-Express 2 root endpoint max data 128(128) link x0(x0) ASPM disabled(L0s) ecap 000b[100] = Vendor 0 none2@pci0:0:8:2: class=0x088000 card=0x00870058 chip=0xd1578086 rev=0x11 hdr=0x00 cap 10[40] = PCI-Express 2 root endpoint max data 128(128) link x0(x0) ASPM disabled(L0s) ecap 000b[100] = Vendor 0 none3@pci0:0:8:3: class=0x088000 card=0x00870058 chip=0xd1588086 rev=0x11 hdr=0x00 none4@pci0:0:16:0: class=0x088000 card=0x00870058 chip=0xd1508086 rev=0x11 hdr=0x00 none5@pci0:0:16:1: class=0x088000 card=0x00870058 chip=0xd1518086 rev=0x11 hdr=0x00 ehci0@pci0:0:26:0: class=0x0c0320 card=0x86871558 chip=0x3b3c8086 rev=0x05 hdr=0x00 cap 01[50] = powerspec 2 supports D0 D3 current D0 cap 0a[58] = EHCI Debug Port at offset 0xa0 in map 0x14 cap 13[98] = PCI Advanced Features: FLR TP hdac1@pci0:0:27:0: class=0x040300 card=0x86871558 chip=0x3b568086 rev=0x05 hdr=0x00 cap 01[50] = powerspec 2 supports D0 D3 current D0 cap 05[60] = MSI supports 1 message, 64 bit enabled with 1 message cap 10[70] = PCI-Express 1 root endpoint max data 128(128) FLR link x0(x0) ecap 0002[100] = VC 1 max VC1 ecap 0005[130] = Root Complex Link Declaration 1 pcib2@pci0:0:28:0: class=0x060400 card=0x86871558 chip=0x3b428086 rev=0x05 hdr=0x01 cap 10[40] = PCI-Express 2 root port slot max data 128(128) link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 05[80] = MSI supports 1 message cap 0d[90] = PCI Bridge card=0x86871558 cap 01[a0] = powerspec 2 supports D0 D3 current D0 pcib3@pci0:0:28:1: class=0x060400 card=0x86871558 chip=0x3b448086 rev=0x05 hdr=0x01 cap 10[40] = PCI-Express 2 root port slot max data 128(128) link x0(x1) speed 0.0(2.5) ASPM disabled(L0s/L1) cap 05[80] = MSI supports 1 message cap 0d[90] = PCI Bridge card=0x86871558 cap 01[a0] = powerspec 2 supports D0 D3 current D0 pcib4@pci0:0:28:3: class=0x060400 card=0x86871558 chip=0x3b488086 rev=0x05 hdr=0x01 cap 10[40] = PCI-Express 2 root port slot max data 128(128) link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 05[80] = MSI supports 1 message cap 0d[90] = PCI Bridge card=0x86871558 cap 01[a0] = powerspec 2 supports D0 D3 current D0 pcib5@pci0:0:28:4: class=0x060400 card=0x86871558 chip=0x3b4a8086 rev=0x05 hdr=0x01 cap 10[40] = PCI-Express 2 root port slot max data 128(128) link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 05[80] = MSI supports 1 message cap 0d[90] = PCI Bridge card=0x86871558 cap 01[a0] = powerspec 2 supports D0 D3 current D0 pcib6@pci0:0:28:7: class=0x060400 card=0x86871558 chip=0x3b508086 rev=0x05 hdr=0x01 cap 10[40] = PCI-Express 2 root port slot max data 128(128) link x0(x1) speed 0.0(2.5) ASPM disabled(L0s/L1) cap 05[80] = MSI supports 1 message cap 0d[90] = PCI Bridge card=0x86871558 cap 01[a0] = powerspec 2 supports D0 D3 current D0 ehci1@pci0:0:29:0: class=0x0c0320 card=0x86871558 chip=0x3b348086 rev=0x05 hdr=0x00 cap 01[50] = powerspec 2 supports D0 D3 current D0 cap 0a[58] = EHCI Debug Port at offset 0xa0 in map 0x14 cap 13[98] = PCI Advanced Features: FLR TP pcib7@pci0:0:30:0: class=0x060401 card=0x86871558 chip=0x24488086 rev=0xa5 hdr=0x01 cap 0d[50] = PCI Bridge card=0x86871558 isab0@pci0:0:31:0: class=0x060100 card=0x86871558 chip=0x3b038086 rev=0x05 hdr=0x00 cap 09[e0] = vendor (length 16) Intel cap 1 version 1 ahci0@pci0:0:31:2: class=0x010601 card=0x86871558 chip=0x3b2f8086 rev=0x05 hdr=0x00 cap 05[80] = MSI supports 1 message enabled with 1 message cap 01[70] = powerspec 3 supports D0 D3 current D0 cap 12[a8] = SATA Index-Data Pair cap 13[b0] = PCI Advanced Features: FLR TP none6@pci0:0:31:3: class=0x0c0500 card=0x86871558 chip=0x3b308086 rev=0x05 hdr=0x00 vgapci0@pci0:2:0:0: class=0x030000 card=0x86871558 chip=0x68a01002 rev=0x00 hdr=0x00 cap 01[50] = powerspec 3 supports D0 D1 D2 D3 current D0 cap 10[58] = PCI-Express 2 legacy endpoint max data 256(256) link x16(x16) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 05[a0] = MSI supports 1 message, 64 bit ecap 000b[100] = Vendor 1 ID 1 ecap 0001[150] = AER 1 0 fatal 1 non-fatal 1 corrected hdac0@pci0:2:0:1: class=0x040300 card=0x86871558 chip=0xaa581002 rev=0x00 hdr=0x00 cap 01[50] = powerspec 3 supports D0 D1 D2 D3 current D0 cap 10[58] = PCI-Express 2 legacy endpoint max data 256(256) link x16(x16) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 05[a0] = MSI supports 1 message, 64 bit enabled with 1 message ecap 000b[100] = Vendor 1 ID 1 ecap 0001[150] = AER 1 0 fatal 1 non-fatal 1 corrected iwn0@pci0:3:0:0: class=0x028000 card=0x11218086 chip=0x42358086 rev=0x00 hdr=0x00 cap 01[c8] = powerspec 3 supports D0 D3 current D0 cap 05[d0] = MSI supports 1 message, 64 bit enabled with 1 message cap 10[e0] = PCI-Express 1 endpoint max data 128(128) FLR link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1) ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected ecap 0003[140] = Serial 1 00216affff5aec90 re0@pci0:7:0:0: class=0x020000 card=0x86871558 chip=0x816810ec rev=0x03 hdr=0x00 cap 01[40] = powerspec 3 supports D0 D1 D2 D3 current D0 cap 05[50] = MSI supports 1 message, 64 bit cap 10[70] = PCI-Express 2 endpoint IRQ 1 max data 128(256) link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 11[ac] = MSI-X supports 4 messages, enabled Table in map 0x20[0x0], PBA in map 0x20[0x800] cap 03[cc] = VPD ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected ecap 0002[140] = VC 1 max VC0 ecap 0003[160] = Serial 1 03000000684ce000 none7@pci0:9:0:0: class=0x0c0010 card=0x86871558 chip=0x2380197b rev=0x00 hdr=0x00 cap 01[44] = powerspec 3 supports D0 D3 current D3 cap 10[80] = PCI-Express 1 endpoint max data 128(128) link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 05[94] = MSI supports 1 message none8@pci0:9:0:1: class=0x088000 card=0x86871558 chip=0x2382197b rev=0x00 hdr=0x00 cap 01[a4] = powerspec 3 supports D0 D3 current D3 cap 10[80] = PCI-Express 1 endpoint max data 128(128) link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 05[94] = MSI supports 1 message sdhci_pci0@pci0:9:0:2: class=0x080501 card=0x86871558 chip=0x2381197b rev=0x00 hdr=0x00 cap 01[a4] = powerspec 3 supports D0 D3 current D0 cap 10[80] = PCI-Express 1 endpoint max data 128(128) link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 05[94] = MSI supports 1 message none9@pci0:9:0:3: class=0x088000 card=0x86871558 chip=0x2383197b rev=0x00 hdr=0x00 cap 01[a4] = powerspec 3 supports D0 D3 current D3 cap 10[80] = PCI-Express 1 endpoint max data 128(128) link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1) cap 05[94] = MSI supports 1 message hostb1@pci0:255:0:0: class=0x060000 card=0x80868086 chip=0x2c528086 rev=0x04 hdr=0x00 hostb2@pci0:255:0:1: class=0x060000 card=0x80868086 chip=0x2c818086 rev=0x04 hdr=0x00 hostb3@pci0:255:2:0: class=0x060000 card=0x80868086 chip=0x2c908086 rev=0x04 hdr=0x00 hostb4@pci0:255:2:1: class=0x060000 card=0x80868086 chip=0x2c918086 rev=0x04 hdr=0x00 hostb5@pci0:255:3:0: class=0x060000 card=0x80868086 chip=0x2c988086 rev=0x04 hdr=0x00 hostb6@pci0:255:3:1: class=0x060000 card=0x80868086 chip=0x2c998086 rev=0x04 hdr=0x00 hostb7@pci0:255:3:4: class=0x060000 card=0x80868086 chip=0x2c9c8086 rev=0x04 hdr=0x00 hostb8@pci0:255:4:0: class=0x060000 card=0x80868086 chip=0x2ca08086 rev=0x04 hdr=0x00 hostb9@pci0:255:4:1: class=0x060000 card=0x80868086 chip=0x2ca18086 rev=0x04 hdr=0x00 hostb10@pci0:255:4:2: class=0x060000 card=0x80868086 chip=0x2ca28086 rev=0x04 hdr=0x00 hostb11@pci0:255:4:3: class=0x060000 card=0x80868086 chip=0x2ca38086 rev=0x04 hdr=0x00 hostb12@pci0:255:5:0: class=0x060000 card=0x80868086 chip=0x2ca88086 rev=0x04 hdr=0x00 hostb13@pci0:255:5:1: class=0x060000 card=0x80868086 chip=0x2ca98086 rev=0x04 hdr=0x00 hostb14@pci0:255:5:2: class=0x060000 card=0x80868086 chip=0x2caa8086 rev=0x04 hdr=0x00 hostb15@pci0:255:5:3: class=0x060000 card=0x80868086 chip=0x2cab8086 rev=0x04 hdr=0x00 --------------070004070605080102080405-- From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 00:31:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D9ACCA1; Sat, 7 Dec 2013 00:31:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 466A81153; Sat, 7 Dec 2013 00:31:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB70V8CV000952; Sat, 7 Dec 2013 00:31:08 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB70V1Wu000900; Sat, 7 Dec 2013 00:31:01 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201312070031.rB70V1Wu000900@svn.freebsd.org> From: Devin Teske Date: Sat, 7 Dec 2013 00:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259054 - in head/usr.sbin/bsdconfig: console diskmgmt docsinstall dot includes mouse networking networking/share packages password security share share/media share/packages startup sta... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 00:31:08 -0000 Author: dteske Date: Sat Dec 7 00:31:01 2013 New Revision: 259054 URL: http://svnweb.freebsd.org/changeset/base/259054 Log: Performance and debugging enhancements: + Remove UNAME_P=$(...) from startup/misc -- already supplied by common.subr + Use f_getvar instead of $(eval echo \$$var) -- f_getvar is sub-shell free + Add `-e' and `-k var' options to f_eval_catch -- increasing use-cases + Use f_eval_catch to display errors on failure -- reducing duplicated code + Use f_eval_catch when we need output from a command -- improving debugging + Optimize f_isinter of strings.subr for performance -- now sub-shell free + Improve error checking on pidfiles -- using f_eval_catch and f_isinteger + Use $var_to_set arg of f_ifconfig_{inet,netmask} -- eliminate sub-shells + Use f_sprintf instead of $(printf ...) -- consolidate sub-shells + Use $var_to_set arg of f_route_get_default -- eliminate sub-shells + Add f_count to replace $(set -- ...;echo $#) -- eliminate sub-shells + Add f_count_ifs to replace $(IFS=x;set -- ...;echo $#) -- no sub-shells + Replace var="$var${var:+ }..." in loops with var="$var ..." with a follow- up var="${var# }" to trim leading whitespace -- optimize loops + Use $var_to_set arg of f_resolv_conf_nameservers -- eliminate sub-shells + Comments for the f_eval_catch function + Remove a duplicate `local ... desc ...' in f_device_get_all of device.subr + Use $var_to_set arg of f_device_capacity -- eliminate sub-shells + Whitespace fixes in f_dialog_init of dialog.subr + Optimize f_inet_atoi of media/tcpip.subr for performance -- sub-shell free + In several cases, send stderr to /dev/null -- clean up runtime execution + Change f_err of common.subr to go to program stderr not terminal stderr, allowing redirection of output from functions that use f_err + Disable debugging when using f_getvar to get variable argument to f_startup_rcconf_map_expand of startup/rcconf.subr + Use f_replace_all instead of $(echo ... | tr | sed) -- performance + Add a $var_to_set option to f_index_{file,menusel_{command,keyword}} of common.subr -- centralize sub-shells Modified: head/usr.sbin/bsdconfig/console/console head/usr.sbin/bsdconfig/console/font head/usr.sbin/bsdconfig/console/keymap head/usr.sbin/bsdconfig/console/repeat head/usr.sbin/bsdconfig/console/saver head/usr.sbin/bsdconfig/console/screenmap head/usr.sbin/bsdconfig/console/ttys head/usr.sbin/bsdconfig/diskmgmt/diskmgmt head/usr.sbin/bsdconfig/docsinstall/docsinstall head/usr.sbin/bsdconfig/dot/dot head/usr.sbin/bsdconfig/includes/includes head/usr.sbin/bsdconfig/mouse/disable head/usr.sbin/bsdconfig/mouse/enable head/usr.sbin/bsdconfig/mouse/flags head/usr.sbin/bsdconfig/mouse/mouse head/usr.sbin/bsdconfig/mouse/port head/usr.sbin/bsdconfig/mouse/type head/usr.sbin/bsdconfig/networking/defaultrouter head/usr.sbin/bsdconfig/networking/devices head/usr.sbin/bsdconfig/networking/hostname head/usr.sbin/bsdconfig/networking/nameservers head/usr.sbin/bsdconfig/networking/networking head/usr.sbin/bsdconfig/networking/share/device.subr head/usr.sbin/bsdconfig/networking/share/hostname.subr head/usr.sbin/bsdconfig/networking/share/ipaddr.subr head/usr.sbin/bsdconfig/networking/share/media.subr head/usr.sbin/bsdconfig/networking/share/netmask.subr head/usr.sbin/bsdconfig/networking/share/resolv.subr head/usr.sbin/bsdconfig/networking/share/routing.subr head/usr.sbin/bsdconfig/networking/share/services.subr head/usr.sbin/bsdconfig/packages/packages head/usr.sbin/bsdconfig/password/password head/usr.sbin/bsdconfig/security/kern_securelevel head/usr.sbin/bsdconfig/security/security head/usr.sbin/bsdconfig/share/common.subr head/usr.sbin/bsdconfig/share/device.subr head/usr.sbin/bsdconfig/share/dialog.subr head/usr.sbin/bsdconfig/share/keymap.subr head/usr.sbin/bsdconfig/share/media/cdrom.subr head/usr.sbin/bsdconfig/share/media/common.subr head/usr.sbin/bsdconfig/share/media/dos.subr head/usr.sbin/bsdconfig/share/media/floppy.subr head/usr.sbin/bsdconfig/share/media/ftp.subr head/usr.sbin/bsdconfig/share/media/nfs.subr head/usr.sbin/bsdconfig/share/media/tcpip.subr head/usr.sbin/bsdconfig/share/media/ufs.subr head/usr.sbin/bsdconfig/share/media/usb.subr head/usr.sbin/bsdconfig/share/mustberoot.subr head/usr.sbin/bsdconfig/share/packages/categories.subr head/usr.sbin/bsdconfig/share/packages/index.subr head/usr.sbin/bsdconfig/share/packages/packages.subr head/usr.sbin/bsdconfig/share/strings.subr head/usr.sbin/bsdconfig/share/sysrc.subr head/usr.sbin/bsdconfig/startup/misc head/usr.sbin/bsdconfig/startup/rcadd head/usr.sbin/bsdconfig/startup/rcconf head/usr.sbin/bsdconfig/startup/rcdelete head/usr.sbin/bsdconfig/startup/rcedit head/usr.sbin/bsdconfig/startup/rcvar head/usr.sbin/bsdconfig/startup/share/rcconf.subr head/usr.sbin/bsdconfig/startup/share/rcedit.subr head/usr.sbin/bsdconfig/startup/share/rcvar.subr head/usr.sbin/bsdconfig/startup/startup head/usr.sbin/bsdconfig/timezone/share/zones.subr head/usr.sbin/bsdconfig/timezone/timezone head/usr.sbin/bsdconfig/ttys/ttys head/usr.sbin/bsdconfig/usermgmt/groupadd head/usr.sbin/bsdconfig/usermgmt/groupdel head/usr.sbin/bsdconfig/usermgmt/groupedit head/usr.sbin/bsdconfig/usermgmt/groupinput head/usr.sbin/bsdconfig/usermgmt/share/group_input.subr head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr head/usr.sbin/bsdconfig/usermgmt/useradd head/usr.sbin/bsdconfig/usermgmt/userdel head/usr.sbin/bsdconfig/usermgmt/useredit head/usr.sbin/bsdconfig/usermgmt/userinput head/usr.sbin/bsdconfig/usermgmt/usermgmt Modified: head/usr.sbin/bsdconfig/console/console ============================================================================== --- head/usr.sbin/bsdconfig/console/console Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/console/console Sat Dec 7 00:31:01 2013 (r259054) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/console/font ============================================================================== --- head/usr.sbin/bsdconfig/console/font Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/console/font Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -174,14 +174,16 @@ esac [ "$f8" -a "$f14" -a "$f16" ] || f_die 1 "$msg_unknown_font_selection" -f_sysrc_set font8x8 "$f8" || f_die -f_sysrc_set font8x14 "$f14" || f_die -f_sysrc_set font8x16 "$f16" || f_die +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x8 "%s"' "$f8" || f_die +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x14 "%s"' "$f14" || f_die +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x16 "%s"' "$f16" || f_die if [ "$mc_start" ]; then - f_sysrc_set mousechar_start "$mc_start" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set mousechar_start "%s"' "$mc_start" || f_die else - f_sysrc_delete mousechar_start || f_die + f_eval_catch "$0" f_sysrc_delete \ + 'f_sysrc_delete mousechar_start' || f_die fi exit $SUCCESS Modified: head/usr.sbin/bsdconfig/console/keymap ============================================================================== --- head/usr.sbin/bsdconfig/console/keymap Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/console/keymap Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -246,10 +246,8 @@ while :; do keymap_name= mtag="${mtag# }" # remove single leading-space if-present for name in $KEYMAP_NAMES; do - if [ "$( eval echo \"\$msg_$name\" )" = "$mtag" ]; then - keymap_name="$name" - break - fi + debug= f_getvar msg_$name msg + [ "$msg" = "$mtag" ] && keymap_name="$name" break done [ "$keymap_name" ] || continue @@ -319,7 +317,8 @@ while :; do esac if [ "$keymap_to_set" ]; then - f_sysrc_set keymap "$keymap_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set keymap "%s"' "$keymap_to_set" || f_die break else f_die 1 "$msg_unknown_keymap" Modified: head/usr.sbin/bsdconfig/console/repeat ============================================================================== --- head/usr.sbin/bsdconfig/console/repeat Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/console/repeat Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -129,7 +129,8 @@ case "$mtag" in esac if [ "$repeat_rate_to_set" ]; then - f_sysrc_set keyrate "$repeat_rate_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set keyrate "%s"' "$repeat_rate_to_set" || f_die break else f_die 1 "$msg_unknown_repeat_rate" Modified: head/usr.sbin/bsdconfig/console/saver ============================================================================== --- head/usr.sbin/bsdconfig/console/saver Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/console/saver Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -144,7 +144,8 @@ case "$mtag" in f_dialog_title "$msg_value_required" f_dialog_input blanktime "$msg_enter_timeout_period" \ "$( f_sysrc_get blanktime )" && - f_sysrc_set blanktime "$blanktime" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set blanktime "%s"' "$blanktime" || f_die f_dialog_title_restore exit $SUCCESS esac @@ -180,7 +181,8 @@ case "$mtag" in esac if [ "$saver_to_set" ]; then - f_sysrc_set saver "$saver_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set saver "%s"' "$saver_to_set" || f_die break else f_die 1 "$msg_unknown_saver" Modified: head/usr.sbin/bsdconfig/console/screenmap ============================================================================== --- head/usr.sbin/bsdconfig/console/screenmap Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/console/screenmap Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -141,7 +141,8 @@ case "$mtag" in esac if [ "$scrnmap_to_set" ]; then - f_sysrc_set scrnmap "$scrnmap_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set scrnmap "%s"' "$scrnmap_to_set" || f_die break else f_die 1 "$msg_unknown_screenmap_selection" Modified: head/usr.sbin/bsdconfig/console/ttys ============================================================================== --- head/usr.sbin/bsdconfig/console/ttys Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/console/ttys Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -108,23 +108,28 @@ dialog_menu_main() # ttys_set_type() { + local funcname=ttys_set_type local consterm="$1" err # # Create new temporary file to write our ttys(5) update with new types. # - local tmpfile="$( mktemp -t "$pgm" )" - [ "$tmpfile" ] || return $FAILURE + local tmpfile + f_eval_catch -k tmpfile $funcname mktemp 'mktemp -t "%s"' "$pgm" || + return $FAILURE # # Fixup permissions and ownership (mktemp(1) creates the temporary file # with 0600 permissions -- change the permissions and ownership to # match ttys(5) before we write it out and mv(1) it into place). # - local mode="$( stat -f '%#Lp' "$ETC_TTYS" 2> /dev/null )" - local owner="$( stat -f '%u:%g' "$ETC_TTYS" 2> /dev/null )" - f_quietly chmod "${mode:-0644}" "$tmpfile" - f_quietly chown "${owner:-root:wheel}" "$tmpfile" + local mode owner + f_eval_catch -dk mode $funcname stat \ + 'stat -f "%%#Lp" "%s"' "$ETC_TTYS" || mode=0644 + f_eval_catch -dk owner $funcname stat \ + 'stat -f "%%u:%%g" "%s"' "$ETC_TTYS" || owner="root:wheel" + f_eval_catch -d $funcname chmod 'chmod "%s" "%s"' "$mode" "$tmpfile" + f_eval_catch -d $funcname chown 'chown "%s" "%s"' "$owner" "$tmpfile" # # Operate on ttys(5), replacing only the types of `ttyv*' and @@ -156,10 +161,8 @@ ttys_set_type() f_dialog_msgbox "$err" return $FAILURE fi - if ! err=$( mv -f "$tmpfile" "$ETC_TTYS" 2>&1 ); then - f_dialog_msgbox "$err" + f_eval_catch $funcname mv 'mv -f "%s" "%s"' "$tmpfile" "$ETC_TTYS" || return $FAILURE - fi return $SUCCESS } Modified: head/usr.sbin/bsdconfig/diskmgmt/diskmgmt ============================================================================== --- head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Sat Dec 7 00:31:01 2013 (r259054) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="050.diskmgmt" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/docsinstall/docsinstall ============================================================================== --- head/usr.sbin/bsdconfig/docsinstall/docsinstall Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/docsinstall/docsinstall Sat Dec 7 00:31:01 2013 (r259054) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="020.docsinstall" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/dot/dot ============================================================================== --- head/usr.sbin/bsdconfig/dot/dot Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/dot/dot Sat Dec 7 00:31:01 2013 (r259054) @@ -41,8 +41,8 @@ BSDCFG_LIBE="/usr/libexec/bsdconfig" APP f_include_lang $BSDCFG_LIBE/include/messages.subr f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/includes/includes ============================================================================== --- head/usr.sbin/bsdconfig/includes/includes Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/includes/includes Sat Dec 7 00:31:01 2013 (r259054) @@ -41,8 +41,8 @@ BSDCFG_LIBE="/usr/libexec/bsdconfig" APP f_include_lang $BSDCFG_LIBE/include/messages.subr f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ GLOBALS Modified: head/usr.sbin/bsdconfig/mouse/disable ============================================================================== --- head/usr.sbin/bsdconfig/mouse/disable Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/mouse/disable Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -73,12 +73,16 @@ f_mustberoot_init # # Stop the mouse daemon # -[ -r "$MOUSED_PIDFILE" ] && - f_quietly kill "$( cat "$MOUSED_PIDFILE" )" -f_sysrc_set moused_enable "NO" || f_die -f_sysrc_set moused_type "NO" || f_die -f_sysrc_delete moused_port || f_die -f_sysrc_delete moused_flags || f_die +if [ -r "$MOUSED_PIDFILE" ]; then + f_eval_catch -dk pid "$0" cat 'cat "%s"' "$MOUSED_PIDFILE" && + f_isinteger "$pid" && + [ $pid -gt 0 ] && + f_eval_catch -d "$0" kill 'kill %s' $pid +fi +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_enable NO' || f_die +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_type NO' || f_die +f_eval_catch "$0" f_sysrc_delete 'f_sysrc_delete moused_port' || f_die +f_eval_catch "$0" f_sysrc_delete 'f_sysrc_delete moused_flags' || f_die # # Message box Modified: head/usr.sbin/bsdconfig/mouse/enable ============================================================================== --- head/usr.sbin/bsdconfig/mouse/enable Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/mouse/enable Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -85,10 +85,15 @@ flags=$( f_sysrc_get moused_flags ) # Start the mouse daemon # f_dialog_info "$msg_trying_to_start_the_mouse_daemon" -[ -r "$MOUSED_PIDFILE" ] && - f_quietly kill "$( cat "$MOUSED_PIDFILE" 2> /dev/null )" -f_quietly vidcontrol -m on -f_quietly moused -t "$type" -p "$port" $flags +if [ -r "$MOUSED_PIDFILE" ]; then + f_eval_catch -dk pid "$0" cat 'cat "%s"' "$MOUSED_PIDFILE" && + f_isinteger "$pid" && + [ $pid -gt 0 ] && + f_eval_catch -d "$0" kill 'kill %s' $pid +fi +f_eval_catch -d "$0" vidcontrol 'vidcontrol -m on' +f_eval_catch -d "$0" moused \ + 'moused -t "%s" -p "%s" %s' "$type" "$port" "$flags" # # Confirm with the user that the mouse is working @@ -101,14 +106,19 @@ f_dialog_title_restore # # Stop the mouse daemon # -f_quietly vidcontrol -m off +f_eval_catch -d "$0" vidcontrol 'vidcontrol -m off' if [ $retval -eq $DIALOG_OK ]; then - f_sysrc_set moused_enable "YES" || f_die - ln -fs /dev/sysmouse /dev/mouse || f_die # backwards compat + f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_enable YES' || f_die + f_eval_catch "$0" ln \ + 'ln -fs /dev/sysmouse /dev/mouse' || f_die # backwards compat else - [ -r "$MOUSED_PIDFILE" ] && - f_quietly kill "$( cat "$MOUSED_PIDFILE" )" - f_sysrc_set moused_enable "NO" || f_die + if [ -r "$MOUSED_PIDFILE" ]; then + f_eval_catch -dk pid "$0" cat 'cat "%s"' "$MOUSED_PIDFILE" && + f_isinteger "$pid" && + [ $pid -gt 0 ] && + f_eval_catch -d "$0" kill 'kill %s' $pid + fi + f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_enable NO' || f_die fi exit $SUCCESS Modified: head/usr.sbin/bsdconfig/mouse/flags ============================================================================== --- head/usr.sbin/bsdconfig/mouse/flags Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/mouse/flags Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ CONFIGURATION @@ -86,7 +86,7 @@ f_dialog_title_restore # # Save the new value # -f_sysrc_set moused_flags "$flags" || f_die +f_eval_catch "$0" f_sysrc_set 'f_sysrc_set moused_flags "%s"' "$flags" || f_die exit $SUCCESS Modified: head/usr.sbin/bsdconfig/mouse/mouse ============================================================================== --- head/usr.sbin/bsdconfig/mouse/mouse Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/mouse/mouse Sat Dec 7 00:31:01 2013 (r259054) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/mouse/port ============================================================================== --- head/usr.sbin/bsdconfig/mouse/port Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/mouse/port Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -141,7 +141,8 @@ case "$mtag" in esac if [ "$moused_port_to_set" ]; then - f_sysrc_set moused_port "$moused_port_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set moused_port "%s"' "$moused_port_to_set" || f_die else f_die 1 "$msg_unknown_mouse_port_selection" fi Modified: head/usr.sbin/bsdconfig/mouse/type ============================================================================== --- head/usr.sbin/bsdconfig/mouse/type Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/mouse/type Sat Dec 7 00:31:01 2013 (r259054) @@ -38,8 +38,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS @@ -157,7 +157,8 @@ case "$mtag" in esac if [ "$moused_type_to_set" ]; then - f_sysrc_set moused_type "$moused_type_to_set" || f_die + f_eval_catch "$0" f_sysrc_set \ + 'f_sysrc_set moused_type "%s"' "$moused_type_to_set" || f_die else f_die 1 "$msg_unknown_mouse_protocol_selection" fi Modified: head/usr.sbin/bsdconfig/networking/defaultrouter ============================================================================== --- head/usr.sbin/bsdconfig/networking/defaultrouter Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/defaultrouter Sat Dec 7 00:31:01 2013 (r259054) @@ -28,6 +28,9 @@ # ############################################################ INCLUDES +# Prevent device.subr (included indirectly) from auto scanning on load +DEVICE_SELF_SCAN_ALL=NO + BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." "$0" @@ -38,8 +41,8 @@ f_include $BSDCFG_SHARE/networking/routi BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/networking/devices ============================================================================== --- head/usr.sbin/bsdconfig/networking/devices Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/devices Sat Dec 7 00:31:01 2013 (r259054) @@ -49,8 +49,8 @@ f_include $BSDCFG_SHARE/networking/netma BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ MAIN @@ -143,8 +143,8 @@ while :; do # Fill in IP address/netmask from active settings if no # configuration could be extrapolated from rc.conf(5) # - [ "$_ipaddr" ] || _ipaddr=$( f_ifconfig_inet $interface ) - [ "$_netmask" ] || _netmask=$( f_ifconfig_netmask $interface ) + [ "$_ipaddr" ] || f_ifconfig_inet $interface _ipaddr + [ "$_netmask" ] || f_ifconfig_netmask $interface _netmask # Get the extra options (this always comes from rc.conf(5)) _options=$( f_ifconfig_options $interface ) Modified: head/usr.sbin/bsdconfig/networking/hostname ============================================================================== --- head/usr.sbin/bsdconfig/networking/hostname Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/hostname Sat Dec 7 00:31:01 2013 (r259054) @@ -41,8 +41,8 @@ f_include $BSDCFG_SHARE/networking/hostn BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/networking/nameservers ============================================================================== --- head/usr.sbin/bsdconfig/networking/nameservers Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/nameservers Sat Dec 7 00:31:01 2013 (r259054) @@ -41,8 +41,8 @@ f_include $BSDCFG_SHARE/networking/resol BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/networking/networking ============================================================================== --- head/usr.sbin/bsdconfig/networking/networking Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/networking Sat Dec 7 00:31:01 2013 (r259054) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Sat Dec 7 00:31:01 2013 (r259054) @@ -40,6 +40,7 @@ f_include $BSDCFG_SHARE/networking/media f_include $BSDCFG_SHARE/networking/netmask.subr f_include $BSDCFG_SHARE/networking/resolv.subr f_include $BSDCFG_SHARE/networking/routing.subr +f_include $BSDCFG_SHARE/strings.subr f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" @@ -163,6 +164,7 @@ f_dialog_menu_netdev() # f_dialog_menu_netdev_edit() { + local funcname=f_dialog_menu_netdev_edit local interface="$1" ipaddr="$2" netmask="$3" options="$4" dhcp="$5" local prompt menu_list height width rows @@ -175,7 +177,7 @@ f_dialog_menu_netdev_edit() dhcp_orig="$5" local hline="$hline_arrows_tab_enter" - prompt=$( printf "$msg_network_configuration" "$interface" ) + f_sprintf prompt "$msg_network_configuration" "$interface" # # Loop forever until the user has finished configuring the different @@ -254,8 +256,9 @@ f_dialog_menu_netdev_edit() # are made is changed parts of the system may hang. # if f_nfs_mounted && ! f_jailed; then - local setting="$( printf "$msg_current_dhcp_status" \ - "$interface" "$dhcp_status" )" + local setting + f_sprintf setting "$msg_current_dhcp_status" \ + "$interface" "$dhcp_status" f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" || continue fi @@ -269,7 +272,7 @@ f_dialog_menu_netdev_edit() trap - SIGINT ( # Execute within sub-shell to allow/catch Ctrl-C trap 'exit $FAILURE' SIGINT - msg=$( printf "$msg_scanning_for_dhcp" "$interface" ) + f_sprintf msg "$msg_scanning_for_dhcp" "$interface" if [ "$USE_XDIALOG" ]; then ( f_quietly ifconfig "$interface" delete @@ -319,14 +322,16 @@ f_dialog_menu_netdev_edit() local value= if [ "$dhcp" ]; then - f_sysrc_delete defaultrouter + f_eval_catch $funcname f_sysrc_delete \ + 'f_sysrc_delete defaultrouter' value=DHCP else value="inet $ipaddr netmask $netmask" value="$value${options:+ }$options" fi - f_sysrc_set ifconfig_$interface "$value" + f_eval_catch $funcname f_sysrc_set \ + 'f_sysrc_set "ifconfig_%s" "%s"' "$interface" "$value" fi # @@ -337,10 +342,12 @@ f_dialog_menu_netdev_edit() then f_show_info "$msg_bring_interface_up" "$interface" - local dr="$( f_sysrc_get defaultrouter )" err + local dr="$( f_sysrc_get defaultrouter )" if [ "$dr" = "NO" -o ! "$dr" ]; then - dr=$( f_route_get_default ) - [ "$dr" ] && f_sysrc_set defaultrouter "$dr" + f_route_get_default dr + [ "$dr" ] && f_eval_catch \ + $funcname f_sysrc_set \ + 'f_sysrc_set defaultrouter "%s"' "$dr" fi # # Make a backup of resolv.conf(5) before using @@ -351,16 +358,13 @@ f_dialog_menu_netdev_edit() # resolv.conf(5) by-default upon termination). # f_quietly cp -fp "$RESOLV_CONF" "$RESOLV_CONF.$$" - err=$( ifconfig $interface inet $ipaddr \ - netmask $netmask $options 2>&1 ) - if [ $? -eq $SUCCESS ]; then - if [ "$dr" -a "$dr" != "NO" ]; then - err=$( route add default "$dr" 2>&1 ) - [ $? -eq $SUCCESS ] || \ - dialog_msgbox "$err" - fi - else - dialog_msgbox "$err" + if f_eval_catch $funcname ifconfig \ + 'ifconfig "%s" inet "%s" netmask "%s" %s' \ + "$interface" "$ipaddr" "$netmask" "$options" + then + [ "$dr" -a "$dr" != "NO" ] && + f_eval_catch $funcname route \ + 'route add default "%s"' "$dr" fi if cmp -s "$RESOLV_CONF" "$RESOLV_CONF.$$"; then f_quietly rm -f "$RESOLV_CONF.$$" Modified: head/usr.sbin/bsdconfig/networking/share/hostname.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/hostname.subr Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/share/hostname.subr Sat Dec 7 00:31:01 2013 (r259054) @@ -95,6 +95,7 @@ f_dialog_validate_hostname() # f_dialog_input_hostname() { + local funcname=f_dialog_input_hostname local hostname="$( f_sysrc_get 'hostname:-$(hostname)' )" local hostname_orig="$hostname" # for change-tracking @@ -120,7 +121,8 @@ f_dialog_input_hostname() # if [ "$hostname" != "$hostname_orig" ]; then f_dialog_info "$msg_saving_hostname" - f_sysrc_set hostname "$hostname" + f_eval_catch $funcname f_sysrc_set \ + 'f_sysrc_set hostname "%s"' "$hostname" fi # Modified: head/usr.sbin/bsdconfig/networking/share/ipaddr.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/ipaddr.subr Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/share/ipaddr.subr Sat Dec 7 00:31:01 2013 (r259054) @@ -144,13 +144,14 @@ f_dialog_input_ipaddr() # system may hang (if any NFS mounts are using that interface). # if f_nfs_mounted && ! f_jailed; then - local setting="$( printf "$msg_current_ipaddr" \ - "$interface" "$_ipaddr" )" + local setting + f_sprintf setting "$msg_current_ipaddr" "$interface" "$_ipaddr" f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" || return $DIALOG_CANCEL fi - local msg="$( printf "$msg_please_enter_new_ip_addr" "$interface" )" + local msg + f_sprintf msg "$msg_please_enter_new_ip_addr" "$interface" # # Loop until the user provides taint-free input. Modified: head/usr.sbin/bsdconfig/networking/share/media.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/media.subr Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/share/media.subr Sat Dec 7 00:31:01 2013 (r259054) @@ -115,13 +115,15 @@ f_dialog_input_options() # the system may hang (if any NFS mounts are using that interface). # if f_nfs_mounted && ! f_jailed; then - local setting="$( printf "$msg_current_options" \ - "$interface" "$options" )" + local setting + f_sprintf setting "$msg_current_options" \ + "$interface" "$options" f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" || return $DIALOG_CANCEL fi - local msg="$( printf "$msg_please_enter_mediaopts" "$interface" )" + local msg + f_sprintf msg "$msg_please_enter_mediaopts" "$interface" local hline="$hline_alnum_punc_tab_enter" local _options @@ -162,8 +164,9 @@ f_dialog_menu_media_options() # the system may hang (if any NFS mounts are using that interface). # if f_nfs_mounted && ! f_jailed; then - local setting="$( printf "$msg_current_options" \ - "$interface" "$_options" )" + local setting + f_sprintf setting "$msg_current_options" \ + "$interface" "$_options" f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" || return $DIALOG_CANCEL fi @@ -196,11 +199,11 @@ f_dialog_menu_media_options() local msg if [ "$USE_XDIALOG" ]; then - msg=$( printf "$xmsg_supported_media_options" \ - "$interface" "$interface" ) + f_sprintf msg "$xmsg_supported_media_options" \ + "$interface" "$interface" else - msg=$( printf "$msg_supported_media_options" \ - "$interface" "$interface" ) + f_sprintf msg "$msg_supported_media_options" \ + "$interface" "$interface" fi local hline="$hline_arrows_tab_enter" Modified: head/usr.sbin/bsdconfig/networking/share/netmask.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/netmask.subr Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/share/netmask.subr Sat Dec 7 00:31:01 2013 (r259054) @@ -94,8 +94,9 @@ f_dialog_input_netmask() # the system may hang (if any NFS mounts are using that interface). # if f_nfs_mounted && ! f_jailed; then - local setting="$( printf "$msg_current_subnet" \ - "$interface" "$_netmask" )" + local setting + f_sprintf setting "$msg_current_subnet" \ + "$interface" "$_netmask" f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" || return $DIALOG_CANCEL fi @@ -103,7 +104,8 @@ f_dialog_input_netmask() # # Loop until the user provides taint-free input. # - local msg="$( printf "$msg_please_enter_subnet_mask" "$interface" )" + local msg + f_sprintf msg "$msg_please_enter_subnet_mask" "$interface" while :; do # # Return error status if: Modified: head/usr.sbin/bsdconfig/networking/share/resolv.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/resolv.subr Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/share/resolv.subr Sat Dec 7 00:31:01 2013 (r259054) @@ -162,20 +162,23 @@ END { ' f_dialog_resolv_conf_update() { + local funcname=f_dialog_resolv_conf_update local hostname="$1" # # Extrapolate the desired domain search parameter for resolv.conf(5) # - local search ndots domain="${hostname#*.}" + local search nfields ndots domain="${hostname#*.}" if [ "$RESOLVER_SEARCH_DOMAINS_ALL" = "1" ]; then - search="" - ndots=$( IFS=.; set -- $domain; echo $(( $# - 1 )) ) + search= + IFS=. f_count_ifs nfields "$domain" + ndots=$(( $nfields - 1 )) while [ $ndots -ge ${RESOLVER_SEARCH_NDOTS:-1} ]; do - search="$search${search:+ }$domain" + search="$search $domain" domain="${domain#*.}" ndots=$(( $ndots - 1 )) done + search="${search# }" domain="${hostname#*.}" else search="$domain" @@ -194,8 +197,9 @@ f_dialog_resolv_conf_update() # Create a new temporary file to write our resolv.conf(5) # update with our new `domain' and `search' directives. # - local tmpfile="$( mktemp -t "$pgm" )" - [ "$tmpfile" ] || return $DIALOG_CANCEL + local tmpfile + f_eval_catch -dk tmpfile $funcname mktemp \ + 'mktemp -t "%s"' "$tmpfile" || return $DIALOG_CANCEL # # Fixup permissions and ownership (mktemp(1) creates the @@ -203,10 +207,16 @@ f_dialog_resolv_conf_update() # permissions and ownership to match resolv.conf(5) before # we write it out and mv(1) it into place). # - local mode="$( stat -f '%#Lp' "$RESOLV_CONF" 2> /dev/null )" - local owner="$( stat -f '%u:%g' "$RESOLV_CONF" 2> /dev/null )" - f_quietly chmod "${mode:-0644}" "$tmpfile" - f_quietly chown "${owner:-root:wheel}" "$tmpfile" + local mode owner + f_eval_catch -dk mode $funcname stat \ + 'stat -f "%%#Lp" "%s"' "$RESOLV_CONF" || mode=0644 + f_eval_catch -dk owner $funcname stat \ + 'stat -f "%%u:%%g" "%s"' "$RESOLV_CONF" || + owner="root:wheel" + f_eval_catch -d $funcname chmod \ + 'chmod "%s" "%s"' "$mode" "$tmpfile" + f_eval_catch -d $funcname chown \ + 'chown "%s" "%s"' "$owner" "$tmpfile" # # Operate on resolv.conf(5), replacing only the last @@ -237,7 +247,8 @@ f_dialog_resolv_conf_update() # echo "$new_contents" | tail -r > "$tmpfile" || return $DIALOG_CANCEL - f_quietly mv "$tmpfile" "$RESOLV_CONF" + f_eval_catch -d $funcname mv \ + 'mv "%s" "%s"' "$tmpfile" "$RESOLV_CONF" fi } @@ -288,6 +299,7 @@ END { if ( ! found ) exit 3 } ' f_dialog_input_nameserver() { + local funcname=f_dialog_input_nameserver local index="${1:-0}" old_ns="$2" new_ns local ns="$old_ns" @@ -344,17 +356,23 @@ f_dialog_input_nameserver() # # Create a new temporary file to write our new resolv.conf(5) # - local tmpfile="$( mktemp -t "$pgm" )" - [ "$tmpfile" ] || return $DIALOG_CANCEL + local tmpfile + f_eval_catch -dk tmpfile $funcname mktemp \ + 'mktemp -t "%s"' "$pgm" || return $DIALOG_CANCEL # # Quietly fixup permissions and ownership # local mode owner - mode=$( stat -f '%#Lp' "$RESOLV_CONF" 2> /dev/null ) - owner=$( stat -f '%u:%g' "$RESOLV_CONF" 2> /dev/null ) - f_quietly chmod "${mode:-0644}" "$tmpfile" - f_quietly chown "${owner:-root:wheel}" "$tmpfile" + f_eval_catch -dk mode $funcname stat \ + 'stat -f "%%#Lp" "%s"' "$RESOLV_CONF" || mode=0644 + f_eval_catch -dk owner $funcname stat \ + 'stat -f "%%u:%%g" "%s"' "$RESOLV_CONF" || + owner="root:wheel" + f_eval_catch -d $funcname chmod \ + 'chmod "%s" "%s"' "$mode" "$tmpfile" + f_eval_catch -d $funcname chown \ + 'chown "%s" "%s"' "$owner" "$tmpfile" # # Operate on resolv.conf(5) @@ -383,7 +401,8 @@ f_dialog_input_nameserver() # file into place. # echo "$new_contents" > "$tmpfile" || return $DIALOG_CANCEL - f_quietly mv "$tmpfile" "$RESOLV_CONF" + f_eval_catch -d $funcname mv \ + 'mv "%s" "%s"' "$tmpfile" "$RESOLV_CONF" fi } @@ -409,7 +428,8 @@ f_dialog_menu_nameservers() # # Re/Build list of nameservers # - local nameservers="$( f_resolv_conf_nameservers )" + local nameservers + f_resolv_conf_nameservers nameservers menu_list=$( index=1 Modified: head/usr.sbin/bsdconfig/networking/share/routing.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/routing.subr Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/share/routing.subr Sat Dec 7 00:31:01 2013 (r259054) @@ -35,6 +35,7 @@ f_include $BSDCFG_SHARE/dialog.subr f_include $BSDCFG_SHARE/media/tcpip.subr f_include $BSDCFG_SHARE/networking/common.subr f_include $BSDCFG_SHARE/networking/ipaddr.subr +f_include $BSDCFG_SHARE/strings.subr f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" @@ -48,6 +49,8 @@ f_include_lang $BSDCFG_LIBE/$APP_DIR/inc # f_dialog_input_defaultrouter() { + local funcname=f_dialog_input_defaultrouter + # # Get the defaultrouter. When this is not configured, the default is # "NO", however we don't ever want to present this default to the user @@ -61,9 +64,7 @@ f_dialog_input_defaultrouter() local defaultrouter="$( f_sysrc_get 'defaultrouter:-NO' )" local defaultrouter_orig="$defaultrouter" # for change-tracking case "$defaultrouter" in - [Nn][Oo]) - defaultrouter=$( f_route_get_default ) - ;; + [Nn][Oo]) f_route_get_default defaultrouter ;; esac # @@ -72,8 +73,9 @@ f_dialog_input_defaultrouter() # mounted, the system will hang. # if f_nfs_mounted && ! f_jailed; then - local setting="$( printf "$msg_current_default_router" \ - "$defaultrouter" )" + local setting + f_sprintf setting "$msg_current_default_router" \ + "$defaultrouter" f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" || return $DIALOG_CANCEL fi @@ -101,27 +103,25 @@ f_dialog_input_defaultrouter() f_dialog_info "$msg_saving_default_router" # Save the default router/gateway - f_sysrc_set defaultrouter "$defaultrouter" + f_eval_catch $funcname f_sysrc_set \ + 'f_sysrc_set defaultrouter "%s"' "$defaultrouter" fi # # Only ask to apply setting if the current defaultrouter is different # than the stored configuration (in rc.conf(5)). # - if [ "$( f_route_get_default )" != "$defaultrouter" ]; then + local dr + f_route_get_default dr + if [ "$dr" != "$defaultrouter" ]; then f_dialog_clear - f_yesno "$msg_activate_default_router" \ - "$( f_route_get_default )" "$defaultrouter" + f_yesno "$msg_activate_default_router" "$dr" "$defaultrouter" if [ $? -eq $DIALOG_OK ]; then - local err - # Apply the default router/gateway - f_quietly route delete default - err=$( route add default "$defaultrouter" 2>&1 ) - if [ $? -ne $SUCCESS ]; then - f_dialog_msgbox "$err" + f_eval_catch -d $funcname route 'route delete default' + f_eval_catch $funcname route \ + 'route add default "%s"' "$defaultrouter" || return $DIALOG_CANCEL - fi fi fi } Modified: head/usr.sbin/bsdconfig/networking/share/services.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/services.subr Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/networking/share/services.subr Sat Dec 7 00:31:01 2013 (r259054) @@ -42,8 +42,9 @@ f_include $BSDCFG_SHARE/sysrc.subr # f_config_pcnfsd() { + local funcname=f_config_pcnfsd f_package_add "pcnfsd" || return $? - f_sysrc_set mountd_flags "-n" + f_eval_catch $funcname f_sysrc_set 'f_sysrc_set mountd_flags -n' return $SUCCESS } Modified: head/usr.sbin/bsdconfig/packages/packages ============================================================================== --- head/usr.sbin/bsdconfig/packages/packages Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/packages/packages Sat Dec 7 00:31:01 2013 (r259054) @@ -45,8 +45,8 @@ f_include $BSDCFG_SHARE/packages/package BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="030.packages" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) -[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/password/password ============================================================================== --- head/usr.sbin/bsdconfig/password/password Sat Dec 7 00:05:45 2013 (r259053) +++ head/usr.sbin/bsdconfig/password/password Sat Dec 7 00:31:01 2013 (r259054) @@ -37,8 +37,8 @@ f_include $BSDCFG_SHARE/password/passwor BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="040.password" -ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 00:33:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3986EA5; Sat, 7 Dec 2013 00:33:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BF52E1176; Sat, 7 Dec 2013 00:33:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB70XA6n001362; Sat, 7 Dec 2013 00:33:10 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB70XAvT001361; Sat, 7 Dec 2013 00:33:10 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201312070033.rB70XAvT001361@svn.freebsd.org> From: Devin Teske Date: Sat, 7 Dec 2013 00:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259055 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 00:33:10 -0000 Author: dteske Date: Sat Dec 7 00:33:10 2013 New Revision: 259055 URL: http://svnweb.freebsd.org/changeset/base/259055 Log: MFC r258927: Fix a regression introduced by SVN r257842 that prevents Encryption from being enabled. Approved by: re (gjb) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/usr.sbin/bsdinstall/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Sat Dec 7 00:31:01 2013 (r259054) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Sat Dec 7 00:33:10 2013 (r259055) @@ -961,7 +961,7 @@ zfs_create_boot() # If encryption is enabled, we need to create the GEOMs # if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then - local bootvdev= + local bootvdev= options= local geli_pool="$BSDINSTALL_CHROOT/$ZFSBOOT_GELI_POOL_NAME" local key="$ZFSBOOT_GELI_KEY_FILE" @@ -978,11 +978,13 @@ zfs_create_boot() f_dprintf "$funcname: %s %s %s" \ "ZFSBOOT_GELI_POOL_NAME=[$ZFSBOOT_GELI_POOL_NAME]" \ "bootvdev=[$bootvdev]" "unenc_list=[$unenc_list]" + options="-o altroot=\"\$BSDINSTALL_CHROOT\"" + options="$options -m \"/\$ZFSBOOT_GELI_POOL_NAME\"" + options="$options -f" f_eval_catch $funcname zpool "$ZPOOL_CREATE_WITH_OPTIONS" \ - "-o altroot=\"\$BSDINSTALL_CHROOT\" - -m \"/\$ZFSBOOT_GELI_POOL_NAME\" -f" \ - \$ZFSBOOT_GELI_POOL_NAME \$bootvdev \ + "$options" \$ZFSBOOT_GELI_POOL_NAME \$bootvdev \ \$unenc_list || return $FAILURE + f_dprintf "$funcname: geli_pool=[%s]" "$geli_pool" f_eval_catch $funcname mkdir "$MKDIR_P" \$geli_pool/boot || return $FAILURE From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 01:35:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B924648; Sat, 7 Dec 2013 01:35:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 58077156A; Sat, 7 Dec 2013 01:35:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB71ZJAM022507; Sat, 7 Dec 2013 01:35:19 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB71ZJbu022506; Sat, 7 Dec 2013 01:35:19 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201312070135.rB71ZJbu022506@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 7 Dec 2013 01:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259056 - head/games/fortune/fortune X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 01:35:19 -0000 Author: marcel Date: Sat Dec 7 01:35:18 2013 New Revision: 259056 URL: http://svnweb.freebsd.org/changeset/base/259056 Log: Fix r203922 for "fortune -o": we free tpath when was_malloc is true but don't define tpath everytime we set was_malloc to true. We end up calling free() multiple times for the same pointer, resulting in: : jemalloc_arena.c:355: Failed assertion: ... When we set path to offensive, we need to set tpath as well. Modified: head/games/fortune/fortune/fortune.c Modified: head/games/fortune/fortune/fortune.c ============================================================================== --- head/games/fortune/fortune/fortune.c Sat Dec 7 00:33:10 2013 (r259055) +++ head/games/fortune/fortune/fortune.c Sat Dec 7 01:35:18 2013 (r259056) @@ -486,7 +486,7 @@ add_file(int percent, const char *file, if (Offend) { if (was_malloc) free(tpath); - path = offensive; + path = tpath = offensive; offensive = NULL; was_malloc = TRUE; DPRINTF(1, (stderr, "\ttrying \"%s\"\n", path)); @@ -508,7 +508,7 @@ over: if (All_forts && offensive != NULL) { if (was_malloc) free(tpath); - path = offensive; + path = tpath = offensive; offensive = NULL; was_malloc = TRUE; DPRINTF(1, (stderr, "\ttrying \"%s\"\n", path)); From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 02:20:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 812085BE; Sat, 7 Dec 2013 02:20:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6EE75181C; Sat, 7 Dec 2013 02:20:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB72KNXC037277; Sat, 7 Dec 2013 02:20:23 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB72KNNk037276; Sat, 7 Dec 2013 02:20:23 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201312070220.rB72KNNk037276@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 7 Dec 2013 02:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259057 - head/games/fortune/fortune X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 02:20:23 -0000 Author: marcel Date: Sat Dec 7 02:20:22 2013 New Revision: 259057 URL: http://svnweb.freebsd.org/changeset/base/259057 Log: Remove "Warning: file \"%s\" unreadable". It was introduced with revision 44599 and turned less than useful ever since fortunes-o.dat got removed. Running "fortunes -a" is enough to always see it for fortunes-o.dat. Since we compile with debugging enabled, the removal is easily compensated for by running "fortune -D -D". Modified: head/games/fortune/fortune/fortune.c Modified: head/games/fortune/fortune/fortune.c ============================================================================== --- head/games/fortune/fortune/fortune.c Sat Dec 7 01:35:18 2013 (r259056) +++ head/games/fortune/fortune/fortune.c Sat Dec 7 02:20:22 2013 (r259057) @@ -806,10 +806,6 @@ is_fortfile(const char *file, char **dat strcat(datfile, ".dat"); if (access(datfile, R_OK) < 0) { DPRINTF(2, (stderr, "FALSE (no readable \".dat\" file)\n")); -#ifdef DEBUG - if (Debug < 2) - DPRINTF(0, (stderr, "Warning: file \"%s\" unreadable\n", datfile)); -#endif free(datfile); return (FALSE); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 06:27:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C93F93E2; Sat, 7 Dec 2013 06:27:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B530E175F; Sat, 7 Dec 2013 06:27: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 rB76Rtra022956; Sat, 7 Dec 2013 06:27:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB76RtGr022954; Sat, 7 Dec 2013 06:27:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312070627.rB76RtGr022954@svn.freebsd.org> From: Xin LI Date: Sat, 7 Dec 2013 06:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259058 - head/usr.bin/bc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 06:27:55 -0000 Author: delphij Date: Sat Dec 7 06:27:54 2013 New Revision: 259058 URL: http://svnweb.freebsd.org/changeset/base/259058 Log: Remove mention of the compatibility option 'q', which is intentionally undocumented and its only purpose is that we do not bail out when used as a drop-in replacement of a different implementation. PR: docs/184550 MFC after: 2 weeks Modified: head/usr.bin/bc/bc.1 head/usr.bin/bc/bc.y Modified: head/usr.bin/bc/bc.1 ============================================================================== --- head/usr.bin/bc/bc.1 Sat Dec 7 02:20:22 2013 (r259057) +++ head/usr.bin/bc/bc.1 Sat Dec 7 06:27:54 2013 (r259058) @@ -43,7 +43,7 @@ .Nd arbitrary-precision arithmetic language and calculator .Sh SYNOPSIS .Nm bc -.Op Fl chlqv +.Op Fl chlv .Op Fl e Ar expression .Op Ar file ... .Sh DESCRIPTION Modified: head/usr.bin/bc/bc.y ============================================================================== --- head/usr.bin/bc/bc.y Sat Dec 7 02:20:22 2013 (r259057) +++ head/usr.bin/bc/bc.y Sat Dec 7 06:27:54 2013 (r259058) @@ -1023,7 +1023,7 @@ static void usage(void) { - fprintf(stderr, "usage: %s [-chlqv] [-e expression] [file ...]\n", + fprintf(stderr, "usage: %s [-chlv] [-e expression] [file ...]\n", __progname); exit(1); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 06:44:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AED915FC for ; Sat, 7 Dec 2013 06:44:50 +0000 (UTC) Received: from mail-qc0-x233.google.com (mail-qc0-x233.google.com [IPv6:2607:f8b0:400d:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 65D361826 for ; Sat, 7 Dec 2013 06:44:50 +0000 (UTC) Received: by mail-qc0-f179.google.com with SMTP id i8so1233663qcq.10 for ; Fri, 06 Dec 2013 22:44:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=P6R33QtdVnZaT9Qntq9+e2qt+BoK3zamBERwjR0qWKk=; b=bstTtXtGagRtSC0spiAYqxTsV9Eeh3AoP5URvrcCyvBUe7IXYfDE8/Vv+J+5i+GD7u 4LQ3B7UUi9QcGfRSE9NlyUnxUtF2oiSK8dzo2qm0hU2d8bwHPyq5Jg672VrKatAqY6na YX2gz4yFNAnPKq0k8xRgzPWjPdBoWxaGqwvLk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=P6R33QtdVnZaT9Qntq9+e2qt+BoK3zamBERwjR0qWKk=; b=hhoJ9/VoKaMGBO5n2i3IUQj7vDmV7tE53VaGvqtseD7E1xDZd+lGYk+Ntv1GXE1mSW z79VjRdciVdiFIToIYXQJC/tJJqccm6nmN1ZqSMcZ65Ya4Kp7Z3M40XLF2/LJ7iiVG4G ZZgHo2uumSbVbvTRNhoQZjedv3H+/DCIdY3DuY5kgCLKZgMDIouC0oH2pXUrEwIsk6qV moGJXQ5q9P4bThpjYdcROyZMrd59u7l2THzpSRgx0iYMBkLnGqYQAfKROjfMuxkzhr+c Hzu3Z//mnUhu/B8jB7rlmGDv5YD5roPp0PvfKVqF81nnrDXS4c7NU4EamwG5ikFZppbI YvpQ== X-Gm-Message-State: ALoCoQlaIVSZ3R59pJN4jZrPGhOXszUZL2jb+qgv7OObIvMkQyJeOvZI20mehlAVHm31RA9o6sE/ X-Received: by 10.224.26.140 with SMTP id e12mr13817701qac.54.1386398689507; Fri, 06 Dec 2013 22:44:49 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.86.42 with HTTP; Fri, 6 Dec 2013 22:44:19 -0800 (PST) In-Reply-To: <201312070627.rB76RtGr022954@svn.freebsd.org> References: <201312070627.rB76RtGr022954@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Dec 2013 01:44:19 -0500 X-Google-Sender-Auth: f9dlpbPQCJjq-7AVbYmGu8qxRt8 Message-ID: Subject: Re: svn commit: r259058 - head/usr.bin/bc To: Xin LI Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 06:44:50 -0000 On Sat, Dec 7, 2013 at 1:27 AM, Xin LI wrote: > Author: delphij > Date: Sat Dec 7 06:27:54 2013 > New Revision: 259058 > URL: http://svnweb.freebsd.org/changeset/base/259058 > > Log: > Remove mention of the compatibility option 'q', which is > intentionally undocumented and its only purpose is that > we do not bail out when used as a drop-in replacement of > a different implementation. As I mentioned in the reply to the PR this change goes in the wrong direction. We should instead document -q as a compatibility option. Undocumented flags, even as NOPS, are bugs. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 06:45:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8D89747; Sat, 7 Dec 2013 06:45:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B8964182F; Sat, 7 Dec 2013 06:45: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 rB76j9tF029263; Sat, 7 Dec 2013 06:45:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB76j9kr029262; Sat, 7 Dec 2013 06:45:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312070645.rB76j9kr029262@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Dec 2013 06:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259059 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 06:45:09 -0000 Author: adrian Date: Sat Dec 7 06:45:09 2013 New Revision: 259059 URL: http://svnweb.freebsd.org/changeset/base/259059 Log: Add some PLCP thresholds from Linux iwlwifi driver in preparation for working on some RF tuning issues. The linux iwlwifi driver has these thresholds which they use to see if there are PLCP errors over a certain interval. If they hit this, they trigger a single-channel (different from active channels!) scan to retune the RF front-end. Modified: head/sys/dev/iwn/if_iwn_chip_cfg.h Modified: head/sys/dev/iwn/if_iwn_chip_cfg.h ============================================================================== --- head/sys/dev/iwn/if_iwn_chip_cfg.h Sat Dec 7 06:27:54 2013 (r259058) +++ head/sys/dev/iwn/if_iwn_chip_cfg.h Sat Dec 7 06:45:09 2013 (r259059) @@ -50,6 +50,14 @@ #define IWN_FLG_NEED_PHY_CALIB_TEMP_OFFSETv2 (1<<7) /* + * Each chip has a different threshold for PLCP errors that should trigger a + * retune. + */ +#define IWN_PLCP_ERR_DEFAULT_THRESHOLD 50 +#define IWN_PLCP_ERR_LONG_THRESHOLD 100 +#define IWN_PLCP_ERR_EXT_LONG_THRESHOLD 200 + +/* * Define some parameters for managing different NIC. * Refer to linux specific file like iwl-xxxx.c to determine correct value * for NIC. @@ -102,6 +110,7 @@ struct iwn_base_params { const bool no_multi_vaps; uint8_t additional_gp_drv_bit; enum bt_mode_enum bt_mode; + uint32_t plcp_err_threshold; }; static const struct iwn_base_params iwn5000_base_params = { @@ -123,6 +132,7 @@ static const struct iwn_base_params iwn5 .no_multi_vaps = true, /* no_multi_vaps */ .additional_gp_drv_bit = IWN_GP_DRIVER_NONE, /* additional_gp_drv_bit */ .bt_mode = IWN_BT_NONE, /* bt_mode */ + .plcp_err_threshold = IWN_PLCP_ERR_LONG_THRESHOLD, }; /* @@ -148,6 +158,7 @@ static const struct iwn_base_params iwn4 .no_multi_vaps = true, /* no_multi_vaps - XXX should work on fixing! */ .additional_gp_drv_bit = IWN_GP_DRIVER_NONE, /* additional_gp_drv_bit */ .bt_mode = IWN_BT_SIMPLE, /* bt_mode */ + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; @@ -171,6 +182,7 @@ static const struct iwn_base_params iwn2 .no_multi_vaps = false, .additional_gp_drv_bit = IWN_GP_DRIVER_REG_BIT_RADIO_IQ_INVERT, .bt_mode = IWN_BT_NONE, + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; static const struct iwn_base_params iwn2030_base_params = { @@ -193,6 +205,7 @@ static const struct iwn_base_params iwn2 .no_multi_vaps = false, .additional_gp_drv_bit = IWN_GP_DRIVER_REG_BIT_RADIO_IQ_INVERT, .bt_mode = IWN_BT_ADVANCED, + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; static const struct iwn_base_params iwn1000_base_params = { @@ -214,6 +227,7 @@ static const struct iwn_base_params iwn1 .no_multi_vaps = true, .additional_gp_drv_bit = IWN_GP_DRIVER_NONE, .bt_mode = IWN_BT_NONE, + .plcp_err_threshold = IWN_PLCP_ERR_EXT_LONG_THRESHOLD, }; static const struct iwn_base_params iwn_6000_base_params = { .pll_cfg_val = 0, @@ -234,6 +248,7 @@ static const struct iwn_base_params iwn_ .no_multi_vaps = true, .additional_gp_drv_bit = IWN_GP_DRIVER_NONE, .bt_mode = IWN_BT_SIMPLE, + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; static const struct iwn_base_params iwn_6000i_base_params = { .pll_cfg_val = 0, @@ -254,6 +269,7 @@ static const struct iwn_base_params iwn_ .no_multi_vaps = true, .additional_gp_drv_bit = IWN_GP_DRIVER_NONE, .bt_mode = IWN_BT_SIMPLE, + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; static const struct iwn_base_params iwn_6000g2_base_params = { .pll_cfg_val = 0, @@ -275,6 +291,7 @@ static const struct iwn_base_params iwn_ .no_multi_vaps = true, .additional_gp_drv_bit = 0, .bt_mode = IWN_BT_SIMPLE, + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; static const struct iwn_base_params iwn_6050_base_params = { @@ -296,6 +313,7 @@ static const struct iwn_base_params iwn_ .no_multi_vaps = true, .additional_gp_drv_bit = IWN_GP_DRIVER_NONE, .bt_mode = IWN_BT_SIMPLE, + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; static const struct iwn_base_params iwn_6150_base_params = { .pll_cfg_val = 0, @@ -315,6 +333,7 @@ static const struct iwn_base_params iwn_ .no_multi_vaps = true, .additional_gp_drv_bit = IWN_GP_DRIVER_6050_1X2, .bt_mode = IWN_BT_SIMPLE, + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; /* IWL_DEVICE_6035 & IWL_DEVICE_6030 */ @@ -338,6 +357,7 @@ static const struct iwn_base_params iwn_ .no_multi_vaps = true, .additional_gp_drv_bit = IWN_GP_DRIVER_NONE, .bt_mode = IWN_BT_ADVANCED, + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; static const struct iwn_base_params iwn_5x50_base_params = { .pll_cfg_val = IWN_ANA_PLL_INIT, @@ -358,6 +378,7 @@ static const struct iwn_base_params iwn_ .no_multi_vaps = true, .additional_gp_drv_bit = IWN_GP_DRIVER_NONE, .bt_mode = IWN_BT_SIMPLE, + .plcp_err_threshold = IWN_PLCP_ERR_LONG_THRESHOLD, }; #endif /* __IF_IWN_CHIP_CFG_H__ */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 07:00:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24C4EA3B for ; Sat, 7 Dec 2013 07:00:16 +0000 (UTC) Received: from mail-qe0-x231.google.com (mail-qe0-x231.google.com [IPv6:2607:f8b0:400d:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CDDF518AB for ; Sat, 7 Dec 2013 07:00:15 +0000 (UTC) Received: by mail-qe0-f49.google.com with SMTP id w7so1260279qeb.8 for ; Fri, 06 Dec 2013 23:00:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=/ciE2OGmOXE98y83zqjH/FZ0DbnzmePMKkzAkCxIDXc=; b=hqG+w/k5WMxoLNoN8cOqv/uQUQcqc8oT/ewCgzaJ5e1uQ/Ex5nuuDhaJtkdl2/3Pzk oEmjMPPhD0u7dg1CZRxPDUQraDOyIYT6CEeVr2xd5nboYThRIbRw2kwfyi/QYOrQ7JVE pmjQ/+N9ybT5aG5KYnuZfYNWgh2qetTEjza1U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=/ciE2OGmOXE98y83zqjH/FZ0DbnzmePMKkzAkCxIDXc=; b=jFZ/7srFTSPrwYMwH/JociVkuQZS8cGsFL7+BXajeALj2fNFrfv9ZvJ/MSEcN92oy5 21bP2xKL9TkeW4JwQP8J510s8JsOo4Hg/Ydvei5dF01ehjd7Y4HKAoG6Ydt0ruhcABPC 0AAml8yzRWfmFq8K3uRkaLW4cY9eM+V9M+1RUEJB+ZVwJ7B3kNibYJuflJLy/SWiGspf J6Coq2xVns7u0shBvHhdfH3hDaYIlnstOpVCD9Yhqu+cPNwY9sum5vnWyR48jGaRn+cq y/6T5V+3P4eOpf3e2YLGLlHAFGuYPQUGYWe0g6kepsF8v9eW3fHw9416pu3OL+2GC4BL 9gvQ== X-Gm-Message-State: ALoCoQnzUwGy6rKFqp58c40HF0VRtng/zBJDEcrP4pRCjn5yVL6abyfc6I5Kf20CXb0iX/CWqAbR X-Received: by 10.49.25.109 with SMTP id b13mr13827265qeg.3.1386399614890; Fri, 06 Dec 2013 23:00:14 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.86.42 with HTTP; Fri, 6 Dec 2013 22:59:44 -0800 (PST) In-Reply-To: <201312052238.rB5McsVN020719@svn.freebsd.org> References: <201312052238.rB5McsVN020719@svn.freebsd.org> From: Eitan Adler Date: Sat, 7 Dec 2013 01:59:44 -0500 X-Google-Sender-Auth: 4sFyFJDHtxgWILi9AiW4c-cJq8s Message-ID: Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken To: Aleksandr Rybalko Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 07:00:16 -0000 On Thu, Dec 5, 2013 at 5:38 PM, Aleksandr Rybalko wrote: > Author: ray > Date: Thu Dec 5 22:38:53 2013 > New Revision: 259016 > URL: http://svnweb.freebsd.org/changeset/base/259016 > > Log: > Merge VT(9) project (a.k.a. newcons). > > Reviewed by: nwhitehorn > MFC_to_10_after: re approval Thanks! I updated soon after this was committed and it works great. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 07:12:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7A2BC64; Sat, 7 Dec 2013 07:12:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C3326192D; Sat, 7 Dec 2013 07:12: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 rB77CbGd039130; Sat, 7 Dec 2013 07:12:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB77CbYo039129; Sat, 7 Dec 2013 07:12:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312070712.rB77CbYo039129@svn.freebsd.org> From: Xin LI Date: Sat, 7 Dec 2013 07:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259060 - head/usr.bin/bc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 07:12:37 -0000 Author: delphij Date: Sat Dec 7 07:12:37 2013 New Revision: 259060 URL: http://svnweb.freebsd.org/changeset/base/259060 Log: Document -q and --quiet as discouraged compatibility option. Suggested by: eadler MFC after: 2 weeks Modified: head/usr.bin/bc/bc.1 Modified: head/usr.bin/bc/bc.1 ============================================================================== --- head/usr.bin/bc/bc.1 Sat Dec 7 06:45:09 2013 (r259059) +++ head/usr.bin/bc/bc.1 Sat Dec 7 07:12:37 2013 (r259060) @@ -35,7 +35,7 @@ .\" .\" @(#)bc.1 6.8 (Berkeley) 8/8/91 .\" -.Dd January 22, 2010 +.Dd December 6, 2013 .Dt BC 1 .Os .Sh NAME @@ -349,6 +349,14 @@ math library, read when the .Fl l option is specified on the command line. .El +.Sh COMPATIBILITY +The +.Fl q +and +.Fl Fl quiet +options are no-ops for compatibility with some other implementations of +.Nm +and their use is discouraged. .Sh SEE ALSO .Xr dc 1 .Pp From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 08:03:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70807366; Sat, 7 Dec 2013 08:03:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4F3AA1B36; Sat, 7 Dec 2013 08:03:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB783B0i055719; Sat, 7 Dec 2013 08:03:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB783AXq055717; Sat, 7 Dec 2013 08:03:10 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312070803.rB783AXq055717@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Dec 2013 08:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259061 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 08:03:11 -0000 Author: adrian Date: Sat Dec 7 08:03:10 2013 New Revision: 259061 URL: http://svnweb.freebsd.org/changeset/base/259061 Log: Begin fleshing out some code to handle tracking PLCP error rates in preparation for the scan based retune logic. The linux iwlwifi driver does a rescan (onto a non-active channel) to force an RF retune when the PLCP error rates exceed a certain threshold. * Add code to track HT PLCP rate errors; * Separate out the PLCP error count fetch and update so the delta can be used when checking for PLCP error rates; * Implement the PLCP error logic from iwlwifi; * For now, just print out whenever the error rate exceeds the threshold. The actual scan based retune will take a bit more effort; the scan command code right now assumes that a scan state is passed in. This does need to change to be more flexible (both for this and in preparation for scanning multiple channels at once.) Tested: * 5100 (STA mode) * 2200 (STA mode) * 2230 (STA mode) Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Dec 7 07:12:37 2013 (r259060) +++ head/sys/dev/iwn/if_iwn.c Sat Dec 7 08:03:10 2013 (r259061) @@ -272,7 +272,10 @@ static int iwn4965_set_gains(struct iwn_ static int iwn5000_set_gains(struct iwn_softc *); static void iwn_tune_sensitivity(struct iwn_softc *, const struct iwn_rx_stats *); +static void iwn_save_stats_counters(struct iwn_softc *, + const struct iwn_stats *); static int iwn_send_sensitivity(struct iwn_softc *); +static void iwn_check_rx_recovery(struct iwn_softc *, struct iwn_stats *); static int iwn_set_pslevel(struct iwn_softc *, int, int, int); static int iwn_send_btcoex(struct iwn_softc *); static int iwn_send_advanced_btcoex(struct iwn_softc *); @@ -3187,13 +3190,39 @@ iwn_rx_statistics(struct iwn_softc *sc, if (calib->state == IWN_CALIB_STATE_ASSOC) iwn_collect_noise(sc, &stats->rx.general); - else if (calib->state == IWN_CALIB_STATE_RUN) + else if (calib->state == IWN_CALIB_STATE_RUN) { iwn_tune_sensitivity(sc, &stats->rx); + /* + * XXX TODO: Only run the RX recovery if we're associated! + */ + iwn_check_rx_recovery(sc, stats); + iwn_save_stats_counters(sc, stats); + } DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n",__func__); } /* + * Save the relevant statistic counters for the next calibration + * pass. + */ +static void +iwn_save_stats_counters(struct iwn_softc *sc, const struct iwn_stats *rs) +{ + struct iwn_calib_state *calib = &sc->calib; + + /* Save counters values for next call. */ + calib->bad_plcp_cck = le32toh(rs->rx.cck.bad_plcp); + calib->fa_cck = le32toh(rs->rx.cck.fa); + calib->bad_plcp_ht = le32toh(rs->rx.ht.bad_plcp); + calib->bad_plcp_ofdm = le32toh(rs->rx.ofdm.bad_plcp); + calib->fa_ofdm = le32toh(rs->rx.ofdm.fa); + + /* Last time we received these tick values */ + sc->last_calib_ticks = ticks; +} + +/* * Process a TX_DONE firmware notification. Unfortunately, the 4965AGN * and 5000 adapters have different incompatible TX status formats. */ @@ -5652,10 +5681,6 @@ iwn_tune_sensitivity(struct iwn_softc *s fa += le32toh(stats->ofdm.fa) - calib->fa_ofdm; fa *= 200 * IEEE80211_DUR_TU; /* 200TU */ - /* Save counters values for next call. */ - calib->bad_plcp_ofdm = le32toh(stats->ofdm.bad_plcp); - calib->fa_ofdm = le32toh(stats->ofdm.fa); - if (fa > 50 * rxena) { /* High false alarm count, decrease sensitivity. */ DPRINTF(sc, IWN_DEBUG_CALIBRATE, @@ -5709,10 +5734,6 @@ iwn_tune_sensitivity(struct iwn_softc *s fa += le32toh(stats->cck.fa) - calib->fa_cck; fa *= 200 * IEEE80211_DUR_TU; /* 200TU */ - /* Save counters values for next call. */ - calib->bad_plcp_cck = le32toh(stats->cck.bad_plcp); - calib->fa_cck = le32toh(stats->cck.fa); - if (fa > 50 * rxena) { /* High false alarm count, decrease sensitivity. */ DPRINTF(sc, IWN_DEBUG_CALIBRATE, @@ -5818,6 +5839,86 @@ send: } /* + * Look at the increase of PLCP errors over time; if it exceeds + * a programmed threshold then trigger an RF retune. + */ +static void +iwn_check_rx_recovery(struct iwn_softc *sc, struct iwn_stats *rs) +{ + int32_t delta_ofdm, delta_ht, delta_cck; + struct iwn_calib_state *calib = &sc->calib; + int delta_ticks, cur_ticks; + int delta_msec; + int thresh; + + /* + * Calculate the difference between the current and + * previous statistics. + */ + delta_cck = le32toh(rs->rx.cck.bad_plcp) - calib->bad_plcp_cck; + delta_ofdm = le32toh(rs->rx.ofdm.bad_plcp) - calib->bad_plcp_ofdm; + delta_ht = le32toh(rs->rx.ht.bad_plcp) - calib->bad_plcp_ht; + + /* + * Calculate the delta in time between successive statistics + * messages. Yes, it can roll over; so we make sure that + * this doesn't happen. + * + * XXX go figure out what to do about rollover + * XXX go figure out what to do if ticks rolls over to -ve instead! + * XXX go stab signed integer overflow undefined-ness in the face. + */ + cur_ticks = ticks; + delta_ticks = cur_ticks - sc->last_calib_ticks; + + /* + * If any are negative, then the firmware likely reset; so just + * bail. We'll pick this up next time. + */ + if (delta_cck < 0 || delta_ofdm < 0 || delta_ht < 0 || delta_ticks < 0) + return; + + /* + * delta_ticks is in ticks; we need to convert it up to milliseconds + * so we can do some useful math with it. + */ + delta_msec = ticks_to_msecs(delta_ticks); + + /* + * Calculate what our threshold is given the current delta_msec. + */ + thresh = sc->base_params->plcp_err_threshold * delta_msec; + + DPRINTF(sc, IWN_DEBUG_STATE, + "%s: time delta: %d; cck=%d, ofdm=%d, ht=%d, total=%d, thresh=%d\n", + __func__, + delta_msec, + delta_cck, + delta_ofdm, + delta_ht, + (delta_msec + delta_cck + delta_ofdm + delta_ht), + thresh); + + /* + * If we need a retune, then schedule a single channel scan + * to a channel that isn't the currently active one! + * + * The math from linux iwlwifi: + * + * if ((delta * 100 / msecs) > threshold) + */ + if (thresh > 0 && (delta_cck + delta_ofdm + delta_ht) * 100 > thresh) { + device_printf(sc->sc_dev, + "%s: PLCP error threshold raw (%d) comparison (%d) " + "over limit (%d); retune!\n", + __func__, + (delta_cck + delta_ofdm + delta_ht), + (delta_cck + delta_ofdm + delta_ht) * 100, + thresh); + } +} + +/* * Set STA mode power saving level (between 0 and 5). * Level 0 is CAM (Continuously Aware Mode), 5 is for maximum power saving. */ @@ -7048,10 +7149,10 @@ iwn5000_query_calibration(struct iwn_sof int error; memset(&cmd, 0, sizeof cmd); - cmd.ucode.once.enable = 0xffffffff; - cmd.ucode.once.start = 0xffffffff; - cmd.ucode.once.send = 0xffffffff; - cmd.ucode.flags = 0xffffffff; + cmd.ucode.once.enable = htole32(0xffffffff); + cmd.ucode.once.start = htole32(0xffffffff); + cmd.ucode.once.send = htole32(0xffffffff); + cmd.ucode.flags = htole32(0xffffffff); DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: sending calibration query\n", __func__); error = iwn_cmd(sc, IWN5000_CMD_CALIB_CONFIG, &cmd, sizeof cmd, 0); @@ -7107,7 +7208,7 @@ iwn5000_send_wimax_coex(struct iwn_softc { struct iwn5000_wimax_coex wimax; -#ifdef notyet +#if 0 if (sc->hw_type == IWN_HW_REV_TYPE_6050) { /* Enable WiMAX coexistence for combo adapters. */ wimax.flags = Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Sat Dec 7 07:12:37 2013 (r259060) +++ head/sys/dev/iwn/if_iwnvar.h Sat Dec 7 08:03:10 2013 (r259061) @@ -163,6 +163,7 @@ struct iwn_calib_state { uint32_t bad_plcp_cck; uint32_t fa_cck; uint32_t low_fa; + uint32_t bad_plcp_ht; uint8_t cck_state; #define IWN_CCK_STATE_INIT 0 #define IWN_CCK_STATE_LOFA 1 @@ -310,9 +311,11 @@ struct iwn_softc { struct task sc_radioon_task; struct task sc_radiooff_task; + /* Calibration information */ struct callout calib_to; int calib_cnt; struct iwn_calib_state calib; + int last_calib_ticks; struct callout watchdog_to; struct callout ct_kill_exit_to; struct iwn_fw_info fw; From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 08:20:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34E0958C; Sat, 7 Dec 2013 08:20:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DA5B1CD2; Sat, 7 Dec 2013 08:20:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB78KOZS062446; Sat, 7 Dec 2013 08:20:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB78KO81062445; Sat, 7 Dec 2013 08:20:24 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312070820.rB78KO81062445@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Dec 2013 08:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259062 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 08:20:25 -0000 Author: adrian Date: Sat Dec 7 08:20:24 2013 New Revision: 259062 URL: http://svnweb.freebsd.org/changeset/base/259062 Log: Refactor out the scan channel to be assigned early on in iwn_scan() rather than it all being a mess of 'c' and 'ic->ic_curchan'. Tested: * Intel 5100 (STA) Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Dec 7 08:03:10 2013 (r259061) +++ head/sys/dev/iwn/if_iwn.c Sat Dec 7 08:20:24 2013 (r259062) @@ -6385,6 +6385,9 @@ iwn_scan(struct iwn_softc *sc) return (EAGAIN); } + /* Assign the scan channel */ + c = ic->ic_curchan; + sc->rxon = &sc->rx_on[IWN_RXON_BSS_CTX]; buf = malloc(IWN_SCAN_MAXSZ, M_DEVBUF, M_NOWAIT | M_ZERO); if (buf == NULL) { @@ -6422,7 +6425,7 @@ iwn_scan(struct iwn_softc *sc) IWN_RXCHAIN_VALID(sc->rxchainmask) | IWN_RXCHAIN_FORCE_MIMO_SEL(sc->rxchainmask) | IWN_RXCHAIN_DRIVER_FORCE; - if (IEEE80211_IS_CHAN_A(ic->ic_curchan) && + if (IEEE80211_IS_CHAN_A(c) && sc->hw_type == IWN_HW_REV_TYPE_4965) { /* Ant A must be avoided in 5GHz because of an HW bug. */ rxchain |= IWN_RXCHAIN_FORCE_SEL(IWN_ANT_B); @@ -6436,7 +6439,7 @@ iwn_scan(struct iwn_softc *sc) tx->id = sc->broadcast_id; tx->lifetime = htole32(IWN_LIFETIME_INFINITE); - if (IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan)) { + if (IEEE80211_IS_CHAN_5GHZ(c)) { /* Send probe requests at 6Mbps. */ tx->rate = htole32(0xd); rs = &ic->ic_sup_rates[IEEE80211_MODE_11A]; @@ -6540,7 +6543,6 @@ iwn_scan(struct iwn_softc *sc) hdr->crc_threshold = is_active ? IWN_GOOD_CRC_TH_DEFAULT : IWN_GOOD_CRC_TH_NEVER; - c = ic->ic_curchan; chan = (struct iwn_scan_chan *)frm; chan->chan = htole16(ieee80211_chan2ieee(ic, c)); chan->flags = 0; From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 08:25:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E92EF702; Sat, 7 Dec 2013 08:25:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BC0411D1B; Sat, 7 Dec 2013 08:25:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB78PO5l063280; Sat, 7 Dec 2013 08:25:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB78POiw063278; Sat, 7 Dec 2013 08:25:24 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312070825.rB78POiw063278@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Dec 2013 08:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259063 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 08:25:25 -0000 Author: adrian Date: Sat Dec 7 08:25:24 2013 New Revision: 259063 URL: http://svnweb.freebsd.org/changeset/base/259063 Log: Add a channel parameter to iwn_scan(). This is in preparation for being able to use iwn_scan() to do an off channel scan to reset the RF tuning. It should be a no-op. Tested: * Intel 5100 (STA) Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Dec 7 08:20:24 2013 (r259062) +++ head/sys/dev/iwn/if_iwn.c Sat Dec 7 08:25:24 2013 (r259063) @@ -282,7 +282,7 @@ static int iwn_send_advanced_btcoex(stru static int iwn5000_runtime_calib(struct iwn_softc *); static int iwn_config(struct iwn_softc *); static uint8_t *ieee80211_add_ssid(uint8_t *, const uint8_t *, u_int); -static int iwn_scan(struct iwn_softc *); +static int iwn_scan(struct iwn_softc *, struct ieee80211_channel *); static int iwn_auth(struct iwn_softc *, struct ieee80211vap *vap); static int iwn_run(struct iwn_softc *, struct ieee80211vap *vap); static int iwn_ampdu_rx_start(struct ieee80211_node *, @@ -6352,7 +6352,7 @@ iwn_get_passive_dwell_time(struct iwn_so } static int -iwn_scan(struct iwn_softc *sc) +iwn_scan(struct iwn_softc *sc, struct ieee80211_channel *c) { struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; @@ -6364,7 +6364,6 @@ iwn_scan(struct iwn_softc *sc) struct iwn_scan_chan *chan; struct ieee80211_frame *wh; struct ieee80211_rateset *rs; - struct ieee80211_channel *c; uint8_t *buf, *frm; uint16_t rxchain; uint8_t txant; @@ -8485,10 +8484,11 @@ iwn_scan_curchan(struct ieee80211_scan_s { struct ieee80211vap *vap = ss->ss_vap; struct iwn_softc *sc = vap->iv_ic->ic_ifp->if_softc; + struct ieee80211com *ic = vap->iv_ic; int error; IWN_LOCK(sc); - error = iwn_scan(sc); + error = iwn_scan(sc, ic->ic_curchan); IWN_UNLOCK(sc); if (error != 0) ieee80211_cancel_scan(vap); From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 08:32:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 111AECD3; Sat, 7 Dec 2013 08:32:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E49DC1E23; Sat, 7 Dec 2013 08:32:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB78WFDF066224; Sat, 7 Dec 2013 08:32:15 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB78WFV7066223; Sat, 7 Dec 2013 08:32:15 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312070832.rB78WFV7066223@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 Dec 2013 08:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259064 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 08:32:16 -0000 Author: adrian Date: Sat Dec 7 08:32:15 2013 New Revision: 259064 URL: http://svnweb.freebsd.org/changeset/base/259064 Log: Refactor out the scan id and scan vap as part of the scan work. Make the scan state optional - we'll obviously need a vap, but we now won't require the scan state. the only thing the scan state is needed for is to check for the list of SSIDs to scan - which we can now just plain ignore by passing in NULL as the scan state pointer. Tested: * Intel 5100 (STA) Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Dec 7 08:25:24 2013 (r259063) +++ head/sys/dev/iwn/if_iwn.c Sat Dec 7 08:32:15 2013 (r259064) @@ -282,7 +282,8 @@ static int iwn_send_advanced_btcoex(stru static int iwn5000_runtime_calib(struct iwn_softc *); static int iwn_config(struct iwn_softc *); static uint8_t *ieee80211_add_ssid(uint8_t *, const uint8_t *, u_int); -static int iwn_scan(struct iwn_softc *, struct ieee80211_channel *); +static int iwn_scan(struct iwn_softc *, struct ieee80211vap *, + struct ieee80211_scan_state *, struct ieee80211_channel *); static int iwn_auth(struct iwn_softc *, struct ieee80211vap *vap); static int iwn_run(struct iwn_softc *, struct ieee80211vap *vap); static int iwn_ampdu_rx_start(struct ieee80211_node *, @@ -6352,12 +6353,12 @@ iwn_get_passive_dwell_time(struct iwn_so } static int -iwn_scan(struct iwn_softc *sc, struct ieee80211_channel *c) +iwn_scan(struct iwn_softc *sc, struct ieee80211vap *vap, + struct ieee80211_scan_state *ss, struct ieee80211_channel *c) { struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211_scan_state *ss = ic->ic_scan; /*XXX*/ - struct ieee80211_node *ni = ss->ss_vap->iv_bss; + struct ieee80211_node *ni = vap->iv_bss; struct iwn_scan_hdr *hdr; struct iwn_cmd_data *tx; struct iwn_scan_essid *essid; @@ -6465,22 +6466,26 @@ iwn_scan(struct iwn_softc *sc, struct ie /* * If we're scanning for a specific SSID, add it to the command. + * + * XXX maybe look at adding support for scanning multiple SSIDs? */ essid = (struct iwn_scan_essid *)(tx + 1); - if (ss->ss_ssid[0].len != 0) { - essid[0].id = IEEE80211_ELEMID_SSID; - essid[0].len = ss->ss_ssid[0].len; - memcpy(essid[0].data, ss->ss_ssid[0].ssid, ss->ss_ssid[0].len); - } + if (ss != NULL) { + if (ss->ss_ssid[0].len != 0) { + essid[0].id = IEEE80211_ELEMID_SSID; + essid[0].len = ss->ss_ssid[0].len; + memcpy(essid[0].data, ss->ss_ssid[0].ssid, ss->ss_ssid[0].len); + } - DPRINTF(sc, IWN_DEBUG_SCAN, "%s: ssid_len=%d, ssid=%*s\n", - __func__, - ss->ss_ssid[0].len, - ss->ss_ssid[0].len, - ss->ss_ssid[0].ssid); + DPRINTF(sc, IWN_DEBUG_SCAN, "%s: ssid_len=%d, ssid=%*s\n", + __func__, + ss->ss_ssid[0].len, + ss->ss_ssid[0].len, + ss->ss_ssid[0].ssid); - if (ss->ss_nssid > 0) - is_active = 1; + if (ss->ss_nssid > 0) + is_active = 1; + } /* * Build a probe request frame. Most of the following code is a @@ -8488,7 +8493,7 @@ iwn_scan_curchan(struct ieee80211_scan_s int error; IWN_LOCK(sc); - error = iwn_scan(sc, ic->ic_curchan); + error = iwn_scan(sc, vap, ss, ic->ic_curchan); IWN_UNLOCK(sc); if (error != 0) ieee80211_cancel_scan(vap); From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 11:27:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 712538D4; Sat, 7 Dec 2013 11:27:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5D4711587; Sat, 7 Dec 2013 11:27: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 rB7BRth3027009; Sat, 7 Dec 2013 11:27:55 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7BRsCx027007; Sat, 7 Dec 2013 11:27:54 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312071127.rB7BRsCx027007@svn.freebsd.org> From: Glen Barber Date: Sat, 7 Dec 2013 11:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r259065 - in releng/10.0: . sys/conf sys/sys X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 11:27:55 -0000 Author: gjb Date: Sat Dec 7 11:27:54 2013 New Revision: 259065 URL: http://svnweb.freebsd.org/changeset/base/259065 Log: - Copy stable/10 (r259064) to releng/10.0 as part of the 10.0-RELEASE cycle. - Update __FreeBSD_version [1] - Set branch name to -RC1 [1] 10.0-CURRENT __FreeBSD_version value ended at '55', so start releng/10.0 at '100' so the branch is started with a value ending in zero. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: releng/10.0/ - copied from r259064, stable/10/ Modified: releng/10.0/sys/conf/newvers.sh releng/10.0/sys/sys/param.h Modified: releng/10.0/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Sat Dec 7 08:32:15 2013 (r259064) +++ releng/10.0/sys/conf/newvers.sh Sat Dec 7 11:27:54 2013 (r259065) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="BETA4" +BRANCH="RC1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.0/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Sat Dec 7 08:32:15 2013 (r259064) +++ releng/10.0/sys/sys/param.h Sat Dec 7 11:27:54 2013 (r259065) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000502 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000100 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 11:33:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9D21BEA; Sat, 7 Dec 2013 11:33:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C683415E5; Sat, 7 Dec 2013 11:33:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7BX7QF029935; Sat, 7 Dec 2013 11:33:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7BX7wd029934; Sat, 7 Dec 2013 11:33:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312071133.rB7BX7wd029934@svn.freebsd.org> From: Glen Barber Date: Sat, 7 Dec 2013 11:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259066 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 11:33:07 -0000 Author: gjb Date: Sat Dec 7 11:33:07 2013 New Revision: 259066 URL: http://svnweb.freebsd.org/changeset/base/259066 Log: Set stable/10 to -PRERELEASE, now that releng/10.0 has been branched. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Sat Dec 7 11:27:54 2013 (r259065) +++ stable/10/sys/conf/newvers.sh Sat Dec 7 11:33:07 2013 (r259066) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="BETA4" +BRANCH="PRERELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 12:57:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00195ADC; Sat, 7 Dec 2013 12:57:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E0C751D08; Sat, 7 Dec 2013 12:57:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7CvcxD057197; Sat, 7 Dec 2013 12:57:38 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7CvcWP057196; Sat, 7 Dec 2013 12:57:38 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312071257.rB7CvcWP057196@svn.freebsd.org> From: Glen Barber Date: Sat, 7 Dec 2013 12:57:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r259067 - releng/10.0/sys/sys X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 12:57:39 -0000 Author: gjb Date: Sat Dec 7 12:57:38 2013 New Revision: 259067 URL: http://svnweb.freebsd.org/changeset/base/259067 Log: When stable/10 was branched from head/, __FreeBSD_version was bumped to 1000500 from 1000055 when it should not have been bumped yet. At the risk of having non-standard '5XX' __FreeBSD_version suffix in a -RELEASE, bump __FreeBSD_version in releng/10.0 from 1000100 to 1000510 to prevent the value from going backwards as part of the stable/10 -> releng/10.0 branch. A commit to bump __FreeBSD_version in stable/10 will follow. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.0/sys/sys/param.h Modified: releng/10.0/sys/sys/param.h ============================================================================== --- releng/10.0/sys/sys/param.h Sat Dec 7 11:33:07 2013 (r259066) +++ releng/10.0/sys/sys/param.h Sat Dec 7 12:57:38 2013 (r259067) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000100 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000510 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 13:03:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B2BAC60; Sat, 7 Dec 2013 13:03:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0D6731D67; Sat, 7 Dec 2013 13:03:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7D3EBu060178; Sat, 7 Dec 2013 13:03:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7D3E9W060177; Sat, 7 Dec 2013 13:03:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312071303.rB7D3E9W060177@svn.freebsd.org> From: Glen Barber Date: Sat, 7 Dec 2013 13:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r259068 - releng/10.0/sys/conf X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 13:03:15 -0000 Author: gjb Date: Sat Dec 7 13:03:14 2013 New Revision: 259068 URL: http://svnweb.freebsd.org/changeset/base/259068 Log: Forced commit to mark the real -RC1 point. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.0/sys/conf/newvers.sh Modified: releng/10.0/sys/conf/newvers.sh ============================================================================== From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 13:06:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DD4FDB0; Sat, 7 Dec 2013 13:06:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 70B081D80; Sat, 7 Dec 2013 13:06:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7D6FP9060662; Sat, 7 Dec 2013 13:06:15 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7D6FxO060661; Sat, 7 Dec 2013 13:06:15 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312071306.rB7D6FxO060661@svn.freebsd.org> From: Glen Barber Date: Sat, 7 Dec 2013 13:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259069 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 13:06:15 -0000 Author: gjb Date: Sat Dec 7 13:06:14 2013 New Revision: 259069 URL: http://svnweb.freebsd.org/changeset/base/259069 Log: Bump __FreeBSD_version to 1000700, to set it higher than what is in releng/10.0 now. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Sat Dec 7 13:03:14 2013 (r259068) +++ stable/10/sys/sys/param.h Sat Dec 7 13:06:14 2013 (r259069) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000502 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000700 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 13:11:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8B9FF83; Sat, 7 Dec 2013 13:11:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A54BB1DC4; Sat, 7 Dec 2013 13:11:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7DBo8X063703; Sat, 7 Dec 2013 13:11:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7DBoJB063702; Sat, 7 Dec 2013 13:11:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312071311.rB7DBoJB063702@svn.freebsd.org> From: Glen Barber Date: Sat, 7 Dec 2013 13:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r259070 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 13:11:50 -0000 Author: gjb Date: Sat Dec 7 13:11:50 2013 New Revision: 259070 URL: http://svnweb.freebsd.org/changeset/base/259070 Log: Require re@ approval for commits to releng/10.0 for the duration of the 10.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Sat Dec 7 13:06:14 2013 (r259069) +++ svnadmin/conf/approvers Sat Dec 7 13:11:50 2013 (r259070) @@ -21,6 +21,7 @@ #^stable/9/ re #^stable/8/ re #^stable/7/ re +^releng/10.0/ re ^releng/9.[0-2]/ (security-officer|so) ^releng/8.[0-4]/ (security-officer|so) ^releng/7.[0-4]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 15:24:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A5137E8; Sat, 7 Dec 2013 15:24:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 067F2144C; Sat, 7 Dec 2013 15:24:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7FOhPF008165; Sat, 7 Dec 2013 15:24:43 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7FOhWn008164; Sat, 7 Dec 2013 15:24:43 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312071524.rB7FOhWn008164@svn.freebsd.org> From: Aleksandr Rybalko Date: Sat, 7 Dec 2013 15:24:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259071 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 15:24:44 -0000 Author: ray Date: Sat Dec 7 15:24:43 2013 New Revision: 259071 URL: http://svnweb.freebsd.org/changeset/base/259071 Log: Include dev/fb/fb_if.m in build always, without it kms modules complain about lack of fb_getinfo_desc symbol. Submitted by: dumbbell Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Dec 7 13:11:50 2013 (r259070) +++ head/sys/conf/files Sat Dec 7 15:24:43 2013 (r259071) @@ -1397,7 +1397,7 @@ dev/ex/if_ex_pccard.c optional ex pccar dev/exca/exca.c optional cbb dev/fatm/if_fatm.c optional fatm pci dev/fb/fbd.c optional fbd | vt -dev/fb/fb_if.m optional fbd | vt +dev/fb/fb_if.m standard dev/fb/splash.c optional splash dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_ic_if.m optional fdt From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 15:31:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D69B4A17; Sat, 7 Dec 2013 15:31:56 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5D19C14CA; Sat, 7 Dec 2013 15:31:56 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rB7FVo4C098175; Sat, 7 Dec 2013 17:31:50 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rB7FVo4C098175 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rB7FVotP098174; Sat, 7 Dec 2013 17:31:50 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 7 Dec 2013 17:31:50 +0200 From: Konstantin Belousov To: Aleksandr Rybalko Subject: Re: svn commit: r259071 - head/sys/conf Message-ID: <20131207153150.GN59496@kib.kiev.ua> References: <201312071524.rB7FOhWn008164@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vJ8TFAha9SGBu4x1" Content-Disposition: inline In-Reply-To: <201312071524.rB7FOhWn008164@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 15:31:57 -0000 --vJ8TFAha9SGBu4x1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 07, 2013 at 03:24:43PM +0000, Aleksandr Rybalko wrote: > Author: ray > Date: Sat Dec 7 15:24:43 2013 > New Revision: 259071 > URL: http://svnweb.freebsd.org/changeset/base/259071 >=20 > Log: > Include dev/fb/fb_if.m in build always, without it kms modules complain= about > lack of fb_getinfo_desc symbol. > =20 > Submitted by: dumbbell > =20 > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/sys/conf/files >=20 > Modified: head/sys/conf/files > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/files Sat Dec 7 13:11:50 2013 (r259070) > +++ head/sys/conf/files Sat Dec 7 15:24:43 2013 (r259071) > @@ -1397,7 +1397,7 @@ dev/ex/if_ex_pccard.c optional ex pccar > dev/exca/exca.c optional cbb > dev/fatm/if_fatm.c optional fatm pci > dev/fb/fbd.c optional fbd | vt > -dev/fb/fb_if.m optional fbd | vt > +dev/fb/fb_if.m standard > dev/fb/splash.c optional splash > dev/fdt/fdt_common.c optional fdt > dev/fdt/fdt_ic_if.m optional fdt As a tangentially related, I noted that logo_freebsd.c is compiled in unconditional. Is it required, can it be made an option ? Also, is it possible to make the mouse cursor an option, same as it was in syscons with SC_NO_CUTPASTE ? --vJ8TFAha9SGBu4x1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSoz9lAAoJEJDCuSvBvK1BvJwQAKnqaHqCByQOj5hAYWPKlnC4 Y30JpgcamTY6JddKcK29Za7Hh04MZGUASy37M7Qq6Bh5YKq7VnmXKS9ZucPchyLe VvxFasvDKlDUrM39Itma0ATP1OuZatitQEPEn+SVKLJ40taCzJWBFy91Tx3W7IUa 2jTh6hjreR47cUhDhXZCtf5QUZWlRwv/GXHtt8epYX54KbBeBMYr7GkRvbcHP6Kf ao7moEdn4h9QmHS4MHtJXW94heWfCd661Xxp6Li8ODVHNBkqkSRHM2dYvY+X/Kr+ Nw2HQCAuvp2+dFRqABTquzNQxTlgBklaUzJwX+0JhleKpCiKY82Qz+Bewvc5kjG8 DLPp+sP3WivdgNNzjerJnpWZQ8Ehl+DrrljjiZ4oeYwfx2aIxoUqPjfm5xAMxgGo nxnzAzUGkHWjOP1Ttx5U19ZQBAO3NKPdM6cBQFlNixDlQK4K9sYaTMlDv87zIMi5 +P6+ic0/zUyvHpeBMLVJ8FE7dLMLoko7eiPUZfmkVpqTnrq0Caat2hW4q37zYLl7 /tRWSj97zFL0FY7+MMvDfhBwfhsXBdgv/0qaU+2oE/7No3fcx8Ln/3b9PbPkLC4i vCeWYqoLvbOkWdYjyMrceJZcT1S2xIFqKiz5+av4BH3QWYpGOwNxiOLj40vP8Pm7 xd9xvGH95pDGwlBA0d2T =hWhp -----END PGP SIGNATURE----- --vJ8TFAha9SGBu4x1-- From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 15:49:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE776CAC; Sat, 7 Dec 2013 15:49:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AADB81587; Sat, 7 Dec 2013 15:49:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7FnGOH015175; Sat, 7 Dec 2013 15:49:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7FnG3i015174; Sat, 7 Dec 2013 15:49:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312071549.rB7FnG3i015174@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 7 Dec 2013 15:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259072 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 15:49:16 -0000 Author: kib Date: Sat Dec 7 15:49:16 2013 New Revision: 259072 URL: http://svnweb.freebsd.org/changeset/base/259072 Log: Cast Elf_Addr to void * to match the free_aligned() argument type. Found by: gcc Sponsored by: The FreeBSD Foundation MFC after: 6 days Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sat Dec 7 15:24:43 2013 (r259071) +++ head/libexec/rtld-elf/rtld.c Sat Dec 7 15:49:16 2013 (r259072) @@ -4369,11 +4369,11 @@ free_tls(void *tls, size_t tcbsize, size tlsstart = tlsend - size; for (i = 0; i < dtvsize; i++) { if (dtv[i + 2] != 0 && (dtv[i + 2] < tlsstart || dtv[i + 2] > tlsend)) { - free_aligned(dtv[i + 2]); + free_aligned((void *)dtv[i + 2]); } } - free_aligned(tlsstart); + free_aligned((void *)tlsstart); free((void*) dtv); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 18:23:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF4113DC; Sat, 7 Dec 2013 18:23:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 90E5C10C7; Sat, 7 Dec 2013 18:23: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 rB7INUts070600; Sat, 7 Dec 2013 18:23:30 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7INUsS070594; Sat, 7 Dec 2013 18:23:30 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312071823.rB7INUsS070594@svn.freebsd.org> From: Peter Wemm Date: Sat, 7 Dec 2013 18:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259073 - in stable/10: . contrib/ipfilter contrib/top share/man/man4 share/mk sys/amd64/include sys/contrib/dev/acpica sys/contrib/ipfilter/netinet sys/dev/fdt sys/x86/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 18:23:30 -0000 Author: peter Date: Sat Dec 7 18:23:29 2013 New Revision: 259073 URL: http://svnweb.freebsd.org/changeset/base/259073 Log: Hoist all the mergeinfo up to the root in preparation for enforcing merges to the root only. All MFC's were rerecorded to the root. Going forward, if an MFC includes mergeinfo, it will need to be made to the root and committed from the root. Merges with --ignore-ancestry or diff | patch can go anywhere. The mergeinfo in HEAD is in a bad state from years of neglect and manual tampering and this was branched into 10.x. This confuses the coalescing code and prevents it from doing its job. Approved by: re (gjb, implicit) Modified: Directory Properties: stable/10/ (props changed) stable/10/MAINTAINERS (props changed) stable/10/Makefile.inc1 (props changed) stable/10/ObsoleteFiles.inc (props changed) stable/10/UPDATING (props changed) stable/10/bin/df/ (props changed) stable/10/bin/freebsd-version/ (props changed) stable/10/cddl/ (props changed) stable/10/cddl/contrib/opensolaris/ (props changed) stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) stable/10/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/10/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/10/contrib/apr/ (props changed) stable/10/contrib/apr-util/ (props changed) stable/10/contrib/atf/ (props changed) stable/10/contrib/binutils/ (props changed) stable/10/contrib/bmake/ (props changed) stable/10/contrib/byacc/ (props changed) stable/10/contrib/bzip2/ (props changed) stable/10/contrib/com_err/ (props changed) stable/10/contrib/compiler-rt/ (props changed) stable/10/contrib/dialog/ (props changed) stable/10/contrib/dtc/ (props changed) stable/10/contrib/ee/ (props changed) stable/10/contrib/expat/ (props changed) stable/10/contrib/file/ (props changed) stable/10/contrib/gcc/ (props changed) stable/10/contrib/gdb/ (props changed) stable/10/contrib/gdtoa/ (props changed) stable/10/contrib/groff/ (props changed) stable/10/contrib/ipfilter/ (props changed) stable/10/contrib/ipfilter/ml_ipl.c (props changed) stable/10/contrib/ipfilter/mlfk_ipl.c (props changed) stable/10/contrib/ipfilter/mlh_rule.c (props changed) stable/10/contrib/ipfilter/mli_ipl.c (props changed) stable/10/contrib/ipfilter/mln_ipl.c (props changed) stable/10/contrib/ipfilter/mls_ipl.c (props changed) stable/10/contrib/ldns/ (props changed) stable/10/contrib/less/ (props changed) stable/10/contrib/libarchive/ (props changed) stable/10/contrib/libarchive/cpio/ (props changed) stable/10/contrib/libarchive/libarchive/ (props changed) stable/10/contrib/libarchive/libarchive_fe/ (props changed) stable/10/contrib/libarchive/tar/ (props changed) stable/10/contrib/libc++/ (props changed) stable/10/contrib/libc-vis/ (props changed) stable/10/contrib/libcxxrt/ (props changed) stable/10/contrib/libexecinfo/ (props changed) stable/10/contrib/libpcap/ (props changed) stable/10/contrib/libstdc++/ (props changed) stable/10/contrib/llvm/ (props changed) stable/10/contrib/llvm/tools/clang/ (props changed) stable/10/contrib/mtree/ (props changed) stable/10/contrib/ncurses/ (props changed) stable/10/contrib/netcat/ (props changed) stable/10/contrib/ntp/ (props changed) stable/10/contrib/nvi/ (props changed) stable/10/contrib/one-true-awk/ (props changed) stable/10/contrib/openbsm/ (props changed) stable/10/contrib/openpam/ (props changed) stable/10/contrib/openresolv/ (props changed) stable/10/contrib/pf/ (props changed) stable/10/contrib/sendmail/ (props changed) stable/10/contrib/serf/ (props changed) stable/10/contrib/smbfs/ (props changed) stable/10/contrib/subversion/ (props changed) stable/10/contrib/tcpdump/ (props changed) stable/10/contrib/tcsh/ (props changed) stable/10/contrib/tnftp/ (props changed) stable/10/contrib/top/ (props changed) stable/10/contrib/top/install-sh (props changed) stable/10/contrib/tzcode/stdtime/ (props changed) stable/10/contrib/tzcode/zic/ (props changed) stable/10/contrib/tzdata/ (props changed) stable/10/contrib/unbound/ (props changed) stable/10/contrib/wpa/ (props changed) stable/10/contrib/xz/ (props changed) stable/10/crypto/heimdal/ (props changed) stable/10/crypto/openssh/ (props changed) stable/10/crypto/openssl/ (props changed) stable/10/etc/ (props changed) stable/10/etc/rc.d/ (props changed) stable/10/gnu/lib/ (props changed) stable/10/gnu/usr.bin/binutils/ (props changed) stable/10/gnu/usr.bin/cc/cc_tools/ (props changed) stable/10/gnu/usr.bin/gdb/ (props changed) stable/10/include/ (props changed) stable/10/lib/ (props changed) stable/10/lib/libc/ (props changed) stable/10/lib/libc/stdtime/ (props changed) stable/10/lib/libc_nonshared/ (props changed) stable/10/lib/libfetch/ (props changed) stable/10/lib/libiconv_modules/ (props changed) stable/10/lib/libsmb/ (props changed) stable/10/lib/libthr/ (props changed) stable/10/lib/libutil/ (props changed) stable/10/lib/libvmmapi/ (props changed) stable/10/lib/libyaml/ (props changed) stable/10/lib/libz/ (props changed) stable/10/release/ (props changed) stable/10/release/doc/ (props changed) stable/10/sbin/ (props changed) stable/10/sbin/camcontrol/ (props changed) stable/10/sbin/dumpon/ (props changed) stable/10/sbin/hastd/ (props changed) stable/10/sbin/ifconfig/ (props changed) stable/10/sbin/ipfw/ (props changed) stable/10/sbin/nvmecontrol/ (props changed) stable/10/share/ (props changed) stable/10/share/examples/bhyve/ (props changed) stable/10/share/i18n/csmapper/JIS/ (props changed) stable/10/share/i18n/esdb/EUC/ (props changed) stable/10/share/man/ (props changed) stable/10/share/man/man4/ (props changed) stable/10/share/man/man4/bhyve.4 (props changed) stable/10/share/man/man5/ (props changed) stable/10/share/man/man7/ (props changed) stable/10/share/man/man8/ (props changed) stable/10/share/misc/ (props changed) stable/10/share/mk/ (props changed) stable/10/share/mk/bsd.arch.inc.mk (props changed) stable/10/share/syscons/ (props changed) stable/10/share/zoneinfo/ (props changed) stable/10/sys/ (props changed) stable/10/sys/amd64/include/vmm.h (props changed) stable/10/sys/amd64/include/vmm_dev.h (props changed) stable/10/sys/amd64/include/vmm_instruction_emul.h (props changed) stable/10/sys/amd64/include/xen/ (props changed) stable/10/sys/amd64/vmm/ (props changed) stable/10/sys/boot/ (props changed) stable/10/sys/boot/i386/efi/ (props changed) stable/10/sys/boot/ia64/efi/ (props changed) stable/10/sys/boot/ia64/ski/ (props changed) stable/10/sys/boot/powerpc/boot1.chrp/ (props changed) stable/10/sys/boot/powerpc/ofw/ (props changed) stable/10/sys/cddl/contrib/opensolaris/ (props changed) stable/10/sys/conf/ (props changed) stable/10/sys/contrib/dev/acpica/ (props changed) stable/10/sys/contrib/dev/acpica/changes.txt (props changed) stable/10/sys/contrib/dev/acpica/common/ (props changed) stable/10/sys/contrib/dev/acpica/compiler/ (props changed) stable/10/sys/contrib/dev/acpica/components/debugger/ (props changed) stable/10/sys/contrib/dev/acpica/components/disassembler/ (props changed) stable/10/sys/contrib/dev/acpica/components/dispatcher/ (props changed) stable/10/sys/contrib/dev/acpica/components/events/ (props changed) stable/10/sys/contrib/dev/acpica/components/executer/ (props changed) stable/10/sys/contrib/dev/acpica/components/hardware/ (props changed) stable/10/sys/contrib/dev/acpica/components/namespace/ (props changed) stable/10/sys/contrib/dev/acpica/components/parser/ (props changed) stable/10/sys/contrib/dev/acpica/components/resources/ (props changed) stable/10/sys/contrib/dev/acpica/components/tables/ (props changed) stable/10/sys/contrib/dev/acpica/components/utilities/ (props changed) stable/10/sys/contrib/dev/acpica/include/ (props changed) stable/10/sys/contrib/dev/acpica/os_specific/ (props changed) stable/10/sys/contrib/ipfilter/ (props changed) stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c (props changed) stable/10/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c (props changed) stable/10/sys/contrib/libfdt/ (props changed) stable/10/sys/contrib/octeon-sdk/ (props changed) stable/10/sys/contrib/x86emu/ (props changed) stable/10/sys/dev/bvm/ (props changed) stable/10/sys/dev/fdt/fdt_ic_if.m (props changed) stable/10/sys/dev/hyperv/ (props changed) stable/10/sys/modules/hyperv/ (props changed) stable/10/sys/modules/vmm/ (props changed) stable/10/sys/x86/include/acpica_machdep.h (props changed) stable/10/tools/ (props changed) stable/10/tools/build/ (props changed) stable/10/tools/build/options/ (props changed) stable/10/tools/tools/atsectl/ (props changed) stable/10/usr.bin/calendar/ (props changed) stable/10/usr.bin/csup/ (props changed) stable/10/usr.bin/iscsictl/ (props changed) stable/10/usr.bin/procstat/ (props changed) stable/10/usr.sbin/ (props changed) stable/10/usr.sbin/bhyve/ (props changed) stable/10/usr.sbin/bhyvectl/ (props changed) stable/10/usr.sbin/bhyveload/ (props changed) stable/10/usr.sbin/bsdconfig/ (props changed) stable/10/usr.sbin/bsdinstall/ (props changed) stable/10/usr.sbin/ctladm/ (props changed) stable/10/usr.sbin/ctld/ (props changed) stable/10/usr.sbin/freebsd-update/ (props changed) stable/10/usr.sbin/jail/ (props changed) stable/10/usr.sbin/mergemaster/ (props changed) stable/10/usr.sbin/mount_smbfs/ (props changed) stable/10/usr.sbin/ndiscvt/ (props changed) stable/10/usr.sbin/pkg/ (props changed) stable/10/usr.sbin/rtadvctl/ (props changed) stable/10/usr.sbin/rtadvd/ (props changed) stable/10/usr.sbin/rtsold/ (props changed) stable/10/usr.sbin/zic/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 18:27:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89EE4626; Sat, 7 Dec 2013 18:27:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 75B9610EF; Sat, 7 Dec 2013 18:27:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7IRMwB071139; Sat, 7 Dec 2013 18:27:22 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7IRMqq071138; Sat, 7 Dec 2013 18:27:22 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312071827.rB7IRMqq071138@svn.freebsd.org> From: Peter Wemm Date: Sat, 7 Dec 2013 18:27:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r259074 - svnadmin/hooks/scripts X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 18:27:22 -0000 Author: peter Date: Sat Dec 7 18:27:21 2013 New Revision: 259074 URL: http://svnweb.freebsd.org/changeset/base/259074 Log: Add initial version of mergeinfo bloat detection script Added: svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl (contents, props changed) Added: svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl Sat Dec 7 18:27:21 2013 (r259074) @@ -0,0 +1,198 @@ +#!/usr/bin/env perl + + +# $FreeBSD$ +# source: http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/check-mime-type.pl +# + +# ==================================================================== +# commit-mime-type-check.pl: check that every added file has the +# svn:mime-type property set and every added file with a mime-type +# matching text/* also has svn:eol-style set. If any file fails this +# test the user is sent a verbose error message suggesting solutions and +# the commit is aborted. +# +# Usage: commit-mime-type-check.pl REPOS TXN-NAME +# ==================================================================== +# Most of commit-mime-type-check.pl was taken from +# commit-access-control.pl, Revision 9986, 2004-06-14 16:29:22 -0400. +# ==================================================================== +# Copyright (c) 2000-2004 CollabNet. All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at http://subversion.tigris.org/license.html. +# If newer versions of this license are posted there, you may use a +# newer version instead, at your option. +# +# This software consists of voluntary contributions made by many +# individuals. For exact contribution history, see the revision +# history and logs, available at http://subversion.tigris.org/. +# ==================================================================== + +require warnings; +import warnings; + +use strict; +use Carp; +use feature qw(switch); # be 5.10 or later, or else! + +###################################################################### +# Configuration section. + +# Svnlook path. +my $svnlook = "/usr/bin/svnlook"; + +# Since the path to svnlook depends upon the local installation +# preferences, check that the required program exists to insure that +# the administrator has set up the script properly. +{ + my $ok = 1; + foreach my $program ($svnlook) { + if (-e $program) { + unless (-x $program) { + warn "$0: required program `$program' is not executable, edit $0.\n"; + $ok = 0; + } + } else { + warn "$0: required program `$program' does not exist, edit $0.\n"; + $ok = 0; + } + } + exit 1 unless $ok; +} + +###################################################################### +# Initial setup/command-line handling. + +&usage unless @ARGV == 2; + +my $repos = shift; +my $txn = shift; + +unless (-e $repos) { + &usage("$0: repository directory `$repos' does not exist."); +} +unless (-d $repos) { + &usage("$0: repository directory `$repos' is not a directory."); +} + + +###################################################################### +# Harvest data using svnlook. + +# Change into /tmp so that svnlook diff can create its .svnlook +# directory. +my $tmp_dir = '/tmp'; +chdir($tmp_dir) + or die "$0: cannot chdir `$tmp_dir': $!\n"; + + +#see rev 257353. We're trying to allow modifications but prevent new stuff. +#Property changes on: stable/10/etc +#___________________________________________________________________ +#Modified: svn:mergeinfo +# +#Property changes on: stable/10/share/man/man7 +#___________________________________________________________________ +#Added: svn:mergeinfo + +my $state = 0; +my $path; +my @errors; +foreach my $line (&read_from_process($svnlook, 'diff', $repos, '-r', $txn)) { + #printf "line: %s, current state %d\n", $line, $state; + if ($state == 0 && $line =~ /^Property changes on: (.*)$/) { + $path = $1; + given ($path) { + when (/stable\/([0-9]+)/) { if ($1 >= 10) { $state = 1; } else { $state = 0; } } + default { $state = 0; } + } + #printf "path: %s, state %d\n", $path, $state; + next; + } + if ($state == 1) { + if ($line =~ /^___________/) { $state = 2; } else { $state = 0; } + #print "state 1 -> 2\n"; + next; + } + if ($state == 2) { + given ($line) { + when (/^Added: svn:mergeinfo/) { + push @errors, "$path : svn:merginfo added at somewhere other than root"; + } + when (/^================/) { $state = 0; } + } + } +} + +# If there are any errors list the problem files and give information +# on how to avoid the problem. Hopefully people will set up auto-props +# and will not see this verbose message more than once. +if (@errors) { + warn "$0:\n\n", join("\n", @errors), "\n\n", <&STDOUT") || die "$0: cannot dup STDOUT: $!\n"; + exec(@_) || die "$0: cannot exec `@_': $!\n"; + } + my @output; + while () { + chomp; + push(@output, $_); + } + close(SAFE_READ); + my $result = $?; + my $exit = $result >> 8; + my $signal = $result & 127; + my $cd = $result & 128 ? "with core dump" : ""; + if ($signal or $cd) { + warn "$0: pipe from `@_' failed $cd: exit=$exit signal=$signal\n"; + } + if (wantarray) { + return ($result, @output); + } else { + return $result; + } +} + +sub read_from_process +{ + unless (@_) { + croak "$0: read_from_process passed no arguments.\n"; + } + my ($status, @output) = &safe_read_from_pipe(@_); + if ($status) { + if (@output) { + die "$0: `@_' failed with this output:\n", join("\n", @output), "\n"; + } else { + die "$0: `@_' failed with no output.\n"; + } + } else { + return @output; + } +} From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 18:46:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B2C8B26; Sat, 7 Dec 2013 18:46:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E194611E2; Sat, 7 Dec 2013 18:46:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7IkP3K077771; Sat, 7 Dec 2013 18:46:25 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7IkPDR077770; Sat, 7 Dec 2013 18:46:25 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312071846.rB7IkPDR077770@svn.freebsd.org> From: Peter Wemm Date: Sat, 7 Dec 2013 18:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r259075 - svnadmin/hooks/scripts X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 18:46:26 -0000 Author: peter Date: Sat Dec 7 18:46:25 2013 New Revision: 259075 URL: http://svnweb.freebsd.org/changeset/base/259075 Log: Add a -t / -r mode so it can be run on either a proto-txn or an existing rev for testing. Update explanation text. Modified: svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl Modified: svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl ============================================================================== --- svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl Sat Dec 7 18:27:21 2013 (r259074) +++ svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl Sat Dec 7 18:46:25 2013 (r259075) @@ -65,9 +65,10 @@ my $svnlook = "/usr/bin/svnlook"; ###################################################################### # Initial setup/command-line handling. -&usage unless @ARGV == 2; +&usage unless @ARGV == 3; my $repos = shift; +my $mode = shift; my $txn = shift; unless (-e $repos) { @@ -100,12 +101,12 @@ chdir($tmp_dir) my $state = 0; my $path; my @errors; -foreach my $line (&read_from_process($svnlook, 'diff', $repos, '-r', $txn)) { +foreach my $line (&read_from_process($svnlook, 'diff', $repos, $mode, $txn)) { #printf "line: %s, current state %d\n", $line, $state; if ($state == 0 && $line =~ /^Property changes on: (.*)$/) { $path = $1; given ($path) { - when (/stable\/([0-9]+)/) { if ($1 >= 10) { $state = 1; } else { $state = 0; } } + when (/stable\/([0-9]+)\//) { if ($1 >= 10) { $state = 1; } else { $state = 0; } } default { $state = 0; } } #printf "path: %s, state %d\n", $path, $state; @@ -119,7 +120,7 @@ foreach my $line (&read_from_process($sv if ($state == 2) { given ($line) { when (/^Added: svn:mergeinfo/) { - push @errors, "$path : svn:merginfo added at somewhere other than root"; + push @errors, "$path : svn:merginfo ADDED"; } when (/^================/) { $state = 0; } } @@ -131,9 +132,16 @@ foreach my $line (&read_from_process($sv # and will not see this verbose message more than once. if (@errors) { warn "$0:\n\n", join("\n", @errors), "\n\n", < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E4C3C6A; Sat, 7 Dec 2013 18:48:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B03411F8; Sat, 7 Dec 2013 18:48: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 rB7ImSOQ078056; Sat, 7 Dec 2013 18:48:28 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7ImSQU078055; Sat, 7 Dec 2013 18:48:28 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312071848.rB7ImSQU078055@svn.freebsd.org> From: Peter Wemm Date: Sat, 7 Dec 2013 18:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r259076 - svnadmin/hooks/scripts X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 18:48:28 -0000 Author: peter Date: Sat Dec 7 18:48:27 2013 New Revision: 259076 URL: http://svnweb.freebsd.org/changeset/base/259076 Log: oops. svn.freebsd.org uses ports svn due to API bindings. Update path. Modified: svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl Modified: svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl ============================================================================== --- svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl Sat Dec 7 18:46:25 2013 (r259075) +++ svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl Sat Dec 7 18:48:27 2013 (r259076) @@ -41,7 +41,7 @@ use feature qw(switch); # be 5.10 or la # Configuration section. # Svnlook path. -my $svnlook = "/usr/bin/svnlook"; +my $svnlook = "/usr/local/bin/svnlook"; # Since the path to svnlook depends upon the local installation # preferences, check that the required program exists to insure that From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 18:53:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FEE9DB7; Sat, 7 Dec 2013 18:53:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C79A1235; Sat, 7 Dec 2013 18: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 rB7Irs5K080766; Sat, 7 Dec 2013 18:53:54 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7Irspf080765; Sat, 7 Dec 2013 18:53:54 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312071853.rB7Irspf080765@svn.freebsd.org> From: Peter Wemm Date: Sat, 7 Dec 2013 18:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r259077 - svnadmin/hooks/scripts X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 18:53:55 -0000 Author: peter Date: Sat Dec 7 18:53:54 2013 New Revision: 259077 URL: http://svnweb.freebsd.org/changeset/base/259077 Log: We set $PATH explicitly for our commit scripts. Don't try to second guess it. Modified: svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl Modified: svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl ============================================================================== --- svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl Sat Dec 7 18:48:27 2013 (r259076) +++ svnadmin/hooks/scripts/detect-mergeinfo-bloat.pl Sat Dec 7 18:53:54 2013 (r259077) @@ -40,28 +40,6 @@ use feature qw(switch); # be 5.10 or la ###################################################################### # Configuration section. -# Svnlook path. -my $svnlook = "/usr/local/bin/svnlook"; - -# Since the path to svnlook depends upon the local installation -# preferences, check that the required program exists to insure that -# the administrator has set up the script properly. -{ - my $ok = 1; - foreach my $program ($svnlook) { - if (-e $program) { - unless (-x $program) { - warn "$0: required program `$program' is not executable, edit $0.\n"; - $ok = 0; - } - } else { - warn "$0: required program `$program' does not exist, edit $0.\n"; - $ok = 0; - } - } - exit 1 unless $ok; -} - ###################################################################### # Initial setup/command-line handling. @@ -101,7 +79,7 @@ chdir($tmp_dir) my $state = 0; my $path; my @errors; -foreach my $line (&read_from_process($svnlook, 'diff', $repos, $mode, $txn)) { +foreach my $line (&read_from_process('svnlook', 'diff', $repos, $mode, $txn)) { #printf "line: %s, current state %d\n", $line, $state; if ($state == 0 && $line =~ /^Property changes on: (.*)$/) { $path = $1; From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 18:55:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21BF6EEB; Sat, 7 Dec 2013 18:55:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0EAAA1240; Sat, 7 Dec 2013 18:55:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7ItrFc081096; Sat, 7 Dec 2013 18:55:53 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7ItrDL081095; Sat, 7 Dec 2013 18:55:53 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312071855.rB7ItrDL081095@svn.freebsd.org> From: Peter Wemm Date: Sat, 7 Dec 2013 18:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r259078 - svnadmin/hooks X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 18:55:54 -0000 Author: peter Date: Sat Dec 7 18:55:53 2013 New Revision: 259078 URL: http://svnweb.freebsd.org/changeset/base/259078 Log: Check for mergeinfo growth on stable/10+. Modified: svnadmin/hooks/pre-commit Modified: svnadmin/hooks/pre-commit ============================================================================== --- svnadmin/hooks/pre-commit Sat Dec 7 18:53:54 2013 (r259077) +++ svnadmin/hooks/pre-commit Sat Dec 7 18:55:53 2013 (r259078) @@ -87,6 +87,9 @@ verify.py "$REPO" -t "$TXN" || exit 1 # check for merge debris detect-merge-conflicts.sh "$REPO" "$TXN" || exit 1 +# stomp on mergeinfo bloat +detect-mergeinfo-bloat.pl "$REPO" -t "$TXN" || exit 1 + # check for upper/lowercase filename conflicts on clients case-insensitive.py "$REPO" "$TXN" || exit 1 @@ -95,16 +98,3 @@ log-police.py -t "$TXN" "$REPO" || exit # Nothing else, go ahead. exit 0 - - -# Make sure that the log message contains some text. -SVNLOOK=/usr/local/bin/svnlook -$SVNLOOK log -t "$TXN" "$REPO" | \ - grep "[a-zA-Z0-9]" > /dev/null || exit 1 - -# Check that the author of this commit has the rights to perform -# the commit on the files and directories being modified. -commit-access-control.pl "$REPO" "$TXN" commit-access-control.cfg || exit 1 - -# All checks passed, so allow the commit. -exit 0 From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 19:39:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A1DC9E4; Sat, 7 Dec 2013 19:39:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 072011482; Sat, 7 Dec 2013 19:39:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7JdcAV095578; Sat, 7 Dec 2013 19:39:38 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7JdcWk095576; Sat, 7 Dec 2013 19:39:38 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312071939.rB7JdcWk095576@svn.freebsd.org> From: Glen Barber Date: Sat, 7 Dec 2013 19:39:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259079 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 19:39:39 -0000 Author: gjb Date: Sat Dec 7 19:39:38 2013 New Revision: 259079 URL: http://svnweb.freebsd.org/changeset/base/259079 Log: Add WITH_DVD to RELEASE_RMAKEFLAGS, otherwise it is not actually passed to 'make release'. MFC after: 3 days X-Before-RC2: yes Sponsored by: The FreeBSD Foundation Modified: head/release/release.conf.sample head/release/release.sh Modified: head/release/release.conf.sample ============================================================================== --- head/release/release.conf.sample Sat Dec 7 18:55:53 2013 (r259078) +++ head/release/release.conf.sample Sat Dec 7 19:39:38 2013 (r259079) @@ -39,3 +39,4 @@ PORTBRANCH="ports/head@rHEAD" #NODOC= #NOPORTS= #RELSTRING= +#WITH_DVD= Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Sat Dec 7 18:55:53 2013 (r259078) +++ head/release/release.sh Sat Dec 7 19:39:38 2013 (r259079) @@ -72,6 +72,9 @@ KERNEL="GENERIC" NODOC= NOPORTS= +# Set to non-empty value to build dvd1.iso as part of the release. +WITH_DVD= + usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -129,7 +132,7 @@ CHROOT_DMAKEFLAGS="${CONF_FILES}" RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \ - ${DOCPORTS}" + ${DOCPORTS} WITH_DVD=${WITH_DVD}" # Force src checkout if configured FORCE_SRC_KEY= From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 19:55:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E610D19; Sat, 7 Dec 2013 19:55:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A77F1587; Sat, 7 Dec 2013 19:55: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 rB7JtZM0001795; Sat, 7 Dec 2013 19:55:35 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7JtYNH001792; Sat, 7 Dec 2013 19:55:34 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201312071955.rB7JtYNH001792@svn.freebsd.org> From: Justin Hibbits Date: Sat, 7 Dec 2013 19:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259080 - in head/sys: dev/iicbus geom/cache geom/journal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 19:55:35 -0000 Author: jhibbits Date: Sat Dec 7 19:55:34 2013 New Revision: 259080 URL: http://svnweb.freebsd.org/changeset/base/259080 Log: Fix some integer signs. These unsigned integers should all be signed. Found by: clang (powerpc64) Modified: head/sys/dev/iicbus/max6690.c head/sys/geom/cache/g_cache.c head/sys/geom/journal/g_journal.c Modified: head/sys/dev/iicbus/max6690.c ============================================================================== --- head/sys/dev/iicbus/max6690.c Sat Dec 7 19:39:38 2013 (r259079) +++ head/sys/dev/iicbus/max6690.c Sat Dec 7 19:55:34 2013 (r259080) @@ -362,7 +362,7 @@ max6690_sensor_sysctl(SYSCTL_HANDLER_ARG struct max6690_softc *sc; struct max6690_sensor *sens; int error; - unsigned int temp; + int temp; dev = arg1; sc = device_get_softc(dev); Modified: head/sys/geom/cache/g_cache.c ============================================================================== --- head/sys/geom/cache/g_cache.c Sat Dec 7 19:39:38 2013 (r259079) +++ head/sys/geom/cache/g_cache.c Sat Dec 7 19:55:34 2013 (r259080) @@ -67,7 +67,7 @@ static u_int g_cache_used_hi = 20; static int sysctl_handle_pct(SYSCTL_HANDLER_ARGS) { - u_int val = *(u_int *)arg1; + int val; int error; error = sysctl_handle_int(oidp, &val, 0, req); Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Sat Dec 7 19:39:38 2013 (r259079) +++ head/sys/geom/journal/g_journal.c Sat Dec 7 19:55:34 2013 (r259080) @@ -168,7 +168,7 @@ SYSCTL_UINT(_kern_geom_journal_cache, OI static int g_journal_cache_switch_sysctl(SYSCTL_HANDLER_ARGS) { - u_int cswitch; + int cswitch; int error; cswitch = g_journal_cache_switch; From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 20:03:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC27F110; Sat, 7 Dec 2013 20:03:46 +0000 (UTC) Received: from mail-pb0-x236.google.com (mail-pb0-x236.google.com [IPv6:2607:f8b0:400e:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E5B41644; Sat, 7 Dec 2013 20:03:46 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id un15so2993459pbc.13 for ; Sat, 07 Dec 2013 12:03:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=lcnet/fRQADW4UwUvlJghMy9j+MyK8mZRzsJtwML8WY=; b=NMKb9wwkCqcfZn+ETAf9mAiRyTTLDMrecwk0EYkKkXzNuMd5755SZVz7BD4L0u6xZo FjXfmXtRihYw/U/G2b0f+RTzIrrsCnlyeFTxof2RUGipZvveTi9uEVLKlsrAdJv/PJvO eLqqBIYet1ULAyb0xTfd2G1Cikig3A3T4eEsAMjjDT+DbS44B4pIcS2I1mjfd8tift03 IRkLmHKCWMyoNbIzJ8Vt770MyvIn4wrejUPUxpn7edYtAvrw+InmWWWbEXqFgpSgN8aU 92NiNdja2fnTzEhnRrz+SrLDMtHYmtkqcNYTbEXUr5DXzvTqKfrjVOXa6RFPZnrMMEex JObg== X-Received: by 10.68.130.10 with SMTP id oa10mr8027931pbb.160.1386446625988; Sat, 07 Dec 2013 12:03:45 -0800 (PST) Received: from zhabar.gateway.2wire.net (76-253-2-5.lightspeed.sntcca.sbcglobal.net. [76.253.2.5]) by mx.google.com with ESMTPSA id ju10sm6424003pbd.33.2013.12.07.12.03.44 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sat, 07 Dec 2013 12:03:45 -0800 (PST) Date: Sat, 7 Dec 2013 12:03:40 -0800 From: Justin Hibbits To: Justin Hibbits Subject: Re: svn commit: r259080 - in head/sys: dev/iicbus geom/cache geom/journal Message-ID: <20131207120340.4d94dd94@zhabar.gateway.2wire.net> In-Reply-To: <201312071955.rB7JtYNH001792@svn.freebsd.org> References: <201312071955.rB7JtYNH001792@svn.freebsd.org> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; powerpc64-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 20:03:46 -0000 On Sat, 7 Dec 2013 19:55:34 +0000 (UTC) Justin Hibbits wrote: > Author: jhibbits > Date: Sat Dec 7 19:55:34 2013 > New Revision: 259080 > URL: http://svnweb.freebsd.org/changeset/base/259080 > > Log: > Fix some integer signs. These unsigned integers should all be > signed. > Found by: clang (powerpc64) > MFC after: 1 week - Justin From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 22:04:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18AB0A55; Sat, 7 Dec 2013 22:04:23 +0000 (UTC) Received: from homiemail-a96.g.dreamhost.com (caiajhbdccac.dreamhost.com [208.97.132.202]) by mx1.freebsd.org (Postfix) with ESMTP id EE4731D61; Sat, 7 Dec 2013 22:04:21 +0000 (UTC) Received: from homiemail-a96.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a96.g.dreamhost.com (Postfix) with ESMTP id 053E03B805B; Sat, 7 Dec 2013 14:04:21 -0800 (PST) Received: from dreadnaught (ip68-100-185-59.dc.dc.cox.net [68.100.185.59]) (Authenticated sender: trhodes@fbsdsecure.org) by homiemail-a96.g.dreamhost.com (Postfix) with ESMTPA id 549C53B8059; Sat, 7 Dec 2013 14:04:20 -0800 (PST) Date: Sat, 7 Dec 2013 17:04:19 -0500 From: Tom Rhodes To: Eitan Adler Subject: Re: svn commit: r259058 - head/usr.bin/bc Message-Id: <20131207170419.124ea16e.trhodes@FreeBSD.org> In-Reply-To: References: <201312070627.rB76RtGr022954@svn.freebsd.org> X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; x86_64-unknown-freebsd9.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, delphij@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 22:04:23 -0000 On Sat, 7 Dec 2013 01:44:19 -0500 Eitan Adler wrote: > On Sat, Dec 7, 2013 at 1:27 AM, Xin LI wrote: > > Author: delphij > > Date: Sat Dec 7 06:27:54 2013 > > New Revision: 259058 > > URL: http://svnweb.freebsd.org/changeset/base/259058 > > > > Log: > > Remove mention of the compatibility option 'q', which is > > intentionally undocumented and its only purpose is that > > we do not bail out when used as a drop-in replacement of > > a different implementation. > > As I mentioned in the reply to the PR this change goes in the wrong direction. > > We should instead document -q as a compatibility option. > Undocumented flags, even as NOPS, are bugs. It should be documented as a do-nothing option. -- Tom Rhodes From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 22:18:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF6FBD77; Sat, 7 Dec 2013 22:18:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AA4891DEF; Sat, 7 Dec 2013 22:18: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 rB7MIb1p051649; Sat, 7 Dec 2013 22:18:37 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7MIasE051639; Sat, 7 Dec 2013 22:18:36 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201312072218.rB7MIasE051639@svn.freebsd.org> From: Neel Natu Date: Sat, 7 Dec 2013 22:18:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259081 - in head: sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/amd64/vmm/io usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 22:18:37 -0000 Author: neel Date: Sat Dec 7 22:18:36 2013 New Revision: 259081 URL: http://svnweb.freebsd.org/changeset/base/259081 Log: If a vcpu disables its local apic and then executes a 'HLT' then spin down the vcpu and destroy its thread context. Also modify the 'HLT' processing to ignore pending interrupts in the IRR if interrupts have been disabled by the guest. The interrupt cannot be injected into the guest in any case so resuming it is futile. With this change "halt" from a Linux guest works correctly. Reviewed by: grehan@ Tested by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com) Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/io/vlapic.c head/sys/amd64/vmm/io/vlapic.h head/sys/amd64/vmm/vmm.c head/usr.sbin/bhyve/bhyverun.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Sat Dec 7 19:55:34 2013 (r259080) +++ head/sys/amd64/include/vmm.h Sat Dec 7 22:18:36 2013 (r259081) @@ -264,6 +264,7 @@ enum vm_exitcode { VM_EXITCODE_PAGING, VM_EXITCODE_INST_EMUL, VM_EXITCODE_SPINUP_AP, + VM_EXITCODE_SPINDOWN_CPU, VM_EXITCODE_MAX }; @@ -307,6 +308,9 @@ struct vm_exit { int vcpu; uint64_t rip; } spinup_ap; + struct { + uint64_t rflags; + } hlt; } u; }; Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sat Dec 7 19:55:34 2013 (r259080) +++ head/sys/amd64/vmm/intel/vmx.c Sat Dec 7 22:18:36 2013 (r259081) @@ -1336,7 +1336,7 @@ vmx_exit_process(struct vmx *vmx, int vc struct vmcs *vmcs; struct vmxctx *vmxctx; uint32_t eax, ecx, edx, idtvec_info, idtvec_err, reason; - uint64_t qual, gpa; + uint64_t qual, gpa, rflags; handled = 0; vmcs = &vmx->vmcs[vcpu]; @@ -1406,7 +1406,10 @@ vmx_exit_process(struct vmx *vmx, int vc break; case EXIT_REASON_HLT: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_HLT, 1); + if ((error = vmread(VMCS_GUEST_RFLAGS, &rflags)) != 0) + panic("vmx_exit_process: vmread(rflags) %d", error); vmexit->exitcode = VM_EXITCODE_HLT; + vmexit->u.hlt.rflags = rflags; break; case EXIT_REASON_MTF: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_MTRAP, 1); Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Sat Dec 7 19:55:34 2013 (r259080) +++ head/sys/amd64/vmm/io/vlapic.c Sat Dec 7 22:18:36 2013 (r259081) @@ -53,6 +53,9 @@ __FBSDID("$FreeBSD$"); #define VLAPIC_CTR1(vlapic, format, p1) \ VCPU_CTR1((vlapic)->vm, (vlapic)->vcpuid, format, p1) +#define VLAPIC_CTR2(vlapic, format, p1, p2) \ + VCPU_CTR2((vlapic)->vm, (vlapic)->vcpuid, format, p1, p2) + #define VLAPIC_CTR_IRR(vlapic, msg) \ do { \ uint32_t *irrptr = &(vlapic)->apic.irr0; \ @@ -221,6 +224,12 @@ vlapic_set_intr_ready(struct vlapic *vla if (vector < 0 || vector >= 256) panic("vlapic_set_intr_ready: invalid vector %d\n", vector); + if (!(lapic->svr & APIC_SVR_ENABLE)) { + VLAPIC_CTR1(vlapic, "vlapic is software disabled, ignoring " + "interrupt %d", vector); + return; + } + idx = (vector / 32) * 4; mask = 1 << (vector % 32); @@ -593,6 +602,25 @@ vlapic_intr_accepted(struct vlapic *vlap vlapic_update_ppr(vlapic); } +static void +lapic_set_svr(struct vlapic *vlapic, uint32_t new) +{ + struct LAPIC *lapic; + uint32_t old, changed; + + lapic = &vlapic->apic; + old = lapic->svr; + changed = old ^ new; + if ((changed & APIC_SVR_ENABLE) != 0) { + if ((new & APIC_SVR_ENABLE) == 0) { + VLAPIC_CTR0(vlapic, "vlapic is software-disabled"); + } else { + VLAPIC_CTR0(vlapic, "vlapic is software-enabled"); + } + } + lapic->svr = new; +} + int vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data) { @@ -602,7 +630,7 @@ vlapic_read(struct vlapic *vlapic, uint6 if (offset > sizeof(*lapic)) { *data = 0; - return 0; + goto done; } offset &= ~3; @@ -680,6 +708,8 @@ vlapic_read(struct vlapic *vlapic, uint6 *data = 0; break; } +done: + VLAPIC_CTR2(vlapic, "vlapic read offset %#x, data %#lx", offset, *data); return 0; } @@ -690,6 +720,8 @@ vlapic_write(struct vlapic *vlapic, uint uint32_t *reg; int retval; + VLAPIC_CTR2(vlapic, "vlapic write offset %#x, data %#lx", offset, data); + if (offset > sizeof(*lapic)) { return 0; } @@ -712,7 +744,7 @@ vlapic_write(struct vlapic *vlapic, uint case APIC_OFFSET_DFR: break; case APIC_OFFSET_SVR: - lapic->svr = data; + lapic_set_svr(vlapic, data); break; case APIC_OFFSET_ICR_LOW: if (!x2apic(vlapic)) { @@ -887,3 +919,15 @@ vlapic_set_x2apic_state(struct vm *vm, i if (state == X2APIC_DISABLED) vlapic->msr_apicbase &= ~APICBASE_X2APIC; } + +bool +vlapic_enabled(struct vlapic *vlapic) +{ + struct LAPIC *lapic = &vlapic->apic; + + if ((vlapic->msr_apicbase & APICBASE_ENABLED) != 0 && + (lapic->svr & APIC_SVR_ENABLE) != 0) + return (true); + else + return (false); +} Modified: head/sys/amd64/vmm/io/vlapic.h ============================================================================== --- head/sys/amd64/vmm/io/vlapic.h Sat Dec 7 19:55:34 2013 (r259080) +++ head/sys/amd64/vmm/io/vlapic.h Sat Dec 7 22:18:36 2013 (r259081) @@ -100,5 +100,6 @@ int vlapic_timer_tick(struct vlapic *vla uint64_t vlapic_get_apicbase(struct vlapic *vlapic); void vlapic_set_apicbase(struct vlapic *vlapic, uint64_t val); void vlapic_set_x2apic_state(struct vm *vm, int vcpuid, enum x2apic_state s); +bool vlapic_enabled(struct vlapic *vlapic); #endif /* _VLAPIC_H_ */ Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Sat Dec 7 19:55:34 2013 (r259080) +++ head/sys/amd64/vmm/vmm.c Sat Dec 7 22:18:36 2013 (r259081) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -859,8 +860,10 @@ vcpu_require_state_locked(struct vcpu *v * Emulate a guest 'hlt' by sleeping until the vcpu is ready to run. */ static int -vm_handle_hlt(struct vm *vm, int vcpuid, boolean_t *retu) +vm_handle_hlt(struct vm *vm, int vcpuid, boolean_t intr_disabled, + boolean_t *retu) { + struct vm_exit *vmexit; struct vcpu *vcpu; int sleepticks, t; @@ -888,12 +891,24 @@ vm_handle_hlt(struct vm *vm, int vcpuid, * These interrupts could have happened any time after we * returned from VMRUN() and before we grabbed the vcpu lock. */ - if (!vm_nmi_pending(vm, vcpuid) && lapic_pending_intr(vm, vcpuid) < 0) { + if (!vm_nmi_pending(vm, vcpuid) && + (intr_disabled || vlapic_pending_intr(vcpu->vlapic) < 0)) { if (sleepticks <= 0) panic("invalid sleepticks %d", sleepticks); t = ticks; vcpu_require_state_locked(vcpu, VCPU_SLEEPING); - msleep_spin(vcpu, &vcpu->mtx, "vmidle", sleepticks); + if (vlapic_enabled(vcpu->vlapic)) { + msleep_spin(vcpu, &vcpu->mtx, "vmidle", sleepticks); + } else { + /* + * Spindown the vcpu if the apic is disabled and it + * had entered the halted state. + */ + *retu = TRUE; + vmexit = vm_exitinfo(vm, vcpuid); + vmexit->exitcode = VM_EXITCODE_SPINDOWN_CPU; + VCPU_CTR0(vm, vcpuid, "spinning down cpu"); + } vcpu_require_state_locked(vcpu, VCPU_FROZEN); vmm_stat_incr(vm, vcpuid, VCPU_IDLE_TICKS, ticks - t); } @@ -1003,7 +1018,7 @@ vm_run(struct vm *vm, struct vm_run *vmr struct pcb *pcb; uint64_t tscval, rip; struct vm_exit *vme; - boolean_t retu; + boolean_t retu, intr_disabled; pmap_t pmap; vcpuid = vmrun->cpuid; @@ -1046,7 +1061,11 @@ restart: retu = FALSE; switch (vme->exitcode) { case VM_EXITCODE_HLT: - error = vm_handle_hlt(vm, vcpuid, &retu); + if ((vme->u.hlt.rflags & PSL_I) == 0) + intr_disabled = TRUE; + else + intr_disabled = FALSE; + error = vm_handle_hlt(vm, vcpuid, intr_disabled, &retu); break; case VM_EXITCODE_PAGING: error = vm_handle_paging(vm, vcpuid, &retu); Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Sat Dec 7 19:55:34 2013 (r259080) +++ head/usr.sbin/bhyve/bhyverun.c Sat Dec 7 22:18:36 2013 (r259081) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -85,8 +86,6 @@ static int pincpu = -1; static int guest_vmexit_on_hlt, guest_vmexit_on_pause, disable_x2apic; static int virtio_msix = 1; -static int foundcpus; - static int strictio; static int acpi; @@ -210,8 +209,7 @@ fbsdrun_addcpu(struct vmctx *ctx, int vc exit(1); } - cpumask |= 1 << vcpu; - foundcpus++; + atomic_set_int(&cpumask, 1 << vcpu); /* * Set up the vmexit struct to allow execution to start @@ -229,6 +227,20 @@ fbsdrun_addcpu(struct vmctx *ctx, int vc } static int +fbsdrun_deletecpu(struct vmctx *ctx, int vcpu) +{ + + if ((cpumask & (1 << vcpu)) == 0) { + fprintf(stderr, "addcpu: attempting to delete unknown cpu %d\n", + vcpu); + exit(1); + } + + atomic_clear_int(&cpumask, 1 << vcpu); + return (cpumask == 0); +} + +static int vmexit_catch_reset(void) { stats.io_reset++; @@ -327,6 +339,17 @@ vmexit_spinup_ap(struct vmctx *ctx, stru } static int +vmexit_spindown_cpu(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu) +{ + int lastcpu; + + lastcpu = fbsdrun_deletecpu(ctx, *pvcpu); + if (!lastcpu) + pthread_exit(NULL); + return (vmexit_catch_reset()); +} + +static int vmexit_vmx(struct vmctx *ctx, struct vm_exit *vmexit, int *pvcpu) { @@ -417,6 +440,7 @@ static vmexit_handler_t handler[VM_EXITC [VM_EXITCODE_MTRAP] = vmexit_mtrap, [VM_EXITCODE_INST_EMUL] = vmexit_inst_emul, [VM_EXITCODE_SPINUP_AP] = vmexit_spinup_ap, + [VM_EXITCODE_SPINDOWN_CPU] = vmexit_spindown_cpu, }; static void From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 22:25:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2517FFB0; Sat, 7 Dec 2013 22:25:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 10DFD1E3C; Sat, 7 Dec 2013 22:25:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7MP7mF054774; Sat, 7 Dec 2013 22:25:07 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7MP7Kv054771; Sat, 7 Dec 2013 22:25:07 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201312072225.rB7MP7Kv054771@svn.freebsd.org> From: Justin Hibbits Date: Sat, 7 Dec 2013 22:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259082 - in head/sys: dev/iicbus powerpc/powermac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 22:25:08 -0000 Author: jhibbits Date: Sat Dec 7 22:25:07 2013 New Revision: 259082 URL: http://svnweb.freebsd.org/changeset/base/259082 Log: Make more unsigned ints signed. Found by: clang (powerpc64) MFC after: 1 week Modified: head/sys/dev/iicbus/ds1631.c head/sys/dev/iicbus/ds1775.c head/sys/powerpc/powermac/platform_powermac.c Modified: head/sys/dev/iicbus/ds1631.c ============================================================================== --- head/sys/dev/iicbus/ds1631.c Sat Dec 7 22:18:36 2013 (r259081) +++ head/sys/dev/iicbus/ds1631.c Sat Dec 7 22:25:07 2013 (r259082) @@ -398,7 +398,7 @@ ds1631_sensor_sysctl(SYSCTL_HANDLER_ARGS device_t dev; struct ds1631_softc *sc; int error; - unsigned int temp; + int temp; dev = arg1; sc = device_get_softc(dev); Modified: head/sys/dev/iicbus/ds1775.c ============================================================================== --- head/sys/dev/iicbus/ds1775.c Sat Dec 7 22:18:36 2013 (r259081) +++ head/sys/dev/iicbus/ds1775.c Sat Dec 7 22:25:07 2013 (r259082) @@ -257,7 +257,7 @@ ds1775_sensor_sysctl(SYSCTL_HANDLER_ARGS device_t dev; struct ds1775_softc *sc; int error; - unsigned int temp; + int temp; dev = arg1; sc = device_get_softc(dev); Modified: head/sys/powerpc/powermac/platform_powermac.c ============================================================================== --- head/sys/powerpc/powermac/platform_powermac.c Sat Dec 7 22:18:36 2013 (r259081) +++ head/sys/powerpc/powermac/platform_powermac.c Sat Dec 7 22:25:07 2013 (r259082) @@ -219,7 +219,8 @@ powermac_timebase_freq(platform_t plat, static int powermac_smp_fill_cpuref(struct cpuref *cpuref, phandle_t cpu) { - cell_t cpuid, res; + cell_t cpuid; + int res; cpuref->cr_hwref = cpu; res = OF_getprop(cpu, "reg", &cpuid, sizeof(cpuid)); From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 22:30:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6925649C; Sat, 7 Dec 2013 22:30:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5602A1E77; Sat, 7 Dec 2013 22:30:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7MU8le055540; Sat, 7 Dec 2013 22:30:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7MU8WK055539; Sat, 7 Dec 2013 22:30:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312072230.rB7MU8WK055539@svn.freebsd.org> From: Dimitry Andric Date: Sat, 7 Dec 2013 22:30:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259083 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 22:30:08 -0000 Author: dim Date: Sat Dec 7 22:30:07 2013 New Revision: 259083 URL: http://svnweb.freebsd.org/changeset/base/259083 Log: For WARNS <= 3, change the clang warning flag -Wno-conversion to -Wno-enum-conversion. In earlier clang versions (before 3.2), the latter did not exist, and suppressing enum conversion warnings was really the goal of this warning suppression flag. This should enable the same kind of warning again as was fixed by r259072 ("incompatible integer to pointer conversion passing 'Elf_Addr' (aka 'unsigned int') to parameter of type 'void *'"), and which was only emitted by gcc. Noticed by: kib MFC after: 3 days Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sat Dec 7 22:25:07 2013 (r259082) +++ head/share/mk/bsd.sys.mk Sat Dec 7 22:30:07 2013 (r259083) @@ -73,7 +73,7 @@ CWARNFLAGS+= -Wno-empty-body -Wno-string .endif # WARNS <= 6 .if ${WARNS} <= 3 CWARNFLAGS+= -Wno-tautological-compare -Wno-unused-value\ - -Wno-parentheses-equality -Wno-unused-function -Wno-conversion + -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion .endif # WARNS <= 3 .if ${WARNS} <= 2 CWARNFLAGS+= -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 23:02:11 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D29A5BBA; Sat, 7 Dec 2013 23:02:11 +0000 (UTC) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 642BE103C; Sat, 7 Dec 2013 23:02:10 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id rB7N1oVP048644; Sun, 8 Dec 2013 00:02:00 +0100 (CET) (envelope-from andreast@FreeBSD.org) Message-ID: <52A3A8DE.9090907@FreeBSD.org> Date: Sun, 08 Dec 2013 00:01:50 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Aleksandr Rybalko , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken References: <201312052238.rB5McsVN020719@svn.freebsd.org> In-Reply-To: <201312052238.rB5McsVN020719@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 23:02:11 -0000 On 05.12.13 23:38, Aleksandr Rybalko wrote: > Author: ray > Date: Thu Dec 5 22:38:53 2013 > New Revision: 259016 > URL: http://svnweb.freebsd.org/changeset/base/259016 > > Log: > Merge VT(9) project (a.k.a. newcons). > > Reviewed by: nwhitehorn > MFC_to_10_after: re approval > > Sponsored by: The FreeBSD Foundation Great! Thanks, gives a new look & feel on the console :) Have it running on amd64/i386 and PowerMac(32/64-bit). The only thing I need to figure is the mapping of the AltGr or in Mac world, the alt key mapping. Iow, the third level mapping of the keys. e.g. the @ here is on altgr-2... Again, thanks! Andreas From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 23:06:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C5D7DFC; Sat, 7 Dec 2013 23:06:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4CB5A105C; Sat, 7 Dec 2013 23:06:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7N611D068973; Sat, 7 Dec 2013 23:06:01 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7N602A068957; Sat, 7 Dec 2013 23:06:00 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201312072306.rB7N602A068957@svn.freebsd.org> From: Rick Macklem Date: Sat, 7 Dec 2013 23:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259084 - in head/sys: fs/nfsclient nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 23:06:01 -0000 Author: rmacklem Date: Sat Dec 7 23:05:59 2013 New Revision: 259084 URL: http://svnweb.freebsd.org/changeset/base/259084 Log: For software builds, the NFS client does many small synchronous (with FILE_SYNC) writes because non-contiguous byte ranges in the same buffer cache block are being written. This patch adds a new mount option "noncontigwr" which allows the non-contiguous byte ranges to be combined, with the dirty byte range becoming the superset of the bytes that are dirty, if the file has not been file locked. This reduces the number of writes significantly for software builds. The only case where this change might break existing applications is where an application is writing non-overlapping byte ranges within the same buffer cache block of a file from multiple clients concurrently. Since such an application would normally do file locking on the file, avoiding the byte range merge for files that have been file locked should be sufficient for most (maybe all?) cases. Submitted by: jhb (earlier version) Reviewed by: kib MFC after: 3 weeks Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsclient/nfsnode.h head/sys/nfsclient/nfsargs.h Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Sat Dec 7 22:30:07 2013 (r259083) +++ head/sys/fs/nfsclient/nfs_clbio.c Sat Dec 7 23:05:59 2013 (r259084) @@ -872,7 +872,7 @@ ncl_write(struct vop_write_args *ap) struct vattr vattr; struct nfsmount *nmp = VFSTONFS(vp->v_mount); daddr_t lbn; - int bcount; + int bcount, noncontig_write, obcount; int bp_cached, n, on, error = 0, error1; size_t orig_resid, local_resid; off_t orig_size, tmp_off; @@ -1035,7 +1035,15 @@ again: * unaligned buffer size. */ mtx_lock(&np->n_mtx); - if (uio->uio_offset == np->n_size && n) { + if ((np->n_flag & NHASBEENLOCKED) == 0 && + (nmp->nm_flag & NFSMNT_NONCONTIGWR) != 0) + noncontig_write = 1; + else + noncontig_write = 0; + if ((uio->uio_offset == np->n_size || + (noncontig_write != 0 && + lbn == (np->n_size / biosize) && + uio->uio_offset + n > np->n_size)) && n) { mtx_unlock(&np->n_mtx); /* * Get the buffer (in its pre-append state to maintain @@ -1043,8 +1051,8 @@ again: * nfsnode after we have locked the buffer to prevent * readers from reading garbage. */ - bcount = on; - bp = nfs_getcacheblk(vp, lbn, bcount, td); + obcount = np->n_size - (lbn * biosize); + bp = nfs_getcacheblk(vp, lbn, obcount, td); if (bp != NULL) { long save; @@ -1056,9 +1064,12 @@ again: mtx_unlock(&np->n_mtx); save = bp->b_flags & B_CACHE; - bcount += n; + bcount = on + n; allocbuf(bp, bcount); bp->b_flags |= save; + if (noncontig_write != 0 && on > obcount) + vfs_bio_bzero_buf(bp, obcount, on - + obcount); } } else { /* @@ -1157,19 +1168,23 @@ again: * area, just update the b_dirtyoff and b_dirtyend, * otherwise force a write rpc of the old dirty area. * + * If there has been a file lock applied to this file + * or vfs.nfs.old_noncontig_writing is set, do the following: * While it is possible to merge discontiguous writes due to * our having a B_CACHE buffer ( and thus valid read data * for the hole), we don't because it could lead to * significant cache coherency problems with multiple clients, * especially if locking is implemented later on. * - * As an optimization we could theoretically maintain - * a linked list of discontinuous areas, but we would still - * have to commit them separately so there isn't much - * advantage to it except perhaps a bit of asynchronization. + * If vfs.nfs.old_noncontig_writing is not set and there has + * not been file locking done on this file: + * Relax coherency a bit for the sake of performance and + * expand the current dirty region to contain the new + * write even if it means we mark some non-dirty data as + * dirty. */ - if (bp->b_dirtyend > 0 && + if (noncontig_write == 0 && bp->b_dirtyend > 0 && (on > bp->b_dirtyend || (on + n) < bp->b_dirtyoff)) { if (bwrite(bp) == EINTR) { error = EINTR; Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sat Dec 7 22:30:07 2013 (r259083) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sat Dec 7 23:05:59 2013 (r259084) @@ -719,7 +719,8 @@ static const char *nfs_opts[] = { "from" "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "resvport", "readahead", "hostname", "timeout", "addr", "fh", "nfsv3", "sec", "principal", "nfsv4", "gssname", "allgssname", "dirpath", "minorversion", - "nametimeo", "negnametimeo", "nocto", "pnfs", "wcommitsize", + "nametimeo", "negnametimeo", "nocto", "noncontigwr", "pnfs", + "wcommitsize", NULL }; /* @@ -840,6 +841,8 @@ nfs_mount(struct mount *mp) args.flags |= NFSMNT_ALLGSSNAME; if (vfs_getopt(mp->mnt_optnew, "nocto", NULL, NULL) == 0) args.flags |= NFSMNT_NOCTO; + if (vfs_getopt(mp->mnt_optnew, "noncontigwr", NULL, NULL) == 0) + args.flags |= NFSMNT_NONCONTIGWR; if (vfs_getopt(mp->mnt_optnew, "pnfs", NULL, NULL) == 0) args.flags |= NFSMNT_PNFS; if (vfs_getopt(mp->mnt_optnew, "readdirsize", (void **)&opt, NULL) == 0) { @@ -1792,6 +1795,8 @@ void nfscl_retopts(struct nfsmount *nmp, &blen); nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NOCTO) != 0, ",nocto", &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NONCONTIGWR) != 0, + ",noncontigwr", &buf, &blen); nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_NOLOCKD | NFSMNT_NFSV4)) == 0, ",lockd", &buf, &blen); nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_NOLOCKD | NFSMNT_NFSV4)) == Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sat Dec 7 22:30:07 2013 (r259083) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sat Dec 7 23:05:59 2013 (r259084) @@ -3078,6 +3078,10 @@ nfs_advlock(struct vop_advlock_args *ap) np->n_change = va.va_filerev; } } + /* Mark that a file lock has been acquired. */ + mtx_lock(&np->n_mtx); + np->n_flag |= NHASBEENLOCKED; + mtx_unlock(&np->n_mtx); } NFSVOPUNLOCK(vp, 0); return (0); @@ -3097,6 +3101,12 @@ nfs_advlock(struct vop_advlock_args *ap) error = ENOLCK; } } + if (error == 0 && ap->a_op == F_SETLK) { + /* Mark that a file lock has been acquired. */ + mtx_lock(&np->n_mtx); + np->n_flag |= NHASBEENLOCKED; + mtx_unlock(&np->n_mtx); + } } return (error); } Modified: head/sys/fs/nfsclient/nfsnode.h ============================================================================== --- head/sys/fs/nfsclient/nfsnode.h Sat Dec 7 22:30:07 2013 (r259083) +++ head/sys/fs/nfsclient/nfsnode.h Sat Dec 7 23:05:59 2013 (r259084) @@ -157,6 +157,7 @@ struct nfsnode { #define NLOCKWANT 0x00010000 /* Want the sleep lock */ #define NNOLAYOUT 0x00020000 /* Can't get a layout for this file */ #define NWRITEOPENED 0x00040000 /* Has been opened for writing */ +#define NHASBEENLOCKED 0x00080000 /* Has been file locked. */ /* * Convert between nfsnode pointers and vnode pointers Modified: head/sys/nfsclient/nfsargs.h ============================================================================== --- head/sys/nfsclient/nfsargs.h Sat Dec 7 22:30:07 2013 (r259083) +++ head/sys/nfsclient/nfsargs.h Sat Dec 7 23:05:59 2013 (r259084) @@ -99,5 +99,6 @@ struct nfs_args { #define NFSMNT_STRICT3530 0x10000000 /* Adhere strictly to RFC3530 */ #define NFSMNT_NOCTO 0x20000000 /* Don't flush attrcache on open */ #define NFSMNT_PNFS 0x40000000 /* Enable pNFS support */ +#define NFSMNT_NONCONTIGWR 0x80000000 /* Enable non-contiguous writes */ #endif From owner-svn-src-all@FreeBSD.ORG Sat Dec 7 23:11:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF4D0FE; Sat, 7 Dec 2013 23:11:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB0E410CB; Sat, 7 Dec 2013 23:11:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7NBDTP072044; Sat, 7 Dec 2013 23:11:13 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7NBCO1072034; Sat, 7 Dec 2013 23:11:12 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201312072311.rB7NBCO1072034@svn.freebsd.org> From: Neel Natu Date: Sat, 7 Dec 2013 23:11:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259085 - in head/sys/amd64/vmm: . intel io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 23:11:14 -0000 Author: neel Date: Sat Dec 7 23:11:12 2013 New Revision: 259085 URL: http://svnweb.freebsd.org/changeset/base/259085 Log: Use callout(9) to drive the vlapic timer instead of clocking it on each VM exit. This decouples the guest's 'hz' from the host's 'hz' setting. For e.g. it is now possible to have a guest run at 'hz=1000' while the host is at 'hz=100'. Discussed with: grehan@ Tested by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com) Modified: head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/io/vlapic.c head/sys/amd64/vmm/io/vlapic.h head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_lapic.c head/sys/amd64/vmm/vmm_lapic.h Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sat Dec 7 23:05:59 2013 (r259084) +++ head/sys/amd64/vmm/intel/vmx.c Sat Dec 7 23:11:12 2013 (r259085) @@ -1563,7 +1563,6 @@ vmx_run(void *arg, int vcpu, register_t panic("vmx_run: error %d setting up pcpu defaults", error); do { - lapic_timer_tick(vmx->vm, vcpu); vmx_inject_interrupts(vmx, vcpu); vmx_run_trace(vmx, vcpu); rc = vmx_setjmp(vmxctx); Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Sat Dec 7 23:05:59 2013 (r259084) +++ head/sys/amd64/vmm/io/vlapic.c Sat Dec 7 23:11:12 2013 (r259085) @@ -30,8 +30,10 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include +#include #include #include @@ -103,12 +105,15 @@ struct vlapic { struct vm *vm; int vcpuid; - struct LAPIC apic; + struct LAPIC apic; int esr_update; - int divisor; - int ccr_ticks; + struct callout callout; /* vlapic timer */ + struct bintime timer_fire_bt; /* callout expiry time */ + struct bintime timer_freq_bt; /* timer frequency */ + struct bintime timer_period_bt; /* timer period */ + struct mtx timer_mtx; /* * The 'isrvec_stk' is a stack of vectors injected by the local apic. @@ -123,6 +128,21 @@ struct vlapic { enum boot_state boot_state; }; +/* + * The 'vlapic->timer_mtx' is used to provide mutual exclusion between the + * vlapic_callout_handler() and vcpu accesses to the following registers: + * - initial count register aka icr_timer + * - current count register aka ccr_timer + * - divide config register aka dcr_timer + * - timer LVT register + * + * Note that the vlapic_callout_handler() does not write to any of these + * registers so they can be safely read from the vcpu context without locking. + */ +#define VLAPIC_TIMER_LOCK(vlapic) mtx_lock(&((vlapic)->timer_mtx)) +#define VLAPIC_TIMER_UNLOCK(vlapic) mtx_unlock(&((vlapic)->timer_mtx)) +#define VLAPIC_TIMER_LOCKED(vlapic) mtx_owned(&((vlapic)->timer_mtx)) + #define VLAPIC_BUS_FREQ tsc_freq static int @@ -170,11 +190,62 @@ vlapic_dump_lvt(uint32_t offset, uint32_ } #endif -static uint64_t +static uint32_t vlapic_get_ccr(struct vlapic *vlapic) { - struct LAPIC *lapic = &vlapic->apic; - return lapic->ccr_timer; + struct bintime bt_now, bt_rem; + struct LAPIC *lapic; + uint32_t ccr; + + ccr = 0; + lapic = &vlapic->apic; + + VLAPIC_TIMER_LOCK(vlapic); + if (callout_active(&vlapic->callout)) { + /* + * If the timer is scheduled to expire in the future then + * compute the value of 'ccr' based on the remaining time. + */ + binuptime(&bt_now); + if (bintime_cmp(&vlapic->timer_fire_bt, &bt_now, >)) { + bt_rem = vlapic->timer_fire_bt; + bintime_sub(&bt_rem, &bt_now); + ccr += bt_rem.sec * BT2FREQ(&vlapic->timer_freq_bt); + ccr += bt_rem.frac / vlapic->timer_freq_bt.frac; + } + } + KASSERT(ccr <= lapic->icr_timer, ("vlapic_get_ccr: invalid ccr %#x, " + "icr_timer is %#x", ccr, lapic->icr_timer)); + VLAPIC_CTR2(vlapic, "vlapic ccr_timer = %#x, icr_timer = %#x", + ccr, lapic->icr_timer); + VLAPIC_TIMER_UNLOCK(vlapic); + return (ccr); +} + +static void +vlapic_set_dcr(struct vlapic *vlapic, uint32_t dcr) +{ + struct LAPIC *lapic; + int divisor; + + lapic = &vlapic->apic; + VLAPIC_TIMER_LOCK(vlapic); + + lapic->dcr_timer = dcr; + divisor = vlapic_timer_divisor(dcr); + VLAPIC_CTR2(vlapic, "vlapic dcr_timer=%#x, divisor=%d", dcr, divisor); + + /* + * Update the timer frequency and the timer period. + * + * XXX changes to the frequency divider will not take effect until + * the timer is reloaded. + */ + FREQ2BT(VLAPIC_BUS_FREQ / divisor, &vlapic->timer_freq_bt); + vlapic->timer_period_bt = vlapic->timer_freq_bt; + bintime_mul(&vlapic->timer_period_bt, lapic->icr_timer); + + VLAPIC_TIMER_UNLOCK(vlapic); } static void @@ -203,7 +274,7 @@ vlapic_reset(struct vlapic *vlapic) memset(lapic, 0, sizeof(*lapic)); lapic->apr = vlapic->vcpuid; vlapic_init_ipi(vlapic); - vlapic->divisor = vlapic_timer_divisor(lapic->dcr_timer); + vlapic_set_dcr(vlapic, 0); if (vlapic->vcpuid == 0) vlapic->boot_state = BS_RUNNING; /* BSP */ @@ -250,30 +321,8 @@ vlapic_set_intr_ready(struct vlapic *vla VLAPIC_CTR_IRR(vlapic, "vlapic_set_intr_ready"); } -static void -vlapic_start_timer(struct vlapic *vlapic, uint32_t elapsed) -{ - uint32_t icr_timer; - - icr_timer = vlapic->apic.icr_timer; - - vlapic->ccr_ticks = ticks; - if (elapsed < icr_timer) - vlapic->apic.ccr_timer = icr_timer - elapsed; - else { - /* - * This can happen when the guest is trying to run its local - * apic timer higher that the setting of 'hz' in the host. - * - * We deal with this by running the guest local apic timer - * at the rate of the host's 'hz' setting. - */ - vlapic->apic.ccr_timer = 0; - } -} - static __inline uint32_t * -vlapic_get_lvt(struct vlapic *vlapic, uint32_t offset) +vlapic_get_lvtptr(struct vlapic *vlapic, uint32_t offset) { struct LAPIC *lapic = &vlapic->apic; int i; @@ -285,6 +334,33 @@ vlapic_get_lvt(struct vlapic *vlapic, ui return ((&lapic->lvt_timer) + i);; } +static __inline uint32_t +vlapic_get_lvt(struct vlapic *vlapic, uint32_t offset) +{ + + return (*vlapic_get_lvtptr(vlapic, offset)); +} + +static void +vlapic_set_lvt(struct vlapic *vlapic, uint32_t offset, uint32_t val) +{ + uint32_t *lvtptr; + struct LAPIC *lapic; + + lapic = &vlapic->apic; + lvtptr = vlapic_get_lvtptr(vlapic, offset); + + if (offset == APIC_OFFSET_TIMER_LVT) + VLAPIC_TIMER_LOCK(vlapic); + + if (!(lapic->svr & APIC_SVR_ENABLE)) + val |= APIC_LVT_M; + *lvtptr = val; + + if (offset == APIC_OFFSET_TIMER_LVT) + VLAPIC_TIMER_UNLOCK(vlapic); +} + #if 1 static void dump_isrvec_stk(struct vlapic *vlapic) @@ -407,15 +483,16 @@ vlapic_process_eoi(struct vlapic *vlapic } static __inline int -vlapic_get_lvt_field(uint32_t *lvt, uint32_t mask) +vlapic_get_lvt_field(uint32_t lvt, uint32_t mask) { - return (*lvt & mask); + + return (lvt & mask); } static __inline int vlapic_periodic_timer(struct vlapic *vlapic) { - uint32_t *lvt; + uint32_t lvt; lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_TIMER_LVT); @@ -428,15 +505,109 @@ static void vlapic_fire_timer(struct vlapic *vlapic) { int vector; - uint32_t *lvt; + uint32_t lvt; + + KASSERT(VLAPIC_TIMER_LOCKED(vlapic), ("vlapic_fire_timer not locked")); lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_TIMER_LVT); if (!vlapic_get_lvt_field(lvt, APIC_LVTT_M)) { vmm_stat_incr(vlapic->vm, vlapic->vcpuid, VLAPIC_INTR_TIMER, 1); - vector = vlapic_get_lvt_field(lvt,APIC_LVTT_VECTOR); + vector = vlapic_get_lvt_field(lvt, APIC_LVTT_VECTOR); vlapic_set_intr_ready(vlapic, vector, false); + vcpu_notify_event(vlapic->vm, vlapic->vcpuid); + } +} + +static void +vlapic_callout_handler(void *arg) +{ + struct vlapic *vlapic; + struct bintime bt, btnow; + sbintime_t rem_sbt; + + vlapic = arg; + + VLAPIC_TIMER_LOCK(vlapic); + if (callout_pending(&vlapic->callout)) /* callout was reset */ + goto done; + + if (!callout_active(&vlapic->callout)) /* callout was stopped */ + goto done; + + callout_deactivate(&vlapic->callout); + + KASSERT(vlapic->apic.icr_timer != 0, ("vlapic timer is disabled")); + + vlapic_fire_timer(vlapic); + + if (vlapic_periodic_timer(vlapic)) { + binuptime(&btnow); + KASSERT(bintime_cmp(&btnow, &vlapic->timer_fire_bt, >=), + ("vlapic callout at %#lx.%#lx, expected at %#lx.#%lx", + btnow.sec, btnow.frac, vlapic->timer_fire_bt.sec, + vlapic->timer_fire_bt.frac)); + + /* + * Compute the delta between when the timer was supposed to + * fire and the present time. + */ + bt = btnow; + bintime_sub(&bt, &vlapic->timer_fire_bt); + + rem_sbt = bttosbt(vlapic->timer_period_bt); + if (bintime_cmp(&bt, &vlapic->timer_period_bt, <)) { + /* + * Adjust the time until the next countdown downward + * to account for the lost time. + */ + rem_sbt -= bttosbt(bt); + } else { + /* + * If the delta is greater than the timer period then + * just reset our time base instead of trying to catch + * up. + */ + vlapic->timer_fire_bt = btnow; + VLAPIC_CTR2(vlapic, "vlapic timer lagging by %lu " + "usecs, period is %lu usecs - resetting time base", + bttosbt(bt) / SBT_1US, + bttosbt(vlapic->timer_period_bt) / SBT_1US); + } + + bintime_add(&vlapic->timer_fire_bt, &vlapic->timer_period_bt); + callout_reset_sbt(&vlapic->callout, rem_sbt, 0, + vlapic_callout_handler, vlapic, 0); } +done: + VLAPIC_TIMER_UNLOCK(vlapic); +} + +static void +vlapic_set_icr_timer(struct vlapic *vlapic, uint32_t icr_timer) +{ + struct LAPIC *lapic; + sbintime_t sbt; + + VLAPIC_TIMER_LOCK(vlapic); + + lapic = &vlapic->apic; + lapic->icr_timer = icr_timer; + + vlapic->timer_period_bt = vlapic->timer_freq_bt; + bintime_mul(&vlapic->timer_period_bt, icr_timer); + + if (icr_timer != 0) { + binuptime(&vlapic->timer_fire_bt); + bintime_add(&vlapic->timer_fire_bt, &vlapic->timer_period_bt); + + sbt = bttosbt(vlapic->timer_period_bt); + callout_reset_sbt(&vlapic->callout, sbt, 0, + vlapic_callout_handler, vlapic, 0); + } else + callout_stop(&vlapic->callout); + + VLAPIC_TIMER_UNLOCK(vlapic); } static VMM_STAT_ARRAY(IPIS_SENT, VM_MAXCPU, "ipis sent to vcpu"); @@ -564,7 +735,6 @@ vlapic_pending_intr(struct vlapic *vlapi break; } } - VLAPIC_CTR0(vlapic, "no pending intr"); return (-1); } @@ -613,9 +783,21 @@ lapic_set_svr(struct vlapic *vlapic, uin changed = old ^ new; if ((changed & APIC_SVR_ENABLE) != 0) { if ((new & APIC_SVR_ENABLE) == 0) { + /* + * The apic is now disabled so stop the apic timer. + */ VLAPIC_CTR0(vlapic, "vlapic is software-disabled"); + VLAPIC_TIMER_LOCK(vlapic); + callout_stop(&vlapic->callout); + VLAPIC_TIMER_UNLOCK(vlapic); } else { + /* + * The apic is now enabled so restart the apic timer + * if it is configured in periodic mode. + */ VLAPIC_CTR0(vlapic, "vlapic is software-enabled"); + if (vlapic_periodic_timer(vlapic)) + vlapic_set_icr_timer(vlapic, lapic->icr_timer); } } lapic->svr = new; @@ -691,8 +873,7 @@ vlapic_read(struct vlapic *vlapic, uint6 *data = lapic->icr_hi; break; case APIC_OFFSET_TIMER_LVT ... APIC_OFFSET_ERROR_LVT: - reg = vlapic_get_lvt(vlapic, offset); - *data = *(reg); + *data = vlapic_get_lvt(vlapic, offset); break; case APIC_OFFSET_ICR: *data = lapic->icr_timer; @@ -717,7 +898,6 @@ int vlapic_write(struct vlapic *vlapic, uint64_t offset, uint64_t data) { struct LAPIC *lapic = &vlapic->apic; - uint32_t *reg; int retval; VLAPIC_CTR2(vlapic, "vlapic write offset %#x, data %#lx", offset, data); @@ -760,21 +940,14 @@ vlapic_write(struct vlapic *vlapic, uint } break; case APIC_OFFSET_TIMER_LVT ... APIC_OFFSET_ERROR_LVT: - reg = vlapic_get_lvt(vlapic, offset); - if (!(lapic->svr & APIC_SVR_ENABLE)) { - data |= APIC_LVT_M; - } - *reg = data; - // vlapic_dump_lvt(offset, reg); + vlapic_set_lvt(vlapic, offset, data); break; case APIC_OFFSET_ICR: - lapic->icr_timer = data; - vlapic_start_timer(vlapic, 0); + vlapic_set_icr_timer(vlapic, data); break; case APIC_OFFSET_DCR: - lapic->dcr_timer = data; - vlapic->divisor = vlapic_timer_divisor(data); + vlapic_set_dcr(vlapic, data); break; case APIC_OFFSET_ESR: @@ -796,70 +969,6 @@ vlapic_write(struct vlapic *vlapic, uint return (retval); } -int -vlapic_timer_tick(struct vlapic *vlapic) -{ - int curticks, delta, periodic, fired; - uint32_t ccr; - uint32_t decrement, leftover; - -restart: - curticks = ticks; - delta = curticks - vlapic->ccr_ticks; - - /* Local APIC timer is disabled */ - if (vlapic->apic.icr_timer == 0) - return (-1); - - /* One-shot mode and timer has already counted down to zero */ - periodic = vlapic_periodic_timer(vlapic); - if (!periodic && vlapic->apic.ccr_timer == 0) - return (-1); - /* - * The 'curticks' and 'ccr_ticks' are out of sync by more than - * 2^31 ticks. We deal with this by restarting the timer. - */ - if (delta < 0) { - vlapic_start_timer(vlapic, 0); - goto restart; - } - - fired = 0; - decrement = (VLAPIC_BUS_FREQ / vlapic->divisor) / hz; - - vlapic->ccr_ticks = curticks; - ccr = vlapic->apic.ccr_timer; - - while (delta-- > 0) { - if (ccr > decrement) { - ccr -= decrement; - continue; - } - - /* Trigger the local apic timer interrupt */ - vlapic_fire_timer(vlapic); - if (periodic) { - leftover = decrement - ccr; - vlapic_start_timer(vlapic, leftover); - ccr = vlapic->apic.ccr_timer; - } else { - /* - * One-shot timer has counted down to zero. - */ - ccr = 0; - } - fired = 1; - break; - } - - vlapic->apic.ccr_timer = ccr; - - if (!fired) - return ((ccr / decrement) + 1); - else - return (0); -} - struct vlapic * vlapic_init(struct vm *vm, int vcpuid) { @@ -869,6 +978,9 @@ vlapic_init(struct vm *vm, int vcpuid) vlapic->vm = vm; vlapic->vcpuid = vcpuid; + mtx_init(&vlapic->timer_mtx, "vlapic timer mtx", NULL, MTX_DEF); + callout_init(&vlapic->callout, 1); + vlapic->msr_apicbase = DEFAULT_APIC_BASE | APICBASE_ENABLED; if (vcpuid == 0) @@ -883,6 +995,7 @@ void vlapic_cleanup(struct vlapic *vlapic) { + callout_drain(&vlapic->callout); free(vlapic, M_VLAPIC); } Modified: head/sys/amd64/vmm/io/vlapic.h ============================================================================== --- head/sys/amd64/vmm/io/vlapic.h Sat Dec 7 23:05:59 2013 (r259084) +++ head/sys/amd64/vmm/io/vlapic.h Sat Dec 7 23:11:12 2013 (r259085) @@ -95,7 +95,6 @@ int vlapic_read(struct vlapic *vlapic, u int vlapic_pending_intr(struct vlapic *vlapic); void vlapic_intr_accepted(struct vlapic *vlapic, int vector); void vlapic_set_intr_ready(struct vlapic *vlapic, int vector, bool level); -int vlapic_timer_tick(struct vlapic *vlapic); uint64_t vlapic_get_apicbase(struct vlapic *vlapic); void vlapic_set_apicbase(struct vlapic *vlapic, uint64_t val); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Sat Dec 7 23:05:59 2013 (r259084) +++ head/sys/amd64/vmm/vmm.c Sat Dec 7 23:11:12 2013 (r259085) @@ -865,26 +865,13 @@ vm_handle_hlt(struct vm *vm, int vcpuid, { struct vm_exit *vmexit; struct vcpu *vcpu; - int sleepticks, t; + int t, timo; vcpu = &vm->vcpu[vcpuid]; vcpu_lock(vcpu); /* - * Figure out the number of host ticks until the next apic - * timer interrupt in the guest. - */ - sleepticks = lapic_timer_tick(vm, vcpuid); - - /* - * If the guest local apic timer is disabled then sleep for - * a long time but not forever. - */ - if (sleepticks < 0) - sleepticks = hz; - - /* * Do a final check for pending NMI or interrupts before * really putting this thread to sleep. * @@ -893,12 +880,15 @@ vm_handle_hlt(struct vm *vm, int vcpuid, */ if (!vm_nmi_pending(vm, vcpuid) && (intr_disabled || vlapic_pending_intr(vcpu->vlapic) < 0)) { - if (sleepticks <= 0) - panic("invalid sleepticks %d", sleepticks); t = ticks; vcpu_require_state_locked(vcpu, VCPU_SLEEPING); if (vlapic_enabled(vcpu->vlapic)) { - msleep_spin(vcpu, &vcpu->mtx, "vmidle", sleepticks); + /* + * XXX msleep_spin() is not interruptible so use the + * 'timo' to put an upper bound on the sleep time. + */ + timo = hz; + msleep_spin(vcpu, &vcpu->mtx, "vmidle", timo); } else { /* * Spindown the vcpu if the apic is disabled and it Modified: head/sys/amd64/vmm/vmm_lapic.c ============================================================================== --- head/sys/amd64/vmm/vmm_lapic.c Sat Dec 7 23:05:59 2013 (r259084) +++ head/sys/amd64/vmm/vmm_lapic.c Sat Dec 7 23:11:12 2013 (r259085) @@ -80,16 +80,6 @@ lapic_set_intr(struct vm *vm, int cpu, i return (0); } -int -lapic_timer_tick(struct vm *vm, int cpu) -{ - struct vlapic *vlapic; - - vlapic = vm_lapic(vm, cpu); - - return (vlapic_timer_tick(vlapic)); -} - static boolean_t x2apic_msr(u_int msr) { Modified: head/sys/amd64/vmm/vmm_lapic.h ============================================================================== --- head/sys/amd64/vmm/vmm_lapic.h Sat Dec 7 23:05:59 2013 (r259084) +++ head/sys/amd64/vmm/vmm_lapic.h Sat Dec 7 23:11:12 2013 (r259085) @@ -40,8 +40,6 @@ int lapic_mmio_read(void *vm, int cpu, u int lapic_mmio_write(void *vm, int cpu, uint64_t gpa, uint64_t wval, int size, void *arg); -int lapic_timer_tick(struct vm *vm, int cpu); - /* * Returns a vector between 32 and 255 if an interrupt is pending in the * IRR that can be delivered based on the current state of ISR and TPR.